Skip to content

Commit f372ab3

Browse files
committed
Update
1 parent a94c392 commit f372ab3

257 files changed

Lines changed: 20992 additions & 4977 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ALICE3/Tasks/alice3-qa-singleparticle.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ struct Alice3SingleParticle {
134134
histos.add("particle/primariesEta", "Particle Eta (primary) " + tit, kTH1D, {axisEta});
135135
histos.add("particle/secondariesEta", "Particle Eta (secondary) " + tit, kTH1D, {axisEta});
136136
histos.add("particle/Y", "Particle Y " + tit, kTH1D, {axisY});
137+
histos.add("particle/primariesY", "Particle Y (primary)" + tit, kTH1D, {axisY});
138+
histos.add("particle/secondariesY", "Particle Y (secondary)" + tit, kTH1D, {axisY});
137139
histos.add("particle/EvsPz", "Particle E vs Pz " + tit, kTH2D, {axisE, axisPz});
138140
histos.add("particle/YvzPz", "Particle Y vs Pz " + tit, kTH2D, {axisY, axisPz});
139141
histos.add("particle/EtavzPz", "Particle Eta vs Pz " + tit, kTH2D, {axisEta, axisPz});
@@ -239,10 +241,12 @@ struct Alice3SingleParticle {
239241
histos.fill(HIST("particle/primariesPt"), mcParticle.pt());
240242
histos.fill(HIST("particle/primariesP"), mcParticle.p());
241243
histos.fill(HIST("particle/primariesEta"), mcParticle.eta());
244+
histos.fill(HIST("particle/primariesY"), mcParticle.y());
242245
} else {
243246
histos.fill(HIST("particle/secondariesPt"), mcParticle.pt());
244247
histos.fill(HIST("particle/secondariesP"), mcParticle.p());
245248
histos.fill(HIST("particle/secondariesEta"), mcParticle.eta());
249+
histos.fill(HIST("particle/secondariesY"), mcParticle.y());
246250
}
247251
histos.fill(HIST("particle/EvsPz"), mcParticle.e(), mcParticle.pz());
248252
histos.fill(HIST("particle/Y"), mcParticle.y());
@@ -411,10 +415,12 @@ struct Alice3SingleParticle {
411415
histos.fill(HIST("particle/primariesPt"), mcParticle.pt());
412416
histos.fill(HIST("particle/primariesP"), mcParticle.p());
413417
histos.fill(HIST("particle/primariesEta"), mcParticle.eta());
418+
histos.fill(HIST("particle/primariesY"), mcParticle.y());
414419
} else {
415420
histos.fill(HIST("particle/secondariesPt"), mcParticle.pt());
416421
histos.fill(HIST("particle/secondariesP"), mcParticle.p());
417422
histos.fill(HIST("particle/secondariesEta"), mcParticle.eta());
423+
histos.fill(HIST("particle/secondariesY"), mcParticle.y());
418424
}
419425
histos.fill(HIST("particle/EvsPz"), mcParticle.e(), mcParticle.pz());
420426
histos.fill(HIST("particle/Y"), mcParticle.y());
@@ -528,10 +534,12 @@ struct Alice3SingleParticle {
528534
histos.fill(HIST("particle/primariesPt"), mcParticle.pt());
529535
histos.fill(HIST("particle/primariesP"), mcParticle.p());
530536
histos.fill(HIST("particle/primariesEta"), mcParticle.eta());
537+
histos.fill(HIST("particle/primariesY"), mcParticle.y());
531538
} else {
532539
histos.fill(HIST("particle/secondariesPt"), mcParticle.pt());
533540
histos.fill(HIST("particle/secondariesP"), mcParticle.p());
534541
histos.fill(HIST("particle/secondariesEta"), mcParticle.eta());
542+
histos.fill(HIST("particle/secondariesY"), mcParticle.y());
535543
}
536544
histos.fill(HIST("particle/EvsPz"), mcParticle.e(), mcParticle.pz());
537545
histos.fill(HIST("particle/Y"), mcParticle.y());

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ project(O2Physics
1616
LANGUAGES C CXX
1717
DESCRIPTION "Physics Analysis for O2")
1818

19+
cmake_policy(SET CMP0144 NEW)
20+
1921
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
2022
set_property(GLOBAL PROPERTY REPORT_UNDEFINED_PROPERTIES)
2123

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/PWGEM @alibuild @mikesas @rbailhac @feisenhu
3737
/PWGEM/Dilepton @alibuild @mikesas @rbailhac @dsekihat @ivorobye @feisenhu
3838
/PWGEM/PhotonMeson @alibuild @mikesas @rbailhac @m-c-danisch @novitzky @mhemmer-cern @dsekihat
39-
/PWGHF @alibuild @vkucera @fcolamar @fgrosa @fcatalan92 @mfaggin @mmazzilli @deepathoms @nzardosh @NicoleBastid @hahassan7
39+
/PWGHF @alibuild @vkucera @fcolamar @fgrosa @fcatalan92 @mfaggin @mmazzilli @deepathoms @nzardosh @NicoleBastid @hahassan7 @jpxrk
4040
/PWGLF @alibuild @ercolessi @fmazzasc @chiarapinto @BongHwi @smaff92 @mbombara @ChiaraDeMartin95 @njacazio @skundu692
4141
/PWGMM @alibuild @aalkin
4242
/PWGMM/Lumi @alibuild @aalkin

Common/CCDB/ctpRateFetcher.cxx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ double ctpRateFetcher::fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStam
3232
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "C1ZNC-B-NOPF-CRU", 6) / (sourceName.find("hadronic") != std::string::npos ? 28. : 1.);
3333
}
3434
} else if (sourceName == "T0CE") {
35-
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVXTCE-B-NOPF-CRU");
35+
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVXTCE-B-NOPF");
3636
} else if (sourceName == "T0SC") {
37-
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVXTSC-B-NOPF-CRU");
37+
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVXTSC-B-NOPF");
3838
} else if (sourceName == "T0VTX") {
3939
if (runNumber < 534202) {
40-
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "minbias_TVX_L0"); // 2022
40+
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "minbias_TVX_L0", 3); // 2022
4141
} else {
4242
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVX-B-NOPF");
4343
}
@@ -52,17 +52,15 @@ double ctpRateFetcher::fetchCTPratesClasses(o2::ccdb::BasicCCDBManager* /*ccdb*/
5252
std::vector<int> clslist = mConfig->getTriggerClassList();
5353
int classIndex = -1;
5454
for (size_t i = 0; i < clslist.size(); i++) {
55-
if (ctpcls[i].name == className) {
55+
if (ctpcls[i].name.find(className) != std::string::npos) {
5656
classIndex = i;
5757
break;
5858
}
5959
}
6060
if (classIndex == -1) {
6161
LOG(fatal) << "Trigger class " << className << " not found in CTPConfiguration";
6262
}
63-
6463
auto rate{mScalers->getRateGivenT(timeStamp * 1.e-3, classIndex, inputType)};
65-
6664
return pileUpCorrection(rate.second);
6765
}
6866

@@ -79,6 +77,9 @@ double ctpRateFetcher::fetchCTPratesInputs(o2::ccdb::BasicCCDBManager* /*ccdb*/,
7977

8078
double ctpRateFetcher::pileUpCorrection(double triggerRate)
8179
{
80+
if (mLHCIFdata == nullptr) {
81+
LOG(fatal) << "No filling" << std::endl;
82+
}
8283
auto bfilling = mLHCIFdata->getBunchFilling();
8384
std::vector<int> bcs = bfilling.getFilledBCs();
8485
double nbc = bcs.size();

Common/CCDB/macros/ctpRateF.C

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ struct ctpRateFetcher {
3737

3838
double ctpRateFetcher::pileUpCorrection(double triggerRate)
3939
{
40+
if (mLHCIFdata == nullptr) {
41+
LOG(fatal) << "No filling" << std::endl;
42+
}
4043
auto bfilling = mLHCIFdata->getBunchFilling();
4144
std::vector<int> bcs = bfilling.getFilledBCs();
4245
double nbc = bcs.size();
@@ -97,22 +100,20 @@ double ctpRateFetcher::fetchCTPratesClasses(o2::ccdb::BasicCCDBManager* ccdb, ui
97100
{
98101
getCTPscalers(ccdb, timeStamp, runNumber);
99102
getCTPconfig(ccdb, timeStamp, runNumber);
100-
101103
std::vector<o2::ctp::CTPClass> ctpcls = mConfig->getCTPClasses();
102104
std::vector<int> clslist = mConfig->getTriggerClassList();
103105
int classIndex = -1;
104106
for (size_t i = 0; i < clslist.size(); i++) {
105-
if (ctpcls[i].name == className) {
107+
if (ctpcls[i].name.find(className) != std::string::npos) {
106108
classIndex = i;
107109
break;
108110
}
109111
}
110112
if (classIndex == -1) {
111113
LOG(fatal) << "Trigger class " << className << " not found in CTPConfiguration";
112114
}
113-
114115
auto rate{mScalers->getRateGivenT(timeStamp * 1.e-3, classIndex, inputType)};
115-
116+
getLHCIFdata(ccdb, timeStamp, runNumber);
116117
return pileUpCorrection(rate.second);
117118
}
118119
double ctpRateFetcher::fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string sourceName)
@@ -124,26 +125,32 @@ double ctpRateFetcher::fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStam
124125
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "C1ZNC-B-NOPF-CRU", 6) / (sourceName.find("hadronic") != std::string::npos ? 28. : 1.);
125126
}
126127
} else if (sourceName == "T0CE") {
127-
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVXTCE-B-NOPF-CRU");
128+
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVXTCE-B-NOPF");
128129
} else if (sourceName == "T0SC") {
129-
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVXTSC-B-NOPF-CRU");
130+
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVXTSC-B-NOPF");
130131
} else if (sourceName == "T0VTX") {
131132
if (runNumber < 534202) {
132-
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "minbias_TVX_L0"); // 2022
133+
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "minbias_TVX_L0", 3); // 2022
133134
} else {
134-
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVX-B-NOPF-CRU");
135+
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVX-B-NOPF");
135136
}
136137
}
137138
LOG(error) << "CTP rate for " << sourceName << " not available";
138139
return -1.;
139140
}
140-
void ctpRateF(int runNumber = 0)
141+
void ctpRateF(int runNumber = 0, bool cxx = 1)
141142
{
142143
auto& ccdbMgr = o2::ccdb::BasicCCDBManager::instance();
143144
auto soreor = ccdbMgr.getRunDuration(runNumber);
144145
uint64_t timeStamp = (soreor.second - soreor.first) / 2 + soreor.first;
145146
std::cout << "Timestamp:" << timeStamp << std::endl;
146-
ctpRateFetcher ctprate;
147-
auto rate = ctprate.fetch(&ccdbMgr, timeStamp + 100, runNumber, "ZNChadronic");
148-
std::cout << "Rate:" << rate << std::endl;
147+
if (cxx) {
148+
o2::ctpRateFetcher ctprate;
149+
auto rate = ctprate.fetch(&ccdbMgr, timeStamp + 100, runNumber, "T0VTX");
150+
std::cout << "Rate:" << rate << std::endl;
151+
} else {
152+
ctpRateFetcher ctprate;
153+
auto rate = ctprate.fetch(&ccdbMgr, timeStamp + 100, runNumber, "T0VTX");
154+
std::cout << "Rate:" << rate << std::endl;
155+
}
149156
}

Common/CCDB/macros/upload_event_selection_params.C

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// or submit itself to any jurisdiction.
1111

1212
#include "CCDB/CcdbApi.h"
13+
#include "CCDB/BasicCCDBManager.h"
1314
#include "TString.h"
1415
#include "map"
1516
#include "string"
@@ -238,17 +239,16 @@ void upload_event_selection_params()
238239
runLast[n] = 297624;
239240

240241
n++;
241-
map<string, string> metadata, metadataRCT, headersFirst, headersLast;
242+
map<string, string> metadata;
242243
for (int i = 0; i < n; i++) {
243244
printf("%s ", period[i].c_str());
244245
if (!isNew[i]) {
245246
printf(" .... is not new, skipping\n");
246247
continue;
247248
}
248-
headersFirst = ccdb.retrieveHeaders(Form("RCT/Info/RunInformation/%i", runFirst[i]), metadataRCT, -1);
249-
headersLast = ccdb.retrieveHeaders(Form("RCT/Info/RunInformation/%i", runLast[i]), metadataRCT, -1);
250-
ULong64_t sor = atol(headersFirst["SOR"].c_str());
251-
ULong64_t eor = atol(headersLast["EOR"].c_str());
249+
auto sor = o2::ccdb::BasicCCDBManager::getRunDuration(ccdb, runFirst[i]).first;
250+
auto eor = o2::ccdb::BasicCCDBManager::getRunDuration(ccdb, runLast[i]).second;
251+
252252
printf("sor=%llu eor=%llu\n", sor, eor);
253253
metadata["period"] = period[i];
254254
metadata["run_first"] = Form("%d", runFirst[i]);

Common/CCDB/macros/upload_trigger_aliases.C

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// or submit itself to any jurisdiction.
1111

1212
#include "CCDB/CcdbApi.h"
13+
#include "CCDB/BasicCCDBManager.h"
1314
#include "TObjArray.h"
1415
#include "TriggerAliases.h"
1516
#include "TTree.h"
@@ -62,7 +63,7 @@ void upload_trigger_aliases()
6263
// ccdb.init("http://ccdb-test.cern.ch:8080");
6364
// ccdb.truncate("EventSelection/TriggerAliases");
6465

65-
map<string, string> metadata, metadataRCT, header;
66+
map<string, string> metadata;
6667

6768
// read list of runs from text file
6869
std::ifstream f("runs_run1.txt");
@@ -92,10 +93,11 @@ void upload_trigger_aliases()
9293
}
9394
}
9495

95-
// read SOR and EOR timestamps from RCT CCDB
96-
header = ccdb.retrieveHeaders(Form("RCT/Info/RunInformation/%i", run), metadataRCT, -1);
97-
ULong64_t sor = atol(header["SOR"].c_str());
98-
ULong64_t eor = atol(header["EOR"].c_str());
96+
// read SOR and EOR timestamps from RCT CCDB (via utility function)
97+
auto soreor = o2::ccdb::BasicCCDBManager::getRunDuration(ccdb, run);
98+
ULong64_t sor = soreor.first;
99+
ULong64_t eor = soreor.second;
100+
99101
// add safety margins to avoid edge effects due to SOR/EOR time differences in DCS and CTP
100102
sor -= 60000;
101103
eor += 300000;

Common/CCDB/macros/upload_trigger_aliases_run3.C

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include "DataFormatsCTP/Configuration.h"
1313
#include "CCDB/CcdbApi.h"
14+
#include "CCDB/BasicCCDBManager.h"
1415
#include "TObjArray.h"
1516
#include "TriggerAliases.h"
1617
#include "TTree.h"
@@ -58,7 +59,7 @@ void upload_trigger_aliases_run3()
5859
// ccdb.init("http://ccdb-test.cern.ch:8080");
5960
// ccdb.truncate("EventSelection/TriggerAliases");
6061

61-
map<string, string> metadata, metadataRCT, header;
62+
map<string, string> metadata;
6263

6364
// read list of runs from text file
6465
std::ifstream f("run3_pbpb2023.txt");
@@ -93,11 +94,13 @@ void upload_trigger_aliases_run3()
9394
continue; // no CTP info
9495
if (run == 528543)
9596
continue; // no CTP info
96-
// read SOR and EOR timestamps from RCT CCDB
97-
header = ccdb.retrieveHeaders(Form("RCT/Info/RunInformation/%i", run), metadataRCT, -1);
98-
ULong64_t sor = atol(header["SOR"].c_str());
99-
ULong64_t eor = atol(header["EOR"].c_str());
100-
ULong64_t ts = sor;
97+
98+
// read SOR and EOR timestamps from RCT CCDB via utility function
99+
auto soreor = o2::ccdb::BasicCCDBManager::getRunDuration(ccdb, run);
100+
auto eor = soreor.second;
101+
auto sor = soreor.first;
102+
auto ts = sor;
103+
101104
// read CTP config
102105
metadata["runNumber"] = Form("%d", run);
103106
auto ctpcfg = ccdb.retrieveFromTFileAny<o2::ctp::CTPConfiguration>("CTP/Config/Config", metadata, ts);

Common/DataModel/Multiplicity.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ DECLARE_SOA_COLUMN(MultNTracksGlobal, multNTracksGlobal, int); //!
7575

7676
DECLARE_SOA_COLUMN(BCNumber, bcNumber, int); //!
7777

78+
// even further QA: timing information for neighboring events
79+
DECLARE_SOA_COLUMN(TimeToPrePrevious, timeToPrePrevious, float); //!
80+
DECLARE_SOA_COLUMN(TimeToPrevious, timeToPrevious, float); //!
81+
DECLARE_SOA_COLUMN(TimeToNext, timeToNext, float); //!
82+
DECLARE_SOA_COLUMN(TimeToNeNext, timeToNeNext, float); //!
83+
7884
} // namespace mult
7985
DECLARE_SOA_TABLE(FV0Mults, "AOD", "FV0MULT", //! Multiplicity with the FV0 detector
8086
mult::MultFV0A, mult::MultFV0C,
@@ -109,6 +115,10 @@ DECLARE_SOA_TABLE(MultsExtra, "AOD", "MULTEXTRA", //!
109115
mult::MultAllTracksTPCOnly, mult::MultAllTracksITSTPC,
110116
mult::BCNumber);
111117

118+
DECLARE_SOA_TABLE(MultNeighs, "AOD", "MULTNEIGH", //!
119+
mult::TimeToPrePrevious, mult::TimeToPrevious,
120+
mult::TimeToNext, mult::TimeToNeNext);
121+
112122
// for QA purposes
113123
DECLARE_SOA_TABLE(MultsGlobal, "AOD", "MULTGLOBAL", //! counters that use Track Selection (optional)
114124
mult::MultNTracksGlobal);

Common/DataModel/PIDResponse.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ DECLARE_SOA_COLUMN(DeDxTunedMc, mcTunedTPCSignal, float); //! TPC signal after T
611611
} // namespace mcpidtpc
612612

613613
DECLARE_SOA_TABLE(mcTPCTuneOnData, "AOD", "MCTPCTUNEONDATA", mcpidtpc::DeDxTunedMc);
614+
DECLARE_SOA_TABLE(mcTPCTuneOnDataTiny, "AOD", "MCTPCTODATATINY", mcpidtpc::DeDxTunedMc, o2::soa::Marker<1>);
614615

615616
namespace pidtpc
616617
{

0 commit comments

Comments
 (0)