@@ -67,25 +67,25 @@ constexpr double kBetheBlochDefault[nParticles][nBetheParams]{
6767 {5.393020 , 7.859534 , 0.004048 , 2.323197 , 1.609307 , 0.09 }, // triton
6868 {-126.557359 , -0.858569 , 1.111643 , 1.210323 , 2.656374 , 0.09 }, // helion
6969 {-126.557359 , -0.858569 , 1.111643 , 1.210323 , 2.656374 , 0.09 }}; // alpha
70- const int nTrkSettings = 19 ;
71- static const std::vector<std::string> trackPIDsettingsNames{" useBBparams" , " minITSnCls" , " minITSnClscos" , " minTPCnCls" , " maxTPCchi2" , " minTPCchi2" , " maxITSchi2" , " minRigidity " , " maxRigidity " , " maxTPCnSigma" , " TOFrequiredabove " , " minTOFmass " , " maxTOFmass " , " maxDcaXY" , " maxDcaZ" , " minITSclsSize" , " maxITSclsSize" , " minTPCnClsCrossedRows" , " minReqClusterITSib" };
70+ const int nTrkSettings = 14 ;
71+ static const std::vector<std::string> trackPIDsettingsNames{" useBBparams" , " minITSnCls" , " minITSnClscos" , " minTPCnCls" , " maxTPCchi2" , " minTPCchi2" , " maxITSchi2" , " maxTPCnSigma" , " maxDcaXY" , " maxDcaZ" , " minITSclsSize" , " maxITSclsSize" , " minTPCnClsCrossedRows" , " minReqClusterITSib" };
7272constexpr double kTrackPIDSettings [nParticles][nTrkSettings]{
73- {0 , 0 , 4 , 60 , 4.0 , 0.5 , 100 , 0.15 , 1.2 , 2.5 , - 1 , 0 , 100 , 2 ., 2 ., 0 ., 1000 , 70 , 1 },
74- {1 , 0 , 4 , 70 , 4.0 , 0.5 , 100 , 0.20 , 4.0 , 3.0 , - 1 , 0 , 100 , 2 ., 2 ., 0 ., 1000 , 70 , 1 },
75- {1 , 0 , 4 , 70 , 4.0 , 0.5 , 100 , 0.50 , 5.0 , 3.0 , - 1 , 0 , 100 , 2 ., 2 ., 0 ., 1000 , 70 , 1 },
76- {1 , 0 , 4 , 70 , 4.0 , 0.5 , 100 , 0.50 , 5.0 , 3.0 , - 1 , 0 , 100 , 2 ., 2 ., 0 ., 1000 , 70 , 1 },
77- {1 , 0 , 4 , 75 , 4.0 , 0.5 , 100 , 0.50 , 5.0 , 5.0 , - 1 , 0 , 100 , 2 ., 2 ., 0 ., 1000 , 70 , 1 },
78- {1 , 0 , 4 , 70 , 4.0 , 0.5 , 100 , 0.50 , 5.0 , 5.0 , - 1 , 0 , 100 , 2 ., 2 ., 0 ., 1000 , 70 , 1 }};
73+ {0 , 0 , 4 , 60 , 4.0 , 0.5 , 100 , 2.5 , 2 ., 2 ., 0 ., 1000 , 70 , 1 },
74+ {1 , 0 , 4 , 70 , 4.0 , 0.5 , 100 , 3.0 , 2 ., 2 ., 0 ., 1000 , 70 , 1 },
75+ {1 , 0 , 4 , 70 , 4.0 , 0.5 , 100 , 3.0 , 2 ., 2 ., 0 ., 1000 , 70 , 1 },
76+ {1 , 0 , 4 , 70 , 4.0 , 0.5 , 100 , 3.0 , 2 ., 2 ., 0 ., 1000 , 70 , 1 },
77+ {1 , 0 , 4 , 75 , 4.0 , 0.5 , 100 , 5.0 , 2 ., 2 ., 0 ., 1000 , 70 , 1 },
78+ {1 , 0 , 4 , 70 , 4.0 , 0.5 , 100 , 5.0 , 2 ., 2 ., 0 ., 1000 , 70 , 1 }};
7979
80- const int nTrkSettings2 = 3 ;
81- static const std::vector<std::string> trackPIDsettingsNames2{" useITSnsigma" , " minITSnsigma" , " maxITSnsigma" };
80+ const int nTrkSettings2 = 4 ;
81+ static const std::vector<std::string> trackPIDsettingsNames2{" useITSnsigma" , " minITSnsigma" , " maxITSnsigma" , " fillsparsh " };
8282constexpr double kTrackPIDSettings2 [nParticles][nTrkSettings2]{
83- {1 , -5 , 4 },
84- {1 , -5 , 4 },
85- {1 , -5 , 4 },
86- {1 , -5 , 4 },
87- {1 , -5 , 4 },
88- {1 , -5 , 4 }};
83+ {1 , -5 , 4 , 0 },
84+ {1 , -5 , 4 , 0 },
85+ {1 , -5 , 4 , 0 },
86+ {1 , -5 , 4 , 1 },
87+ {1 , -5 , 4 , 1 },
88+ {1 , -5 , 4 , 1 }};
8989
9090struct PrimParticles {
9191 TString name;
@@ -139,30 +139,23 @@ struct NucleitpcPbPb {
139139 Configurable<bool > cfgminReqClusterITSibRequire{" cfgminReqClusterITSibRequire" , true , " Require min number of clusters required in ITS inner barrel" };
140140 Configurable<bool > cfgmaxITSchi2Require{" cfgmaxITSchi2Require" , true , " Require maxITSchi2 Cut" };
141141 Configurable<bool > cfgmaxTPCnSigmaRequire{" cfgmaxTPCnSigmaRequire" , true , " Require maxTPCnSigma Cut" };
142- Configurable<bool > cfgmaxITSnSigmaRequire{" cfgmaxITSnSigmaRequire" , true , " Require maxITSnSigma Cut for helium" };
143142 Configurable<bool > cfgminGetMeanItsClsSizeRequire{" cfgminGetMeanItsClsSizeRequire" , true , " Require minGetMeanItsClsSize Cut" };
144143 Configurable<bool > cfgmaxGetMeanItsClsSizeRequire{" cfgmaxGetMeanItsClsSizeRequire" , true , " Require maxGetMeanItsClsSize Cut" };
145- Configurable<bool > cfgRigidityCutRequire{" cfgRigidityCutRequire" , true , " Require Rigidity Cut" };
146- Configurable<bool > cfgmassRequire{" cfgmassRequire" , true , " Require mass Cuts" };
147144 Configurable<bool > cfgDCAwithptRequire{" cfgDCAwithptRequire" , true , " Require DCA cuts with pt dependance" };
148145 Configurable<bool > cfgDCAnopt{" cfgDCAnopt" , true , " Require DCA cuts without pt dependance" };
149- Configurable<bool > cfgTwicemass{" cfgTwicemass" , true , " multiply mass by its charge" };
150146 Configurable<bool > cfgRequirebetaplot{" cfgRequirebetaplot" , true , " Require beta plot" };
151- Configurable<bool > cfgRequireMCposZ{" cfgRequireMCposZ" , true , " Require beta plot" };
152147
153148 Configurable<LabeledArray<double >> cfgBetheBlochParams{" cfgBetheBlochParams" , {kBetheBlochDefault [0 ], nParticles, nBetheParams, particleNames, betheBlochParNames}, " TPC Bethe-Bloch parameterisation for light nuclei" };
154149 Configurable<LabeledArray<double >> cfgTrackPIDsettings{" cfgTrackPIDsettings" , {kTrackPIDSettings [0 ], nParticles, nTrkSettings, particleNames, trackPIDsettingsNames}, " track selection and PID criteria" };
155150 Configurable<LabeledArray<double >> cfgTrackPIDsettings2{" cfgTrackPIDsettings2" , {kTrackPIDSettings2 [0 ], nParticles, nTrkSettings2, particleNames, trackPIDsettingsNames2}, " track selection and PID criteria" };
156151 Configurable<bool > cfgFillhspectra{" cfgFillhspectra" , true , " fill data sparsh" };
157- Configurable<bool > cfgFillQAplots{" cfgFillQAplots" , false , " Fill QA sparsh" };
158152 Configurable<bool > cfgFillmass{" cfgFillmass" , false , " Fill mass histograms" };
159153 Configurable<float > centcut{" centcut" , 80 .0f , " centrality cut" };
160154 Configurable<float > cfgCutRapidity{" cfgCutRapidity" , 0 .5f , " Rapidity range" };
161155 Configurable<float > cfgZvertex{" cfgZvertex" , 10 , " Min Z Vertex" };
162156 Configurable<bool > cfgZvertexRequire{" cfgZvertexRequire" , true , " Pos Z cut require" };
163157 Configurable<bool > cfgZvertexRequireMC{" cfgZvertexRequireMC" , true , " Pos Z cut require for generated particles" };
164158 Configurable<bool > cfgsel8Require{" cfgsel8Require" , true , " sel8 cut require" };
165- Configurable<float > cfgITSnsigma{" cfgITSnsigma" , 5 , " Max ITS nsigma value" };
166159 Configurable<float > cfgtpcNClsFound{" cfgtpcNClsFound" , 100 .0f , " min. no. of tpcNClsFound" };
167160 Configurable<float > cfgitsNCls{" cfgitsNCls" , 2 .0f , " min. no. of itsNCls" };
168161 o2::track::TrackParametrizationWithError<float > mTrackParCov ;
@@ -242,7 +235,6 @@ struct NucleitpcPbPb {
242235
243236 histos.add <THnSparse>(" hSpectra" , " " , HistType::kTHnSparseF , {speciesBitAxis, ptAxis, nsigmaAxis, {5 , -2.5 , 2.5 }, axisCent, axisRigidity, axisdEdx, axisDCA, axisDCA, nsigmaAxis});
244237
245- histos.add <THnSparse>(" hQAtest" , " " , HistType::kTHnSparseF , {speciesBitAxis, ptAxis, {5 , -2.5 , 2.5 }, axisTPCcls, axisITScls, axisITSchi2, axisTPCchi2});
246238
247239 if (doprocessMC) {
248240 histomc.add (" histVtxZgen" , " histVtxZgen" , kTH1F , {axisVtxZ});
@@ -267,8 +259,31 @@ struct NucleitpcPbPb {
267259 }
268260 }
269261 // ----------------------------------------------------------------------------------------------------------------
270- void findprimaryParticles (aod::TrackAssoc const & tracksByColl, TracksFull const & tracks, float cent)
262+ // ----------------------------------------------------------------------------------------------------------------
263+ void processData (CollisionsFull const & collisions, TracksFull const & tracks, aod::BCsWithTimestamps const &, aod::TrackAssoc const & tracksColl)
271264 {
265+ for (const auto & collision : collisions) {
266+ auto bc = collision.bc_as <aod::BCsWithTimestamps>();
267+ initCCDB (bc);
268+ initCollision (collision);
269+ if (!collPassedEvSel)
270+ continue ;
271+ if (collision.centFT0C () > centcut)
272+ continue ;
273+ if (removeITSROFrameBorder && !collision.selection_bit (aod::evsel::kNoITSROFrameBorder ))
274+ continue ;
275+ if (removeNoSameBunchPileup && !collision.selection_bit (aod::evsel::kNoSameBunchPileup ))
276+ continue ;
277+ if (requireIsGoodZvtxFT0vsPV && !collision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ))
278+ continue ;
279+ if (requireIsVertexITSTPC && !collision.selection_bit (aod::evsel::kIsVertexITSTPC ))
280+ continue ;
281+ if (removeNoTimeFrameBorder && !collision.selection_bit (aod::evsel::kNoTimeFrameBorder ))
282+ continue ;
283+ histos.fill (HIST (" histCentFTOC_cut" ), collision.centFT0C ());
284+ const uint64_t collIdx = collision.globalIndex ();
285+ auto tracksByColl = tracksColl.sliceBy (perCollision, collIdx);
286+ // ///////////////////////////////////////////////////////////////////////////////
272287 for (const auto & trackId : tracksByColl) {
273288 const auto & track = tracks.rawIteratorAt (trackId.trackId ());
274289 if (!track.isPVContributor () && cfgUsePVcontributors)
@@ -296,9 +311,6 @@ struct NucleitpcPbPb {
296311 if (track.sign () < 0 ) {
297312 sign = -1 ;
298313 } // <- This redeclares a new local variable!
299- if (cfgFillQAplots) {
300- histos.fill (HIST (" hQAtest" ), i, ptMomn, sign, track.tpcNClsFound (), track.itsNCls (), track.itsChi2NCl (), track.tpcChi2NCl ());
301- }
302314 if (std::abs (getRapidity (track, i)) > cfgCutRapidity && cfgRapidityRequire)
303315 continue ;
304316 if (track.tpcNClsFound () < cfgTrackPIDsettings->get (i, " minTPCnCls" ) && cfgTPCNClsfoundRequire)
@@ -338,47 +350,20 @@ struct NucleitpcPbPb {
338350 continue ;
339351
340352 fillhmass (track, i);
341- if (cfgFillhspectra) {
342- histos.fill (HIST (" hSpectra" ), i, ptMomn, tpcNsigma, sign, cent , getRigidity (track) * track.sign (), track.tpcSignal (), track.dcaZ (), track.dcaXY (), itsSigma);
353+ if (cfgFillhspectra && cfgTrackPIDsettings2-> get (i, " fillsparsh " ) == 1 ) {
354+ histos.fill (HIST (" hSpectra" ), i, ptMomn, tpcNsigma, sign, collision. centFT0C () , getRigidity (track) * track.sign (), track.tpcSignal (), track.dcaZ (), track.dcaXY (), itsSigma);
343355 }
344356 if (cfgRequirebetaplot) {
345357 histos.fill (HIST (" Tofsignal" ), getRigidity (track) * track.sign (), o2::pid::tof::Beta::GetBeta (track));
346358 }
347359 }
348- if (track.tpcNClsFound () < cfgtpcNClsFound || track.itsNCls () < cfgitsNCls) {
360+ if (track.tpcNClsFound () > cfgtpcNClsFound || track.itsNCls () > cfgitsNCls) {
349361 histos.fill (HIST (" Tpcsignal" ), getRigidity (track) * track.sign (), track.tpcSignal ());
350362 }
351363 histos.fill (HIST (" histeta" ), track.eta ());
352364 } // track loop
353- }
354- // ----------------------------------------------------------------------------------------------------------------
355- void processData (CollisionsFull const & collisions, TracksFull const & tracks, aod::BCsWithTimestamps const &, aod::TrackAssoc const & tracksColl)
356- {
357- for (const auto & collision : collisions) {
358- auto bc = collision.bc_as <aod::BCsWithTimestamps>();
359- initCCDB (bc);
360- initCollision (collision);
361- if (!collPassedEvSel)
362- continue ;
363- if (collision.centFT0C () > centcut)
364- continue ;
365- if (removeITSROFrameBorder && !collision.selection_bit (aod::evsel::kNoITSROFrameBorder ))
366- continue ;
367- if (removeNoSameBunchPileup && !collision.selection_bit (aod::evsel::kNoSameBunchPileup ))
368- continue ;
369- if (requireIsGoodZvtxFT0vsPV && !collision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ))
370- continue ;
371- if (requireIsVertexITSTPC && !collision.selection_bit (aod::evsel::kIsVertexITSTPC ))
372- continue ;
373- if (removeNoTimeFrameBorder && !collision.selection_bit (aod::evsel::kNoTimeFrameBorder ))
374- continue ;
375- histos.fill (HIST (" histCentFTOC_cut" ), collision.centFT0C ());
376- const uint64_t collIdx = collision.globalIndex ();
377- auto tracksByColl = tracksColl.sliceBy (perCollision, collIdx);
365+ // /////////////////////////////////////////////
378366
379- findprimaryParticles (tracksByColl, tracks, collision.centFT0C ());
380- if (!collHasCandidate)
381- continue ;
382367 }
383368 }
384369 PROCESS_SWITCH (NucleitpcPbPb, processData, " data analysis" , false );
@@ -496,9 +481,6 @@ struct NucleitpcPbPb {
496481 if (track.sign () < 0 ) {
497482 sign = -1 ;
498483 } // <- This redeclares a new local variable!
499- if (cfgFillQAplots) {
500- histos.fill (HIST (" hQAtest" ), i, ptMomn, sign, track.tpcNClsFound (), track.itsNCls (), track.itsChi2NCl (), track.tpcChi2NCl ());
501- }
502484 if (std::abs (getRapidity (track, i)) > cfgCutRapidity && cfgRapidityRequire)
503485 continue ;
504486 if (track.tpcNClsFound () < cfgTrackPIDsettings->get (i, " minTPCnCls" ) && cfgTPCNClsfoundRequire)
@@ -538,7 +520,7 @@ struct NucleitpcPbPb {
538520 continue ;
539521
540522 fillhmass (track, i);
541- if (cfgFillhspectra) {
523+ if (cfgFillhspectra && cfgTrackPIDsettings2-> get (i, " fillsparsh " ) == 1 ) {
542524 histos.fill (HIST (" hSpectra" ), i, ptMomn, tpcNsigma, sign, collision.centFT0C (), getRigidity (track) * track.sign (), track.tpcSignal (), track.dcaZ (), track.dcaXY (), itsSigma);
543525 }
544526 if (cfgRequirebetaplot) {
0 commit comments