Skip to content

Commit 422df25

Browse files
[PWGLF] [PWGMM] Separate table added for CTP info (#13321)
Co-authored-by: Arvind Khuntia <arvind.khuntia@cern.ch>
1 parent 731aa17 commit 422df25

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

PWGMM/Lumi/Tasks/LumiFDDFT0.cxx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,18 @@ DECLARE_SOA_TABLE(EventInfoFV0, "AOD", "EventInfoFV0",
120120
full::InputMask, full::TCMTriggerFV0, full::TimeAFV0,
121121
full::ChargeAFV0);
122122

123+
DECLARE_SOA_TABLE(EventInfoCTP, "AOD", "EventInfoCTP",
124+
full::TimeStamp, full::GlobalBC,
125+
full::InputMask);
126+
123127
} // namespace o2::aod
124128

125129
struct LumiFDDFT0 {
126130
Produces<o2::aod::EventInfo> rowEventInfo;
127131
Produces<o2::aod::EventInfoFDD> rowEventInfofdd;
128132
Produces<o2::aod::EventInfoFT0> rowEventInfoft0;
129133
Produces<o2::aod::EventInfoFV0> rowEventInfofv0;
134+
Produces<o2::aod::EventInfoCTP> rowEventInfoCTP;
130135
Service<o2::ccdb::BasicCCDBManager> ccdb;
131136
const char* ccdbpath_grp = "GLO/Config/GRPMagField";
132137
const char* ccdburl = "http://alice-ccdb.cern.ch";
@@ -135,6 +140,7 @@ struct LumiFDDFT0 {
135140
Configurable<uint64_t> fttimestamp{"fttimestamp", 1668080173000, "First time of time stamp"};
136141
Configurable<int> nContribMax{"nContribMax", 2500, "Maximum number of contributors"};
137142
Configurable<int> nContribMin{"nContribMin", 10, "Minimum number of contributors"};
143+
Configurable<bool> useRelTimeStamp{"useRelTimeStamp", false, "timestamp info stored as relative to fttimestamp"};
138144

139145
HistogramRegistry histos{
140146
"histos",
@@ -340,8 +346,19 @@ struct LumiFDDFT0 {
340346
};
341347
PROCESS_SWITCH(LumiFDDFT0, processFull, "Process FDD", true);
342348

343-
void processLite(aod::FDDs const& fdds, aod::FT0s const& ft0s, aod::FV0As const& fv0s, aod::BCsWithTimestamps const&)
349+
void processLite(aod::FDDs const& fdds, aod::FT0s const& ft0s, aod::FV0As const& fv0s, aod::BCsWithTimestamps const& bcs)
344350
{
351+
// table to store CTP input mask, globalBC and timestamp
352+
for (const auto& bc : bcs) {
353+
if (!bc.timestamp())
354+
continue;
355+
if (useRelTimeStamp) {
356+
Long64_t relTS = bc.timestamp() - fttimestamp;
357+
rowEventInfoCTP(relTS, bc.globalBC(), bc.inputMask());
358+
} else {
359+
rowEventInfoCTP(bc.timestamp(), bc.globalBC(), bc.inputMask());
360+
}
361+
}
345362

346363
// Scan over the FDD table and store charge and time along with globalBC
347364
for (auto& fdd : fdds) {

0 commit comments

Comments
 (0)