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
23 changes: 11 additions & 12 deletions PWGEM/PhotonMeson/Tasks/emcalPi0Qc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
photon.SetPxPyPzE(px, py, pz, energy);
id = clusid;
sm = sm_tmp;
onDCal = (phi < 6 && phi > 4);

Check failure on line 83 in PWGEM/PhotonMeson/Tasks/emcalPi0Qc.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.
}

ROOT::Math::PxPyPzEVector photon;
Expand Down Expand Up @@ -271,7 +271,7 @@
}

// add histograms per supermodule
for (int ism = 0; ism < 20; ++ism) {

Check failure on line 274 in PWGEM/PhotonMeson/Tasks/emcalPi0Qc.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.add(Form("clusterTimeVsTimeStamp/clusterTimeVsTimeStampSM%d", ism), Form("Cluster time vs collision timestamp in Supermodule %d", ism), HistType::kTH2F, {clusterTimeAxis, collisionTimeAxis});
mHistManager.add(Form("clusterNcellVsTimeStamp/clusterNCellVsTimeStampSM%d", ism), Form("Cluster number of cells vs collision timestamp in Supermodule %d", ism), HistType::kTH2F, {{50, 0, 50}, collisionTimeAxis});
mHistManager.add(Form("clusterM02VsTimeStamp/clusterM02VsTimeStampSM%d", ism), Form("Cluster M02 vs collision timestamp in Supermodule %d", ism), HistType::kTH2F, {{400, 0, 5}, collisionTimeAxis});
Expand Down Expand Up @@ -320,7 +320,7 @@
void supermoduleHistHelperMeson(float minv, float timeSinceSOR)
{
static constexpr std::string_view MesonInvMassHistSM[20] = {"mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM0", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM1", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM2", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM3", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM4", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM5", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM6", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM7", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM8", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM9", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM10", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM11", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM12", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM13", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM14", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM15", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM16", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM17", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM18", "mesonInvMassVsTimeStamp/mesonInvMassVsTimeStampSM19"};
mHistManager.fill(HIST(MesonInvMassHistSM[supermoduleID]), minv, timeSinceSOR,mWeight);
mHistManager.fill(HIST(MesonInvMassHistSM[supermoduleID]), minv, timeSinceSOR, mWeight);
}

void fillSupermoduleHistogramsPhoton(int supermoduleID, float time, float m02, int NCell, float timeSinceSOR)
Expand Down Expand Up @@ -492,7 +492,7 @@
}
mHistManager.fill(HIST("events"), 3); // Fill readout

if (mDoEventSel.value && collision.numContrib() < 0.5) { // Skip collisions without contributors

Check failure on line 495 in PWGEM/PhotonMeson/Tasks/emcalPi0Qc.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;
}
mHistManager.fill(HIST("events"), 4); // Fill >1 vtx contr. bin of event histogram
Expand Down Expand Up @@ -571,47 +571,47 @@
}
}

mHistManager.fill(HIST("events"), 1, mWeight); // Fill "All events" bin of event histogram
mHistManager.fill(HIST("events"), 1, mWeight); // Fill "All events" bin of event histogram
mHistManager.fill(HIST("eventsWithoutWeight"), 1); // Fill "All events" bin of event histogram without weight
if(collision.has_mcCollision()) {
if (collision.has_mcCollision()) {
mHistManager.fill(HIST("eventsWithoutWeight"), 2); // Fill "Has MC collision" bin of event histogram without weight
}
if (mDoEventSel.value && (!collision.sel8())) { // Check sel8
continue;
}

mHistManager.fill(HIST("events"), 2, mWeight); // Fill sel8
mHistManager.fill(HIST("eventsWithoutWeight"), 3); // Fill sel8 bin of event histogram without weight
mHistManager.fill(HIST("events"), 2, mWeight); // Fill sel8
mHistManager.fill(HIST("eventsWithoutWeight"), 3); // Fill sel8 bin of event histogram without weight
if (mRequireCaloReadout.value && !collision.alias_bit(kTVXinEMC)) { // Check whether EMC was read out
continue;
}
mHistManager.fill(HIST("events"), 3, mWeight); // Fill readout
mHistManager.fill(HIST("eventsWithoutWeight"), 4); // Fill readout bin of event histogram without weight
mHistManager.fill(HIST("events"), 3, mWeight); // Fill readout
mHistManager.fill(HIST("eventsWithoutWeight"), 4); // Fill readout bin of event histogram without weight
if (mDoEventSel.value && collision.numContrib() < 0.5) { // Skip collisions without contributors

Check failure on line 590 in PWGEM/PhotonMeson/Tasks/emcalPi0Qc.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;
}
mHistManager.fill(HIST("events"), 4, mWeight); // Fill >1 vtx contr. bin of event histogram
mHistManager.fill(HIST("events"), 4, mWeight); // Fill >1 vtx contr. bin of event histogram
mHistManager.fill(HIST("eventsWithoutWeight"), 5); // Fill >1 vtx contr. bin of event histogram without weight
mHistManager.fill(HIST("eventVertexZAll"), collision.posZ(), mWeight);
if (mVertexCut > 0 && std::abs(collision.posZ()) > mVertexCut) {
continue;
}
mHistManager.fill(HIST("events"), 5, mWeight); // Fill z-Vertex selected bin of event histogram
mHistManager.fill(HIST("events"), 5, mWeight); // Fill z-Vertex selected bin of event histogram
mHistManager.fill(HIST("eventsWithoutWeight"), 6); // Fill z-Vertex selected bin of event histogram without weight
mHistManager.fill(HIST("eventVertexZSelected"), collision.posZ(), mWeight);

if (mDoEventSel.value && collision.ambiguous()) { // Skip ambiguous collisions (those that are in BCs including multiple collisions)
continue;
}
mHistManager.fill(HIST("events"), 6, mWeight); // Fill "One collision in BC" bin of event histogram
mHistManager.fill(HIST("events"), 6, mWeight); // Fill "One collision in BC" bin of event histogram
mHistManager.fill(HIST("eventsWithoutWeight"), 7); // Fill "One collision in BC" bin of event histogram without weight
if (mDoEventSel.value) {
auto found = cellGlobalBCs.find(collision.foundBC_as<MyBCs>().globalBC());
if (mRequireEMCalCells.value && (found == cellGlobalBCs.end() || found->second == 0)) { // Skip collisions without any readout EMCal cells
continue;
}
}
mHistManager.fill(HIST("events"), 7, mWeight); // Fill at least one non0 cell in EMCal of event histogram (Selected)
mHistManager.fill(HIST("events"), 7, mWeight); // Fill at least one non0 cell in EMCal of event histogram (Selected)
mHistManager.fill(HIST("eventsWithoutWeight"), 8); // Fill at least one non0 cell in EMCal of event histogram (Selected) without weight
// Get BC and run number
int64_t foundBCId = collision.foundBCId();
Expand Down Expand Up @@ -780,7 +780,7 @@
LOG(debug) << "processMesons " << mPhotons.size();

// if less then 2 clusters are found, skip event
if (mPhotons.size() < 2)

Check failure on line 783 in PWGEM/PhotonMeson/Tasks/emcalPi0Qc.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;

// loop over all photon combinations and build meson candidates
Expand Down Expand Up @@ -812,7 +812,6 @@
}
// TODO: for now this part makes no sense when running JJ MC due to weights
calculateMixedBack(mPhotons[ig1]);

}

evtMix.addEvent(mPhotons);
Expand All @@ -822,7 +821,7 @@
void calculateBackground(const Meson& meson, unsigned int ig1, unsigned int ig2)
{
// if less than 3 clusters are present, skip event
if (mPhotons.size() < 3) {

Check failure on line 824 in PWGEM/PhotonMeson/Tasks/emcalPi0Qc.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;
}
const double rotationAngle = o2::constants::math::PIHalf; // 0.78539816339; // rotaion angle 90°
Expand Down Expand Up @@ -910,11 +909,11 @@
int nBinsPt = 179;
double maxPt = 60;
for (int i = 0; i < nBinsPt + 1; i++) {
if (i < 100) {

Check failure on line 912 in PWGEM/PhotonMeson/Tasks/emcalPi0Qc.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.
result.emplace_back(0.10 * i);
} else if (i < 140) {

Check failure on line 914 in PWGEM/PhotonMeson/Tasks/emcalPi0Qc.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.
result.emplace_back(10. + 0.25 * (i - 100));
} else if (i < 180) {

Check failure on line 916 in PWGEM/PhotonMeson/Tasks/emcalPi0Qc.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.
result.emplace_back(20. + 1.00 * (i - 140));
} else {
result.emplace_back(maxPt);
Expand Down
Loading