Skip to content

Commit e232ec2

Browse files
committed
INEL > 0 update, modify code for pull request
1 parent 5a4ad2d commit e232ec2

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

PWGLF/Tasks/Resonances/rho770analysis.cxx

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ using namespace o2::constants::physics;
4242
using LorentzVectorPxPyPzMVector = ROOT::Math::PxPyPzMVector;
4343
using LorentzVectorPxPyPzEVector = ROOT::Math::PxPyPzEVector;
4444

45+
enum {
46+
kKstar
47+
};
48+
4549
struct rho770analysis {
4650
SliceCache cache;
4751
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -107,6 +111,8 @@ struct rho770analysis {
107111
histos.add("hInvMass_Kstar_LSpp", "Kstar ++ invariant mass", {HistType::kTHnSparseF, {massKstarAxis, ptAxis, centAxis}});
108112
histos.add("hInvMass_Kstar_LSmm", "Kstar -- invariant mass", {HistType::kTHnSparseF, {massKstarAxis, ptAxis, centAxis}});
109113

114+
histos.add("QA/hMultiplicityPercent", "Multiplicity percentile of collision", HistType::kTH1F, {centAxis});
115+
110116
histos.add("QA/Nsigma_TPC_BF", "", {HistType::kTH2F, {pTqaAxis, pidqaAxis}});
111117
histos.add("QA/Nsigma_TOF_BF", "", {HistType::kTH2F, {pTqaAxis, pidqaAxis}});
112118
histos.add("QA/TPC_TOF_BF", "", {HistType::kTH2F, {pidqaAxis, pidqaAxis}});
@@ -221,6 +227,8 @@ struct rho770analysis {
221227
template <bool IsMC, typename CollisionType, typename CenMult, typename TracksType>
222228
void fillHistograms(const CollisionType& collision, const CenMult& multiplicity, const TracksType& dTracks)
223229
{
230+
histos.fill(HIST("QA/hMultiplicityPercent"), multiplicity);
231+
224232
LorentzVectorPxPyPzMVector part1, part2, reco;
225233
for (const auto& [trk1, trk2] : combinations(CombinationsUpperIndexPolicy(dTracks, dTracks))) {
226234

@@ -257,17 +265,17 @@ struct rho770analysis {
257265
if constexpr (IsMC) {
258266
if (trk1.motherId() != trk2.motherId())
259267
continue;
260-
if (std::abs(trk1.pdgCode()) == 211 && std::abs(trk2.pdgCode()) == 211) {
261-
if (std::abs(trk1.motherPDG()) == 113) {
268+
if (std::abs(trk1.pdgCode()) == kPiPlus && std::abs(trk2.pdgCode()) == kPiPlus) {
269+
if (std::abs(trk1.motherPDG()) == kRho770_0) {
262270
histos.fill(HIST("MCL/hpT_rho770_REC"), reco.M(), reco.Pt(), multiplicity);
263-
} else if (std::abs(trk1.motherPDG()) == 223) {
271+
} else if (std::abs(trk1.motherPDG()) == kOmega ) {
264272
histos.fill(HIST("MCL/hpT_omega_REC"), reco.M(), reco.Pt(), multiplicity);
265-
} else if (std::abs(trk1.motherPDG()) == 310) {
273+
} else if (std::abs(trk1.motherPDG()) == kK0Short) {
266274
histos.fill(HIST("MCL/hpT_K0s_REC"), reco.M(), reco.Pt(), multiplicity);
267275
histos.fill(HIST("MCL/hpT_K0s_pipi_REC"), reco.M(), reco.Pt(), multiplicity);
268276
}
269-
} else if ((std::abs(trk1.pdgCode()) == 211 && std::abs(trk2.pdgCode()) == 321) || (std::abs(trk1.pdgCode()) == 321 && std::abs(trk2.pdgCode()) == 211)) {
270-
if (std::abs(trk1.motherPDG()) == 313) {
277+
} else if ((std::abs(trk1.pdgCode()) == kPiPlus && std::abs(trk2.pdgCode()) == 321) || (std::abs(trk1.pdgCode()) == 321 && std::abs(trk2.pdgCode()) == kPiPlus)) {
278+
if (std::abs(trk1.motherPDG()) == kK0Star892) {
271279
histos.fill(HIST("MCL/hpT_Kstar_REC"), reco.M(), reco.Pt(), multiplicity);
272280
}
273281
}
@@ -300,7 +308,7 @@ struct rho770analysis {
300308
if constexpr (IsMC) {
301309
if (trk1.motherId() != trk2.motherId())
302310
continue;
303-
if ((std::abs(trk1.pdgCode()) == 211 && std::abs(trk2.pdgCode()) == 321) || (std::abs(trk1.pdgCode()) == 321 && std::abs(trk2.pdgCode()) == 211)) {
311+
if ((std::abs(trk1.pdgCode()) == kPiPlus && std::abs(trk2.pdgCode()) == 321) || (std::abs(trk1.pdgCode()) == 321 && std::abs(trk2.pdgCode()) == kPiPlus)) {
304312
if (std::abs(trk1.motherPDG()) == 313) {
305313
histos.fill(HIST("MCL/hpT_Kstar_Kpi_REC"), reco.M(), reco.Pt(), multiplicity);
306314
}
@@ -366,13 +374,13 @@ struct rho770analysis {
366374
multiplicity = mcColl.centFT0M();
367375

368376
for (const auto& part : resoParents) { // loop over all pre-filtered MC particles
369-
if (std::abs(part.pdgCode()) != 113)
377+
if (std::abs(part.pdgCode()) != kRho770_0)
370378
continue;
371379
if (!part.producedByGenerator())
372380
continue;
373381
if (part.y() < cfgMinRap || part.y() > cfgMaxRap)
374382
continue;
375-
if (!(std::abs(part.daughterPDG1()) == 211 && std::abs(part.daughterPDG2()) == 211))
383+
if (!(std::abs(part.daughterPDG1()) == kPiPlus && std::abs(part.daughterPDG2()) == kPiPlus))
376384
continue;
377385

378386
LorentzVectorPxPyPzEVector truthpar;
@@ -401,4 +409,4 @@ struct rho770analysis {
401409
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
402410
{
403411
return WorkflowSpec{adaptAnalysisTask<rho770analysis>(cfgc)};
404-
}
412+
}

0 commit comments

Comments
 (0)