1010// or submit itself to any jurisdiction.
1111// /
1212
13-
1413// / \file MultandPtFluctuations.cxx
1514// / \brief Calculate multiplicity and transverse momentum fluctuations using strongly intensive observables
1615// / \author Omama Rubza <omama.rubza@cern.ch>
1716
18- #include " Framework/runDataProcessing.h"
19- #include " Framework/AnalysisTask.h"
20- #include " Framework/HistogramRegistry.h"
21- #include " Framework/HistogramSpec.h"
22- #include " Framework/AnalysisDataModel.h"
23- #include " Framework/ASoAHelpers.h"
24-
17+ #include " Common/Core/TrackSelection.h"
18+ #include " Common/DataModel/Centrality.h"
2519#include " Common/DataModel/EventSelection.h"
2620#include " Common/DataModel/FT0Corrected.h"
2721#include " Common/DataModel/Multiplicity.h"
28- #include " Common/DataModel/Centrality.h"
29- #include " Common/Core/TrackSelection.h"
3022#include " Common/DataModel/TrackSelectionTables.h"
3123
24+ #include " Framework/ASoAHelpers.h"
25+ #include " Framework/AnalysisDataModel.h"
26+ #include " Framework/AnalysisTask.h"
27+ #include " Framework/HistogramRegistry.h"
28+ #include " Framework/HistogramSpec.h"
29+ #include " Framework/runDataProcessing.h"
30+
3231#include " TProfile.h"
32+
3333#include < vector>
3434
3535using namespace o2 ;
3636using namespace o2 ::framework;
3737using namespace o2 ::aod;
3838using namespace o2 ::framework::expressions;
3939
40-
41- struct MultandptFluctuations {
40+ struct MultandPtFluctuations {
4241
4342 // ------ Histogram binning
4443
@@ -47,192 +46,202 @@ struct MultandptFluctuations {
4746 Configurable<int > ndcaZ{" ndcaZ" , 100 , " DCAz bins" };
4847 Configurable<int > nCentBins{" nCentBins" , 100 , " Number of centrality bins" };
4948
50-
5149 // ------ Event Cuts
52- Configurable<float > vtxZcut{" vertexZcut " , 10 .0f , " Vertex Z" };
50+ Configurable<float > vtxZcut{" vtxZcut " , 10 .0f , " vertex Z" };
5351 Configurable<bool > cfgNoSameBunchPileup{" cfgNoSameBunchPileup" , true , " kNoSameBunchPileup" };
54- Configurable<bool > cfgEvSelUseGoodZvtxFT0vsPV{" cfgEvSelUseGoodZvtxFT0vsPV" ,true , " Good Zvtx FT0 vs PV" };
52+ Configurable<bool > cfgEvSelUseGoodZvtxFT0vsPV{" cfgEvSelUseGoodZvtxFT0vsPV" , true , " Good Zvtx FT0 vs PV" };
5553 Configurable<bool > cfgUseGoodITSLayerAllCut{" cfgUseGoodITSLayerAllCut" , true , " Good ITS Layers" };
5654
57-
5855 // ----- Centrality estimator
5956 Configurable<bool > cFT0M{" cFT0M" , false , " FT0M centrality" }; // for pp
60- Configurable<bool > cFT0C{" cFT0C" , true , " Use FT0C centrality" };
61-
57+ Configurable<bool > cFT0C{" cFT0C" , true , " Use FT0C centrality" };
6258
6359 // ------ Track cuts
6460
6561 Configurable<float > ptMinCut{" ptMinCut" , 0 .2f , " Minimum pT" };
6662 Configurable<float > ptMaxCut{" ptMaxCut" , 5 .0f , " Maximum pT" };
67- Configurable<float > etaCut{" etaCut" ,0 .8f , " Maximum |eta|" };
63+ Configurable<float > etaCut{" etaCut" , 0 .8f , " Maximum |eta|" };
6864 Configurable<int > itsNClsCut{" itsNClsCut" , 4 , " Minimum ITS clusters" };
6965 Configurable<float > tpcCrossCut{" tpcCrossCut" , 70 .0f , " TPC crossed rows" };
70- Configurable<float > crossedRowsOverFindableCut{" crossedRowsOverFindableCut" , 0 .8f ," TPC crossed rows over findable" };
66+ Configurable<float > crossedRowsOverFindableCut{" crossedRowsOverFindableCut" , 0 .8f , " TPC crossed rows over findable" };
7167 Configurable<float > dcaZCut{" dcaZCut" , 2 .0f , " Maximum DCAz" };
7268 Configurable<float > dcaXYCut{" dcaXYCut" , 0 .2f , " Maximum DCAxy" };
7369 Configurable<float > tpcChiCut{" tpcChiCut" , 4 .0f , " TPC chi2/NCls" };
74- Configurable<float > itsChiCut{" itsChiCut" , 36 .0f ," ITS chi2/NCls" };
75- Configurable<bool > requireITS{" requireITS" ,true , " Require ITS hit" };
70+ Configurable<float > itsChiCut{" itsChiCut" , 36 .0f , " ITS chi2/NCls" };
71+ Configurable<bool > requireITS{" requireITS" , true , " Require ITS hit" };
7672 Configurable<bool > requireTPC{" requireTPC" , true , " Require TPC hit" };
77- Configurable<bool > requireInnerITS{" requireInnerITS" , true ," At least one hit in ITS layers 0,1,2" };
78-
73+ Configurable<bool > requireInnerITS{" requireInnerITS" , true , " At least one hit in ITS layers 0,1,2" };
7974
8075 // ----- Histogram Registry
8176 HistogramRegistry histos{
82- " histos" , {}, OutputObjHandlingPolicy::AnalysisObject
83- };
77+ " histos" ,
78+ {},
79+ OutputObjHandlingPolicy::AnalysisObject};
8480
8581 void init (InitContext const &)
8682 {
8783 const AxisSpec axisEta{30 , -1.5 , +1.5 , " #eta" };
8884 const AxisSpec axisPt{nBinsPt, 0.15 , 10.0 , " p_{T}" };
8985 const AxisSpec axisVtxz{80 , -20 , 20 , " V_{Z} (cm)" };
9086 const AxisSpec axisPhi{40 , -1 , 7 , " #phi" };
91- const AxisSpec axisdcaXY{ndcaXY, -0.3 , 0.3 , " DCAxy" };
92- const AxisSpec axisdcaZ{ndcaZ, -3.0 , 3.0 , " DCAz" };
87+ const AxisSpec axisdcaXY{ndcaXY, -0.3 , 0.3 , " DCAxy" };
88+ const AxisSpec axisdcaZ{ndcaZ, -3.0 , 3.0 , " DCAz" };
9389 const AxisSpec axisNch{500 , 0 , 500 , " Nch" };
94- const AxisSpec axisCent{ nCentBins, 0.0 , 100.0 , " Centrality (%)" }; // ------------- centrality bins
95-
90+ const AxisSpec axisCent{nCentBins, 0.0 , 100.0 , " Centrality (%)" }; // ------------- centrality bins
9691
9792 histos.add (" QA/BeforeCut/VtxZ" , " Vertex Z" , kTH1F , {axisVtxz});
98- histos.add (" QA/AfterCut/VtxZ" , " Vertex Z" , kTH1F , {axisVtxz});
93+ histos.add (" QA/AfterCut/VtxZ" , " Vertex Z" , kTH1F , {axisVtxz});
9994 histos.add (" QA/BeforeCut/Cent" , " Centrality" , kTH1F , {axisCent});
100- histos.add (" QA/AfterCut/Cent" , " Centrality" , kTH1F , {axisCent});
101- histos.add (" QA/BeforeCut/Eta" , " Eta" , kTH1F , {axisEta});
102- histos.add (" QA/AfterCut/Eta" , " Eta" , kTH1F , {axisEta});
103- histos.add (" QA/BeforeCut/Pt" , " Pt" , kTH1F , {axisPt});
104- histos.add (" QA/AfterCut/Pt" , " Pt" , kTH1F , {axisPt});
105- histos.add (" QA/BeforeCut/Phi" , " Phi" , kTH1F , {axisPhi});
106- histos.add (" QA/AfterCut/Phi" , " Phi" , kTH1F , {axisPhi});
95+ histos.add (" QA/AfterCut/Cent" , " Centrality" , kTH1F , {axisCent});
96+ histos.add (" QA/BeforeCut/Eta" , " Eta" , kTH1F , {axisEta});
97+ histos.add (" QA/AfterCut/Eta" , " Eta" , kTH1F , {axisEta});
98+ histos.add (" QA/BeforeCut/Pt" , " Pt" , kTH1F , {axisPt});
99+ histos.add (" QA/AfterCut/Pt" , " Pt" , kTH1F , {axisPt});
100+ histos.add (" QA/BeforeCut/Phi" , " Phi" , kTH1F , {axisPhi});
101+ histos.add (" QA/AfterCut/Phi" , " Phi" , kTH1F , {axisPhi});
107102 histos.add (" QA/BeforeCut/DcaXY" , " DCAxy" , kTH1F , {axisdcaXY});
108- histos.add (" QA/AfterCut/DcaXY" , " DCAxy" , kTH1F , {axisdcaXY});
109- histos.add (" QA/BeforeCut/DcaZ" , " DCAz" , kTH1F , {axisdcaZ});
110- histos.add (" QA/AfterCut/DcaZ" , " DCAz" , kTH1F , {axisdcaZ});
111- histos.add (" hNch" , " Nch" , kTH1F , {axisNch});
103+ histos.add (" QA/AfterCut/DcaXY" , " DCAxy" , kTH1F , {axisdcaXY});
104+ histos.add (" QA/BeforeCut/DcaZ" , " DCAz" , kTH1F , {axisdcaZ});
105+ histos.add (" QA/AfterCut/DcaZ" , " DCAz" , kTH1F , {axisdcaZ});
106+ histos.add (" hNch" , " Nch" , kTH1F , {axisNch});
112107 histos.add (" h2_DcaZ" , " DCA_{Z}" , kTH2D , {{axisPt}, {axisdcaZ}});
113108 histos.add (" h2_DcaXY" , " DCA_{XY}" , kTH2D , {{axisPt}, {axisdcaXY}});
114109 histos.add (" hEventCounter" , " Number of events vs centrality" , kTH1F , {axisCent});
115- histos.add (" p_a" , " <A> vs centrality" , kTProfile , {axisCent});
116- histos.add (" p_b" , " <B> vs centrality" , kTProfile , {axisCent});
117- histos.add (" p_a2" , " <A^{2}> vs centrality" , kTProfile , {axisCent});
118- histos.add (" p_b2" , " <B^{2}> vs centrality" , kTProfile , {axisCent});
119- histos.add (" p_ab" , " <AB> vs centrality" , kTProfile , {axisCent});
120- histos.add (" p_asumb" , " <A+B> vs centrality" , kTProfile , {axisCent});
121-
110+ histos.add (" p_a" , " <A> vs centrality" , kTProfile , {axisCent});
111+ histos.add (" p_b" , " <B> vs centrality" , kTProfile , {axisCent});
112+ histos.add (" p_a2" , " <A^{2}> vs centrality" , kTProfile , {axisCent});
113+ histos.add (" p_b2" , " <B^{2}> vs centrality" , kTProfile , {axisCent});
114+ histos.add (" p_ab" , " <AB> vs centrality" , kTProfile , {axisCent});
115+ histos.add (" p_asumb" , " <A+B> vs centrality" , kTProfile , {axisCent});
122116 }
123117
124- // ---------- Filters
125- Filter ptFilter =(aod::track::pt > ptMinCut) && (aod::track::pt < ptMaxCut);
126- Filter etaFilter =nabs(aod::track::eta) < etaCut;
118+ // ---------- Filters
119+ Filter ptFilter = (aod::track::pt > ptMinCut) && (aod::track::pt < ptMaxCut);
120+ Filter etaFilter = nabs(aod::track::eta) < etaCut;
127121 Filter posZFilter = nabs(aod::collision::posZ) < vtxZcut;
128122
129- using myColsData = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms,aod::CentFT0Cs>;
123+ using myColsData = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs>;
130124 using myTracksData = soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>;
131125 using myFilteredTracksData = soa::Filtered<myTracksData>;
132126
133- void process (myColsData::iterator const & col, myFilteredTracksData const & tracks)
127+ void process (myColsData::iterator const & col, myFilteredTracksData const & tracks)
134128 {
135129 histos.fill (HIST (" QA/BeforeCut/VtxZ" ), col.posZ ());
136130
137131 float cent = -1 .0f ;
138132
139- if (cFT0M) { cent = col.centFT0M ();
133+ if (cFT0M) {
134+ cent = col.centFT0M ();
140135 }
141136
142137 if (cFT0C) {
143- cent = col.centFT0C ();
144- // if (!track.isGlobalTrack()) continue;
145- }
138+ cent = col.centFT0C ();
139+ // if (!track.isGlobalTrack()) continue;
140+ }
146141
147142 if (cent < 0 ) {
148143 return ;
149144 }
150145
151146 histos.fill (HIST (" QA/BeforeCut/Cent" ), cent);
152147
153- if (!col.sel8 ()) return ;
148+ if (!col.sel8 ())
149+ return ;
154150
155- if (std::abs (col.posZ ()) > vtxZcut) return ;
151+ if (std::abs (col.posZ ()) > vtxZcut)
152+ return ;
156153
157- if (cfgNoSameBunchPileup && !col.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) return ;
154+ if (cfgNoSameBunchPileup && !col.selection_bit (o2::aod::evsel::kNoSameBunchPileup ))
155+ return ;
158156
159- if (cfgEvSelUseGoodZvtxFT0vsPV && !col.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) return ;
157+ if (cfgEvSelUseGoodZvtxFT0vsPV && !col.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV ))
158+ return ;
160159
161- if (cfgUseGoodITSLayerAllCut && !col.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll )) return ;
160+ if (cfgUseGoodITSLayerAllCut && !col.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll ))
161+ return ;
162162
163163 histos.fill (HIST (" hEventCounter" ), cent);
164164
165165 histos.fill (HIST (" QA/AfterCut/VtxZ" ), col.posZ ());
166166 histos.fill (HIST (" QA/AfterCut/Cent" ), cent);
167167
168- double A = 0.0 ;
169- double B = 0.0 ;
168+ double a = 0.0 ;
169+ double b = 0.0 ;
170170
171- // if (!track.isGlobalTrack()) continue;
172- for (const auto & track : tracks) {
171+ // if (!track.isGlobalTrack()) continue;
172+ for (const auto & track : tracks) {
173173
174- histos.fill (HIST (" QA/BeforeCut/Eta" ), track.eta ());
175- histos.fill (HIST (" QA/BeforeCut/Pt" ), track.pt ());
176- histos.fill (HIST (" QA/BeforeCut/Phi" ), track.phi ());
177- histos.fill (HIST (" QA/BeforeCut/DcaXY" ), track.dcaXY ());
178- histos.fill (HIST (" QA/BeforeCut/DcaZ" ), track.dcaZ ());
174+ histos.fill (HIST (" QA/BeforeCut/Eta" ), track.eta ());
175+ histos.fill (HIST (" QA/BeforeCut/Pt" ), track.pt ());
176+ histos.fill (HIST (" QA/BeforeCut/Phi" ), track.phi ());
177+ histos.fill (HIST (" QA/BeforeCut/DcaXY" ), track.dcaXY ());
178+ histos.fill (HIST (" QA/BeforeCut/DcaZ" ), track.dcaZ ());
179179
180- // Track quality cuts
180+ // Track quality cuts
181181
182- if (requireITS && !track.hasITS ()) continue ;
183- if (requireTPC && !track.hasTPC ()) continue ;
182+ if (requireITS && !track.hasITS ())
183+ continue ;
184+ if (requireTPC && !track.hasTPC ())
185+ continue ;
184186
185- if (track.itsNCls () < itsNClsCut) continue ;
186- if (track.tpcNClsCrossedRows () < tpcCrossCut) continue ;
187+ if (track.itsNCls () < itsNClsCut)
188+ continue ;
189+ if (track.tpcNClsCrossedRows () < tpcCrossCut)
190+ continue ;
187191
188- if (track.tpcCrossedRowsOverFindableCls () < crossedRowsOverFindableCut) continue ;
192+ if (track.tpcCrossedRowsOverFindableCls () < crossedRowsOverFindableCut)
193+ continue ;
189194
190- if (std::abs (track.dcaZ ()) > dcaZCut) continue ;
191- if (std::abs (track.dcaXY ()) > dcaXYCut) continue ;
195+ if (std::abs (track.dcaZ ()) > dcaZCut)
196+ continue ;
197+ if (std::abs (track.dcaXY ()) > dcaXYCut)
198+ continue ;
192199
193- if (track.tpcChi2NCl () > tpcChiCut) continue ;
194- if (track.itsChi2NCl () > itsChiCut) continue ;
200+ if (track.tpcChi2NCl () > tpcChiCut)
201+ continue ;
202+ if (track.itsChi2NCl () > itsChiCut)
203+ continue ;
195204
196- if (std::abs (track.eta ()) > etaCut) continue ;
205+ if (std::abs (track.eta ()) > etaCut)
206+ continue ;
197207
198- if (requireInnerITS) {
208+ if (requireInnerITS) {
199209
200- auto itsMap = track.itsClusterMap ();
210+ auto itsMap = track.itsClusterMap ();
201211
202- if (!(itsMap & (1 << 0 )) &&
203- !(itsMap & (1 << 1 )) &&
204- !(itsMap & (1 << 2 ))) {
205- continue ;
206- }
207- }
212+ if (!(itsMap & (1 << 0 )) &&
213+ !(itsMap & (1 << 1 )) &&
214+ !(itsMap & (1 << 2 ))) {
215+ continue ;
216+ }
217+ }
208218
209- // After cuts QA
210- histos.fill (HIST (" QA/AfterCut/Eta" ), track.eta ());
211- histos.fill (HIST (" QA/AfterCut/Pt" ), track.pt ());
212- histos.fill (HIST (" QA/AfterCut/Phi" ), track.phi ());
213- histos.fill (HIST (" QA/AfterCut/DcaXY" ), track.dcaXY ());
214- histos.fill (HIST (" QA/AfterCut/DcaZ" ), track.dcaZ ());
219+ // After cuts QA
220+ histos.fill (HIST (" QA/AfterCut/Eta" ), track.eta ());
221+ histos.fill (HIST (" QA/AfterCut/Pt" ), track.pt ());
222+ histos.fill (HIST (" QA/AfterCut/Phi" ), track.phi ());
223+ histos.fill (HIST (" QA/AfterCut/DcaXY" ), track.dcaXY ());
224+ histos.fill (HIST (" QA/AfterCut/DcaZ" ), track.dcaZ ());
215225
216- histos.fill (HIST (" h2_DcaZ" ), track.pt (),track.dcaZ ());
217- histos.fill (HIST (" h2_DcaXY" ), track.pt (),track.dcaXY ());
218-
219- A++; // A-nch, B =pt
220- B += track.pt ();
226+ histos.fill (HIST (" h2_DcaZ" ), track.pt (), track.dcaZ ());
227+ histos.fill (HIST (" h2_DcaXY" ), track.pt (), track.dcaXY ());
221228
229+ a++; // A-nch, B =pt
230+ b += track.pt ();
222231 }
223- // ---- Fill TProfiles (once per event)
224- histos.fill (HIST (" p_a" ), cent, A);
225- histos.fill (HIST (" p_b" ), cent, B);
226- histos.fill (HIST (" p_a2" ),cent, A * A);
227- histos.fill (HIST (" p_b2" ), cent, B * B);
228- histos.fill (HIST (" p_ab" ), cent, A * B);
229- histos.fill (HIST (" p_asumb" ), cent, A + B);
232+
233+ // ---- Fill TProfiles (once per event)
234+ histos.fill (HIST (" p_a" ), cent, a);
235+ histos.fill (HIST (" p_b" ), cent, b);
236+ histos.fill (HIST (" p_a2" ), cent, a * a);
237+ histos.fill (HIST (" p_b2" ), cent, b * b);
238+ histos.fill (HIST (" p_ab" ), cent, a * b);
239+ histos.fill (HIST (" p_asumb" ), cent, a + b);
230240 }
231241};
232242
233- WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
234- {
235- return WorkflowSpec{
236- adaptAnalysisTask<MultandptFluctuations>(cfgc)
237- };
243+ WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
244+ {
245+ return WorkflowSpec{
246+ adaptAnalysisTask<MultandPtFluctuations>(cfgc)};
238247}
0 commit comments