Skip to content

Commit 6ca89e3

Browse files
authored
[PWGLF] Added QC checks for resonance injected MC (#9599)
1 parent b5fb90a commit 6ca89e3

File tree

1 file changed

+31
-14
lines changed

1 file changed

+31
-14
lines changed

PWGLF/Tasks/Resonances/higherMassResonances.cxx

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct HigherMassResonances {
7777
Configurable<bool> globalTracks{"globalTracks", false, "Global tracks"};
7878
Configurable<bool> hasTPC{"hasTPC", false, "TPC"};
7979

80-
// Configurable for event selection
80+
// Configurables for event selection
8181
Configurable<float> cutzvertex{"cutzvertex", 10.0f, "Accepted z-vertex range (cm)"};
8282
Configurable<float> cfgETAcut{"cfgETAcut", 0.8f, "Track ETA cut"};
8383
Configurable<bool> timFrameEvsel{"timFrameEvsel", false, "TPC Time frame boundary cut"};
@@ -133,7 +133,7 @@ struct HigherMassResonances {
133133
Configurable<bool> rapidityks{"rapidityks", true, "rapidity cut on K0s"};
134134
Configurable<bool> applyCompetingcut{"applyCompetingcut", false, "Competing cascade rejection cut"};
135135
Configurable<float> competingcascrejlambda{"competingcascrejlambda", 0.005, "rejecting competing cascade lambda"};
136-
Configurable<float> competingcascrejlambdaanti{"competingcascrejlambdaanti", 0.005, "rejecting competing cascade anti-lambda"}; // If one of the pions is misidentified as a proton, then instead of Ks we reconstruct lambda, therefore the competing cascade rejection cut is applied in which if the reconstrcted mass of a pion and proton (which we are assuming to be misidentified as proton) is close to lambda or anti-lambda, then the track is rejected.
136+
Configurable<float> competingcascrejlambdaanti{"competingcascrejlambdaanti", 0.005, "rejecting competing cascade anti-lambda"}; // If one of the pions is misidentified as a proton, then instead of Ks we reconstruct lambda, therefore the competing cascade rejection cut is applied in which if the reconstrcted mass of a pion and proton (which we are assuming to be misidentified as proton) is close to lambda or anti-lambda, then the track is rejected
137137
Configurable<int> tpcCrossedrows{"tpcCrossedrows", 70, "TPC crossed rows"};
138138
Configurable<float> tpcCrossedrowsOverfcls{"tpcCrossedrowsOverfcls", 0.8, "TPC crossed rows over findable clusters"};
139139

@@ -283,12 +283,18 @@ struct HigherMassResonances {
283283
// For MC
284284
hMChists.add("events_check", "No. of events in the generated MC", kTH1I, {{20, 0, 20}});
285285
hMChists.add("events_checkrec", "No. of events in the reconstructed MC", kTH1I, {{20, 0, 20}});
286-
hMChists.add("Genf1710", "Gen f_{0}(1710)", kTH1F, {ptAxis});
287-
hMChists.add("Recf1710_pt1", "Rec f_{0}(1710) p_{T}", kTH1F, {ptAxis});
288-
hMChists.add("Recf1710_pt2", "Rec f_{0}(1710) p_{T}", kTH1F, {ptAxis});
286+
hMChists.add("Genf1710", "Gen f_{0}(1710)", kTHnSparseF, {multiplicityAxis, ptAxis});
287+
hMChists.add("Recf1710_pt1", "Rec f_{0}(1710) p_{T}", kTHnSparseF, {multiplicityAxis, ptAxis, glueballMassAxis});
288+
hMChists.add("Recf1710_pt2", "Rec f_{0}(1710) p_{T}", kTHnSparseF, {multiplicityAxis, ptAxis, glueballMassAxis});
289289
hMChists.add("Recf1710_p", "Rec f_{0}(1710) p", kTH1F, {ptAxis});
290290
hMChists.add("Recf1710_mass", "Rec f_{0}(1710) mass", kTH1F, {glueballMassAxis});
291291
hMChists.add("Genf1710_mass", "Gen f_{0}(1710) mass", kTH1F, {glueballMassAxis});
292+
hMChists.add("GenEta", "Gen Eta", kTH1F, {{100, -1.0f, 1.0f}});
293+
hMChists.add("GenPhi", "Gen Phi", kTH1F, {{70, 0.0f, 7.0f}});
294+
hMChists.add("GenRapidity", "Gen Rapidity", kTH1F, {{100, -1.0f, 1.0f}});
295+
hMChists.add("RecEta", "Rec Eta", kTH1F, {{100, -1.0f, 1.0f}});
296+
hMChists.add("RecPhi", "Rec Phi", kTH1F, {{70, 0.0f, 7.0f}});
297+
hMChists.add("RecRapidity", "Rec Rapidity", kTH1F, {{100, -1.0f, 1.0f}});
292298
hMChists.add("MC_mult", "Multiplicity in MC", kTH1F, {multiplicityAxis});
293299
hMChists.add("MC_mult_after_event_sel", "Multiplicity in MC", kTH1F, {multiplicityAxis});
294300

@@ -547,7 +553,7 @@ struct HigherMassResonances {
547553
using TrackCandidates = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::pidTPCFullPi, aod::pidTOFFullPi>>;
548554
using V0TrackCandidate = aod::V0Datas;
549555
// For Monte Carlo
550-
using EventCandidatesMC = soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels, aod::CentFT0Cs>;
556+
using EventCandidatesMC = soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels, aod::CentFT0Cs, aod::CentFT0Ms>;
551557
using TrackCandidatesMC = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::McTrackLabels>>;
552558
using V0TrackCandidatesMC = soa::Join<aod::V0Datas, aod::McV0Labels>;
553559

@@ -963,6 +969,7 @@ struct HigherMassResonances {
963969
PROCESS_SWITCH(HigherMassResonances, processME, "mixed event process", true);
964970

965971
int counter = 0;
972+
// float multiplicity_gen = 0.0;
966973
void processGen(aod::McCollision const& mcCollision, aod::McParticles const& mcParticles, const soa::SmallGroups<EventCandidatesMC>& collisions)
967974
{
968975
TLorentzVector genvec;
@@ -984,6 +991,7 @@ struct HigherMassResonances {
984991

985992
std::vector<int64_t> selectedEvents(collisions.size());
986993
int nevts = 0;
994+
float multiplicity_gen = 0.0;
987995
for (const auto& collision : collisions) {
988996
if (std::abs(collision.mcCollision().posZ()) > cutzvertex) {
989997
continue;
@@ -996,15 +1004,17 @@ struct HigherMassResonances {
9961004
continue;
9971005
}
9981006

1007+
multiplicity_gen = collision.centFT0M();
1008+
9991009
selectedEvents[nevts++] = collision.mcCollision_as<aod::McCollisions>().globalIndex();
10001010
}
10011011
selectedEvents.resize(nevts);
10021012
hMChists.fill(HIST("events_check"), 3.5);
1003-
// const auto evtReconstructedAndSelected = std::find(selectedEvents.begin(), selectedEvents.end(), mcCollision.globalIndex()) != selectedEvents.end();
1013+
const auto evtReconstructedAndSelected = std::find(selectedEvents.begin(), selectedEvents.end(), mcCollision.globalIndex()) != selectedEvents.end();
10041014

1005-
// if (!allGenCollisions && !evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection
1006-
// return;
1007-
// }
1015+
if (!allGenCollisions && !evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection
1016+
return;
1017+
}
10081018
hMChists.fill(HIST("events_check"), 4.5);
10091019
for (const auto& mcParticle : mcParticles) {
10101020
if (std::abs(mcParticle.y()) >= 0.5) {
@@ -1047,8 +1057,11 @@ struct HigherMassResonances {
10471057
}
10481058
if (passKs) {
10491059
genvec.SetPtEtaPhiE(mcParticle.pt(), mcParticle.eta(), mcParticle.phi(), mcParticle.e());
1050-
hMChists.fill(HIST("Genf1710"), mcParticle.pt());
10511060
hMChists.fill(HIST("Genf1710_mass"), genvec.M());
1061+
hMChists.fill(HIST("Genf1710"), multiplicity_gen, mcParticle.pt());
1062+
hMChists.fill(HIST("GenRapidity"), genvec.Rapidity());
1063+
hMChists.fill(HIST("GenPhi"), genvec.Phi());
1064+
hMChists.fill(HIST("GenEta"), genvec.Eta());
10521065
}
10531066
}
10541067
}
@@ -1071,7 +1084,7 @@ struct HigherMassResonances {
10711084
return;
10721085
}
10731086
hMChists.fill(HIST("events_checkrec"), 1.5);
1074-
// if (std::abs(collision.mcCollision().posZ()) > cutzvertex || !collision.sel8()) {
1087+
// // if (std::abs(collision.mcCollision().posZ()) > cutzvertex || !collision.sel8()) {
10751088
if (std::abs(collision.mcCollision().posZ()) > cutzvertex) {
10761089
return;
10771090
}
@@ -1224,9 +1237,13 @@ struct HigherMassResonances {
12241237

12251238
hMChists.fill(HIST("Recf1710_p"), motherP);
12261239
hMChists.fill(HIST("Recf1710_mass"), recMass);
1227-
hMChists.fill(HIST("Recf1710_pt1"), mothertrack1.pt());
1240+
hMChists.fill(HIST("Recf1710_pt1"), multiplicity, mothertrack1.pt(), recMass);
12281241
// hMChists.fill(HIST("Genf1710_mass"), genMass);
1229-
hMChists.fill(HIST("Recf1710_pt2"), lResonance.Pt());
1242+
hMChists.fill(HIST("Recf1710_pt2"), multiplicity, lResonance.Pt(), recMass);
1243+
1244+
hMChists.fill(HIST("RecRapidity"), mothertrack1.y());
1245+
hMChists.fill(HIST("RecPhi"), mothertrack1.phi());
1246+
hMChists.fill(HIST("RecEta"), mothertrack1.eta());
12301247
}
12311248
gindex2.clear();
12321249
}

0 commit comments

Comments
 (0)