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
8 changes: 8 additions & 0 deletions Common/TableProducer/eventSelection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1201,10 +1201,12 @@
histos.add("hCounterTCE", "", kTH1D, {{1, 0., 1.}});
histos.add("hCounterZEM", "", kTH1D, {{1, 0., 1.}});
histos.add("hCounterZNC", "", kTH1D, {{1, 0., 1.}});
histos.add("hCounterTVXZDC", "", kTH1D, {{1, 0., 1.}});
histos.add("hCounterTVXafterBCcuts", "", kTH1D, {{1, 0., 1.}});
histos.add("hCounterTCEafterBCcuts", "", kTH1D, {{1, 0., 1.}});
histos.add("hCounterZEMafterBCcuts", "", kTH1D, {{1, 0., 1.}});
histos.add("hCounterZNCafterBCcuts", "", kTH1D, {{1, 0., 1.}});
histos.add("hCounterTVXZDCafterBCcuts", "", kTH1D, {{1, 0., 1.}});
histos.add("hLumiTVX", ";;Luminosity, 1/#mub", kTH1D, {{1, 0., 1.}});
histos.add("hLumiTCE", ";;Luminosity, 1/#mub", kTH1D, {{1, 0., 1.}});
histos.add("hLumiZEM", ";;Luminosity, 1/#mub", kTH1D, {{1, 0., 1.}});
Expand Down Expand Up @@ -1371,15 +1373,15 @@
double perBcRateTCE = static_cast<double>(mCounterTCE[i + 1] - mCounterTCE[i]) / nOrbits / nCollidingBCs;
double perBcRateZNC = static_cast<double>(mCounterZNC[i + 1] - mCounterZNC[i]) / nOrbits / nCollidingBCs;
double perBcRateZEM = static_cast<double>(mCounterZEM[i + 1] - mCounterZEM[i]) / nOrbits / nCollidingBCs;
double muTVX = (perBcRateTVX < 1 && perBcRateTVX > 1e-10) ? -std::log(1 - perBcRateTVX) : 0;

Check failure on line 1376 in Common/TableProducer/eventSelection.cxx

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.
double muTCE = (perBcRateTCE < 1 && perBcRateTCE > 1e-10) ? -std::log(1 - perBcRateTCE) : 0;

Check failure on line 1377 in Common/TableProducer/eventSelection.cxx

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.
double muZNC = (perBcRateZNC < 1 && perBcRateZNC > 1e-10) ? -std::log(1 - perBcRateZNC) : 0;

Check failure on line 1378 in Common/TableProducer/eventSelection.cxx

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.
double muZEM = (perBcRateZEM < 1 && perBcRateZEM > 1e-10) ? -std::log(1 - perBcRateZEM) : 0;

Check failure on line 1379 in Common/TableProducer/eventSelection.cxx

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.
LOGP(debug, "orbit={} muTVX={} muTCE={} muZNC={} muZEM={}", mOrbits[i], muTVX, muTCE, muZNC, muZEM);
mPileupCorrectionTVX.push_back(muTVX > 1e-10 ? muTVX / (1 - std::exp(-muTVX)) : 1);

Check failure on line 1381 in Common/TableProducer/eventSelection.cxx

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.
mPileupCorrectionTCE.push_back(muTCE > 1e-10 ? muTCE / (1 - std::exp(-muTCE)) : 1);

Check failure on line 1382 in Common/TableProducer/eventSelection.cxx

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.
mPileupCorrectionZNC.push_back(muZNC > 1e-10 ? muZNC / (1 - std::exp(-muZNC)) : 1);

Check failure on line 1383 in Common/TableProducer/eventSelection.cxx

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.
mPileupCorrectionZEM.push_back(muZEM > 1e-10 ? muZEM / (1 - std::exp(-muZEM)) : 1);

Check failure on line 1384 in Common/TableProducer/eventSelection.cxx

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.
}
// filling last orbit range using previous orbit range
mPileupCorrectionTVX.push_back(mPileupCorrectionTVX.back());
Expand Down Expand Up @@ -1428,9 +1430,15 @@
if (isTriggerTVX) {
histos.get<TH1>(HIST("hCounterTVX"))->Fill(srun, 1);
histos.get<TH1>(HIST("hLumiTVX"))->Fill(srun, lumiTVX);
if (isTriggerZNA && isTriggerZNC) {
histos.get<TH1>(HIST("hCounterTVXZDC"))->Fill(srun, 1);
}
if (noBorder) {
histos.get<TH1>(HIST("hCounterTVXafterBCcuts"))->Fill(srun, 1);
histos.get<TH1>(HIST("hLumiTVXafterBCcuts"))->Fill(srun, lumiTVX);
if (isTriggerZNA && isTriggerZNC) {
histos.get<TH1>(HIST("hCounterTVXZDCafterBCcuts"))->Fill(srun, 1);
}
for (size_t i = 0; i < mRCTFlagsCheckers.size(); i++) {
if (mRCTFlagsCheckers[i](bc))
histos.get<TH2>(HIST("hLumiTVXafterBCcutsRCT"))->Fill(srun, i, lumiTVX);
Expand Down
8 changes: 8 additions & 0 deletions Common/Tools/EventSelectionModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -1435,10 +1435,10 @@
isGoodZvtxFT0vsPV = std::fabs(diffVz) < evselOpts.maxDiffZvtxFT0vsPV;
} else { // special treatment of light ion runs
float multT0A = bc.ft0().sumAmpA();
float multT0C = bc.ft0().sumAmpC();

Check failure on line 1438 in Common/Tools/EventSelectionModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float T0M = multT0A + multT0C;
// calc mean at this T0 ampl.
float x = (T0M < 50 ? 50 : T0M);

Check failure on line 1441 in Common/Tools/EventSelectionModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double diffMean = diffVzParMean[0] + diffVzParMean[1] * pow(x, diffVzParMean[2]) + diffVzParMean[3] * pow(x, diffVzParMean[4]);
// calc sigma at this T0 ampl.
x = (T0M < 20 ? 20 : (T0M > 1.2e4 ? 1.2e4 : T0M));
Expand Down Expand Up @@ -1557,10 +1557,12 @@
histos.add("luminosity/hCounterTCE", "", framework::kTH1D, {{1, 0., 1.}});
histos.add("luminosity/hCounterZEM", "", framework::kTH1D, {{1, 0., 1.}});
histos.add("luminosity/hCounterZNC", "", framework::kTH1D, {{1, 0., 1.}});
histos.add("luminosity/hCounterTVXZDC", "", framework::kTH1D, {{1, 0., 1.}});
histos.add("luminosity/hCounterTVXafterBCcuts", "", framework::kTH1D, {{1, 0., 1.}});
histos.add("luminosity/hCounterTCEafterBCcuts", "", framework::kTH1D, {{1, 0., 1.}});
histos.add("luminosity/hCounterZEMafterBCcuts", "", framework::kTH1D, {{1, 0., 1.}});
histos.add("luminosity/hCounterZNCafterBCcuts", "", framework::kTH1D, {{1, 0., 1.}});
histos.add("luminosity/hCounterTVXZDCafterBCcuts", "", framework::kTH1D, {{1, 0., 1.}});
histos.add("luminosity/hLumiTVX", ";;Luminosity, 1/#mub", framework::kTH1D, {{1, 0., 1.}});
histos.add("luminosity/hLumiTCE", ";;Luminosity, 1/#mub", framework::kTH1D, {{1, 0., 1.}});
histos.add("luminosity/hLumiZEM", ";;Luminosity, 1/#mub", framework::kTH1D, {{1, 0., 1.}});
Expand Down Expand Up @@ -1803,9 +1805,15 @@
if (isTriggerTVX) {
histos.template get<TH1>(HIST("luminosity/hCounterTVX"))->Fill(srun, 1);
histos.template get<TH1>(HIST("luminosity/hLumiTVX"))->Fill(srun, lumiTVX);
if (isTriggerZNA && isTriggerZNC) {
histos.template get<TH1>(HIST("luminosity/hCounterTVXZDC"))->Fill(srun, 1);
}
if (noBorder) {
histos.template get<TH1>(HIST("luminosity/hCounterTVXafterBCcuts"))->Fill(srun, 1);
histos.template get<TH1>(HIST("luminosity/hLumiTVXafterBCcuts"))->Fill(srun, lumiTVX);
if (isTriggerZNA && isTriggerZNC) {
histos.template get<TH1>(HIST("luminosity/hCounterTVXZDCafterBCcuts"))->Fill(srun, 1);
}
for (size_t i = 0; i < mRCTFlagsCheckers.size(); i++) {
if ((rct & mRCTFlagsCheckers[i].value()) == 0)
histos.template get<TH2>(HIST("luminosity/hLumiTVXafterBCcutsRCT"))->Fill(srun, i, lumiTVX);
Expand Down
Loading