Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Common/TableProducer/multCentTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct MultCentTable {
ccdb->setFatalWhenNull(false); // please never crash on your own, all exceptions captured (as they always should)

// task-specific
module.init(opts, initContext);
module.init(metadataInfo, opts, initContext);
}

void processRun2(soa::Join<aod::Collisions, aod::Run2MatchedSparse> const& collisions,
Expand Down
9 changes: 7 additions & 2 deletions Common/Tools/MultModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@
CalibrationInfo nGlobalInfo = CalibrationInfo("NGlobal");
CalibrationInfo mftInfo = CalibrationInfo("MFT");

template <typename TConfigurables, typename TInitContext>
void init(TConfigurables& opts, TInitContext& context)
template <typename TMetadatainfo, typename TConfigurables, typename TInitContext>
void init(TMetadatainfo const& metadataInfo, TConfigurables& opts, TInitContext& context)
{
// read in configurations from the task where it's used
internalOpts = opts;
Expand Down Expand Up @@ -484,6 +484,11 @@
listOfRequestors[kMultsGlobal].Append(Form("%s ", "dependency check"));
}

// capture the need for PYTHIA calibration in Pb-Pb runs
if (metadataInfo.isMC() && mRunNumber >= 544013 && mRunNumber <= 545367) {

Check failure on line 488 in Common/Tools/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
internalOpts.generatorName.value = "PYTHIA";
}

mRunNumber = 0;
mRunNumberCentrality = 0;
lCalibLoaded = false;
Expand Down Expand Up @@ -545,9 +550,9 @@
if (internalOpts.mEnabledTables[kPVMults]) {
if (std::abs(track.eta()) < 1.0) {
mults.multNContribsEta1++; // pvmults
if (std::abs(track.eta()) < 0.8) {

Check failure on line 553 in Common/Tools/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multNContribs++; // pvmults
if (std::abs(track.eta()) < 0.5) {

Check failure on line 555 in Common/Tools/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multNContribsEtaHalf++; // pvmults
}
}
Expand Down Expand Up @@ -643,7 +648,7 @@
auto amplitude = fv0.amplitude()[ii];
auto channel = fv0.channel()[ii];
mults.multFV0A += amplitude;
if (channel > 7) {

Check failure on line 651 in Common/Tools/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multFV0AOuter += amplitude;
}
}
Expand Down Expand Up @@ -759,9 +764,9 @@
if (track.isPVContributor()) {
if (std::abs(track.eta()) < 1.0) {
mults.multNContribsEta1++; // pvmults
if (std::abs(track.eta()) < 0.8) {

Check failure on line 767 in Common/Tools/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multNContribs++; // pvmults
if (std::abs(track.eta()) < 0.5) {

Check failure on line 769 in Common/Tools/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multNContribsEtaHalf++; // pvmults
}
}
Expand Down Expand Up @@ -796,14 +801,14 @@
}
mults.multNbrContribsEta10GlobalTrackWoDCA++;

if (std::abs(track.eta()) < 0.8) {

Check failure on line 804 in Common/Tools/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multNbrContribsEta08GlobalTrackWoDCA++;
}
if (std::abs(track.eta()) < 0.5) {

Check failure on line 807 in Common/Tools/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multNbrContribsEta05GlobalTrackWoDCA++;
}
}
if (std::fabs(track.eta()) < 0.8 && track.tpcNClsFound() >= 80 && track.tpcNClsCrossedRows() >= 100) {

Check failure on line 811 in Common/Tools/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (track.isGlobalTrack()) {
mults.multGlobalTracks++;
}
Expand Down Expand Up @@ -866,7 +871,7 @@
if (p != nullptr) {
charge = p->Charge();
}
if (std::abs(charge) < 1e-3) {

Check failure on line 874 in Common/Tools/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue; // reject neutral particles in counters
}

Expand Down
Loading