2222#include " Common/DataModel/TrackSelectionTables.h"
2323
2424#include < Framework/ASoA.h>
25+ #include < Framework/AnalysisDataModel.h>
2526#include < Framework/AnalysisHelpers.h>
2627#include < Framework/AnalysisTask.h>
2728#include < Framework/HistogramRegistry.h>
2829#include < Framework/HistogramSpec.h>
2930#include < Framework/InitContext.h>
31+ #include < Framework/OutputObjHandlingPolicy.h>
3032#include < Framework/runDataProcessing.h>
3133
34+ #include < Configurable.h>
35+ #include < cstdint>
36+ #include < cstdlib>
37+
3238// Event selection: Only events that contain track above some threshold
3339// -------------------------------------------------------------------------------------------
3440// TRACK DATA
@@ -147,17 +153,21 @@ struct DiffWakeTreeProducer {
147153 const float minMomentum = 0.1 ; // min for pT
148154
149155 // Event selection corresponds to sel8FullPbPb
150- if (!col.sel8 ())
156+ if (!col.sel8 ()) {
151157 return ;
152- if (col.centFT0C () > centMax)
158+ }
159+ if (col.centFT0C () > centMax) {
153160 return ; // Centrality 0 - 10 %
154- if (std::abs (col.posZ ()) > zVertCut)
161+ }
162+ if (std::abs (col.posZ ()) > zVertCut) {
155163 return ; // z position < 10 cm
156- if (!col.selection_bit (o2::aod::evsel::kNoCollInRofStandard ))
164+ }
165+ if (!col.selection_bit (o2::aod::evsel::kNoCollInRofStandard )) {
157166 return ;
158- if (!col.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard ))
167+ }
168+ if (!col.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
159169 return ;
160-
170+ }
161171 // ------ Get Run number ---------------------
162172 auto bc = col.bc_as <Bcs>();
163173 int run = bc.runNumber ();
@@ -172,23 +182,27 @@ struct DiffWakeTreeProducer {
172182 bool eventHighpT = false ;
173183 for (const auto & track : tracks) {
174184
175- if (!track.isGlobalTrackWoPtEta ())
185+ if (!track.isGlobalTrackWoPtEta ()) {
176186 continue ;
177- if (track.pt () < minMomentum)
187+ }
188+ if (track.pt () < minMomentum) {
178189 continue ;
179- if (std::abs (track.eta ()) > etaCut)
190+ }
191+ if (std::abs (track.eta ()) > etaCut) {
180192 continue ;
193+ }
181194 if (track.pt () > ptThresh) {
182195 eventHighpT = true ;
183196 break ;
184197 }
185198 }
186- if (!eventHighpT)
199+ if (!eventHighpT) {
187200 return ;
201+ }
188202 // ------------------------------------------------------------
189203 // Translate values to less memory consuming values
190- int16_t substituteEp2 = static_cast <int16_t >(ep2 * 1000 );
191- int16_t substituteEp3 = static_cast <int16_t >(ep3 * 1000 );
204+ auto substituteEp2 = static_cast <int16_t >(ep2 * 1000 );
205+ auto substituteEp3 = static_cast <int16_t >(ep3 * 1000 );
192206
193207 testcol (run,
194208 col.centFT0C (),
@@ -204,15 +218,19 @@ struct DiffWakeTreeProducer {
204218 for (const auto & track : tracks) {
205219
206220 // Track cut
207- if (!track.isGlobalTrackWoPtEta ())
221+ if (!track.isGlobalTrackWoPtEta ()) {
208222 continue ; // General track cuts, but pT and eta cut are set manually
209- if (track.pt () < minMomentum)
223+ }
224+ if (track.pt () < minMomentum) {
210225 continue ;
211- if (std::abs (track.eta ()) > etaCut)
226+ }
227+ if (std::abs (track.eta ()) > etaCut) {
212228 continue ;
229+ }
213230
214- if (std::abs (track.px ()) > maxMomentum || std::abs (track.py ()) > maxMomentum || std::abs (track.pz ()) > maxMomentum)
231+ if (std::abs (track.px ()) > maxMomentum || std::abs (track.py ()) > maxMomentum || std::abs (track.pz ()) > maxMomentum) {
215232 continue ; // to avoid overflow in Substitute_p
233+ }
216234
217235 histos.fill (HIST (" etaHistogram" ), track.eta ());
218236 histos.fill (HIST (" pTHistogram" ), track.pt ());
@@ -250,11 +268,11 @@ struct DiffWakeTreeProducer {
250268 substituteP |= (particlePz & bitmask20Bits) << lowermostBit;
251269
252270 // dEdx
253- uint16_t substituteDEDX = static_cast <uint16_t >(track.tpcSignal () * 10 );
271+ auto substituteDEDX = static_cast <uint16_t >(track.tpcSignal () * 10 );
254272
255273 // DCA
256- int16_t substituteDCAXY = static_cast <int16_t >(track.dcaXY () * 100 );
257- int16_t substituteDCAZ = static_cast <int16_t >(track.dcaZ () * 100 );
274+ auto substituteDCAXY = static_cast <int16_t >(track.dcaXY () * 100 );
275+ auto substituteDCAZ = static_cast <int16_t >(track.dcaZ () * 100 );
258276
259277 // --------------- Fill track table ------------------
260278 testtrack (testcol.lastIndex (),
0 commit comments