1515// /
1616// / \brief An analysis task to select and analyze anti-nuclei events and tracks.
1717
18- #include " Framework/runDataProcessing.h"
19- #include " Framework/AnalysisTask.h"
20- #include " Framework/HistogramRegistry.h"
21- #include " Framework/AnalysisDataModel.h"
22- #include < TParameter.h>
23- #include < cmath>
24- #include " Common/DataModel/EventSelection.h"
18+ #include " Common/Core/PID/TPCPIDResponse.h"
2519#include " Common/Core/TrackSelection.h"
2620#include " Common/Core/TrackSelectionDefaults.h"
21+ #include " Common/DataModel/Centrality.h"
22+ #include " Common/DataModel/EventSelection.h"
2723#include " Common/DataModel/PIDResponse.h"
28- #include " Common/Core/PID/TPCPIDResponse.h"
2924#include " Common/DataModel/TrackSelectionTables.h"
30- # include " Common/DataModel/Centrality.h "
25+
3126#include " DataFormatsTPC/BetheBlochAleph.h"
27+ #include " Framework/AnalysisDataModel.h"
28+ #include " Framework/AnalysisTask.h"
29+ #include " Framework/HistogramRegistry.h"
30+ #include " Framework/runDataProcessing.h"
31+
32+ #include < TParameter.h>
33+
34+ #include < cmath>
3235
3336using namespace o2 ;
3437using namespace o2 ::framework;
3538using CollisionWithEvSel = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs>;
3639using TotalTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::pidTOFDe>;
3740
38- namespace {
39- static const std::vector<std::string> particleName{" d" };
41+ namespace
42+ {
43+ static const std::vector<std::string> particleName{" d" };
4044static const double kBetheBlochDefault [6 ]{-1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 , -1 .e32 };
4145static const std::vector<std::string> betheBlochParNames{" p0" , " p1" , " p2" , " p3" , " p4" , " resolution" };
42- }
46+ } // namespace
4347
4448struct Antinucleitask {
4549 // Histogram registry: for holding histograms
@@ -55,7 +59,7 @@ struct Antinucleitask {
5559 Configurable<LabeledArray<double >> cfgBetheBlochParams{" cfgBetheBlochParams" , {kBetheBlochDefault , 1 , 6 , particleName, betheBlochParNames}, " TPC Bethe-Bloch parameterisation for deuteron" };
5660
5761 void init (InitContext const &)
58- { // Defining the Histogram Axes
62+ { // Defining the Histogram Axes
5963 ConfigurableAxis etaAxis{" etaAxis" , {16 , -0.8 , +0.8 }, " #eta" };
6064 ConfigurableAxis phiAxis{" phiAxis" , {70 , 0 .f , 7 .f }, " #phi" };
6165 ConfigurableAxis zVtxAxis{" zVtxAxis" , {100 , -20 .f , 20 .f }, " Primary Vertex z (cm)" };
@@ -64,11 +68,10 @@ struct Antinucleitask {
6468 ConfigurableAxis centAxis{" centAxis" , {100 , 0 , 100 .0f }, " Centrality" };
6569 ConfigurableAxis momAxis{" momAxis" , {5 .e2 , 0 .f , 5 .f }, " momentum axis binning" };
6670 ConfigurableAxis tpcAxis{" tpcAxis" , {4 .e2 , 0 .f , 4 .e3f }, " tpc signal axis binning" };
67-
6871
6972 // Creating histograms
7073 histos.add (" RawzVtx" , " RawzVtx" , kTH1F , {{zVtxAxis, " Primary Vertex z (cm)" }});
71- histos.add (" zVtx" , " zVtx" , kTH1F ,{{zVtxAxis, " Primary Vertex z (cm)" }});
74+ histos.add (" zVtx" , " zVtx" , kTH1F , {{zVtxAxis, " Primary Vertex z (cm)" }});
7275 histos.add (" RawEta" , " RawEta" , kTH1F , {{etaAxis, " #eta" }});
7376 histos.add (" Eta" , " Eta" , kTH1F , {{etaAxis, " #eta" }});
7477 histos.add (" RawPhi" , " RawPhi" , kTH1F , {{phiAxis, " #phi (rad)" }});
@@ -80,21 +83,28 @@ struct Antinucleitask {
8083 histos.add (" tpcNSigma" , " tpcNSigma" , kTH3F , {{centAxis, " Centrality" }, {ptAxis, " #it{p}_{T} (GeV/#it{c})" }, {NSigmaAxis, " N_{#sigma}" }});
8184 histos.add (" RawtofNSigma" , " RawtofNSigma" , kTH3F , {{centAxis, " Centrality" }, {ptAxis, " #it{p}_{T} (GeV/#it{c})" }, {NSigmaAxis, " N_{#sigma}" }});
8285 histos.add (" tofNSigma" , " tofNSigma" , kTH3F , {{centAxis, " Centrality" }, {ptAxis, " #it{p}_{T} (GeV/#it{c})" }, {NSigmaAxis, " N_{#sigma}" }});
83-
8486 }
8587
86- // Function to apply track cuts
88+ // Function to apply track cuts
8789 template <typename T>
8890 bool isGoodTrack (const T& track)
8991 {
90- if (track.eta () > 0 .8f ) return false ;
91- if (track.tpcNClsFound () < mtrackNclusTPCcut) return false ;
92- if (track.tpcNClsCrossedRows () < 70 ) return false ;
93- if (track.itsNCls () < mtrackNclusITScut) return false ;
94- if (track.tpcChi2NCl () > mChi2TPC ) return false ;
95- if (track.itsChi2NCl () > mChi2ITS ) return false ;
96- if (std::abs (track.dcaXY ()) > mtrackDCAxy) return false ;
97- if (std::abs (track.dcaZ ()) > mtrackDCAz) return false ;
92+ if (track.eta () > 0 .8f )
93+ return false ;
94+ if (track.tpcNClsFound () < mtrackNclusTPCcut)
95+ return false ;
96+ if (track.tpcNClsCrossedRows () < 70 )
97+ return false ;
98+ if (track.itsNCls () < mtrackNclusITScut)
99+ return false ;
100+ if (track.tpcChi2NCl () > mChi2TPC )
101+ return false ;
102+ if (track.itsChi2NCl () > mChi2ITS )
103+ return false ;
104+ if (std::abs (track.dcaXY ()) > mtrackDCAxy)
105+ return false ;
106+ if (std::abs (track.dcaZ ()) > mtrackDCAz)
107+ return false ;
98108
99109 return true ;
100110 }
@@ -132,21 +142,20 @@ struct Antinucleitask {
132142 histos.fill (HIST (" RawPt" ), pt);
133143 histos.fill (HIST (" RawtpcNSigma" ), collision.centFT0C (), pt, tpcNSigmaDeuteron);
134144 histos.fill (HIST (" RawtofNSigma" ), collision.centFT0C (), pt, track.tofNSigmaDe ());
135-
145+
136146 // If the track is good, fill the "after cuts" histograms.
137147 if (isGoodTrack (track)) {
138148 histos.fill (HIST (" Eta" ), track.eta ());
139149 histos.fill (HIST (" Phi" ), track.phi ());
140150 histos.fill (HIST (" Pt" ), pt);
141-
151+
142152 histos.fill (HIST (" tpcNSigma" ), collision.centFT0C (), pt, tpcNSigmaDeuteron);
143153
144154 histos.fill (HIST (" TpcSignal" ), track.tpcInnerParam (), track.tpcSignal ());
145155
146- if (std::abs (tpcNSigmaDeuteron)< 3 .f ) {
147- histos.fill (HIST (" tofNSigma" ), collision.centFT0C (), pt, track.tofNSigmaDe ());
148- }
149-
156+ if (std::abs (tpcNSigmaDeuteron) < 3 .f ) {
157+ histos.fill (HIST (" tofNSigma" ), collision.centFT0C (), pt, track.tofNSigmaDe ());
158+ }
150159 }
151160 }
152161 }
@@ -158,4 +167,5 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
158167{
159168 return WorkflowSpec{
160169 adaptAnalysisTask<Antinucleitask>(cfgc)};
161- }
170+ }
171+
0 commit comments