Skip to content

Commit c3ba6d6

Browse files
committed
Please consider the following formatting changes
1 parent 2d3ba14 commit c3ba6d6

File tree

2 files changed

+57
-50
lines changed

2 files changed

+57
-50
lines changed

PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ using HfcRedCollision = HfcRedCollisions::iterator;
4949

5050
namespace hf_candidate_reduced
5151
{
52-
DECLARE_SOA_INDEX_COLUMN(HfcRedCollision, hfcRedCollision); //! ReducedCollision index
53-
DECLARE_SOA_INDEX_COLUMN(HfcRedFlowColl, hfcRedFlowColl); //! ReducedCollision index
54-
DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Prong 0 index
55-
DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Prong 1 index
56-
DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Prong2 index
57-
DECLARE_SOA_COLUMN(PhiCand, phiCand, float); //! Phi of the candidate
58-
DECLARE_SOA_COLUMN(EtaCand, etaCand, float); //! Eta of the candidate
59-
DECLARE_SOA_COLUMN(PtCand, ptCand, float); //! Pt of the candidate
60-
DECLARE_SOA_COLUMN(InvMassDs, invMassDs, float); //! Invariant mass of Ds candidate
61-
DECLARE_SOA_COLUMN(InvMassCand, invMassCand, float); //! Invariant mass of Charm candidate
62-
DECLARE_SOA_COLUMN(BdtScorePrompt, bdtScorePrompt, float); //! BDT output score for prompt hypothesis
63-
DECLARE_SOA_COLUMN(BdtScoreBkg, bdtScoreBkg, float); //! BDT output score for background hypothesis
64-
DECLARE_SOA_COLUMN(BdtScore0, bdtScore0, float); //! First BDT output score
65-
DECLARE_SOA_COLUMN(BdtScore1, bdtScore1, float); //! Second BDT output score
52+
DECLARE_SOA_INDEX_COLUMN(HfcRedCollision, hfcRedCollision); //! ReducedCollision index
53+
DECLARE_SOA_INDEX_COLUMN(HfcRedFlowColl, hfcRedFlowColl); //! ReducedCollision index
54+
DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Prong 0 index
55+
DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Prong 1 index
56+
DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Prong2 index
57+
DECLARE_SOA_COLUMN(PhiCand, phiCand, float); //! Phi of the candidate
58+
DECLARE_SOA_COLUMN(EtaCand, etaCand, float); //! Eta of the candidate
59+
DECLARE_SOA_COLUMN(PtCand, ptCand, float); //! Pt of the candidate
60+
DECLARE_SOA_COLUMN(InvMassDs, invMassDs, float); //! Invariant mass of Ds candidate
61+
DECLARE_SOA_COLUMN(InvMassCand, invMassCand, float); //! Invariant mass of Charm candidate
62+
DECLARE_SOA_COLUMN(BdtScorePrompt, bdtScorePrompt, float); //! BDT output score for prompt hypothesis
63+
DECLARE_SOA_COLUMN(BdtScoreBkg, bdtScoreBkg, float); //! BDT output score for background hypothesis
64+
DECLARE_SOA_COLUMN(BdtScore0, bdtScore0, float); //! First BDT output score
65+
DECLARE_SOA_COLUMN(BdtScore1, bdtScore1, float); //! Second BDT output score
6666
} // namespace hf_candidate_reduced
6767
DECLARE_SOA_TABLE(DsCandReduceds, "AOD", "DSCANDREDUCED", //! Table with Ds candidate info
6868
soa::Index<>,
@@ -147,12 +147,12 @@ DECLARE_SOA_TABLE(HfcRedTrkSels, "AOD", "HFCREDTRKSEL", //! Table with associate
147147
// definition of columns and tables for Charm-Hadron and Hadron-Hadron correlation pairs
148148
namespace hf_correlation_charm_hadron_reduced
149149
{
150-
DECLARE_SOA_INDEX_COLUMN_FULL(CharmTrig, charmTrig, int, HfcRedCharmTrigs, "_0"); //! Reduced charm trigger candidate index
151-
DECLARE_SOA_INDEX_COLUMN_FULL(HadTrig, hadTrig, int, HfcRedTrkAssocs, "_1"); //! Reduced hadron trigger candidate index
152-
DECLARE_SOA_INDEX_COLUMN_FULL(TrkAssoc, trkAssoc, int, HfcRedTrkAssocs, "_2"); //! Reduced associated track index
153-
DECLARE_SOA_COLUMN(DeltaPhi, deltaPhi, float); //! DeltaPhi between charm hadron and Hadrons
154-
DECLARE_SOA_COLUMN(DeltaEta, deltaEta, float); //! DeltaEta between charm hadron and Hadrons
155-
DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin for the MixedEvent
150+
DECLARE_SOA_INDEX_COLUMN_FULL(CharmTrig, charmTrig, int, HfcRedCharmTrigs, "_0"); //! Reduced charm trigger candidate index
151+
DECLARE_SOA_INDEX_COLUMN_FULL(HadTrig, hadTrig, int, HfcRedTrkAssocs, "_1"); //! Reduced hadron trigger candidate index
152+
DECLARE_SOA_INDEX_COLUMN_FULL(TrkAssoc, trkAssoc, int, HfcRedTrkAssocs, "_2"); //! Reduced associated track index
153+
DECLARE_SOA_COLUMN(DeltaPhi, deltaPhi, float); //! DeltaPhi between charm hadron and Hadrons
154+
DECLARE_SOA_COLUMN(DeltaEta, deltaEta, float); //! DeltaEta between charm hadron and Hadrons
155+
DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin for the MixedEvent
156156
} // namespace hf_correlation_charm_hadron_reduced
157157

158158
DECLARE_SOA_TABLE(HfcRedChHads, "AOD", "HFCREDCHHAD", //! Charm-Hadron pairs information

PWGHF/HFC/TableProducer/correlatorFlowCharmHadronsReduced.cxx

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -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

453460
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

0 commit comments

Comments
 (0)