Skip to content

Commit 098baf1

Browse files
authored
Merge pull request #6 from alibuild/alibot-cleanup-4783
Please consider the following formatting changes to #4783
2 parents 9341408 + c5f0031 commit 098baf1

File tree

2 files changed

+31
-32
lines changed

2 files changed

+31
-32
lines changed

PWGHF/D2H/DataModel/ReducedDataModel.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,9 @@ DECLARE_SOA_COLUMN(InvMassAntiLambda, invMassAntiLambda, float); //! Invariant m
381381
DECLARE_SOA_COLUMN(Px, px, float); //! Momentum of V0/3 prong candidate in GeV/c
382382
DECLARE_SOA_COLUMN(Py, py, float);
383383
DECLARE_SOA_COLUMN(Pz, pz, float);
384-
DECLARE_SOA_COLUMN(CosP, cosp, float); //! Cos PA of V0 candidate
385-
DECLARE_SOA_COLUMN(DCA, dca, float); //! DCA of V0 candidate
386-
DECLARE_SOA_COLUMN(Radius, radius, float); //! Radius of V0 candidate
384+
DECLARE_SOA_COLUMN(CosP, cosp, float); //! Cos PA of V0 candidate
385+
DECLARE_SOA_COLUMN(DCA, dca, float); //! DCA of V0 candidate
386+
DECLARE_SOA_COLUMN(Radius, radius, float); //! Radius of V0 candidate
387387
DECLARE_SOA_COLUMN(V0Type, v0Type, uint8_t); //! Bitmap with mass hypothesis of the V0
388388
DECLARE_SOA_COLUMN(DType, dType, int8_t); //! Integer with selected D candidate type: 1 = Dplus, -1 = Dminus, 2 = DstarPlus, -2 = DstarMinus
389389
} // namespace hf_reso_cand_reduced

PWGHF/D2H/TableProducer/dataCreatorDV0Reduced.cxx

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ enum Event : uint8_t {
5454
enum DecayChannel : uint8_t {
5555
DstarV0 = 0,
5656
DplusV0
57-
};
57+
};
5858

5959
enum V0_type : uint8_t {
6060
K0s = 0,
@@ -156,7 +156,7 @@ struct HfDataCreatorDV0Reduced {
156156
/// \param collision is the current collision
157157
/// \return a bitmap with mass hypotesis if passes all cuts
158158
template <typename V0, typename Coll>
159-
inline uint8_t isSelectedV0(const V0& v0, const Coll& collision, const std::array<int, 3>& dDaughtersIDs)
159+
inline uint8_t isSelectedV0(const V0& v0, const Coll& collision, const std::array<int, 3>& dDaughtersIDs)
160160
{
161161
uint8_t isSelected{BIT(K0s) | BIT(Lambda) | BIT(AntiLambda)};
162162
// reject VOs that share daughters with D
@@ -167,7 +167,7 @@ struct HfDataCreatorDV0Reduced {
167167
if (std::fabs(v0.negativeeta()) > minV0dauEta || std::fabs(v0.positiveeta()) > minV0dauEta) { // cut all V0 daughters with |eta| > 1.
168168
return 0;
169169
}
170-
//minimum v0radius
170+
// minimum v0radius
171171
if (v0.v0radius() < minK0sLambdaRadius) {
172172
return 0;
173173
}
@@ -177,10 +177,10 @@ struct HfDataCreatorDV0Reduced {
177177
return 0;
178178
}
179179
// DCA V0 and V0 daughters to select for primary V0s
180-
if (v0.dcav0topv() > maxV0DCA || v0.dcaV0daughters() > maxV0dauDCA || std::fabs(v0.dcapostopv()) <minV0dauDCA || std::fabs(v0.dcanegtopv()) <minV0dauDCA ) {
180+
if (v0.dcav0topv() > maxV0DCA || v0.dcaV0daughters() > maxV0dauDCA || std::fabs(v0.dcapostopv()) < minV0dauDCA || std::fabs(v0.dcanegtopv()) < minV0dauDCA) {
181181
return 0;
182-
}
183-
//mass hypotesis
182+
}
183+
// mass hypotesis
184184
if (TESTBIT(isSelected, K0s) && std::fabs(v0.mK0Short() - MassK0) > deltaMassK0s) {
185185
CLRBIT(isSelected, K0s);
186186
}
@@ -255,13 +255,13 @@ struct HfDataCreatorDV0Reduced {
255255
prongIdsD[1] = candD.prong1Id();
256256
prongIdsD[2] = candD.prong2Id();
257257
d_type = candD.sign() * TypeD::Dplus;
258-
} // else if
258+
} // else if
259259

260260
// Loop on V0 candidates
261261
for (const auto& v0 : V0s) {
262-
v0_type = isSelectedV0(v0, collision,prongIdsD);
263-
//Apply selsection
264-
if (v0_type == 0){
262+
v0_type = isSelectedV0(v0, collision, prongIdsD);
263+
// Apply selsection
264+
if (v0_type == 0) {
265265
continue;
266266
}
267267
// propagate V0 to primary vertex (if enabled)
@@ -276,38 +276,37 @@ struct HfDataCreatorDV0Reduced {
276276
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParK0, 2.f, matCorr, &dcaInfo);
277277
getPxPyPz(trackParK0, pVecV0);
278278
}
279-
float ptV0 = sqrt(pVecV0[0] * pVecV0[0] + pVecV0[1] * pVecV0[1]);\
280-
// fill histos
279+
float ptV0 = sqrt(pVecV0[0] * pVecV0[0] + pVecV0[1] * pVecV0[1]); // fill histos
281280
registry.fill(HIST("hPtV0"), ptV0);
282281
registry.fill(HIST("hV0_type"), v0_type);
283-
if (TESTBIT(v0_type, K0s)){
282+
if (TESTBIT(v0_type, K0s)) {
284283
massV0 = MassK0;
285284
auto invMass2DV0 = RecoDecay::m2(std::array{pVecD, pVecV0}, std::array{massD, massV0});
286285
registry.fill(HIST("hMassK0s"), v0.mK0Short());
287286
switch (DecayChannel) {
288-
case DecayChannel::DstarV0:
289-
registry.fill(HIST("hMassDs1"), sqrt(invMass2DV0) - invMassD);
290-
break;
291-
case DecayChannel::DplusV0:
292-
registry.fill(HIST("hMassDsStar2"), sqrt(invMass2DV0) - invMassD);
293-
break;
294-
default:
295-
break;
287+
case DecayChannel::DstarV0:
288+
registry.fill(HIST("hMassDs1"), sqrt(invMass2DV0) - invMassD);
289+
break;
290+
case DecayChannel::DplusV0:
291+
registry.fill(HIST("hMassDsStar2"), sqrt(invMass2DV0) - invMassD);
292+
break;
293+
default:
294+
break;
296295
}
297296
}
298-
if (TESTBIT(v0_type, Lambda)){
297+
if (TESTBIT(v0_type, Lambda)) {
299298
massV0 = MassLambda0;
300299
auto invMass2DV0 = RecoDecay::m2(std::array{pVecD, pVecV0}, std::array{massD, massV0});
301300
registry.fill(HIST("hMassLambda"), v0.mLambda());
302-
if(DecayChannel == DecayChannel::DplusV0){
301+
if (DecayChannel == DecayChannel::DplusV0) {
303302
registry.fill(HIST("hMassXcRes"), sqrt(invMass2DV0) - invMassD);
304303
}
305304
}
306-
if(TESTBIT(v0_type, AntiLambda)){
305+
if (TESTBIT(v0_type, AntiLambda)) {
307306
massV0 = MassLambda0;
308307
auto invMass2DV0 = RecoDecay::m2(std::array{pVecD, pVecV0}, std::array{massD, massV0});
309308
registry.fill(HIST("hMassLambda"), v0.mAntiLambda());
310-
if(DecayChannel == DecayChannel::DplusV0){
309+
if (DecayChannel == DecayChannel::DplusV0) {
311310
registry.fill(HIST("hMassXcRes"), sqrt(invMass2DV0) - invMassD);
312311
}
313312
}
@@ -384,10 +383,10 @@ struct HfDataCreatorDV0Reduced {
384383
PROCESS_SWITCH(HfDataCreatorDV0Reduced, processDplusV0, "Process Dplus candidates without MC info and without ML info", true);
385384

386385
void processDstarV0(aod::Collisions const& collisions,
387-
CandDstarFiltered const& candsDstar,
388-
aod::TrackAssoc const& trackIndices,
389-
aod::V0Datas const& V0s,
390-
aod::BCsWithTimestamps const& bcs)
386+
CandDstarFiltered const& candsDstar,
387+
aod::TrackAssoc const& trackIndices,
388+
aod::V0Datas const& V0s,
389+
aod::BCsWithTimestamps const& bcs)
391390
{
392391
// handle normalization by the right number of collisions
393392
hfCollisionCounter(collisions.tableSize());

0 commit comments

Comments
 (0)