1212// / \file FlowEseCorre.cxx
1313// / \brief Task for flow and event shape engineering corrections
1414// / \author Alice Collaboration
15+ // / \since 2023-05-15
16+ // / \version 1.0
17+ // /
18+ // / This task calculates flow and event shape engineering corrections
19+ // / using Q-vector and event plane methods.
1520
1621// C++/ROOT includes.
1722#include < TComplex.h>
@@ -50,7 +55,7 @@ using MyCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod
5055using MyTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TrackSelectionExtension>;
5156using BCsWithRun3Matchings = soa::Join<aod::BCs, aod::Timestamps, aod::Run3MatchedToBCSparse>;
5257
53- struct FlowEseCorr {
58+ struct FlowEseCorre {
5459 HistogramRegistry histosQA{" histosQA" , {}, OutputObjHandlingPolicy::AnalysisObject, false , false };
5560
5661 Configurable<std::vector<int >> cfgNmods{" cfgNmods" , {2 }, " Modulation of interest" };
@@ -77,7 +82,7 @@ struct FlowEseCorr{
7782
7883 EventPlaneHelper helperEP;
7984
80- void init (InitContext const &)
85+ void init (InitContext const &)
8186 {
8287 AxisSpec axisCent{cfgAxisCent, " centrality" };
8388 AxisSpec axisQvec{cfgAxisQvec, " Q" };
@@ -97,25 +102,26 @@ struct FlowEseCorr{
97102 }
98103
99104 template <typename CollType>
100- bool selectEvent (const CollType & collision)
105+ bool selectEvent (CollType const & collision)
101106 {
102- if (!collision.sel8 ()){
107+ if (!collision.sel8 ()) {
103108 return false ;
104109 }
105- if (!collision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV )){
110+ if (!collision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV )) {
106111 return false ;
107112 }
108- if (!collision.selection_bit (aod::evsel::kNoSameBunchPileup )){
113+ if (!collision.selection_bit (aod::evsel::kNoSameBunchPileup )) {
109114 return false ;
110115 }
111- if (!collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )){
116+ if (!collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
112117 return false ;
113118 }
119+
114120 return true ;
115121 }
116122
117123 template <typename TrackType>
118- bool selectTrack (const TrackType & track)
124+ bool selectTrack (TrackType const & track)
119125 {
120126 if (track.pt () < cfgMinPt)
121127 return false ;
@@ -140,9 +146,9 @@ struct FlowEseCorr{
140146 }
141147
142148 template <typename CollType>
143- void fillHistosQvec (const CollType & collision, int nmode)
149+ void fillHistosQvec (CollType const & collision, int nmode)
144150 {
145- if (nmode == kDefaultModulation ){
151+ if (nmode == kDefaultModulation ) {
146152 histosQA.fill (HIST (" histQvecV2" ), collision.qvecFT0CReVec ()[0 ], collision.qvecFT0CImVec ()[0 ], collision.centFT0C ());
147153 histosQA.fill (HIST (" histEvtPlV2" ), helperEP.GetEventPlane (collision.qvecFT0CReVec ()[0 ], collision.qvecFT0CImVec ()[0 ], nmode), collision.centFT0C ());
148154 histosQA.fill (HIST (" histQvecRes_SigRefAV2" ), helperEP.GetResolution (helperEP.GetEventPlane (collision.qvecFT0CReVec ()[0 ], collision.qvecFT0CImVec ()[0 ], nmode), helperEP.GetEventPlane (collision.qvecTPCposReVec ()[0 ], collision.qvecTPCposImVec ()[0 ], nmode), nmode), collision.centFT0C ());
@@ -151,37 +157,36 @@ struct FlowEseCorr{
151157 }
152158
153159 template <typename CollType, typename TrackType>
154- void fillHistosFlow (const CollType & collision, const TrackType & tracks, int nmode)
160+ void fillHistosFlow (CollType const & collision, TrackType const & tracks, int nmode)
155161 {
156- if (collision.sumAmplFT0C () < kMinAmplitudeThreshold ){
162+ if (collision.sumAmplFT0C () < kMinAmplitudeThreshold ) {
157163 return ;
158164 }
159- for (const auto &trk : tracks)
160- {
161- if (!selectTrack (trk)){
165+ for (auto const & trk : tracks) {
166+ if (!selectTrack (trk)) {
162167 continue ;
163168 }
164- if (nmode == kDefaultModulation ){
169+ if (nmode == kDefaultModulation ) {
165170 histosQA.fill (HIST (" histCosDetV2" ), collision.centFT0C (), trk.pt (),
166171 std::cos (static_cast <float >(nmode) * (trk.phi () - helperEP.GetEventPlane (collision.qvecFT0CReVec ()[0 ], collision.qvecFT0CImVec ()[0 ], nmode))));
167172 }
168173 }
169174 }
170175
171- void process (MyCollisions::iterator const & collision, MyTracks const & tracks)
176+ void process (MyCollisions::iterator const & collision, MyTracks const & tracks)
172177 {
173- if (!selectEvent (collision)){
178+ if (!selectEvent (collision)) {
174179 return ;
175180 }
176- for (const auto & mod : cfgNmods-> at (i)) {
181+ for (auto const & mod : * cfgNmods) {
177182 fillHistosQvec (collision, mod);
178183 fillHistosFlow (collision, tracks, mod);
179184 }
180185 }
181186};
182187
183- WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
188+ WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
184189{
185190 return WorkflowSpec{
186- adaptAnalysisTask<FlowEseCorre>(cfgc)};
187- }
191+ adaptAnalysisTask<FlowEseCorre>(cfgc)};
192+ }
0 commit comments