@@ -58,12 +58,12 @@ struct HfTaskCharmHadronsFemtoDream {
5858 ConfigurableAxis bin4DMult{" bin4Dmult" , {VARIABLE_WIDTH, 0 .0f , 4 .0f , 8 .0f , 12 .0f , 16 .0f , 20 .0f , 24 .0f , 28 .0f , 32 .0f , 36 .0f , 40 .0f , 44 .0f , 48 .0f , 52 .0f , 56 .0f , 60 .0f , 64 .0f , 68 .0f , 72 .0f , 76 .0f , 80 .0f , 84 .0f , 88 .0f , 92 .0f , 96 .0f , 100 .0f , 200 .0f }, " multiplicity Binning for the 4Dimensional plot: k* vs multiplicity vs multiplicity percentile vs mT (set <<Confuse4D>> to true in order to use)" };
5959 ConfigurableAxis bin4DmT{" bin4DmT" , {VARIABLE_WIDTH, 1 .02f , 1 .14f , 1 .20f , 1 .26f , 1 .38f , 1 .56f , 1 .86f , 4 .50f }, " mT Binning for the 4Dimensional plot: k* vs multiplicity vs multiplicity percentile vs mT (set <<Confuse4D>> to true in order to use)" };
6060 ConfigurableAxis bin4DmultPercentile{" bin4DmultPercentile" , {10 , 0 .0f , 100 .0f }, " multiplicity percentile Binning for the 4Dimensional plot: k* vs multiplicity vs multiplicity percentile vs mT (set <<Confuse4D>> to true in order to use)" };
61- ConfigurableAxis binInvMass{" binInvMass" , {300 , 2.15 , 2.45 }, " InvMass binning" };
61+ ConfigurableAxis binInvMass{" binInvMass" , {400 , 2.10 , 2.50 }, " InvMass binning" };
62+ ConfigurableAxis binpTCharm{" binpTCharm" , {360 , 0 , 36 }, " pT binning of charm hadron" };
6263 ConfigurableAxis binTempFitVarTrack{" binTempFitVarTrack" , {300 , -0.15 , 0.15 }, " binning of the TempFitVar in the pT vs. TempFitVar plot (Track)" };
6364 ConfigurableAxis binmT{" binmT" , {225 , 0 ., 7.5 }, " binning mT" };
6465 ConfigurableAxis binmultTempFit{" binmultTempFit" , {1 , 0 , 1 }, " multiplicity Binning for the TempFitVar plot" };
6566 ConfigurableAxis binMulPercentile{" binMulPercentile" , {10 , 0 .0f , 100 .0f }, " multiplicity percentile Binning" };
66- ConfigurableAxis binpT{" binpT" , {20 , 0.5 , 4.05 }, " pT binning" };
6767 ConfigurableAxis binpTTrack{" binpTTrack" , {50 , 0.5 , 10.05 }, " pT binning of the pT vs. TempFitVar plot (Track)" };
6868 ConfigurableAxis binEta{" binEta" , {{200 , -1.5 , 1.5 }}, " eta binning" };
6969 ConfigurableAxis binPhi{" binPhi" , {{200 , 0 , TMath::TwoPi ()}}, " phi binning" };
@@ -167,12 +167,15 @@ struct HfTaskCharmHadronsFemtoDream {
167167 femtodreamcollision::BitMaskType BitMask = 1 << 0 ;
168168
169169 // / Histogramming for particle 1
170- FemtoDreamParticleHisto<aod::femtodreamparticle::ParticleType::kTrack , 1 > trackHistoPartOne;
170+ FemtoDreamParticleHisto<aod::femtodreamparticle::ParticleType::kTrack , 1 > allTrackHisto;
171+ FemtoDreamParticleHisto<aod::femtodreamparticle::ParticleType::kTrack , 5 > selectedTrackHisto;
172+
171173 // / Histogramming for Event
172174 FemtoDreamEventHisto eventHisto;
173175 // / Histogram output
174176 HistogramRegistry registry{" CorrelationsAndQA" , {}, OutputObjHandlingPolicy::AnalysisObject};
175177 HistogramRegistry registryMixQa{" registryMixQa" };
178+ HistogramRegistry registryCharmHadronQa{" registryCharmHadronQa" };
176179 // / Partition for particle 1
177180
178181 Partition<FilteredFDParticles> partitionTrk1 = (aod::femtodreamparticle::partType == uint8_t (aod::femtodreamparticle::ParticleType::kTrack )) && (ncheckbit(aod::femtodreamparticle::cut, cutBitTrack1)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1 .f * aod::femtodreamparticle::eta)) / 2 .f <= pidThresTrack1, ncheckbit(aod::femtodreamparticle::pidcut, tpcBitTrack1), ncheckbit(aod::femtodreamparticle::pidcut, tpcTofBitTrack1));
@@ -201,27 +204,30 @@ struct HfTaskCharmHadronsFemtoDream {
201204 colBinningMultPercentile = {{mixingBinVztx, mixingBinMultPercentile}, true };
202205 colBinningMultMultPercentile = {{mixingBinVztx, mixingBinMult, mixingBinMultPercentile}, true };
203206 eventHisto.init (®istry);
204- trackHistoPartOne.init (®istry, binmultTempFit, binMulPercentile, binpTTrack, binEta, binPhi, binTempFitVarTrack, binNSigmaTPC, binNSigmaTOF, binNSigmaTPCTOF, binTPCClusters, dummy, isMc, pdgCodeTrack1, true );
207+ allTrackHisto.init (®istry, binmultTempFit, binMulPercentile, binpTTrack, binEta, binPhi, binTempFitVarTrack, binNSigmaTPC, binNSigmaTOF, binNSigmaTPCTOF, binTPCClusters, dummy, isMc, pdgCodeTrack1, true );
208+ selectedTrackHisto.init (®istry, binmultTempFit, binMulPercentile, binpTTrack, binEta, binPhi, binTempFitVarTrack, binNSigmaTPC, binNSigmaTOF, binNSigmaTPCTOF, binTPCClusters, dummy, isMc, pdgCodeTrack1, true );
205209
206210 sameEventCont.init <true >(®istry,
207- binkstar, binpT , binkT, binmT, mixingBinMult, mixingBinMultPercentile,
211+ binkstar, binpTTrack , binkT, binmT, mixingBinMult, mixingBinMultPercentile,
208212 bin4Dkstar, bin4DmT, bin4DMult, bin4DmultPercentile,
209213 isMc, use4D, extendedPlots,
210214 highkstarCut,
211215 smearingByOrigin, binInvMass);
212216
213217 sameEventCont.setPDGCodes (pdgCodeTrack1, charmHadPDGCode);
214218 mixedEventCont.init <true >(®istry,
215- binkstar, binpT , binkT, binmT, mixingBinMult, mixingBinMultPercentile,
219+ binkstar, binpTTrack , binkT, binmT, mixingBinMult, mixingBinMultPercentile,
216220 bin4Dkstar, bin4DmT, bin4DMult, bin4DmultPercentile,
217221 isMc, use4D, extendedPlots,
218222 highkstarCut,
219223 smearingByOrigin, binInvMass);
220224
221225 mixedEventCont.setPDGCodes (pdgCodeTrack1, charmHadPDGCode);
222- registryMixQa.add (" MixingQA/hSECollisionBins" , " ;bin;Entries" , kTH1F , {{120 , -0.5 , 119.5 }});
223- registryMixQa.add (" MixingQA/hSECollisionPool" , " ;bin;Entries" , kTH2F , {{100 , -10 , 10 }, {2000 , 0 , 200 }});
224- registryMixQa.add (" MixingQA/hMECollisionBins" , " ;bin;Entries" , kTH1F , {{120 , -0.5 , 119.5 }});
226+ registryMixQa.add (" MixingQA/hSECollisionBins" , " ; bin; Entries" , kTH1F , {{120 , -0.5 , 119.5 }});
227+ registryMixQa.add (" MixingQA/hSECollisionPool" , " ; Vz (cm); Mul" , kTH2F , {{100 , -10 , 10 }, {200 , 0 , 200 }});
228+ registryMixQa.add (" MixingQA/hMECollisionBins" , " ; bin; Entries" , kTH1F , {{120 , -0.5 , 119.5 }});
229+ registryCharmHadronQa.add (" CharmHadronQA/hPtVsMass" , " ; #it{p}_{T} (GeV/#it{c}); inv. mass (GeV/#it{c}^{2})" , kTH2F , {binpTCharm, binInvMass});
230+
225231 pairCleaner.init (®istry);
226232 if (useCPR.value ) {
227233 pairCloseRejectionSE.init (®istry, ®istry, cprDeltaPhiMax.value , cprDeltaEtaMax.value , cprPlotPerRadii.value , 1 );
@@ -243,11 +249,6 @@ struct HfTaskCharmHadronsFemtoDream {
243249 fillCollision (col);
244250
245251 processType = 1 ; // for same event
246- // / Histogramming same event
247- for (auto const & part : sliceTrk1) {
248-
249- trackHistoPartOne.fillQA <isMc, true >(part, static_cast <aod::femtodreamparticle::MomentumType>(ConfTempFitVarMomentum.value ), col.multNtr (), col.multV0M ());
250- }
251252
252253 for (auto const & [p1, p2] : combinations (CombinationsFullIndexPolicy (sliceTrk1, sliceCharmHad))) {
253254
@@ -304,6 +305,8 @@ struct HfTaskCharmHadronsFemtoDream {
304305 if (p2.pt () < charmHadMinPt || p2.pt () > charmHadMaxPt) {
305306 continue ;
306307 }
308+ // / Filling QA histograms of the selected tracks
309+ selectedTrackHisto.fillQA <isMc, true >(p1, static_cast <aod::femtodreamparticle::MomentumType>(ConfTempFitVarMomentum.value ), col.multNtr (), col.multV0M ());
307310
308311 int charmHadMc = 0 ;
309312 int originType = 0 ;
@@ -427,12 +430,26 @@ struct HfTaskCharmHadronsFemtoDream {
427430 FilteredFDParticles const & parts,
428431 FilteredCharmCands const &)
429432 {
430- if ((col.bitmaskTrackOne () & BitMask) != BitMask || (col.bitmaskTrackTwo () & BitMask) != BitMask) {
431- return ;
432- }
433433 eventHisto.fillQA (col);
434434 auto sliceTrk1 = partitionTrk1->sliceByCached (aod::femtodreamparticle::fdCollisionId, col.globalIndex (), cache);
435435 auto sliceCharmHad = partitionCharmHadron->sliceByCached (aod::femtodreamparticle::fdCollisionId, col.globalIndex (), cache);
436+ // / Filling QA histograms of the all tracks and all charm hadrons before pairing
437+ for (auto const & part : sliceTrk1) {
438+ allTrackHisto.fillQA <false , true >(part, static_cast <aod::femtodreamparticle::MomentumType>(ConfTempFitVarMomentum.value ), col.multNtr (), col.multV0M ());
439+ }
440+ for (auto const & part : sliceCharmHad) {
441+ float invMass;
442+ if (part.candidateSelFlag () == 1 ) {
443+ invMass = part.m (std::array{o2::constants::physics::MassProton, o2::constants::physics::MassKPlus, o2::constants::physics::MassPiPlus});
444+ } else {
445+ invMass = part.m (std::array{o2::constants::physics::MassPiPlus, o2::constants::physics::MassKPlus, o2::constants::physics::MassProton});
446+ }
447+ registryCharmHadronQa.fill (HIST (" CharmHadronQA/hPtVsMass" ), part.pt (), invMass);
448+ }
449+
450+ if ((col.bitmaskTrackOne () & BitMask) != BitMask || (col.bitmaskTrackTwo () & BitMask) != BitMask) {
451+ return ;
452+ }
436453 doSameEvent<false >(sliceTrk1, sliceCharmHad, parts, col);
437454 }
438455 PROCESS_SWITCH (HfTaskCharmHadronsFemtoDream, processSameEvent, " Enable processing same event" , false );
@@ -467,15 +484,22 @@ struct HfTaskCharmHadronsFemtoDream {
467484 o2::aod::FDExtMCParticles const &,
468485 FilteredCharmMcCands const &)
469486 {
470- if ((col.bitmaskTrackOne () & BitMask) != BitMask || (col.bitmaskTrackTwo () & BitMask) != BitMask) {
471- return ;
472- }
487+ eventHisto.fillQA (col);
488+
473489 auto sliceMcTrk1 = partitionMcTrk1->sliceByCached (aod::femtodreamparticle::fdCollisionId, col.globalIndex (), cache);
474490 auto sliceMcCharmHad = partitionMcCharmHadron->sliceByCached (aod::femtodreamparticle::fdCollisionId, col.globalIndex (), cache);
475491
476492 if (sliceMcTrk1.size () == 0 && sliceMcCharmHad.size () == 0 ) {
477493 return ;
478494 }
495+ // / Filling QA histograms of the all mc tracks before pairing
496+ for (auto const & part : sliceMcTrk1) {
497+ allTrackHisto.fillQA <true , true >(part, static_cast <aod::femtodreamparticle::MomentumType>(ConfTempFitVarMomentum.value ), col.multNtr (), col.multV0M ());
498+ }
499+
500+ if ((col.bitmaskTrackOne () & BitMask) != BitMask || (col.bitmaskTrackTwo () & BitMask) != BitMask) {
501+ return ;
502+ }
479503 doSameEvent<true >(sliceMcTrk1, sliceMcCharmHad, parts, col);
480504 }
481505 PROCESS_SWITCH (HfTaskCharmHadronsFemtoDream, processSameEventMc, " Enable processing same event for Monte Carlo" , false );
0 commit comments