@@ -93,10 +93,10 @@ struct HfCorrelatorFlowCharmHadrons {
9393 doprocessSameEventHadHadWCentMix, doprocessSameEventHadHadWMultMix, doprocessMixedEventHadHadWCentMix, doprocessMixedEventHadHadWMultMix};
9494 if ((std::accumulate (doprocess.begin (), doprocess.end (), 0 )) > 1 ) {
9595 LOGP (fatal, " Only one process function should be enabled! Please check your configuration!" );
96- if ( !((doprocessSameEventCharmHadWCentMix && doprocessMixedEventCharmHadWCentMix) || (doprocessSameEventCharmHadWMultMix && doprocessMixedEventCharmHadWMultMix)) ) {
96+ if (!((doprocessSameEventCharmHadWCentMix && doprocessMixedEventCharmHadWCentMix) || (doprocessSameEventCharmHadWMultMix && doprocessMixedEventCharmHadWMultMix))) {
9797 LOG (fatal) << " Different binning policies between Same Event and Mixed Event" ;
9898 }
99- if ( !((doprocessSameEventHadHadWCentMix && doprocessMixedEventHadHadWCentMix) || (doprocessSameEventHadHadWMultMix && doprocessMixedEventHadHadWMultMix)) ) {
99+ if (!((doprocessSameEventHadHadWCentMix && doprocessMixedEventHadHadWCentMix) || (doprocessSameEventHadHadWMultMix && doprocessMixedEventHadHadWMultMix))) {
100100 LOG (fatal) << " Different binning policies between Same Event and Mixed Event" ;
101101 }
102102 }
@@ -143,16 +143,17 @@ struct HfCorrelatorFlowCharmHadrons {
143143 if (doprocessSameEventCharmHadWCentMix || doprocessSameEventCharmHadWMultMix) {
144144 registry.add (" hSparseCorrelationsSECharmHad" , " THn for SE Charm-Had correlations" , HistType::kTHnSparseF , axes);
145145 } else if (doprocessMixedEventCharmHadWCentMix || doprocessMixedEventCharmHadWMultMix) {
146- registry.add (" hSparseCorrelationsMECharmHad" , " THn for ME Charm-Had correlations" , HistType::kTHnSparseF , axes);
146+ registry.add (" hSparseCorrelationsMECharmHad" , " THn for ME Charm-Had correlations" , HistType::kTHnSparseF , axes);
147147 }
148148 }
149149 }
150150 }
151151
152152 // / Get charm candidate or hadron track pT
153153 // / \param track is the candidate
154- template <typename TTrack>
155- double getPt (const TTrack& track) {
154+ template <typename TTrack>
155+ double getPt (const TTrack& track)
156+ {
156157 if constexpr (requires { track.ptAssocTrack (); }) {
157158 return track.ptAssocTrack ();
158159 } else {
@@ -163,8 +164,9 @@ struct HfCorrelatorFlowCharmHadrons {
163164
164165 // / Get charm candidate or hadron track eta
165166 // / \param track is the candidate
166- template <typename TTrack>
167- double getEta (const TTrack& track) {
167+ template <typename TTrack>
168+ double getEta (const TTrack& track)
169+ {
168170 if constexpr (requires { track.etaAssocTrack (); }) {
169171 return track.etaAssocTrack ();
170172 } else {
@@ -175,8 +177,9 @@ struct HfCorrelatorFlowCharmHadrons {
175177
176178 // / Get charm candidate or hadron track phi
177179 // / \param track is the candidate
178- template <typename TTrack>
179- double getPhi (const TTrack& track) {
180+ template <typename TTrack>
181+ double getPhi (const TTrack& track)
182+ {
180183 if constexpr (requires { track.phiAssocTrack (); }) {
181184 return track.phiAssocTrack ();
182185 } else {
@@ -188,8 +191,9 @@ struct HfCorrelatorFlowCharmHadrons {
188191 // / Get the binning pool associated to the collision
189192 // / \param collision is the collision
190193 // / \param corrBinning is the binning policy for the correlation
191- template <bool fillHistos, typename TColl, typename TBinningType>
192- int getPoolBin (const TColl& collision, const TBinningType& corrBinning) {
194+ template <bool fillHistos, typename TColl, typename TBinningType>
195+ int getPoolBin (const TColl& collision, const TBinningType& corrBinning)
196+ {
193197 int poolBin{0 };
194198 if constexpr (std::is_same_v<TBinningType, BinningTypeDerivedCent>) {
195199 poolBin = corrBinning.getBin (std::make_tuple (collision.posZ (), collision.centrality ()));
@@ -208,8 +212,9 @@ struct HfCorrelatorFlowCharmHadrons {
208212 // / Reject daughter-track pairs and same-track pairs
209213 // / \param cand is the trigger candidate
210214 // / \param track is the associated track
211- template <typename TTrigPart, typename TTrack>
212- bool rejSameEvtPair (const TTrigPart& cand, const TTrack& track) {
215+ template <typename TTrigPart, typename TTrack>
216+ bool rejSameEvtPair (const TTrigPart& cand, const TTrack& track)
217+ {
213218 if constexpr (requires { cand.originTrackId (); }) {
214219 // Remove same track pairs for Had-Had correlations
215220 return (cand.originTrackId () == track.originTrackId ());
@@ -226,8 +231,9 @@ struct HfCorrelatorFlowCharmHadrons {
226231 // / Slice trigger candidates by collision
227232 // / \param cands are the trigger candidates
228233 // / \param collId is the collision index
229- template <typename TTrigCands>
230- auto sliceTrigCands (TTrigCands const & cands, const int collId) {
234+ template <typename TTrigCands>
235+ auto sliceTrigCands (TTrigCands const & cands, const int collId)
236+ {
231237 if constexpr (std::is_same_v<TTrigCands, soa::Join<aod::HfcRedTrkAssocs, aod::HfcRedTrkSels>>) {
232238 return cands.sliceBy (tracksPerCol, collId);
233239 } else {
@@ -239,25 +245,26 @@ struct HfCorrelatorFlowCharmHadrons {
239245 // / \param trigCand is the trigger charm hadron candidate
240246 // / \param assocTrack is the associated hadron track
241247 // / \param poolBin is the pool bin of the collision
242- template <bool isMixedEvent, typename TTrigCand, typename TTrack>
248+ template <bool isMixedEvent, typename TTrigCand, typename TTrack>
243249 void fillCharmHadInfo (TTrigCand const & trigCand,
244250 TTrack const & assocTrack,
245- const int poolBin) {
251+ const int poolBin)
252+ {
246253 double deltaPhi = RecoDecay::constrainAngle (getPhi (assocTrack), getPhi (trigCand), -o2::constants::math::PIHalf);
247254 if (fillTables) {
248255 entryCharmHadPair (trigCand.globalIndex (), assocTrack.globalIndex (), deltaPhi, getEta (assocTrack) - getEta (trigCand), poolBin);
249256 }
250257 if (fillSparses) {
251258 if constexpr (isMixedEvent) {
252259 registry.fill (HIST (" hSparseCorrelationsMECharmHad" ), getPt (trigCand), getPt (assocTrack),
253- getEta (trigCand) - getEta (assocTrack),
254- deltaPhi, poolBin, trigCand.bdtScore0 (),
255- trigCand.bdtScore1 (), trigCand.invMassCand ());
260+ getEta (trigCand) - getEta (assocTrack),
261+ deltaPhi, poolBin, trigCand.bdtScore0 (),
262+ trigCand.bdtScore1 (), trigCand.invMassCand ());
256263 } else {
257264 registry.fill (HIST (" hSparseCorrelationsSECharmHad" ), getPt (trigCand), getPt (assocTrack),
258- getEta (trigCand) - getEta (assocTrack),
259- deltaPhi, poolBin, trigCand.bdtScore0 (),
260- trigCand.bdtScore1 (), trigCand.invMassCand ());
265+ getEta (trigCand) - getEta (assocTrack),
266+ deltaPhi, poolBin, trigCand.bdtScore0 (),
267+ trigCand.bdtScore1 (), trigCand.invMassCand ());
261268 }
262269 }
263270 }
@@ -266,10 +273,11 @@ struct HfCorrelatorFlowCharmHadrons {
266273 // / \param trigCand is the trigger hadron candidate
267274 // / \param assocTrack is the associated hadron track
268275 // / \param poolBin is the pool bin of the collision
269- template <bool isMixedEvent, typename TCand>
276+ template <bool isMixedEvent, typename TCand>
270277 void fillHadHadInfo (TCand const & trigCand,
271278 TCand const & assocTrack,
272- const int poolBin) {
279+ const int poolBin)
280+ {
273281 double deltaPhi = RecoDecay::constrainAngle (getPhi (assocTrack), getPhi (trigCand), -o2::constants::math::PIHalf);
274282 if (fillTables) {
275283 entryHadHadPair (trigCand.globalIndex (), assocTrack.globalIndex (), deltaPhi, getEta (assocTrack) - getEta (trigCand), poolBin);
@@ -288,7 +296,7 @@ struct HfCorrelatorFlowCharmHadrons {
288296 // / \param trigCands are the selected trigger candidates
289297 // / \param assocTracks are the selected associated tracks
290298 // / \param corrBinning is the binning policy for the correlation
291- template <typename TTrigCands, typename TAssocTracks, typename TBinningType>
299+ template <typename TTrigCands, typename TAssocTracks, typename TBinningType>
292300 void fillSameEvent (aod::HfcRedFlowColls const & collisions,
293301 TTrigCands const & trigCands,
294302 TAssocTracks const & assocTracks,
@@ -298,7 +306,7 @@ struct HfCorrelatorFlowCharmHadrons {
298306 int poolBin = getPoolBin<true >(collision, corrBinning);
299307 registry.fill (HIST (" hCollisionPoolBin" ), poolBin);
300308 registry.fill (HIST (" hZVtx" ), collision.posZ (), poolBin);
301-
309+
302310 auto thisCollId = collision.globalIndex ();
303311 auto trigCandsThisColl = sliceTrigCands (trigCands, thisCollId);
304312 auto assocCandsThisColl = assocTracks.sliceBy (tracksPerCol, thisCollId);
@@ -330,7 +338,7 @@ struct HfCorrelatorFlowCharmHadrons {
330338 // / \param trigCands are the selected trigger candidates
331339 // / \param assocTracks are the selected associated tracks
332340 // / \param corrBinning is the binning policy for the correlation
333- template <typename TTrigCands, typename TAssocTracks, typename TBinningType>
341+ template <typename TTrigCands, typename TAssocTracks, typename TBinningType>
334342 void fillMixedEvent (aod::HfcRedFlowColls const & collisions,
335343 TTrigCands const & trigCands,
336344 TAssocTracks const & assocTracks,
@@ -388,7 +396,7 @@ struct HfCorrelatorFlowCharmHadrons {
388396 fillSameEvent (collisions, candidates, tracks, corrBinningCent);
389397 }
390398 PROCESS_SWITCH (HfCorrelatorFlowCharmHadrons, processSameEventCharmHadWCentMix, " Process Same Event for Charm-Had with centrality pools" , true );
391-
399+
392400 void processSameEventCharmHadWMultMix (aod::HfcRedFlowColls const & collisions,
393401 soa::Join<aod::HfcRedCharmTrigs, aod::HfcRedCharmMls> const & candidates,
394402 soa::Join<aod::HfcRedTrkAssocs, aod::HfcRedTrkSels> const & tracks)
@@ -447,7 +455,6 @@ struct HfCorrelatorFlowCharmHadrons {
447455 fillMixedEvent (collisions, tracks, tracks, corrBinningMult);
448456 }
449457 PROCESS_SWITCH (HfCorrelatorFlowCharmHadrons, processMixedEventHadHadWMultMix, " Process Mixed Event for Had-Had with multiplicity pools" , false );
450-
451458};
452459
453460WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
0 commit comments