@@ -62,7 +62,8 @@ struct DiHadronCor {
6262 O2_DEFINE_CONFIGURABLE (cfgCutPtMax, float , 10 .0f , " maximum accepted track pT" )
6363 O2_DEFINE_CONFIGURABLE (cfgCutEta, float , 0 .8f , " Eta cut" )
6464 O2_DEFINE_CONFIGURABLE (cfgCutChi2prTPCcls, float , 2 .5f , " max chi2 per TPC clusters" )
65- O2_DEFINE_CONFIGURABLE (cfgCutTPCclu, float , 70 .0f , " minimum TPC clusters" )
65+ O2_DEFINE_CONFIGURABLE (cfgCutTPCclu, float , 50 .0f , " minimum TPC clusters" )
66+ O2_DEFINE_CONFIGURABLE (cfgCutTPCCrossedRows, float , 70 .0f , " minimum TPC crossed rows" )
6667 O2_DEFINE_CONFIGURABLE (cfgCutITSclu, float , 5 .0f , " minimum ITS clusters" )
6768 O2_DEFINE_CONFIGURABLE (cfgCutDCAz, float , 2 .0f , " max DCA to vertex z" )
6869 O2_DEFINE_CONFIGURABLE (cfgCutMerging, float , 0.0 , " Merging cut on track merge" )
@@ -242,7 +243,11 @@ struct DiHadronCor {
242243 LOGF (fatal, " Full simulation and on-the-fly processing of mixed event not supported" );
243244 }
244245 if (doprocessMCSame || doprocessOntheflySame) {
245- registry.add (" MCTrue/MCeventcount" , " MCeventcount" , {HistType::kTH1F , {{4 , 0 , 4 , " bin" }}}); // histogram to see how many events are in the same and mixed event
246+ registry.add (" MCTrue/MCeventcount" , " MCeventcount" , {HistType::kTH1F , {{5 , 0 , 5 , " bin" }}}); // histogram to see how many events are in the same and mixed event
247+ registry.get <TH1>(HIST (" MCTrue/MCeventcount" ))->GetXaxis ()->SetBinLabel (2 , " same all" );
248+ registry.get <TH1>(HIST (" MCTrue/MCeventcount" ))->GetXaxis ()->SetBinLabel (3 , " same reco" );
249+ registry.get <TH1>(HIST (" MCTrue/MCeventcount" ))->GetXaxis ()->SetBinLabel (4 , " mixed all" );
250+ registry.get <TH1>(HIST (" MCTrue/MCeventcount" ))->GetXaxis ()->SetBinLabel (5 , " mixed reco" );
246251 registry.add (" MCTrue/MCCentrality" , hCentTitle.c_str (), {HistType::kTH1D , {axisCentrality}});
247252 registry.add (" MCTrue/MCNch" , " N_{ch}" , {HistType::kTH1D , {axisMultiplicity}});
248253 registry.add (" MCTrue/MCzVtx" , " MCzVtx" , {HistType::kTH1D , {axisVertex}});
@@ -254,13 +259,15 @@ struct DiHadronCor {
254259 registry.add (" MCTrue/MCdeltaEta_deltaPhi_mixed" , " " , {HistType::kTH2D , {axisDeltaPhi, axisDeltaEta}});
255260 }
256261 if (doprocessMCEfficiency) {
257- registry.add (" MCEffeventcount" , " bin" , {HistType::kTH1F , {{4 , 0 , 4 , " bin" }}});
258- registry.get <TH1>(HIST (" MCEffeventcount" ))->GetXaxis ()->SetBinLabel (1 , " MC" );
259- registry.get <TH1>(HIST (" MCEffeventcount" ))->GetXaxis ()->SetBinLabel (2 , " Reco Primary" );
260- registry.get <TH1>(HIST (" MCEffeventcount" ))->GetXaxis ()->SetBinLabel (3 , " Reco All" );
261- registry.get <TH1>(HIST (" MCEffeventcount" ))->GetXaxis ()->SetBinLabel (4 , " Fake" );
262+ registry.add (" MCEffeventcount" , " bin" , {HistType::kTH1F , {{5 , 0 , 5 , " bin" }}});
263+ registry.get <TH1>(HIST (" MCEffeventcount" ))->GetXaxis ()->SetBinLabel (1 , " All" );
264+ registry.get <TH1>(HIST (" MCEffeventcount" ))->GetXaxis ()->SetBinLabel (2 , " MC" );
265+ registry.get <TH1>(HIST (" MCEffeventcount" ))->GetXaxis ()->SetBinLabel (3 , " Reco Primary" );
266+ registry.get <TH1>(HIST (" MCEffeventcount" ))->GetXaxis ()->SetBinLabel (4 , " Reco All" );
267+ registry.get <TH1>(HIST (" MCEffeventcount" ))->GetXaxis ()->SetBinLabel (5 , " Fake" );
262268 }
263269
270+ LOGF (info, " Initializing correlation container" );
264271 std::vector<AxisSpec> corrAxis = {{axisSample, " Sample" },
265272 {axisVertex, " z-vtx (cm)" },
266273 {axisPtTrigger, " p_{T} (GeV/c)" },
@@ -276,6 +283,8 @@ struct DiHadronCor {
276283
277284 same.setObject (new CorrelationContainer (" sameEvent" , " sameEvent" , corrAxis, effAxis, userAxis));
278285 mixed.setObject (new CorrelationContainer (" mixedEvent" , " mixedEvent" , corrAxis, effAxis, userAxis));
286+
287+ LOGF (info, " End of init" );
279288 }
280289
281290 int getMagneticField (uint64_t timestamp)
@@ -319,7 +328,7 @@ struct DiHadronCor {
319328 template <typename TTrack>
320329 bool trackSelected (TTrack track)
321330 {
322- return ((track.tpcNClsFound () >= cfgCutTPCclu) && (track.itsNCls () >= cfgCutITSclu));
331+ return ((track.tpcNClsFound () >= cfgCutTPCclu) && (track.tpcNClsCrossedRows () >= cfgCutTPCCrossedRows) && (track. itsNCls () >= cfgCutITSclu));
323332 }
324333
325334 template <typename TTrack>
@@ -727,13 +736,14 @@ struct DiHadronCor {
727736
728737 void processMCEfficiency (FilteredMcCollisions::iterator const & mcCollision, soa::SmallGroups<soa::Join<aod::McCollisionLabels, aod::Collisions>> const & collisions, FilteredMcParticles const & mcParticles, FilteredTracksWithMCLabels const & tracks)
729738 {
730- if (cfgSelCollByNch && (tracks.size () < cfgCutMultMin || tracks.size () >= cfgCutMultMax)) {
739+ registry.fill (HIST (" MCEffeventcount" ), 0.5 );
740+ if (cfgSelCollByNch && (mcParticles.size () < cfgCutMultMin || mcParticles.size () >= cfgCutMultMax)) {
731741 return ;
732742 }
733743 // Primaries
734744 for (const auto & mcParticle : mcParticles) {
735745 if (mcParticle.isPhysicalPrimary ()) {
736- registry.fill (HIST (" MCEffeventcount" ), 0 .5 );
746+ registry.fill (HIST (" MCEffeventcount" ), 1 .5 );
737747 same->getTrackHistEfficiency ()->Fill (CorrelationContainer::MC, mcParticle.eta (), mcParticle.pt (), getSpecies (mcParticle.pdgCode ()), 0 ., mcCollision.posZ ());
738748 }
739749 }
@@ -746,16 +756,16 @@ struct DiHadronCor {
746756
747757 for (const auto & track : groupedTracks) {
748758 if (track.has_mcParticle ()) {
749- const auto & mcParticle = track.mcParticle ();
759+ auto mcParticle = track.mcParticle ();
750760 if (mcParticle.isPhysicalPrimary ()) {
751- registry.fill (HIST (" MCEffeventcount" ), 1 .5 );
761+ registry.fill (HIST (" MCEffeventcount" ), 2 .5 );
752762 same->getTrackHistEfficiency ()->Fill (CorrelationContainer::RecoPrimaries, mcParticle.eta (), mcParticle.pt (), getSpecies (mcParticle.pdgCode ()), 0 ., mcCollision.posZ ());
753763 }
754- registry.fill (HIST (" MCEffeventcount" ), 2 .5 );
764+ registry.fill (HIST (" MCEffeventcount" ), 3 .5 );
755765 same->getTrackHistEfficiency ()->Fill (CorrelationContainer::RecoAll, mcParticle.eta (), mcParticle.pt (), getSpecies (mcParticle.pdgCode ()), 0 ., mcCollision.posZ ());
756766 } else {
757767 // fake track
758- registry.fill (HIST (" MCEffeventcount" ), 3 .5 );
768+ registry.fill (HIST (" MCEffeventcount" ), 4 .5 );
759769 same->getTrackHistEfficiency ()->Fill (CorrelationContainer::Fake, track.eta (), track.pt (), 0 , 0 ., mcCollision.posZ ());
760770 }
761771 }
@@ -858,6 +868,7 @@ struct DiHadronCor {
858868 continue ;
859869 }
860870
871+ registry.fill (HIST (" MCTrue/MCeventcount" ), 4.5 );
861872 fillMCCorrelations<CorrelationContainer::kCFStepTrackedOnlyPrim >(tracks1, tracks2, collision1.posZ (), MixedEvent, eventWeight);
862873 }
863874 }
0 commit comments