@@ -88,22 +88,22 @@ DECLARE_SOA_TABLE(ProtRecCollEbyeTables, "AOD", "PROTRECCOLLEBYETABLE",
8888 rec_ebyecolltable::AntiProtNoRec);
8989using ProtRecCollEbyeTable = ProtRecCollEbyeTables::iterator;
9090
91- DECLARE_SOA_TABLE (ProtRecCollTables , " AOD" , " PROTRECCOLLTABLE " ,
91+ DECLARE_SOA_TABLE (RecCollTables , " AOD" , " RECCOLLTABLE " ,
9292 o2::soa::Index<>,
9393 rec_ebyecolltable::CentralityRec);
94- using ProtRecCollTable = ProtRecCollTables ::iterator;
94+ using RecCollTable = RecCollTables ::iterator;
9595
9696namespace rec_ebyetracktable
9797{
98- DECLARE_SOA_INDEX_COLUMN (ProtRecCollTable, protRecCollTable );
98+ DECLARE_SOA_INDEX_COLUMN (RecCollTable, recCollTable );
9999DECLARE_SOA_COLUMN (Pt, pt, float );
100100DECLARE_SOA_COLUMN (Eta, eta, float );
101101DECLARE_SOA_COLUMN (Charge, charge, int );
102102} // namespace rec_ebyetracktable
103103
104104DECLARE_SOA_TABLE (ProtRecCompleteEbyeTables, " AOD" , " PROTRECCOMPLETEEBYETABLE" ,
105105 o2::soa::Index<>,
106- rec_ebyetracktable::ProtRecCollTableId ,
106+ rec_ebyetracktable::RecCollTableId ,
107107 rec_ebyetracktable::Pt,
108108 rec_ebyetracktable::Eta,
109109 rec_ebyetracktable::Charge);
@@ -143,14 +143,18 @@ struct NetprotonCumulantsMc {
143143
144144 HistogramRegistry histos{" Histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
145145
146- // Filter command for rec (data/MC )***********
147- Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex && (aod::evsel::sel8 == true ) ;
146+ // Filter command for rec (data)***********
147+ Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
148148 Filter trackFilter = (nabs(aod::track::eta) < 0 .8f ) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5 .0f ) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t ) true )) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (aod::track::dcaZ < cfgCutDCAz) && (aod::track::dcaXY < cfgCutDCAxy);
149149
150150 // filtering collisions and tracks for real data***********
151151 using AodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFDDMs>>;
152152 using AodTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullEl, aod::pidTOFFullEl>>;
153153
154+ // // Filter command for rec (MC)***********
155+ // Filter collisionMcFilter = nabs(aod::collision::posZ) < cfgCutVertex && (aod::evsel::sel8 == true);
156+ // Filter trackMcFilter = (nabs(aod::track::eta) < 0.8f) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (aod::track::dcaZ < cfgCutDCAz) && (aod::track::dcaXY < cfgCutDCAxy);
157+
154158 // filtering collisions and tracks for MC rec data***********
155159 using MyMCRecCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFDDMs, aod::McCollisionLabels>>;
156160 using MyMCRecCollision = MyMCRecCollisions::iterator;
@@ -192,6 +196,12 @@ struct NetprotonCumulantsMc {
192196 histos.add (" hrecEtaAll" , " Reconstructed All particles;#eta" , kTH1F , {{100 , -2.01 , 2.01 }});
193197 histos.add (" hrecEtaProton" , " Reconstructed Proton;#eta" , kTH1F , {{100 , -2.01 , 2.01 }});
194198 histos.add (" hrecEtaAntiproton" , " Reconstructed Antiprotons;#eta" , kTH1F , {{100 , -2.01 , 2.01 }});
199+ histos.add (" hrecDcaXYAll" , " Reconstructed All particles;DCA_{xy} (in cm)" , kTH1F , {{400 , -2.01 , 2.01 }});
200+ histos.add (" hrecDcaXYProton" , " Reconstructed Proton;DCA_{xy} (in cm)" , kTH1F , {{400 , -2.01 , 2.01 }});
201+ histos.add (" hrecDcaXYAntiproton" , " Reconstructed Antiprotons;DCA_{xy} (in cm)" , kTH1F , {{400 , -2.01 , 2.01 }});
202+ histos.add (" hrecDcaZAll" , " Reconstructed All particles;DCA_{z} (in cm)" , kTH1F , {{400 , -2.01 , 2.01 }});
203+ histos.add (" hrecDcaZProton" , " Reconstructed Proton;DCA_{z} (in cm)" , kTH1F , {{400 , -2.0 , 2.0 }});
204+ histos.add (" hrecDcaZAntiproton" , " Reconstructed Antiprotons;DCA_{z} (in cm)" , kTH1F , {{400 , -2.0 , 2.0 }});
195205 histos.add (" hrecPtDistProtonVsCentrality" , " Reconstructed proton number vs centrality in 2D" , kTH2F , {ptAxis, centAxis});
196206 histos.add (" hrecPtDistAntiprotonVsCentrality" , " Reconstructed antiproton number vs centrality in 2D" , kTH2F , {ptAxis, centAxis});
197207 histos.add (" hrecNetProtonVsCentrality" , " Reconstructed net-proton number vs centrality in 2D" , kTH2F , {netprotonAxis, centAxis});
@@ -209,6 +219,9 @@ struct NetprotonCumulantsMc {
209219 histos.add (" hgenPtAll" , " Generated All particles;#it{p}_{T} (GeV/#it{c})" , kTH1F , {ptAxis});
210220 histos.add (" hgenPtProton" , " Generated Protons;#it{p}_{T} (GeV/#it{c})" , kTH1F , {ptAxis});
211221 histos.add (" hgenPtAntiproton" , " Generated Antiprotons;#it{p}_{T} (GeV/#it{c})" , kTH1F , {ptAxis});
222+ histos.add (" hrecPartPtAll" , " Reconstructed All particles filled mcparticle pt;#it{p}_{T} (GeV/#it{c})" , kTH1F , {ptAxis});
223+ histos.add (" hrecPartPtProton" , " Reconstructed Protons filled mcparticle pt;#it{p}_{T} (GeV/#it{c})" , kTH1F , {ptAxis});
224+ histos.add (" hrecPartPtAntiproton" , " Reconstructed Antiprotons filled mcparticle pt;#it{p}_{T} (GeV/#it{c})" , kTH1F , {ptAxis});
212225 histos.add (" hgenPhiAll" , " Generated All particles;#phi" , kTH1F , {{100 , 0 ., 7 .}});
213226 histos.add (" hgenPhiProton" , " Generated Protons;#phi" , kTH1F , {{100 , 0 ., 7 .}});
214227 histos.add (" hgenPhiAntiproton" , " Generated Antiprotons;#phi" , kTH1F , {{100 , 0 ., 7 .}});
@@ -228,6 +241,12 @@ struct NetprotonCumulantsMc {
228241 }
229242 }
230243
244+ // template <typename T>
245+ // bool selectionTrack(const T& candidate)
246+ // {
247+
248+ // }
249+
231250 template <typename T>
232251 bool selectionPIDold (const T& candidate)
233252 {
@@ -376,11 +395,14 @@ struct NetprotonCumulantsMc {
376395 PROCESS_SWITCH (NetprotonCumulantsMc, processMCGen, " Process Generated" , true );
377396
378397 Produces<aod::ProtRecCollEbyeTables> recEbyeCollisions; // ! MC Rec table creation
379- Produces<aod::ProtRecCollTables > recCollisions; // ! MC Rec table creation
398+ Produces<aod::RecCollTables > recCollisions; // ! MC Rec table creation
380399 Produces<aod::ProtRecCompleteEbyeTables> recEbyeCompleteCollisions; // ! MC Rec table creation with tracks
381400
382401 void processMCRec (MyMCRecCollision const & collision, MyMCTracks const & tracks, aod::McCollisions const &, aod::McParticles const &)
383402 {
403+ if (!collision.sel8 ()) {
404+ return ;
405+ }
384406 if (!collision.has_mcCollision ()) {
385407 return ;
386408 }
@@ -405,10 +427,16 @@ struct NetprotonCumulantsMc {
405427 }
406428
407429 auto particle = track.mcParticle ();
430+ if ((particle.pt () < cfgCutPtLower) || (particle.pt () > 5 .0f ) || (std::abs (particle.eta ()) > 0 .8f )) {
431+ continue ;
432+ }
408433 if (particle.isPhysicalPrimary ()) {
409- histos.fill (HIST (" hrecPtAll" ), particle.pt ());
434+ histos.fill (HIST (" hrecPartPtAll" ), particle.pt ());
435+ histos.fill (HIST (" hrecPtAll" ), track.pt ());
410436 histos.fill (HIST (" hrecEtaAll" ), particle.eta ());
411437 histos.fill (HIST (" hrecPhiAll" ), particle.phi ());
438+ histos.fill (HIST (" hrecDcaXYAll" ), track.dcaXY ());
439+ histos.fill (HIST (" hrecDcaZAll" ), track.dcaZ ());
412440
413441 bool trackSelected = false ;
414442 if (cfgPIDchoice == 0 )
@@ -419,21 +447,27 @@ struct NetprotonCumulantsMc {
419447 if (trackSelected) {
420448 recEbyeCompleteCollisions (recCollisions.lastIndex (), particle.pt (), particle.eta (), track.sign ());
421449 if (track.sign () > 0 ) {
422- histos.fill (HIST (" hrecPtProton" ), particle.pt ()); // ! hist for p rec
450+ histos.fill (HIST (" hrecPartPtProton" ), particle.pt ()); // ! hist for p rec
451+ histos.fill (HIST (" hrecPtProton" ), track.pt ()); // ! hist for p rec
423452 histos.fill (HIST (" hrecPtDistProtonVsCentrality" ), particle.pt (), cent);
424453 histos.fill (HIST (" hrecEtaProton" ), particle.eta ());
425454 histos.fill (HIST (" hrecPhiProton" ), particle.phi ());
455+ histos.fill (HIST (" hrecDcaXYProton" ), track.dcaXY ());
456+ histos.fill (HIST (" hrecDcaZProton" ), track.dcaZ ());
426457 if (particle.pt () < cfgCutPtUpper)
427458 nProt = nProt + 1.0 ;
428459 if (particle.pdgCode () == 2212 ) {
429460 histos.fill (HIST (" hrecTruePtProton" ), particle.pt ()); // ! hist for p purity
430461 }
431462 }
432463 if (track.sign () < 0 ) {
433- histos.fill (HIST (" hrecPtAntiproton" ), particle.pt ()); // ! hist for anti-p rec
464+ histos.fill (HIST (" hrecPartPtAntiproton" ), particle.pt ()); // ! hist for anti-p rec
465+ histos.fill (HIST (" hrecPtAntiproton" ), track.pt ()); // ! hist for anti-p rec
434466 histos.fill (HIST (" hrecPtDistAntiprotonVsCentrality" ), particle.pt (), cent);
435467 histos.fill (HIST (" hrecEtaAntiproton" ), particle.eta ());
436468 histos.fill (HIST (" hrecPhiAntiproton" ), particle.phi ());
469+ histos.fill (HIST (" hrecDcaXYAntiproton" ), track.dcaXY ());
470+ histos.fill (HIST (" hrecDcaZAntiproton" ), track.dcaZ ());
437471 if (particle.pt () < cfgCutPtUpper)
438472 nAntiprot = nAntiprot + 1.0 ;
439473 if (particle.pdgCode () == -2212 ) {
0 commit comments