@@ -191,12 +191,54 @@ constexpr double ITSnSigmaCutDefault[5][2]{
191191 {-3 ., 3 .},
192192 {-3 ., 3 .},
193193 {-3 ., 3 .}};
194- constexpr double PtPreselection [5 ][2 ]{
194+ constexpr double POverZPreselection [5 ][2 ]{
195195 {0.15 , 99 .},
196196 {0.15 , 99 .},
197197 {0.15 , 99 .},
198198 {0.15 , 99 .},
199199 {0.15 , 99 .}};
200+ constexpr double EtaPreselection[5 ][2 ]{
201+ {0.9 },
202+ {0.9 },
203+ {0.9 },
204+ {0.8 },
205+ {0.9 }};
206+ constexpr double TPCNclsPreselection[5 ][2 ]{
207+ {50 , 160 },
208+ {50 , 160 },
209+ {50 , 160 },
210+ {100 , 160 },
211+ {50 , 160 }};
212+ constexpr double ITSNclsPreselection[5 ][2 ]{
213+ {5 , 7 },
214+ {5 , 7 },
215+ {5 , 7 },
216+ {5 , 7 },
217+ {5 , 7 }};
218+ constexpr double TPCChi2Preselection[5 ][2 ]{
219+ {0 , 10 },
220+ {0 , 10 },
221+ {0 , 10 },
222+ {0.5 , 4 },
223+ {0 , 10 }};
224+ constexpr double ITSChi2Preselection[5 ][2 ]{
225+ {0 , 36 },
226+ {0 , 36 },
227+ {0 , 36 },
228+ {0 , 36 },
229+ {0 , 36 }};
230+ constexpr double DCAxyPreselection[5 ][2 ]{
231+ {1 },
232+ {1 },
233+ {1 },
234+ {0.1 },
235+ {1 }};
236+ constexpr double DCAzPreselection[5 ][2 ]{
237+ {5 },
238+ {5 },
239+ {5 },
240+ {1 },
241+ {5 }};
200242static const std::vector<std::string> names{" proton" , " deuteron" , " triton" , " He3" , " alpha" };
201243static const std::vector<std::string> chargeLabelNames{" Positive" , " Negative" };
202244static const std::vector<std::string> betheBlochParNames{" p0" , " p1" , " p2" , " p3" , " p4" , " resolution" };
@@ -208,7 +250,14 @@ static const std::vector<std::string> openEventSelConfigNames{"Open related even
208250static const std::vector<std::string> openTrackSelConfigNames{" Open track selection from TrackSelection table" };
209251static const std::vector<std::string> pidTPCnSigmaNames{" n#sigma_{TPC} Low" , " n#sigma_{TPC} High" };
210252static const std::vector<std::string> pidITSnSigmaNames{" n#sigma_{ITS} Low" , " n#sigma_{ITS} High" };
211- static const std::vector<std::string> pidPtNames{" p_{T} Low" , " p_{T} High" };
253+ static const std::vector<std::string> pidPOverZNames{" p/z Low" , " p/z High" };
254+ static const std::vector<std::string> pidEtaNames{" Abs Eta Max" };
255+ static const std::vector<std::string> pidTPCNclsNames{" TPCNcls Low" , " TPCNcls High" };
256+ static const std::vector<std::string> pidITSNclsNames{" ITSNcls Low" , " ITSNcls High" };
257+ static const std::vector<std::string> pidTPCChi2Names{" TPCChi2 Low" , " TPCChi2 High" };
258+ static const std::vector<std::string> pidITSChi2Names{" ITSChi2 Low" , " ITSChi2 High" };
259+ static const std::vector<std::string> pidDCAxyNames{" Abs DCAxy Max" };
260+ static const std::vector<std::string> pidDCAzNames{" Abs DCAz Max" };
212261std::vector<ESECandidate> eseCandidates;
213262// Tar ptr
214263std::shared_ptr<TH1> hPIDQATar1D[12 ];
@@ -238,7 +287,7 @@ struct FlowEsePHe3 {
238287 Configurable<std::string> cfgTarName{" cfgTarName" , " kHe3" , " Name of the v2 particle: kProton, kDeuteron, kTriton, kHe3, kAlpha" };
239288 Configurable<std::string> cfgRefName{" cfgRefName" , " kProton" , " Name of the q2 reference particle: kProton, kDeuteron, kTriton, kHe3, kAlpha" };
240289 // total control config
241- Configurable<bool > cfgOpenAllowCrossTrack{" cfgOpenAllowCrossTrack" , false , " Allow one track to be identified as different kind of PID particles" };
290+ Configurable<bool > cfgOpenAllowCrossTrack{" cfgOpenAllowCrossTrack" , true , " Allow one track to be identified as different kind of PID particles" };
242291 Configurable<bool > cfgOpenFullEventQA{" cfgOpenFullEventQA" , true , " Open full QA plots for event QA" };
243292 Configurable<bool > cfgOpenPIDQA{" cfgOpenPIDQA" , true , " Open PID QA plots" };
244293 Configurable<bool > cfgOpenv2{" cfgOpenv2" , true , " Open v2(EP)and q calculation for Proton and He3" };
@@ -262,7 +311,7 @@ struct FlowEsePHe3 {
262311 Configurable<LabeledArray<int >> cfgOpenTrackSel{" cfgOpenTrackSel" , {ese_parameters::OpenTrackSel[0 ], 7 , 1 , ese_parameters::openTrackSelNames, ese_parameters::openTrackSelConfigNames}, " Track selection switch configuration" };
263312 Configurable<float > cfgMinPtPID{" cfgMinPtPID" , 0.15 , " Minimum track #P_{t} for PID" };
264313 Configurable<float > cfgMaxPtPID{" cfgMaxPtPID" , 99.9 , " Maximum track #P_{t} for PID" };
265- Configurable<float > cfgMaxEtaPID{" cfgMaxEtaPID" , 0.8 , " Maximum track #eta for PID" };
314+ Configurable<float > cfgMaxEtaPID{" cfgMaxEtaPID" , 0.9 , " Maximum track #eta for PID" };
266315 Configurable<float > cfgMinTPCChi2NCl{" cfgMinTPCChi2NCl" , 0 , " Minimum chi2 per cluster TPC for PID if not use costom track cuts" };
267316 Configurable<float > cfgMinChi2NClITS{" cfgMinChi2NClITS" , 0 , " Minimum chi2 per cluster ITS for PID if not use costom track cuts" };
268317 Configurable<float > cfgMaxTPCChi2NCl{" cfgMaxTPCChi2NCl" , 4 , " Maximum chi2 per cluster TPC for PID if not use costom track cuts" };
@@ -275,10 +324,18 @@ struct FlowEsePHe3 {
275324 Configurable<float > cfgMaxDCAz{" cfgMaxDCAz" , 2 , " Maxium DCAz for standard PID tracking" };
276325 Configurable<float > cfgPtMaxforTPCOnlyPIDPrton{" cfgPtMaxforTPCOnlyPIDPrton" , 0.4 , " Maxmium track pt for TPC only PID, at RMS PID mode for proton" };
277326 // PID configs
278- Configurable<LabeledArray<double >> cfgPtPreselection{" cfgPtPreselection" , {ese_parameters::PtPreselection[0 ], 5 , 2 , ese_parameters::names, ese_parameters::pidPtNames}, " Pt preselection for light nuclei" };
327+ Configurable<bool > cfgOpenITSPreselection{" cfgOpenITSPreselection" , false , " Use nSigma ITS preselection for light nuclei" };
328+ Configurable<LabeledArray<double >> cfgPOverZPreselection{" cfgPOverZPreselection" , {ese_parameters::POverZPreselection[0 ], 5 , 2 , ese_parameters::names, ese_parameters::pidPOverZNames}, " P/Z preselection for light nuclei" };
329+ Configurable<LabeledArray<double >> cfgEtaPreselection{" cfgEtaPreselection" , {ese_parameters::EtaPreselection[0 ], 5 , 1 , ese_parameters::names, ese_parameters::pidEtaNames}, " Eta preselection for light nuclei" };
330+ Configurable<LabeledArray<double >> cfgTPCNclsPreselection{" cfgTPCNclsPreselection" , {ese_parameters::TPCNclsPreselection[0 ], 5 , 2 , ese_parameters::names, ese_parameters::pidTPCNclsNames}, " TPCNcls preselection for light nuclei" };
331+ Configurable<LabeledArray<double >> cfgITSNclsPreselection{" cfgITSNclsPreselection" , {ese_parameters::ITSNclsPreselection[0 ], 5 , 2 , ese_parameters::names, ese_parameters::pidITSNclsNames}, " ITSNcls preselection for light nuclei" };
332+ Configurable<LabeledArray<double >> cfgTPCChi2Preselection{" cfgTPCChi2Preselection" , {ese_parameters::TPCChi2Preselection[0 ], 5 , 2 , ese_parameters::names, ese_parameters::pidTPCChi2Names}, " TPCChi2 preselection for light nuclei" };
333+ Configurable<LabeledArray<double >> cfgITSChi2Preselection{" cfgITSChi2Preselection" , {ese_parameters::ITSChi2Preselection[0 ], 5 , 2 , ese_parameters::names, ese_parameters::pidITSChi2Names}, " ITSChi2 preselection for light nuclei" };
334+ Configurable<LabeledArray<double >> cfgDCAxyPreselection{" cfgDCAxyPreselection" , {ese_parameters::DCAxyPreselection[0 ], 5 , 1 , ese_parameters::names, ese_parameters::pidDCAxyNames}, " DCAxy preselection for light nuclei" };
335+ Configurable<LabeledArray<double >> cfgDCAzPreselection{" cfgDCAzPreselection" , {ese_parameters::DCAzPreselection[0 ], 5 , 1 , ese_parameters::names, ese_parameters::pidDCAzNames}, " DCAz preselection for light nuclei" };
279336 Configurable<std::vector<float >> cfgnSigmaCutTOFProton{" cfgnSigmaCutTOFProton" , {-1.5 , 1.5 }, " TOF nsigma cut limit for Proton" };
280337 Configurable<std::vector<float >> cfgnSigmaCutRMSProton{" cfgnSigmaCutRMSProton" , {-3 , 3 }, " RMS nsigma cut limit for Proton" };
281- Configurable<bool > cfgUseSelfnSigmaTPCProton{" cfgUseSelfnSigmaTPCProton" , false , " Use self nSigma TPC for Proton PID" };
338+ Configurable<bool > cfgUseSelfnSigmaTPCProton{" cfgUseSelfnSigmaTPCProton" , true , " Use self nSigma TPC for Proton PID" };
282339 Configurable<int > cfgProtonPIDMode{" cfgProtonPIDMode" , 2 , " Proton PID mode: 0 for TPC + RMS(TPC,TOF), 1 for TPC only, 2 for TOF only" };
283340 Configurable<LabeledArray<double >> cfgnSigmaTPC{" cfgnSigmaTPC" , {ese_parameters::TPCnSigmaCutDefault[0 ], 5 , 2 , ese_parameters::names, ese_parameters::pidTPCnSigmaNames}, " TPC nSigma selection for light nuclei" };
284341 Configurable<LabeledArray<double >> cfgnSigmaITS{" cfgnSigmaITS" , {ese_parameters::ITSnSigmaCutDefault[0 ], 5 , 2 , ese_parameters::names, ese_parameters::pidITSnSigmaNames}, " ITS nSigma selection for light nuclei" };
@@ -656,9 +713,6 @@ struct FlowEsePHe3 {
656713 template <typename CollType>
657714 void fillHistosQvec (const CollType& collision)
658715 {
659- int detInd = detId * 4 + cfgnTotalSystem * 4 * (2 - 2 );
660- int refAInd = refAId * 4 + cfgnTotalSystem * 4 * (2 - 2 );
661- int refBInd = refBId * 4 + cfgnTotalSystem * 4 * (2 - 2 );
662716 if (collision.qvecAmp ()[detId] > ese_parameters::Amplitudelow) {
663717 histsESE.fill (HIST (" PlanQA/histQvec_CorrL0_V2" ), collision.qvecRe ()[detInd], collision.qvecIm ()[detInd], collision.centFT0C ());
664718 histsESE.fill (HIST (" PlanQA/histQvec_CorrL1_V2" ), collision.qvecRe ()[detInd + 1 ], collision.qvecIm ()[detInd + 1 ], collision.centFT0C ());
@@ -679,7 +733,30 @@ struct FlowEsePHe3 {
679733 template <typename TrackType>
680734 bool pidSel (const TrackType& track, uint8_t POI)
681735 {
682- if (track.pt () < cfgPtPreselection->get (POI, 0u ) || track.pt () > cfgPtPreselection->get (POI, 1u )) {
736+ bool heliumPID = track.pidForTracking () == o2::track::PID::Helium3 || track.pidForTracking () == o2::track::PID::Alpha;
737+ float correctedTpcInnerParam = (heliumPID && cfgCompensatePIDinTracking) ? track.tpcInnerParam () / 2 : track.tpcInnerParam ();
738+ if (correctedTpcInnerParam < cfgPOverZPreselection->get (POI, 0u ) || correctedTpcInnerParam > cfgPOverZPreselection->get (POI, 1u )) {
739+ return false ;
740+ }
741+ if (std::abs (track.eta ()) > cfgEtaPreselection->get (POI)) {
742+ return false ;
743+ }
744+ if (track.tpcNClsFound () < cfgTPCNclsPreselection->get (POI, 0u ) || track.tpcNClsFound () > cfgTPCNclsPreselection->get (POI, 1u )) {
745+ return false ;
746+ }
747+ if (track.itsNCls () < cfgITSNclsPreselection->get (POI, 0u ) || track.itsNCls () > cfgITSNclsPreselection->get (POI, 1u )) {
748+ return false ;
749+ }
750+ if (track.tpcChi2NCl () < cfgTPCChi2Preselection->get (POI, 0u ) || track.tpcChi2NCl () > cfgTPCChi2Preselection->get (POI, 1u )) {
751+ return false ;
752+ }
753+ if (track.itsChi2NCl () < cfgITSChi2Preselection->get (POI, 0u ) || track.itsChi2NCl () > cfgITSChi2Preselection->get (POI, 1u )) {
754+ return false ;
755+ }
756+ if (std::abs (track.dcaXY ()) > cfgDCAxyPreselection->get (POI)) {
757+ return false ;
758+ }
759+ if (std::abs (track.dcaZ ()) > cfgDCAzPreselection->get (POI)) {
683760 return false ;
684761 }
685762 float nSigmaTPC = 0 .f ;
@@ -700,27 +777,32 @@ struct FlowEsePHe3 {
700777 return false ;
701778 }
702779 }
703- nSigmaITS = itsResponse.nSigmaITS <o2::track::PID::Proton>(track);
780+ if (cfgOpenITSPreselection)
781+ nSigmaITS = itsResponse.nSigmaITS <o2::track::PID::Proton>(track);
704782 break ;
705783
706784 case ese_parameters::kDeuteron :
707785 nSigmaTPC = getNSigmaTPCSelfBB (track, ese_parameters::kDeuteron );
708- nSigmaITS = itsResponse.nSigmaITS <o2::track::PID::Deuteron>(track);
786+ if (cfgOpenITSPreselection)
787+ nSigmaITS = itsResponse.nSigmaITS <o2::track::PID::Deuteron>(track);
709788 break ;
710789
711790 case ese_parameters::kTriton :
712791 nSigmaTPC = getNSigmaTPCSelfBB (track, ese_parameters::kTriton );
713- nSigmaITS = itsResponse.nSigmaITS <o2::track::PID::Triton>(track);
792+ if (cfgOpenITSPreselection)
793+ nSigmaITS = itsResponse.nSigmaITS <o2::track::PID::Triton>(track);
714794 break ;
715795
716796 case ese_parameters::kHe3 :
717797 nSigmaTPC = getNSigmaTPCSelfBB (track, ese_parameters::kHe3 );
718- nSigmaITS = itsResponse.nSigmaITS <o2::track::PID::Helium3>(track);
798+ if (cfgOpenITSPreselection)
799+ nSigmaITS = itsResponse.nSigmaITS <o2::track::PID::Helium3>(track);
719800 break ;
720801
721802 case ese_parameters::kAlpha :
722803 nSigmaTPC = getNSigmaTPCSelfBB (track, ese_parameters::kAlpha );
723- nSigmaITS = itsResponse.nSigmaITS <o2::track::PID::Alpha>(track);
804+ if (cfgOpenITSPreselection)
805+ nSigmaITS = itsResponse.nSigmaITS <o2::track::PID::Alpha>(track);
724806 break ;
725807
726808 default :
@@ -730,8 +812,10 @@ struct FlowEsePHe3 {
730812 if (nSigmaTPC < cfgnSigmaTPC->get (POI, 0u ) || nSigmaTPC > cfgnSigmaTPC->get (POI, 1u )) {
731813 return false ;
732814 }
733- if (nSigmaITS < cfgnSigmaITS->get (POI, 0u ) || nSigmaITS > cfgnSigmaITS->get (POI, 1u )) {
734- return false ;
815+ if (cfgOpenITSPreselection) {
816+ if (nSigmaITS < cfgnSigmaITS->get (POI, 0u ) || nSigmaITS > cfgnSigmaITS->get (POI, 1u )) {
817+ return false ;
818+ }
735819 }
736820 return true ;
737821 }
@@ -782,9 +866,9 @@ struct FlowEsePHe3 {
782866 ese_parameters::hPIDQATar1D[10 ]->Fill (nSigmaTOFTar);
783867 ese_parameters::hPIDQATar1D[11 ]->Fill (nSigmaITSTar);
784868 ese_parameters::hPIDQATar2D[0 ]->Fill (track.sign () * correctedTpcInnerParam, track.tpcSignal ());
785- ese_parameters::hPIDQATar2D[1 ]->Fill (nSigmaTPCTar, track.pt ());
786- ese_parameters::hPIDQATar2D[2 ]->Fill (nSigmaTOFTar, track.pt ());
787- ese_parameters::hPIDQATar2D[3 ]->Fill (nSigmaITSTar, track.pt ());
869+ ese_parameters::hPIDQATar2D[1 ]->Fill (track.pt (), nSigmaTPCTar );
870+ ese_parameters::hPIDQATar2D[2 ]->Fill (track.pt (), nSigmaTOFTar );
871+ ese_parameters::hPIDQATar2D[3 ]->Fill (track.pt (), nSigmaITSTar );
788872 if (cfgOpen3DPIDPlots->get (0u )) {
789873 ese_parameters::hPIDQATar3D[0 ]->Fill (nSigmaTOFTar, nSigmaITSTar, track.pt ());
790874 }
@@ -830,9 +914,9 @@ struct FlowEsePHe3 {
830914 ese_parameters::hPIDQARef1D[10 ]->Fill (nSigmaTOFRef);
831915 ese_parameters::hPIDQARef1D[11 ]->Fill (nSigmaITSRef);
832916 ese_parameters::hPIDQARef2D[0 ]->Fill (track.sign () * correctedTpcInnerParam, track.tpcSignal ());
833- ese_parameters::hPIDQARef2D[1 ]->Fill (nSigmaTPCRef, track.pt ());
834- ese_parameters::hPIDQARef2D[2 ]->Fill (nSigmaTOFRef, track.pt ());
835- ese_parameters::hPIDQARef2D[3 ]->Fill (nSigmaITSRef, track.pt ());
917+ ese_parameters::hPIDQARef2D[1 ]->Fill (track.pt (), nSigmaTPCRef );
918+ ese_parameters::hPIDQARef2D[2 ]->Fill (track.pt (), nSigmaTOFRef );
919+ ese_parameters::hPIDQARef2D[3 ]->Fill (track.pt (), nSigmaITSRef );
836920 if (cfgOpen3DPIDPlots->get (0u )) {
837921 ese_parameters::hPIDQARef3D[0 ]->Fill (nSigmaTOFRef, nSigmaITSRef, track.pt ());
838922 }
@@ -891,7 +975,7 @@ struct FlowEsePHe3 {
891975 AxisSpec axisCentForQA = {100 , 0 , 100 };
892976 AxisSpec axisCharge = {4 , -2 , 2 , " Charge" };
893977 // hists for event level QA
894- histsESE.add (" EventQA/histEventCount" , " ;Event Count;Counts" , {HistType::kTH1F , {{100 , 0 , 100 }}});
978+ histsESE.add (" EventQA/histEventCount" , " ;Event Count;Counts" , {HistType::kTH1F , {{11 , 0 , 11 }}});
895979 histsESE.get <TH1>(HIST (" EventQA/histEventCount" ))->GetXaxis ()->SetBinLabel (1 , " after sel8" );
896980 histsESE.get <TH1>(HIST (" EventQA/histEventCount" ))->GetXaxis ()->SetBinLabel (2 , " kIsGoodZvtxFT0vsPV" );
897981 histsESE.get <TH1>(HIST (" EventQA/histEventCount" ))->GetXaxis ()->SetBinLabel (3 , " kNoSameBunchPileup" );
@@ -1029,6 +1113,7 @@ struct FlowEsePHe3 {
10291113 float q2Refy{0 .};
10301114 int multiTar{0 };
10311115 int multiRef{0 };
1116+ fillHistosQvec (collision);
10321117 fillESECandidates (collision, tracks, q2Tarx, q2Tary, multiTar, q2Refx, q2Refy, multiRef);
10331118 float q2Tar{calculateq2 (q2Tarx, q2Tary, multiTar)};
10341119 float q2Ref{calculateq2 (q2Refx, q2Refy, multiRef)};
0 commit comments