@@ -66,22 +66,22 @@ struct LfITSTPCMatchingSecondaryTracksQA {
6666 Configurable<double > zVtx{" zVtx" , 10.0 , " Maximum zVertex" };
6767
6868 // Track Parameters
69- Configurable<float > minITSnCls{" minITSnCls" , 1 .0f , " min number of ITS clusters" };
70- Configurable<float > minNCrossedRowsTPC{" minNCrossedRowsTPC" , 80 .0f , " min number of TPC crossed rows" };
69+ Configurable<float > minITSnCls{" minITSnCls" , 5 .0f , " min number of ITS clusters" };
70+ Configurable<float > minNCrossedRowsTPC{" minNCrossedRowsTPC" , 100 .0f , " min number of TPC crossed rows" };
7171 Configurable<float > maxChi2TPC{" maxChi2TPC" , 4 .0f , " max chi2 per cluster TPC" };
7272 Configurable<float > maxChi2ITS{" maxChi2ITS" , 36 .0f , " max chi2 per cluster ITS" };
7373 Configurable<float > etaMin{" etaMin" , -0 .8f , " eta min" };
7474 Configurable<float > etaMax{" etaMax" , +0 .8f , " eta max" };
7575 Configurable<float > nsigmaTPCmin{" nsigmaTPCmin" , -3 .0f , " Minimum nsigma TPC" };
7676 Configurable<float > nsigmaTPCmax{" nsigmaTPCmax" , +3 .0f , " Maximum nsigma TPC" };
7777 Configurable<float > nsigmaTOFmin{" nsigmaTOFmin" , -3 .0f , " Minimum nsigma TOF" };
78- Configurable<float > nsigmaTOFmax{" nsigmaTOFmax" , +3 .0f , " Maximum nsigma TOF" };
79- Configurable<float > dcaxyMax{" dcaxyMax" , 0 .1f , " dcaxy max" };
80- Configurable<float > dcazMax{" dcazMax" , 0 .1f , " dcaz max" };
78+ Configurable<float > nsigmaTOFmax{" nsigmaTOFmax" , +3 .5f , " Maximum nsigma TOF" };
79+ Configurable<float > dcaxyMax{" dcaxyMax" , 0 .05f , " dcaxy max" };
80+ Configurable<float > dcazMax{" dcazMax" , 0 .05f , " dcaz max" };
8181 Configurable<float > dcaMin{" dcaMin" , 0 .1f , " dca min" };
8282 Configurable<bool > requireTOF{" requireTOF" , false , " require TOF hit" };
8383 Configurable<bool > requireItsHits{" requireItsHits" , false , " require ITS hits" };
84- Configurable<std::vector<float >> requiredHit{" requiredHit" , {0 , 0 , 0 , 0 , 0 , 0 , 0 }, " required ITS Hits (1=required, 0=not required)" };
84+ Configurable<std::vector<float >> requiredHit{" requiredHit" , {1 , 1 , 1 , 0 , 0 , 0 , 0 }, " required ITS Hits (1=required, 0=not required)" };
8585
8686 // V0 Parameters
8787 Configurable<float > minimumV0Radius{" minimumV0Radius" , 0 .0f , " Minimum V0 Radius" };
@@ -106,6 +106,8 @@ struct LfITSTPCMatchingSecondaryTracksQA {
106106 registryData.add (" secPionTPC_ITS" , " secPionTPC_ITS" , HistType::kTH3D , {{100 , 0 , 10 , " #it{p}_{T} (GeV/#it{c})" }, {16 , -0.8 , 0.8 , " #eta" }, {100 , 0 , TwoPI, " #phi" }});
107107 registryData.add (" secPionV0TPC" , " secPionV0TPC" , HistType::kTH3D , {{100 , 0 , 10 , " #it{p}_{T} (GeV/#it{c})" }, {16 , -0.8 , 0.8 , " #eta" }, {100 , 0 , TwoPI, " #phi" }});
108108 registryData.add (" secPionV0TPC_ITS" , " secPionV0TPC_ITS" , HistType::kTH3D , {{100 , 0 , 10 , " #it{p}_{T} (GeV/#it{c})" }, {16 , -0.8 , 0.8 , " #eta" }, {100 , 0 , TwoPI, " #phi" }});
109+ registryData.add (" primProtonTPC" , " primProtonTPC" , HistType::kTH1D , {{500 , 0 , 5 , " #it{p}_{T} (GeV/#it{c})" }});
110+ registryData.add (" primProtonITS" , " primProtonITS" , HistType::kTH1D , {{500 , 0 , 5 , " #it{p}_{T} (GeV/#it{c})" }});
109111 }
110112
111113 if (doprocessMC) {
@@ -118,6 +120,8 @@ struct LfITSTPCMatchingSecondaryTracksQA {
118120 registryMC.add (" secPionTPC_ITS_MC" , " secPionTPC_ITS_MC" , HistType::kTH3D , {{100 , 0 , 10 , " #it{p}_{T} (GeV/#it{c})" }, {16 , -0.8 , 0.8 , " #eta" }, {100 , 0 , TwoPI, " #phi" }});
119121 registryMC.add (" secPionV0TPC_MC" , " secPionV0TPC_MC" , HistType::kTH3D , {{100 , 0 , 10 , " #it{p}_{T} (GeV/#it{c})" }, {16 , -0.8 , 0.8 , " #eta" }, {100 , 0 , TwoPI, " #phi" }});
120122 registryMC.add (" secPionV0TPC_ITS_MC" , " secPionV0TPC_ITS_MC" , HistType::kTH3D , {{100 , 0 , 10 , " #it{p}_{T} (GeV/#it{c})" }, {16 , -0.8 , 0.8 , " #eta" }, {100 , 0 , TwoPI, " #phi" }});
123+ registryMC.add (" primProtonTPC_MC" , " primProtonTPC_MC" , HistType::kTH1D , {{500 , 0 , 5 , " #it{p}_{T} (GeV/#it{c})" }});
124+ registryMC.add (" primProtonITS_MC" , " primProtonITS_MC" , HistType::kTH1D , {{500 , 0 , 5 , " #it{p}_{T} (GeV/#it{c})" }});
121125 }
122126 }
123127
@@ -210,6 +214,43 @@ struct LfITSTPCMatchingSecondaryTracksQA {
210214 return true ;
211215 }
212216
217+ template <typename protonTrack>
218+ bool passedProtonSelection (const protonTrack& track)
219+ {
220+ // Switch between TPC and TOF analysis
221+ static constexpr double kPtThreshold = 0.6 ;
222+
223+ // TPC Selection
224+ if (track.pt () < kPtThreshold && (track.tpcNSigmaPr () < nsigmaTPCmin || track.tpcNSigmaPr () > nsigmaTPCmax))
225+ return false ;
226+
227+ // TOF Selection
228+ if (track.pt () > kPtThreshold && (track.tpcNSigmaPr () < nsigmaTPCmin || track.tpcNSigmaPr () > nsigmaTPCmax || track.tofNSigmaPr () < nsigmaTOFmin || track.tofNSigmaPr () > nsigmaTOFmax))
229+ return false ;
230+ return true ;
231+ }
232+
233+ template <typename ItsTrack>
234+ bool passedTrackSelectionItsPrimary (const ItsTrack& track)
235+ {
236+ if (!track.hasITS ())
237+ return false ;
238+ if (track.itsNCls () < minITSnCls)
239+ return false ;
240+ if (track.itsChi2NCl () > maxChi2ITS)
241+ return false ;
242+
243+ auto requiredItsHit = static_cast <std::vector<float >>(requiredHit);
244+ if (requireItsHits) {
245+ for (int i = 0 ; i < 7 ; i++) {
246+ if (requiredItsHit[i] > 0 && !hasHitOnITSlayer (track.itsClusterMap (), i)) {
247+ return false ;
248+ }
249+ }
250+ }
251+ return true ;
252+ }
253+
213254 template <typename ItsTrack>
214255 bool passedTrackSelectionIts (const ItsTrack& track)
215256 {
@@ -245,6 +286,27 @@ struct LfITSTPCMatchingSecondaryTracksQA {
245286 return ;
246287 registryData.fill (HIST (" number_of_events_data" ), 1.5 );
247288
289+ // Reject events near the ITS Read-Out Frame border
290+ if (!collision.selection_bit (o2::aod::evsel::kNoITSROFrameBorder ))
291+ return ;
292+ registryData.fill (HIST (" number_of_events_data" ), 2.5 );
293+
294+ // Reject events at the Time Frame border
295+ if (!collision.selection_bit (o2::aod::evsel::kNoTimeFrameBorder ))
296+ return ;
297+ registryData.fill (HIST (" number_of_events_data" ), 3.5 );
298+
299+ // Reject events with same-bunch pileup
300+ if (!collision.selection_bit (o2::aod::evsel::kNoSameBunchPileup ))
301+ return ;
302+ registryData.fill (HIST (" number_of_events_data" ), 4.5 );
303+
304+ // Require consistent FT0 vs PV z-vertex
305+ if (!collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV ))
306+ return ;
307+ registryData.fill (HIST (" number_of_events_data" ), 5.5 );
308+
309+ // Loop over reconstructed tracks
248310 for (const auto & track : tracks) {
249311
250312 // DCA distributions
@@ -253,6 +315,12 @@ struct LfITSTPCMatchingSecondaryTracksQA {
253315 registryData.fill (HIST (" dcazDatavspt" ), track.pt (), track.dcaZ ());
254316 }
255317
318+ // Primary protons
319+ if (passedTrackSelectionTpcPrimary (track) && passedProtonSelection (track))
320+ registryData.fill (HIST (" primProtonTPC" ), track.pt ());
321+ if (passedTrackSelectionTpcPrimary (track) && passedProtonSelection (track) && passedTrackSelectionItsPrimary (track))
322+ registryData.fill (HIST (" primProtonITS" ), track.pt ());
323+
256324 // Primary Tracks
257325 if (passedTrackSelectionTpcPrimary (track) && passedPionSelection (track))
258326 registryData.fill (HIST (" primPionTPC" ), track.pt (), track.eta (), TVector2::Phi_0_2pi (track.phi ()));
@@ -293,9 +361,30 @@ struct LfITSTPCMatchingSecondaryTracksQA {
293361 for (const auto & collision : collisions) {
294362 registryMC.fill (HIST (" number_of_events_mc" ), 0.5 );
295363
364+ // Event Selection
296365 if (!collision.sel8 () || std::fabs (collision.posZ ()) > zVtx)
297366 continue ;
298- registryMC.fill (HIST (" number_of_events_mc" ), 1.5 );
367+ registryData.fill (HIST (" number_of_events_mc" ), 1.5 );
368+
369+ // Reject events near the ITS Read-Out Frame border
370+ if (!collision.selection_bit (o2::aod::evsel::kNoITSROFrameBorder ))
371+ continue ;
372+ registryData.fill (HIST (" number_of_events_mc" ), 2.5 );
373+
374+ // Reject events at the Time Frame border
375+ if (!collision.selection_bit (o2::aod::evsel::kNoTimeFrameBorder ))
376+ continue ;
377+ registryData.fill (HIST (" number_of_events_mc" ), 3.5 );
378+
379+ // Reject events with same-bunch pileup
380+ if (!collision.selection_bit (o2::aod::evsel::kNoSameBunchPileup ))
381+ continue ;
382+ registryData.fill (HIST (" number_of_events_mc" ), 4.5 );
383+
384+ // Require consistent FT0 vs PV z-vertex
385+ if (!collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV ))
386+ continue ;
387+ registryData.fill (HIST (" number_of_events_mc" ), 5.5 );
299388
300389 auto v0sPerColl = fullV0s.sliceBy (perCollisionV0, collision.globalIndex ());
301390 auto tracksPerColl = mcTracks.sliceBy (perCollisionTrk, collision.globalIndex ());
@@ -308,6 +397,12 @@ struct LfITSTPCMatchingSecondaryTracksQA {
308397 registryMC.fill (HIST (" dcazMCvspt" ), track.pt (), track.dcaZ ());
309398 }
310399
400+ // Primary protons
401+ if (passedTrackSelectionTpcPrimary (track) && passedProtonSelection (track))
402+ registryMC.fill (HIST (" primProtonTPC_MC" ), track.pt ());
403+ if (passedTrackSelectionTpcPrimary (track) && passedProtonSelection (track) && passedTrackSelectionItsPrimary (track))
404+ registryMC.fill (HIST (" primProtonITS_MC" ), track.pt ());
405+
311406 // Primary Tracks
312407 if (passedTrackSelectionTpcPrimary (track) && passedPionSelection (track))
313408 registryMC.fill (HIST (" primPionTPC_MC" ), track.pt (), track.eta (), TVector2::Phi_0_2pi (track.phi ()));
0 commit comments