@@ -41,9 +41,9 @@ using namespace o2;
4141using namespace o2 ::framework;
4242using namespace o2 ::framework::expressions;
4343using namespace o2 ::aod::mult;
44- using ColEvSels = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::Mults >;
44+ using ColEvSels = soa::Join<aod::Collisions, aod::EvSels>;
4545using AodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs>>;
46- using AodTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra>>;
46+ using AodTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA >>;
4747using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
4848using AodZDCs = soa::Join<aod::ZDCMults, aod::Zdcs>;
4949
@@ -56,20 +56,23 @@ struct FlowZDCtask {
5656 O2_DEFINE_CONFIGURABLE (cfgCutPtPOIMin, float , 0 .2f , " Minimal pT for poi tracks" )
5757 O2_DEFINE_CONFIGURABLE (cfgCutPtPOIMax, float , 10 .0f , " Maximal pT for poi tracks" )
5858 O2_DEFINE_CONFIGURABLE (cfgCutPtMin, float , 0 .2f , " Minimal pT for ref tracks" )
59- O2_DEFINE_CONFIGURABLE (cfgCutPtMax, float , 3 .0f , " Maximal pT for ref tracks" )
60- O2_DEFINE_CONFIGURABLE (cfgCutEta, float , 0 .9f , " Eta range for tracks" ) // changed from .8 bc zdc is at eta 8.78
59+ O2_DEFINE_CONFIGURABLE (cfgCutPtMax, float , 10 .0f , " Maximal pT for ref tracks" )
60+ O2_DEFINE_CONFIGURABLE (cfgCutEta, float , 0 .8f , " Eta range for tracks" )
6161 O2_DEFINE_CONFIGURABLE (cfgCutChi2prTPCcls, float , 2.5 , " Chi2 per TPC clusters" )
6262 O2_DEFINE_CONFIGURABLE (cfgUseNch, bool , false , " Use Nch for flow observables" )
6363 O2_DEFINE_CONFIGURABLE (cfgNbootstrap, int , 10 , " Number of subsamples" )
64+ O2_DEFINE_CONFIGURABLE (cfgCutDCAz, float , 2 , " DCA Z cut" )
65+ O2_DEFINE_CONFIGURABLE (cfgCutDCAxy, float , 0 .2f , " DCA XY cut" )
6466
65- Configurable<int > nBinsPt{" nBinsPt" , 100 , " N bins in pT histo" };
67+ Configurable<int > nBinsPt{" nBinsPt" , 500 , " N bins in pT histo" };
6668 Configurable<int > eventSelection{" eventSelection" , 1 , " event selection" };
6769 Configurable<float > maxZp{" maxZp" , 3099.5 , " Max ZP signal" };
6870 Configurable<float > vtxCut{" vtxCut" , 10.0 , " Z vertex cut" };
6971 Configurable<float > etaCut{" etaCut" , 0.8 , " Eta cut" };
7072 Configurable<float > etaGap{" etaGap" , 0.5 , " Eta gap" };
7173 Configurable<float > minPt{" minPt" , 0.2 , " Minimum pt" };
7274 Configurable<float > maxPt{" maxPt" , 20.0 , " Maximum pt" };
75+ Configurable<float > minTpcNcrossedRows{" minTpcNcrossedRows" , 20 , " minTpcNcrossedRows" };
7376 Configurable<float > maxZem{" maxZem" , 3099.5 , " Max ZEM signal" };
7477 // for ZDC info and analysis
7578 Configurable<int > nBinsADC{" nBinsADC" , 1000 , " nbinsADC" };
@@ -95,7 +98,7 @@ struct FlowZDCtask {
9598 ConfigurableAxis axisFT0MAmp{" axisFT0MAmp" , {10000 , 0 , 10000 }, " axisFT0MAmp" };
9699
97100 Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
98- Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t ) true )) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls);
101+ Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t ) true )) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy) ;
99102 Partition<AodTracks> tracksIUWithTPC = (aod::track::tpcNClsFindable > (uint8_t )0 );
100103
101104 std::complex <double > qTPC; // init q TPC
@@ -179,8 +182,8 @@ struct FlowZDCtask {
179182 " ZP Energy vs FT0C Centrality;Centrality [%];ZP Energy" ,
180183 kTH2F ,
181184 {AxisSpec{100 , 0 , 100 , " Centrality [%]" }, AxisSpec{100 , 0 , 500 , " ZP Energy" }});
182- // for q vector recentering
183- histos.add (" revsimag " , " revsimag " , kTH2F , {axisREQ, axisIMQ });
185+ histos. add ( " revsimag " , " revsimag " , kTH2F , {axisREQ, axisIMQ}); // for q vector recentering
186+ histos.add (" hYield " , " Nch vs pT " , kTH2F , {axisMultiplicity, axisPt });
184187
185188 if (doprocessZdcCollAssoc) { // Check if the process function for ZDCCollAssoc is enabled
186189 histos.add (" ZNAcoll" , " ZNAcoll; ZNA amplitude; Entries" , {HistType::kTH1F , {{nBinsAmp, -0.5 , maxZn}}});
@@ -234,38 +237,45 @@ struct FlowZDCtask {
234237 const auto & tracksGrouped = tracksIUWithTPC->sliceByCached (aod::track::collisionId, collision.globalIndex (), cache);
235238 const int multTPC = tracksGrouped.size ();
236239 const auto cent = collision.centFT0C ();
237- int nTot = tracks.size ();
238240
239241 // this is the q vector for the TPC data. it is a complex function
240242 double qTpcReal = 0.0 ; // Initialize qTPC_real
241243 double qTpcIm = 0.0 ; // init qTPC_imaginary
242244
243- int multTrk = tracks.size (); // Tracks are already filtered with GlobalTrack || GlobalTrackSDD
244-
245245 if (cent < 0.0 && cent > 70 )
246246 return ;
247247 std::complex <double > qTPC (0 , 0 ); // Starting with a q-vector of zero
248-
248+ int nTot{ 0 }; // Tracks are already filtered with GlobalTrack || GlobalTrackSDD
249249 for (const auto & track : tracks) {
250+ if (track.tpcNClsCrossedRows () < minTpcNcrossedRows)
251+ continue ;
252+ if (fabs (track.dcaXY ()) > cfgCutDCAxy)
253+ continue ;
250254 double phi = track.phi ();
251-
255+ nTot++;
252256 histos.fill (HIST (" etaHistogram" ), track.eta ());
253257 histos.fill (HIST (" phiHistogram" ), track.phi ());
254258 histos.fill (HIST (" ptHistogram" ), track.pt ());
255-
256259 qTPC += std::complex <double >(std::cos (2.0 * phi), std::sin (2.0 * phi));
257-
258- histos.fill (HIST (" multvsCent" ), cent, nTot);
259-
260- } // end track loop
261-
260+ } // end track loop 1
261+ int pT{0 };
262+ for (const auto & track : tracks) {
263+ if (track.tpcNClsCrossedRows () < minTpcNcrossedRows)
264+ continue ;
265+ if (fabs (track.dcaXY ()) > cfgCutDCAxy)
266+ continue ;
267+ pT = track.pt ();
268+ pT++;
269+ } // end track loop 2
270+ histos.fill (HIST (" multvsCent" ), cent, nTot);
271+ histos.fill (HIST (" hYield" ), nTot, pT);
272+ histos.fill (HIST (" multHistogram" ), nTot);
262273 qTpcReal = qTPC.real () / nTot; // normalize these vectors by the total number of particles
263274 qTpcIm = qTPC.imag () / nTot;
264275
265276 histos.fill (HIST (" REqHistogram" ), qTpcReal);
266277 histos.fill (HIST (" IMqHistogram" ), qTpcIm);
267278
268- histos.fill (HIST (" multHistogram" ), multTrk);
269279 histos.fill (HIST (" TPCmultiplicity" ), multTPC);
270280
271281 histos.fill (HIST (" revsimag" ), qTpcReal, qTpcIm);
@@ -290,14 +300,14 @@ struct FlowZDCtask {
290300 if (collision.has_foundFT0 ()) {
291301 auto ft0 = collision.foundFT0 ();
292302 for (const auto & amplitude : ft0.amplitudeA ()) {
293- histos.fill (HIST (" hFT0AAmp" ), amplitude);
294303 ft0aAmp += amplitude;
295304 }
296305 for (const auto & amplitude : ft0.amplitudeC ()) {
297- histos.fill (HIST (" hFT0CAmp" ), amplitude);
298306 ft0cAmp += amplitude;
299307 }
300308 }
309+ histos.fill (HIST (" hFT0AAmp" ), ft0aAmp);
310+ histos.fill (HIST (" hFT0CAmp" ), ft0cAmp);
301311 double ft0mAmp = ft0aAmp + ft0cAmp;
302312 histos.fill (HIST (" hFT0MAmp" ), ft0mAmp);
303313 if (foundBC.has_zdc ()) {
0 commit comments