99// granted to it by virtue of its status as an Intergovernmental Organization
1010// or submit itself to any jurisdiction.
1111
12+ // / \file twoParticleCorrelationpp.cxx
13+ // / \brief Task for two particle correlation in pp in order to calculate a baseline in a template fit for the flow coefficients
14+ // / \author Josué Martínez García <josuem@cern.ch>
15+
1216#include " PWGCF/Core/CorrelationContainer.h"
1317#include " PWGCF/Core/PairCuts.h"
1418
@@ -45,13 +49,13 @@ struct TwoParticleCorrelationpp {
4549 Configurable<int > range5Min{" range5Min" , 41 , {" Range on multiplicity" }};
4650 Configurable<int > range5Max{" range5Max" , 50 , {" Range on multiplicity" }};
4751 Configurable<int > nEventsMixed{" nEventsMixed" , 5 , {" Events to be Mixed" }};
48- Configurable<bool > EvSel8{ " EvSel8 " , true , {" rejects collisions using sel8()" }};
49- Configurable<float > cfgZVtxCut = {" zvtxcut " , 10.0 , " Vertex z cut. Default 10 cm" };
50- Configurable<bool > EvSelkNoSameBunchPileup{ " EvSelkNoSameBunchPileup " , true , {" rejects collisions which are associated with the same found-by-T0 bunch crossing" }};
51- Configurable<bool > EvSelkNoITSROFrameBorder{ " EvSelkNoITSROFrameBorder " , true , {" reject events at ITS ROF border" }};
52- Configurable<bool > EvSelkNoTimeFrameBorder{ " EvSelkNoTimeFrameBorder " , true , {" reject events at TF border" }};
53- Configurable<bool > EvSelkIsGoodZvtxFT0vsPV{ " EvSelkIsGoodZvtxFT0vsPV " , true , {" removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference, use this cut at low multiplicities with caution" }};
54- Configurable<bool > EvSelkNoCollInTimeRangeStandard{ " EvSelkNoCollInTimeRangeStandard " , true , {" no collisions in specified time range" }};
52+ Configurable<bool > evSel8{ " evSel8 " , true , {" rejects collisions using sel8()" }};
53+ Configurable<float > cfgZVtxCut = {" cfgZVtxCut " , 10.0 , " Vertex z cut. Default 10 cm" };
54+ Configurable<bool > evSelkNoSameBunchPileup{ " evSelkNoSameBunchPileup " , true , {" rejects collisions which are associated with the same found-by-T0 bunch crossing" }};
55+ Configurable<bool > evSelkNoITSROFrameBorder{ " evSelkNoITSROFrameBorder " , true , {" reject events at ITS ROF border" }};
56+ Configurable<bool > evSelkNoTimeFrameBorder{ " evSelkNoTimeFrameBorder " , true , {" reject events at TF border" }};
57+ Configurable<bool > evSelkIsGoodZvtxFT0vsPV{ " evSelkIsGoodZvtxFT0vsPV " , true , {" removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference, use this cut at low multiplicities with caution" }};
58+ Configurable<bool > evSelkNoCollInTimeRangeStandard{ " evSelkNoCollInTimeRangeStandard " , true , {" no collisions in specified time range" }};
5559 // Declare configurables on tracks
5660 Configurable<float > cutMyptMin{" cutMyptMin" , 0.2 , {" My Track cut" }};
5761 Configurable<float > cutMyptMax{" cutMyptMax" , 3 ., {" My Track cut" }};
@@ -78,15 +82,15 @@ struct TwoParticleCorrelationpp {
7882 {" Photon" , " K0" , " Lambda" , " Phi" , " Rho" }},
7983 " Pair cuts on various particles" };
8084 // Configurable<float> cfgTwoTrackCut{"cfgTwoTrackCut", -1, {"Two track cut"}};
81- ConfigurableAxis axisVertex{" axisVertex" , {7 , -7 , 7 }, " vertex axis for histograms" };
82- ConfigurableAxis axisDeltaPhi{" axisDeltaPhi" , {32 , -constants::math:: PIHalf, constants::math::PIHalf * 3 }, " delta phi axis for histograms" };
83- ConfigurableAxis axisDeltaEta{" axisDeltaEta" , {32 , -1.6 , 1.6 }, " delta eta axis for histograms" };
84- ConfigurableAxis axisPtTrigger{" axisPtTrigger" , {VARIABLE_WIDTH, 0.5 , 1.0 , 1.5 , 2.0 , 3.0 , 4.0 , 6.0 , 10.0 }, " pt trigger axis for histograms" };
85- ConfigurableAxis axisPtAssoc{" axisPtAssoc" , {VARIABLE_WIDTH, 0.5 , 1.0 , 1.5 , 2.0 , 3.0 , 4.0 , 6.0 }, " pt associated axis for histograms" };
86- ConfigurableAxis axisMultiplicity{" axisMultiplicity" , {VARIABLE_WIDTH, 0 , 5 , 10 , 20 , 30 , 40 , 50 , 100.1 }, " multiplicity / centrality axis for histograms" };
87- ConfigurableAxis axisVertexEfficiency{" axisVertexEfficiency" , {10 , -10 , 10 }, " vertex axis for efficiency histograms" };
88- ConfigurableAxis axisEtaEfficiency{" axisEtaEfficiency" , {20 , -1.0 , 1.0 }, " eta axis for efficiency histograms" };
89- ConfigurableAxis axisPtEfficiency{" axisPtEfficiency" , {VARIABLE_WIDTH, 0.5 , 0.6 , 0.7 , 0.8 , 0.9 , 1.0 , 1.25 , 1.5 , 1.75 , 2.0 , 2.25 , 2.5 , 2.75 , 3.0 , 3.25 , 3.5 , 3.75 , 4.0 , 4.5 , 5.0 , 6.0 , 7.0 , 8.0 }, " pt axis for efficiency histograms" };
85+ ConfigurableAxis axisVertex{" axisVertex" , {20 , -10 , 10 }, " vertex axis for histograms" };
86+ ConfigurableAxis axisDeltaPhi{" axisDeltaPhi" , {32 , -PIHalf, kThreeHalfPi }, " delta phi axis for histograms" };
87+ ConfigurableAxis axisDeltaEta{" axisDeltaEta" , {32 , -1.6 , 1.6 }, " delta eta axis for histograms" };
88+ ConfigurableAxis axisPtTrigger{" axisPtTrigger" , {VARIABLE_WIDTH, 0.5 , 1.0 , 1.5 , 2.0 , 3.0 , 4.0 , 6.0 , 10.0 }, " pt trigger axis for histograms" };
89+ ConfigurableAxis axisPtAssoc{" axisPtAssoc" , {VARIABLE_WIDTH, 0.5 , 1.0 , 1.5 , 2.0 , 3.0 , 4.0 , 6.0 }, " pt associated axis for histograms" };
90+ ConfigurableAxis axisMultiplicity{" axisMultiplicity" , {VARIABLE_WIDTH, 0 , 5 , 10 , 15 , 20 , 25 , 30 , 35 , 40 , 45 , 50 , 60 , 70 , 80 , 90 , 100 , 110 .1 }, " multiplicity / multiplicity axis for histograms" };
91+ ConfigurableAxis axisVertexEfficiency{" axisVertexEfficiency" , {10 , -10 , 10 }, " vertex axis for efficiency histograms" };
92+ ConfigurableAxis axisEtaEfficiency{" axisEtaEfficiency" , {20 , -1.0 , 1.0 }, " eta axis for efficiency histograms" };
93+ ConfigurableAxis axisPtEfficiency{" axisPtEfficiency" , {VARIABLE_WIDTH, 0.5 , 0.6 , 0.7 , 0.8 , 0.9 , 1.0 , 1.25 , 1.5 , 1.75 , 2.0 , 2.25 , 2.5 , 2.75 , 3.0 , 3.25 , 3.5 , 3.75 , 4.0 , 4.5 , 5.0 , 6.0 , 7.0 , 8.0 }, " pt axis for efficiency histograms" };
9094
9195 // Output definitions
9296 OutputObj<CorrelationContainer> same{" sameEvent" };
@@ -102,8 +106,8 @@ struct TwoParticleCorrelationpp {
102106 const AxisSpec axisCountTracks{17 , -0.5 , 16.5 };
103107 const AxisSpec axisCountEvents{8 , -0.5 , 7.5 };
104108
105- histos.add (" yields" , " multiplicity/centrality vs pT vs eta" , {HistType::kTH3F , {{100 , 0 , 100 , " / multiplicity/centrality " }, {40 , 0 , 20 , " p_{T}" }, {100 , -2 , 2 , " #eta" }}});
106- histos.add (" etaphi" , " multiplicity/centrality vs eta vs phi" , {HistType::kTH3F , {{100 , 0 , 100 , " multiplicity/centrality " }, {100 , -2 , 2 , " #eta" }, {200 , 0 , 2 * M_PI , " #varphi" }}});
109+ histos.add (" yields" , " multiplicity vs pT vs eta" , {HistType::kTH3F , {{100 , 0 , 100 , " multiplicity" }, {40 , 0 , 20 , " p_{T}" }, {100 , -2 , 2 , " #eta" }}});
110+ histos.add (" etaphi" , " multiplicity vs eta vs phi" , {HistType::kTH3F , {{100 , 0 , 100 , " multiplicity" }, {100 , -2 , 2 , " #eta" }, {64 , 0 ., TwoPI , " #varphi" }}});
107111 histos.add (" sameEvent2D" , " #Delta #eta vs #Delta #phi" , {HistType::kTH2F , {axisDeltaEta, axisDeltaPhi}});
108112 histos.add (" sameEvent_2_10" , " #Delta #eta vs #Delta #phi" , {HistType::kTH2F , {axisDeltaEta, axisDeltaPhi}});
109113 histos.add (" sameEvent_11_20" , " #Delta #eta vs #Delta #phi" , {HistType::kTH2F , {axisDeltaEta, axisDeltaPhi}});
@@ -166,25 +170,25 @@ struct TwoParticleCorrelationpp {
166170 template <typename TCollision>
167171 bool isEventSelected (TCollision collision)
168172 {
169- if (EvSel8 && !collision.sel8 ()) {
173+ if (evSel8 && !collision.sel8 ()) {
170174 return false ;
171175 }
172176 if (collision.posZ () < -cfgZVtxCut || cfgZVtxCut < collision.posZ ()) {
173177 return false ;
174178 }
175- if (EvSelkNoSameBunchPileup && !collision.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) {
179+ if (evSelkNoSameBunchPileup && !collision.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) {
176180 return false ;
177181 }
178- if (EvSelkNoITSROFrameBorder && !collision.selection_bit (o2::aod::evsel::kNoITSROFrameBorder )) {
182+ if (evSelkNoITSROFrameBorder && !collision.selection_bit (o2::aod::evsel::kNoITSROFrameBorder )) {
179183 return false ;
180184 }
181- if (EvSelkNoTimeFrameBorder && !collision.selection_bit (o2::aod::evsel::kNoTimeFrameBorder )) {
185+ if (evSelkNoTimeFrameBorder && !collision.selection_bit (o2::aod::evsel::kNoTimeFrameBorder )) {
182186 return false ;
183187 }
184- if (EvSelkIsGoodZvtxFT0vsPV && !collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
188+ if (evSelkIsGoodZvtxFT0vsPV && !collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
185189 return false ;
186190 }
187- if (EvSelkNoCollInTimeRangeStandard && !collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
191+ if (evSelkNoCollInTimeRangeStandard && !collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
188192 return false ;
189193 }
190194 return true ;
@@ -257,7 +261,7 @@ struct TwoParticleCorrelationpp {
257261 template <typename TTracks>
258262 void fillQA (TTracks tracks, float multiplicity)
259263 {
260- for (auto & track : tracks) {
264+ for (const auto & track : tracks) {
261265 histos.fill (HIST (" yields" ), multiplicity, track.pt (), track.eta ());
262266 histos.fill (HIST (" etaphi" ), multiplicity, track.eta (), track.phi ());
263267 }
@@ -424,31 +428,31 @@ struct TwoParticleCorrelationpp {
424428 hFlowEvents->GetXaxis ()->SetBinLabel (8 , " kNoCollInTimeRangeStandard" );
425429
426430 histos.fill (HIST (" Events/hEventsAfterCuts" ), 0 );
427- if (EvSel8 && !collision.sel8 ()) {
431+ if (evSel8 && !collision.sel8 ()) {
428432 return ;
429433 }
430434 histos.fill (HIST (" Events/hEventsAfterCuts" ), 1 );
431435 if (collision.posZ () < -cfgZVtxCut || cfgZVtxCut < collision.posZ ()) {
432436 return ;
433437 }
434438 histos.fill (HIST (" Events/hEventsAfterCuts" ), 2 );
435- if (EvSelkNoSameBunchPileup && !collision.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) {
439+ if (evSelkNoSameBunchPileup && !collision.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) {
436440 return ;
437441 }
438442 histos.fill (HIST (" Events/hEventsAfterCuts" ), 3 );
439- if (EvSelkNoITSROFrameBorder && !collision.selection_bit (o2::aod::evsel::kNoITSROFrameBorder )) {
443+ if (evSelkNoITSROFrameBorder && !collision.selection_bit (o2::aod::evsel::kNoITSROFrameBorder )) {
440444 return ;
441445 }
442446 histos.fill (HIST (" Events/hEventsAfterCuts" ), 4 );
443- if (EvSelkNoTimeFrameBorder && !collision.selection_bit (o2::aod::evsel::kNoTimeFrameBorder )) {
447+ if (evSelkNoTimeFrameBorder && !collision.selection_bit (o2::aod::evsel::kNoTimeFrameBorder )) {
444448 return ;
445449 }
446450 histos.fill (HIST (" Events/hEventsAfterCuts" ), 5 );
447- if (EvSelkIsGoodZvtxFT0vsPV && !collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
451+ if (evSelkIsGoodZvtxFT0vsPV && !collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
448452 return ;
449453 }
450454 histos.fill (HIST (" Events/hEventsAfterCuts" ), 6 );
451- if (EvSelkNoCollInTimeRangeStandard && !collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
455+ if (evSelkNoCollInTimeRangeStandard && !collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
452456 return ;
453457 }
454458 histos.fill (HIST (" Events/hEventsAfterCuts" ), 7 );
@@ -563,6 +567,6 @@ struct TwoParticleCorrelationpp {
563567WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
564568{
565569 return WorkflowSpec{
566- adaptAnalysisTask<TwoParticleCorrelationpp>(cfgc),
570+ adaptAnalysisTask<TwoParticleCorrelationpp>(cfgc, " two-particle-correlation-pp " ),
567571 };
568572}
0 commit comments