@@ -48,7 +48,7 @@ using namespace o2::framework::expressions;
4848
4949struct FlowSP {
5050 // QA Plots
51- O2_DEFINE_CONFIGURABLE (cfgFillEventQA , bool , true , " Fill histograms for event QA" );
51+ O2_DEFINE_CONFIGURABLE (cfgFillQAHistos , bool , true , " Fill histograms for event and track QA" );
5252 // Centrality Estimators -> standard is FT0C
5353 O2_DEFINE_CONFIGURABLE (cfgFT0Cvariant1, bool , false , " Set centrality estimator to cfgFT0Cvariant1" );
5454 O2_DEFINE_CONFIGURABLE (cfgFT0M, bool , false , " Set centrality estimator to cfgFT0M" );
@@ -58,6 +58,7 @@ struct FlowSP {
5858 O2_DEFINE_CONFIGURABLE (cfgDCAxy, float , 0.2 , " Cut on DCA in the transverse direction (cm)" );
5959 O2_DEFINE_CONFIGURABLE (cfgDCAz, float , 2 , " Cut on DCA in the longitudinal direction (cm)" );
6060 O2_DEFINE_CONFIGURABLE (cfgNcls, float , 70 , " Cut on number of TPC clusters found" );
61+ O2_DEFINE_CONFIGURABLE (cfgFshcls, float , 0.2 , " Cut on fraction of shared TPC clusters found" );
6162 O2_DEFINE_CONFIGURABLE (cfgPtmin, float , 0.2 , " minimum pt (GeV/c)" );
6263 O2_DEFINE_CONFIGURABLE (cfgPtmax, float , 10 , " maximum pt (GeV/c)" );
6364 O2_DEFINE_CONFIGURABLE (cfgEta, float , 0.8 , " eta cut" );
@@ -197,10 +198,12 @@ struct FlowSP {
197198 }
198199
199200 if ((doprocessData || doprocessMCReco)) {
200- if (cfgFillEventQA ) {
201+ if (cfgFillQAHistos ) {
201202 registry.add (" QA/after/hCent" , " " , {HistType::kTH1D , {axisCent}});
202203 registry.add (" QA/after/pt_phi" , " " , {HistType::kTH2D , {axisPt, axisPhiMod}});
203204 registry.add (" QA/after/hPt_inclusive" , " " , {HistType::kTH1D , {axisPt}});
205+ registry.add (" QA/after/hPt_positive" , " " , {HistType::kTH1D , {axisPt}});
206+ registry.add (" QA/after/hPt_negative" , " " , {HistType::kTH1D , {axisPt}});
204207 registry.add (" QA/after/globalTracks_centT0C" , " " , {HistType::kTH2D , {axisCent, nchAxis}});
205208 registry.add (" QA/after/PVTracks_centT0C" , " " , {HistType::kTH2D , {axisCent, multpvAxis}});
206209 registry.add (" QA/after/globalTracks_PVTracks" , " " , {HistType::kTH2D , {multpvAxis, nchAxis}});
@@ -270,7 +273,7 @@ struct FlowSP {
270273 registry.add <TProfile>(" qAXqCY" , " " , kTProfile , {axisCent});
271274 registry.add <TProfile>(" qAYqCX" , " " , kTProfile , {axisCent});
272275
273- if (cfgFillEventQA ) {
276+ if (cfgFillQAHistos ) {
274277 registry.add (" QA/after/PsiA_vs_Cent" , " " , {HistType::kTH2D , {axisPhiPlane, axisCent}});
275278 registry.add (" QA/after/PsiC_vs_Cent" , " " , {HistType::kTH2D , {axisPhiPlane, axisCent}});
276279 registry.add (" QA/after/PsiFull_vs_Cent" , " " , {HistType::kTH2D , {axisPhiPlane, axisCent}});
@@ -521,6 +524,9 @@ struct FlowSP {
521524 if (track.tpcNClsFound () < cfgNcls)
522525 return false ;
523526
527+ if (track.tpcFractionSharedCls () < cfgFshcls)
528+ return false ;
529+
524530 double phimodn = track.phi ();
525531 if (field < 0 ) // for negative polarity field
526532 phimodn = o2::constants::math::TwoPI - phimodn;
@@ -666,7 +672,8 @@ struct FlowSP {
666672 cfg.correctionsLoaded = false ;
667673 cfg.lastRunNumber = bc.runNumber ();
668674 }
669- fillEventQA<kBefore >(collision, tracks);
675+ if (cfgFillQAHistos)
676+ fillEventQA<kBefore >(collision, tracks);
670677
671678 loadCorrections (bc.timestamp ());
672679
@@ -704,7 +711,8 @@ struct FlowSP {
704711 double psiFull = 1.0 * std::atan2 (qyA + qyC, qxA + qxC);
705712 registry.fill (HIST (" hSPplaneFull" ), psiFull, 1 );
706713
707- fillEventQA<kAfter >(collision, tracks);
714+ if (cfgFillQAHistos)
715+ fillEventQA<kAfter >(collision, tracks);
708716
709717 registry.fill (HIST (" hCosPhiACosPhiC" ), centrality, std::cos (psiA) * std::cos (psiC));
710718 registry.fill (HIST (" hSinPhiASinPhiC" ), centrality, std::sin (psiA) * std::sin (psiC));
@@ -816,12 +824,14 @@ struct FlowSP {
816824 double vtxz = collision.posZ ();
817825 float centrality = collision.centFT0C ();
818826
819- fillEventQA<kBefore >(collision, tracks);
827+ if (cfgFillQAHistos)
828+ fillEventQA<kBefore >(collision, tracks);
820829
821830 if (!eventSelected (collision, tracks.size (), centrality))
822831 return ;
823832
824- fillEventQA<kAfter >(collision, tracks);
833+ if (cfgFillQAHistos)
834+ fillEventQA<kAfter >(collision, tracks);
825835
826836 for (const auto & track : tracks) {
827837
@@ -832,7 +842,16 @@ struct FlowSP {
832842 if (mcParticle.eta () < -cfgEta || mcParticle.eta () > cfgEta || mcParticle.pt () < cfgPtmin || mcParticle.pt () > cfgPtmax || track.tpcNClsFound () < cfgNcls)
833843 return ;
834844
845+ if (track.sign () == 0.0 )
846+ return ;
847+ bool pos = (track.sign () > 0 ) ? true : false ;
848+
835849 registry.fill (HIST (" QA/before/hPt_inclusive" ), track.pt ());
850+ if (pos) {
851+ registry.fill (HIST (" QA/before/hPt_positive" ), track.pt ());
852+ } else {
853+ registry.fill (HIST (" QA/before/hPt_negative" ), track.pt ());
854+ }
836855
837856 if (!trackSelected (track, field))
838857 return ;
0 commit comments