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
6 changes: 6 additions & 0 deletions PWGEM/PhotonMeson/Tasks/emcalBcWiseGammaGamma.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@
mHistManager.add("True/eta_invMassVsPt_HadronicShower", "Reconstructed validated eta meson from hadronic shower;#bf{#it{M}^{#gamma#gamma} (GeV/#it{c}^{2})};#bf{#it{p}_{T}^{#gamma#gamma} (GeV/#it{c})};#bf{FT0M centrality (%)}", HistType::kTH3F, {{400, 0., 0.8}, {200, 0., 20.}, cfgCentralityBinning});

mHistManager.add("Generated/pi0_AllBCs", "pT spectrum of generated pi0s in all BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#pi^{0}}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
mHistManager.add("Generated/pi0_FT0", "pT spectrum of generated pi0s in BCs with found FT0;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#pi^{0}}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
mHistManager.add("Generated/pi0_TVX", "pT spectrum of generated pi0s in TVX triggered BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#pi^{0}}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
mHistManager.add("Generated/pi0_kTVXinEMC", "pT spectrum of generated pi0s in kTVXinEMC triggered BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#pi^{0}}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
mHistManager.add("Accepted/pi0_kTVXinEMC", "pT spectrum of accepted pi0s in kTVXinEMC triggered BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#pi^{0}}^{acc}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
mHistManager.add("Generated/eta_AllBCs", "pT spectrum of generated eta mesons in all BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#eta}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
mHistManager.add("Generated/eta_FT0", "pT spectrum of generated eta mesons in BCs with found FT0;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#eta}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
mHistManager.add("Generated/eta_TVX", "pT spectrum of generated eta mesons in TVX triggered BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#eta}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
mHistManager.add("Generated/eta_kTVXinEMC", "pT spectrum of generated eta mesons in kTVXinEMC triggered BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#eta}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
mHistManager.add("Accepted/eta_kTVXinEMC", "pT spectrum of accepted eta mesons in kTVXinEMC triggered BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#eta}^{acc}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
Expand Down Expand Up @@ -145,7 +147,7 @@
float mu = bc.mu();
mHistManager.fill(HIST("Event/Mu"), mu);
mHistManager.fill(HIST("Event/TimeSinceSOF"), bc.timeSinceSOF() / 60.);
double p = mu > 0.001 ? mu / (1 - std::exp(-mu)) : 1.; // No pile-up for small mu (protection against division by zero)

Check failure on line 150 in PWGEM/PhotonMeson/Tasks/emcalBcWiseGammaGamma.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.
mHistManager.fill(HIST("Event/nCollisions"), 0, bc.centrality(), p);
if (bc.hasFT0()) {
mHistManager.fill(HIST("Event/nBCs"), 1, bc.centrality());
Expand All @@ -172,7 +174,7 @@
mHistManager.fill(HIST("Event/CentralityVsAmplitude"), bc.centrality(), bc.ft0Amplitude());

mHistManager.fill(HIST("Event/nCollPerBC"), collisions.size(), bc.centrality());
if (collisions.size() == 2) {

Check failure on line 177 in PWGEM/PhotonMeson/Tasks/emcalBcWiseGammaGamma.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.
mHistManager.fill(HIST("Event/Z1VsZ2"), collisions.iteratorAt(0).zVtx(), collisions.iteratorAt(1).zVtx());
mHistManager.fill(HIST("Event/dZ"), collisions.iteratorAt(0).zVtx() - collisions.iteratorAt(1).zVtx());
}
Expand Down Expand Up @@ -205,7 +207,7 @@

mHistManager.fill(HIST("GG/invMassVsPt"), v12.M(), v12.Pt(), bc.centrality());

if (clusters.size() < 3)

Check failure on line 210 in PWGEM/PhotonMeson/Tasks/emcalBcWiseGammaGamma.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.
continue;

if (bc.globalIndex() % cfgBGEventDownsampling != 0)
Expand All @@ -215,7 +217,7 @@

ROOT::Math::AxisAngle rotationAxis(v12.Vect(), constants::math::PIHalf);
ROOT::Math::Rotation3D rotationMatrix(rotationAxis);
for (ROOT::Math::PtEtaPhiMVector vi : {v1, v2}) {

Check failure on line 220 in PWGEM/PhotonMeson/Tasks/emcalBcWiseGammaGamma.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.

vi = rotationMatrix * vi;

Expand Down Expand Up @@ -294,7 +296,7 @@
return false;
if (cfgSelectOnlyUniqueAmbiguous == 1 && collisions.size() != 1)
return false;
if (cfgSelectOnlyUniqueAmbiguous == 2 && collisions.size() == 1)

Check failure on line 299 in PWGEM/PhotonMeson/Tasks/emcalBcWiseGammaGamma.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.
return false;
if (cfgMinTimeSinceSOF > bc.timeSinceSOF() / 60 || cfgMaxTimeSinceSOF < bc.timeSinceSOF() / 60)
return false;
Expand All @@ -306,6 +308,8 @@
for (const auto& mcPi0 : mcPi0s) {
if (mcPi0.isPrimary()) {
mHistManager.fill(HIST("Generated/pi0_AllBCs"), mcPi0.pt(), bc.centrality());
if (bc.hasFT0())
mHistManager.fill(HIST("Generated/pi0_FT0"), mcPi0.pt(), bc.centrality());
if (bc.hasTVX())
mHistManager.fill(HIST("Generated/pi0_TVX"), mcPi0.pt(), bc.centrality());
if (bc.haskTVXinEMC())
Expand All @@ -317,6 +321,8 @@
for (const auto& mcEta : mcEtas) {
if (mcEta.isPrimary()) {
mHistManager.fill(HIST("Generated/eta_AllBCs"), mcEta.pt(), bc.centrality());
if (bc.hasFT0())
mHistManager.fill(HIST("Generated/eta_FT0"), mcEta.pt(), bc.centrality());
if (bc.hasTVX())
mHistManager.fill(HIST("Generated/eta_TVX"), mcEta.pt(), bc.centrality());
if (bc.haskTVXinEMC())
Expand Down
4 changes: 4 additions & 0 deletions PWGJE/TableProducer/emcalCorrectionTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
Configurable<bool> applyTempCalib{"applyTempCalib", false, "Switch to turn on Temperature calibration."};
Configurable<std::string> pathTempCalibCCDB{"pathTempCalibCCDB", "Users/j/jokonig/EMCalTempCalibParams", "Path in the ccdb where slope and intercept for each cell are stored"}; // change to official path as soon as it is available
Configurable<bool> useTempCalibMean{"useTempCalibMean", false, "Switch to turn on Temperature mean calculation instead of median."};
Configurable<float> mcCellEnergyResolutionBroadening{"mcCellEnergyResolutionBroadening", 0., "Relative widening of the MC cell energy resolution. 0 for no widening, 0.1 for 10% widening, etc. Only applied to MC."};

// Require EMCAL cells (CALO type 1)
Filter emccellfilter = aod::calo::caloType == selectedCellType;
Expand Down Expand Up @@ -227,11 +228,11 @@

// Define the cell energy binning
std::vector<double> cellEnergyBins;
for (int i = 0; i < 51; i++)

Check failure on line 231 in PWGJE/TableProducer/emcalCorrectionTask.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.
cellEnergyBins.emplace_back(0.1 * (i - 0) + 0.0); // from 0 to 5 GeV/c, every 0.1 GeV
for (int i = 51; i < 76; i++)

Check failure on line 233 in PWGJE/TableProducer/emcalCorrectionTask.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.
cellEnergyBins.emplace_back(0.2 * (i - 51) + 5.2); // from 5.2 to 10.0 GeV, every 0.2 GeV
for (int i = 76; i < 166; i++)

Check failure on line 235 in PWGJE/TableProducer/emcalCorrectionTask.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.
cellEnergyBins.emplace_back(1. * (i - 76) + 11.); // from 11.0 to 100. GeV, every 1 GeV

// Setup QA hists.
Expand Down Expand Up @@ -488,6 +489,9 @@
if (static_cast<bool>(hasShaperCorrection) && emcal::intToChannelType(cell.cellType()) == emcal::ChannelType_t::LOW_GAIN) { // Apply shaper correction to LG cells
amplitude = o2::emcal::NonlinearityHandler::evaluateShaperCorrectionCellEnergy(amplitude);
}
if (mcCellEnergyResolutionBroadening != 0.) {
amplitude *= (1. + normalgaus(rdgen) * mcCellEnergyResolutionBroadening); // Fine tune the MC cell energy resolution
}
cellsBC.emplace_back(cell.cellNumber(),
amplitude,
cell.time() + getCellTimeShift(cell.cellNumber(), amplitude, o2::emcal::intToChannelType(cell.cellType()), runNumber),
Expand Down Expand Up @@ -884,7 +888,7 @@
}
// Tracks that do not point to the EMCal/DCal/PHOS get default values of -999
// This way we can cut out tracks that do not point to the EMCal+DCal
if (track.trackEtaEmcal() < -900 || track.trackPhiEmcal() < -900) {

Check failure on line 891 in PWGJE/TableProducer/emcalCorrectionTask.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.
continue;
}
if (trackMinPt > 0 && track.pt() < trackMinPt) {
Expand Down Expand Up @@ -950,7 +954,7 @@
return cellAbsScaleFactors.value[mClusterizers.at(0)->getGeometry()->GetSMType(iSM)];

// Apply cell scale based on columns to accoutn for material of TRD structures
} else if (applyCellAbsScale == 2) {

Check failure on line 957 in PWGJE/TableProducer/emcalCorrectionTask.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.
auto res = mClusterizers.at(0)->getGeometry()->GlobalRowColFromIndex(cellID);
return cellAbsScaleFactors.value[std::get<1>(res)];
} else {
Expand Down
Loading