Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions PWGMM/Lumi/Tasks/LumiFDDFT0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

#include <array>
#include <cmath>
#include <iostream>

Check failure on line 43 in PWGMM/Lumi/Tasks/LumiFDDFT0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <map>
#include <vector>

Expand All @@ -64,6 +64,7 @@
DECLARE_SOA_COLUMN(GlobalBC, globalBC, uint64_t);
DECLARE_SOA_COLUMN(VertexChi2, vertexChi2, double);
DECLARE_SOA_COLUMN(NContrib, nContrib, int);
DECLARE_SOA_COLUMN(InputMask, inputMask, uint64_t); //! CTP input mask

// Information for FDD
DECLARE_SOA_COLUMN(isFDD, isfdd, bool);
Expand All @@ -90,7 +91,7 @@
DECLARE_SOA_COLUMN(ChargeAFV0, chargeAfv0, double); // Only FV0-A charge

} // namespace full
DECLARE_SOA_TABLE(EventInfo, "AOD", "EventInfo", full::TimeStamp, full::VertexX,
DECLARE_SOA_TABLE(EventInfo, "AOD", "EventInfo", full::TimeStamp, full::InputMask, full::VertexX,
full::VertexY, full::VertexZ, full::GlobalBC,
full::VertexChi2, full::NContrib,
full::isFDD, full::TCMTriggerFDD,
Expand All @@ -103,20 +104,20 @@

DECLARE_SOA_TABLE(EventInfoFDD, "AOD", "EventInfoFDD",
full::TimeStamp, full::GlobalBC,
full::TCMTriggerFDD, full::TimeAFDD,
full::InputMask, full::TCMTriggerFDD, full::TimeAFDD,
full::TimeCFDD, full::IsCoinAmpFDDA,
full::IsCoinAmpFDDC, full::ChargeAFDD,
full::ChargeCFDD);

DECLARE_SOA_TABLE(EventInfoFT0, "AOD", "EventInfoFT0",
full::TimeStamp, full::GlobalBC,
full::TCMTriggerFT0, full::TimeAFT0,
full::InputMask, full::TCMTriggerFT0, full::TimeAFT0,
full::TimeCFT0, full::ChargeAFT0,
full::ChargeCFT0);

DECLARE_SOA_TABLE(EventInfoFV0, "AOD", "EventInfoFV0",
full::TimeStamp, full::GlobalBC,
full::TCMTriggerFV0, full::TimeAFV0,
full::InputMask, full::TCMTriggerFV0, full::TimeAFV0,
full::ChargeAFV0);

} // namespace o2::aod
Expand Down Expand Up @@ -181,8 +182,8 @@
o2::aod::TracksExtra> const& unfiltered_tracks)
{
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
Long64_t relTS = bc.timestamp() - fttimestamp;

Check failure on line 185 in PWGMM/Lumi/Tasks/LumiFDDFT0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Long64_t globalBC = bc.globalBC();

Check failure on line 186 in PWGMM/Lumi/Tasks/LumiFDDFT0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
std::vector<int64_t> vec_globID_contr = {};
std::vector<o2::track::TrackParCov> vec_TrkContributos = {};

Expand Down Expand Up @@ -304,7 +305,7 @@
}
} // fv0

rowEventInfo(relTS, refitX, refitY, refitZ, globalBC, chi2, nContrib, collision.has_foundFDD(),
rowEventInfo(relTS, bc.inputMask(), refitX, refitY, refitZ, globalBC, chi2, nContrib, collision.has_foundFDD(),
mTriggerFDD, timeaFDD, timecFDD, chargeaFDD, chargecFDD, collision.has_foundFT0(), mTriggerFT0, timeaFT0,
timecFT0, chargeaFT0, chargecFT0, collision.has_foundFV0(), mTriggerFV0, timeaFV0, chargeaFV0);

Expand Down Expand Up @@ -351,7 +352,7 @@
o2::parameters::GRPMagField* grpo = ccdb->getForTimeStamp<o2::parameters::GRPMagField>(ccdbpath_grp, bc.timestamp());
if (grpo != nullptr) {
o2::base::Propagator::initFieldFromGRP(grpo);
std::cout << "run " << bc.runNumber() << std::endl;

Check failure on line 355 in PWGMM/Lumi/Tasks/LumiFDDFT0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
} else {
LOGF(fatal,
"GRP object is not available in CCDB for run=%d at timestamp=%llu",
Expand All @@ -360,8 +361,8 @@
mRunNumber = bc.runNumber();
}
// get the relative ts and globalBC, which will help to sync FDD and FT0 data
Long64_t relTS = bc.timestamp() - fttimestamp;

Check failure on line 364 in PWGMM/Lumi/Tasks/LumiFDDFT0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Long64_t globalBC = bc.globalBC();

Check failure on line 365 in PWGMM/Lumi/Tasks/LumiFDDFT0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
int localBC = globalBC % nBCsPerOrbit;
histoslite.fill(HIST("BCFDD"), localBC);

Expand All @@ -388,7 +389,7 @@
bool isCoinA = checkAnyCoincidence(channelA);
bool isCoinC = checkAnyCoincidence(channelC);

rowEventInfofdd(relTS, globalBC, fdd.triggerMask(), fdd.timeA(), fdd.timeC(), isCoinA, isCoinC, chargeaFDD, chargecFDD);
rowEventInfofdd(relTS, globalBC, bc.inputMask(), fdd.triggerMask(), fdd.timeA(), fdd.timeC(), isCoinA, isCoinC, chargeaFDD, chargecFDD);
} // end of fdd table

// Scan over the FT0 table and store charge and time along with globalBC
Expand All @@ -396,8 +397,8 @@
auto bc = ft0.bc_as<BCsWithTimestamps>();
if (!bc.timestamp())
continue;
Long64_t relTS = bc.timestamp() - fttimestamp;

Check failure on line 400 in PWGMM/Lumi/Tasks/LumiFDDFT0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Long64_t globalBC = bc.globalBC();

Check failure on line 401 in PWGMM/Lumi/Tasks/LumiFDDFT0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
int localBC = globalBC % nBCsPerOrbit;
histoslite.fill(HIST("BCFT0"), localBC);
double chargeaFT0 = 0.;
Expand All @@ -408,7 +409,7 @@
for (auto amplitude : ft0.amplitudeC()) {
chargecFT0 += amplitude;
}
rowEventInfoft0(relTS, globalBC, ft0.triggerMask(), ft0.timeA(), ft0.timeC(), chargeaFT0, chargecFT0);
rowEventInfoft0(relTS, globalBC, bc.inputMask(), ft0.triggerMask(), ft0.timeA(), ft0.timeC(), chargeaFT0, chargecFT0);
} // end of ft0 table

// Scan over the FV0 table and store charge and time along with globalBC
Expand All @@ -416,8 +417,8 @@
auto bc = fv0.bc_as<BCsWithTimestamps>();
if (!bc.timestamp())
continue;
Long64_t relTS = bc.timestamp() - fttimestamp;

Check failure on line 420 in PWGMM/Lumi/Tasks/LumiFDDFT0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Long64_t globalBC = bc.globalBC();

Check failure on line 421 in PWGMM/Lumi/Tasks/LumiFDDFT0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
int localBC = globalBC % nBCsPerOrbit;
histoslite.fill(HIST("BCFV0"), localBC);

Expand All @@ -425,7 +426,7 @@
for (auto amplitude : fv0.amplitude()) {
chargeaFV0 += amplitude;
}
rowEventInfofv0(relTS, globalBC, fv0.triggerMask(), fv0.time(), chargeaFV0);
rowEventInfofv0(relTS, globalBC, bc.inputMask(), fv0.triggerMask(), fv0.time(), chargeaFV0);
} // end of fv0 table
};
PROCESS_SWITCH(LumiFDDFT0, processLite, "Process FDD and FT0 info", false);
Expand Down
Loading