Skip to content

Commit 8d4a967

Browse files
author
Mattia Faggin
committed
Final comments by Vit.
1 parent 9576674 commit 8d4a967

5 files changed

Lines changed: 54 additions & 49 deletions

File tree

PWGHF/TableProducer/candidateCreator2Prong.cxx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ struct HfCandidateCreator2Prong {
102102
OutputObj<TH2F> hDcaXYProngs{TH2F("hDcaXYProngs", "DCAxy of 2-prong candidates;#it{p}_{T} (GeV/#it{c};#it{d}_{xy}) (#mum);entries", 100, 0., 20., 200, -500., 500.)};
103103
OutputObj<TH2F> hDcaZProngs{TH2F("hDcaZProngs", "DCAz of 2-prong candidates;#it{p}_{T} (GeV/#it{c};#it{d}_{z}) (#mum);entries", 100, 0., 20., 200, -500., 500.)};
104104
OutputObj<TH1F> hVertexerType{TH1F("hVertexerType", "Use KF or DCAFitterN;Vertexer type;entries", 2, -0.5, 1.5)}; // See o2::aod::hf_cand::VertexerType
105-
OutputObj<TH1D> hCollisions{TH1D("hCollisions", "HF event counter", 5, -0.5, 4.5)};
105+
OutputObj<TH1D> hCollisions{TH1D("hCollisions", "HF event counter", ValuesEvSel::NEvSel, -0.5f, static_cast<float>(ValuesEvSel::NEvSel) - 0.5f)};
106106
OutputObj<TH1D> hPosZBeforeEvSel{TH1D("hPosZBeforeEvSel", "PV position Z before ev. selection;posZ (cm);entries", 400, -20, 20)};
107107
OutputObj<TH1D> hPosZAfterEvSel{TH1D("hPosZAfterEvSel", "PV position Z after ev. selection;posZ (cm);entries", 400, -20, 20)};
108108

@@ -161,11 +161,7 @@ struct HfCandidateCreator2Prong {
161161
runNumber = 0;
162162

163163
/// collision monitoring
164-
hCollisions->GetXaxis()->SetBinLabel(1, "All collisions");
165-
hCollisions->GetXaxis()->SetBinLabel(2, "Centrality ok");
166-
hCollisions->GetXaxis()->SetBinLabel(3, "Centrality + sel8 ok");
167-
hCollisions->GetXaxis()->SetBinLabel(4, "Centrality + sel8 + posZ ok");
168-
hCollisions->GetXaxis()->SetBinLabel(5, "Centrality + sel8 + posZ + TF border ok");
164+
setLabelHistoEvSel(hCollisions.object);
169165
}
170166

171167
template <bool doPvRefit, o2::aod::hf_collision_centrality::CentralityEstimator centEstimator, typename Coll, typename CandType, typename TTracks>
@@ -179,7 +175,7 @@ struct HfCandidateCreator2Prong {
179175

180176
/// reject candidates not satisfying the event selections
181177
auto collision = rowTrackIndexProng2.template collision_as<Coll>();
182-
const uint16_t rejectionMask = getHfCollisionRejectionMask<centEstimator>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
178+
const uint16_t rejectionMask = getHfCollisionRejectionMask<centEstimator>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
183179
if (rejectionMask != 0) {
184180
/// at least one event selection not satisfied --> reject the candidate
185181
continue;
@@ -308,7 +304,7 @@ struct HfCandidateCreator2Prong {
308304

309305
/// reject candidates in collisions not satisfying the event selections
310306
auto collision = rowTrackIndexProng2.template collision_as<Coll>();
311-
const uint16_t rejectionMask = getHfCollisionRejectionMask<centEstimator>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
307+
const uint16_t rejectionMask = getHfCollisionRejectionMask<centEstimator>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
312308
if (rejectionMask != 0) {
313309
/// at least one event selection not satisfied --> reject the candidate
314310
continue;
@@ -587,7 +583,7 @@ struct HfCandidateCreator2Prong {
587583
for (const auto& collision : collisions) {
588584

589585
/// bitmask with event. selection info
590-
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::None>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
586+
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::None>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
591587

592588
/// monitor the satisfied event selections
593589
monitorCollision(collision, rejectionMask, hCollisions.object, hPosZBeforeEvSel.object, hPosZAfterEvSel.object);
@@ -603,7 +599,7 @@ struct HfCandidateCreator2Prong {
603599
for (const auto& collision : collisions) {
604600

605601
/// bitmask with event. selection info
606-
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0C>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
602+
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0C>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
607603

608604
/// monitor the satisfied event selections
609605
monitorCollision(collision, rejectionMask, hCollisions.object, hPosZBeforeEvSel.object, hPosZAfterEvSel.object);
@@ -619,7 +615,7 @@ struct HfCandidateCreator2Prong {
619615
for (const auto& collision : collisions) {
620616

621617
/// bitmask with event. selection info
622-
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0M>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
618+
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0M>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
623619

624620
/// monitor the satisfied event selections
625621
monitorCollision(collision, rejectionMask, hCollisions.object, hPosZBeforeEvSel.object, hPosZAfterEvSel.object);

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ struct HfCandidateCreator3Prong {
9999
OutputObj<TH1F> hCovSVZZ{TH1F("hCovSVZZ", "3-prong candidates;ZZ element of cov. matrix of sec. vtx. position (cm^{2});entries", 100, 0., 0.2)};
100100
OutputObj<TH2F> hDcaXYProngs{TH2F("hDcaXYProngs", "DCAxy of 3-prong candidates;#it{p}_{T} (GeV/#it{c};#it{d}_{xy}) (#mum);entries", 100, 0., 20., 200, -500., 500.)};
101101
OutputObj<TH2F> hDcaZProngs{TH2F("hDcaZProngs", "DCAz of 3-prong candidates;#it{p}_{T} (GeV/#it{c};#it{d}_{z}) (#mum);entries", 100, 0., 20., 200, -500., 500.)};
102-
OutputObj<TH1D> hCollisions{TH1D("hCollisions", "HF event counter", 5, -0.5, 4.5)};
102+
OutputObj<TH1D> hCollisions{TH1D("hCollisions", "HF event counter", ValuesEvSel::NEvSel, -0.5f, static_cast<float>(ValuesEvSel::NEvSel) - 0.5f)};
103103
OutputObj<TH1D> hPosZBeforeEvSel{TH1D("hPosZBeforeEvSel", "PV position Z before ev. selection;posZ (cm);entries", 400, -20, 20)};
104104
OutputObj<TH1D> hPosZAfterEvSel{TH1D("hPosZAfterEvSel", "PV position Z after ev. selection;posZ (cm);entries", 400, -20, 20)};
105105

@@ -154,11 +154,7 @@ struct HfCandidateCreator3Prong {
154154
runNumber = 0;
155155

156156
/// collision monitoring
157-
hCollisions->GetXaxis()->SetBinLabel(1, "All collisions");
158-
hCollisions->GetXaxis()->SetBinLabel(2, "Centrality ok");
159-
hCollisions->GetXaxis()->SetBinLabel(3, "Centrality + sel8 ok");
160-
hCollisions->GetXaxis()->SetBinLabel(4, "Centrality + sel8 + posZ ok");
161-
hCollisions->GetXaxis()->SetBinLabel(5, "Centrality + sel8 + posZ + TF border ok");
157+
setLabelHistoEvSel(hCollisions.object);
162158
}
163159

164160
template <bool doPvRefit = false, o2::aod::hf_collision_centrality::CentralityEstimator centEstimator, typename Coll, typename Cand>
@@ -172,7 +168,7 @@ struct HfCandidateCreator3Prong {
172168

173169
/// reject candidates in collisions not satisfying the event selections
174170
auto collision = rowTrackIndexProng3.template collision_as<Coll>();
175-
uint16_t rejectionMask = getHfCollisionRejectionMask<centEstimator>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
171+
uint16_t rejectionMask = getHfCollisionRejectionMask<centEstimator>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
176172
if (rejectionMask != 0) {
177173
/// at least one event selection not satisfied --> reject the candidate
178174
continue;
@@ -392,7 +388,7 @@ struct HfCandidateCreator3Prong {
392388
for (const auto& collision : collisions) {
393389

394390
/// bitmask with event. selection info
395-
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::None>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
391+
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::None>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
396392

397393
/// monitor the satisfied event selections
398394
monitorCollision(collision, rejectionMask, hCollisions.object, hPosZBeforeEvSel.object, hPosZAfterEvSel.object);
@@ -408,7 +404,7 @@ struct HfCandidateCreator3Prong {
408404
for (const auto& collision : collisions) {
409405

410406
/// bitmask with event. selection info
411-
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0C>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
407+
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0C>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
412408

413409
/// monitor the satisfied event selections
414410
monitorCollision(collision, rejectionMask, hCollisions.object, hPosZBeforeEvSel.object, hPosZAfterEvSel.object);
@@ -424,7 +420,7 @@ struct HfCandidateCreator3Prong {
424420
for (const auto& collision : collisions) {
425421

426422
/// bitmask with event. selection info
427-
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0M>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
423+
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0M>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
428424

429425
/// monitor the satisfied event selections
430426
monitorCollision(collision, rejectionMask, hCollisions.object, hPosZBeforeEvSel.object, hPosZAfterEvSel.object);

PWGHF/TableProducer/candidateCreatorCascade.cxx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ struct HfCandidateCreatorCascade {
8181
OutputObj<TH1F> hMass2{TH1F("hMass2", "2-prong candidates;inv. mass (p K_{S}^{0}) (GeV/#it{c}^{2});entries", 500, 0., 5.)};
8282
OutputObj<TH1F> hCovPVXX{TH1F("hCovPVXX", "2-prong candidates;XX element of cov. matrix of prim. vtx. position (cm^{2});entries", 100, 0., 1.e-4)};
8383
OutputObj<TH1F> hCovSVXX{TH1F("hCovSVXX", "2-prong candidates;XX element of cov. matrix of sec. vtx. position (cm^{2});entries", 100, 0., 0.2)};
84-
OutputObj<TH1D> hCollisions{TH1D("hCollisions", "HF event counter", 5, -0.5, 4.5)};
84+
OutputObj<TH1D> hCollisions{TH1D("hCollisions", "HF event counter", ValuesEvSel::NEvSel, -0.5f, static_cast<float>(ValuesEvSel::NEvSel) - 0.5f)};
8585
OutputObj<TH1D> hPosZBeforeEvSel{TH1D("hPosZBeforeEvSel", "PV position Z before ev. selection;posZ (cm);entries", 400, -20, 20)};
8686
OutputObj<TH1D> hPosZAfterEvSel{TH1D("hPosZAfterEvSel", "PV position Z after ev. selection;posZ (cm);entries", 400, -20, 20)};
8787

@@ -130,11 +130,7 @@ struct HfCandidateCreatorCascade {
130130
runNumber = 0;
131131

132132
/// collision monitoring
133-
hCollisions->GetXaxis()->SetBinLabel(1, "All collisions");
134-
hCollisions->GetXaxis()->SetBinLabel(2, "Centrality ok");
135-
hCollisions->GetXaxis()->SetBinLabel(3, "Centrality + sel8 ok");
136-
hCollisions->GetXaxis()->SetBinLabel(4, "Centrality + sel8 + posZ ok");
137-
hCollisions->GetXaxis()->SetBinLabel(5, "Centrality + sel8 + posZ + TF border ok");
133+
setLabelHistoEvSel(hCollisions.object);
138134
}
139135

140136
template <o2::aod::hf_collision_centrality::CentralityEstimator centEstimator, typename Coll>
@@ -151,7 +147,7 @@ struct HfCandidateCreatorCascade {
151147

152148
/// reject candidates in collisions not satisfying the event selections
153149
auto collision = casc.template collision_as<Coll>();
154-
const uint16_t rejectionMask = getHfCollisionRejectionMask<centEstimator>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
150+
const uint16_t rejectionMask = getHfCollisionRejectionMask<centEstimator>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
155151
if (rejectionMask != 0) {
156152
/// at least one event selection not satisfied --> reject the candidate
157153
continue;
@@ -372,7 +368,7 @@ struct HfCandidateCreatorCascade {
372368
for (const auto& collision : collisions) {
373369

374370
/// bitmask with event. selection info
375-
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::None>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
371+
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::None>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
376372

377373
/// monitor the satisfied event selections
378374
monitorCollision(collision, rejectionMask, hCollisions.object, hPosZBeforeEvSel.object, hPosZAfterEvSel.object);
@@ -388,7 +384,7 @@ struct HfCandidateCreatorCascade {
388384
for (const auto& collision : collisions) {
389385

390386
/// bitmask with event. selection info
391-
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0C>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
387+
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0C>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
392388

393389
/// monitor the satisfied event selections
394390
monitorCollision(collision, rejectionMask, hCollisions.object, hPosZBeforeEvSel.object, hPosZAfterEvSel.object);
@@ -404,7 +400,7 @@ struct HfCandidateCreatorCascade {
404400
for (const auto& collision : collisions) {
405401

406402
/// bitmask with event. selection info
407-
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0M>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
403+
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0M>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
408404

409405
/// monitor the satisfied event selections
410406
monitorCollision(collision, rejectionMask, hCollisions.object, hPosZBeforeEvSel.object, hPosZAfterEvSel.object);

PWGHF/TableProducer/candidateCreatorDstar.cxx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ struct HfCandidateCreatorDstar {
107107
{"QA/hPtD0", "D^{0} candidates", {HistType::kTH1F, {ptAxis}}},
108108
{"QA/hPtDstar", "D* candidates", {HistType::kTH1F, {ptAxis}}}}};
109109

110-
OutputObj<TH1D> hCollisions{TH1D("hCollisions", "HF event counter", 5, -0.5, 4.5)};
110+
OutputObj<TH1D> hCollisions{TH1D("hCollisions", "HF event counter", ValuesEvSel::NEvSel, -0.5f, static_cast<float>(ValuesEvSel::NEvSel) - 0.5f)};
111111
OutputObj<TH1D> hPosZBeforeEvSel{TH1D("hPosZBeforeEvSel", "PV position Z before ev. selection;posZ (cm);entries", 400, -20, 20)};
112112
OutputObj<TH1D> hPosZAfterEvSel{TH1D("hPosZAfterEvSel", "PV position Z after ev. selection;posZ (cm);entries", 400, -20, 20)};
113113

@@ -159,11 +159,7 @@ struct HfCandidateCreatorDstar {
159159
bz = 0;
160160

161161
/// collision monitoring
162-
hCollisions->GetXaxis()->SetBinLabel(1, "All collisions");
163-
hCollisions->GetXaxis()->SetBinLabel(2, "Centrality ok");
164-
hCollisions->GetXaxis()->SetBinLabel(3, "Centrality + sel8 ok");
165-
hCollisions->GetXaxis()->SetBinLabel(4, "Centrality + sel8 + posZ ok");
166-
hCollisions->GetXaxis()->SetBinLabel(5, "Centrality + sel8 + posZ + TF border ok");
162+
setLabelHistoEvSel(hCollisions.object);
167163
}
168164

169165
/// @brief function for secondary vertex reconstruction and candidate creator
@@ -188,7 +184,7 @@ struct HfCandidateCreatorDstar {
188184

189185
/// reject candidates in collisions not satisfying the event selections
190186
auto collision = rowTrackIndexDstar.template collision_as<Coll>();
191-
const uint16_t rejectionMask = getHfCollisionRejectionMask<centEstimator>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
187+
const uint16_t rejectionMask = getHfCollisionRejectionMask<centEstimator>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
192188
if (rejectionMask != 0) {
193189
/// at least one event selection not satisfied --> reject the candidate
194190
continue;
@@ -443,7 +439,7 @@ struct HfCandidateCreatorDstar {
443439
for (const auto& collision : collisions) {
444440

445441
/// bitmask with event. selection info
446-
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::None>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
442+
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::None>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
447443

448444
/// monitor the satisfied event selections
449445
monitorCollision(collision, rejectionMask, hCollisions.object, hPosZBeforeEvSel.object, hPosZAfterEvSel.object);
@@ -459,7 +455,7 @@ struct HfCandidateCreatorDstar {
459455
for (const auto& collision : collisions) {
460456

461457
/// bitmask with event. selection info
462-
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0C>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
458+
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0C>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
463459

464460
/// monitor the satisfied event selections
465461
monitorCollision(collision, rejectionMask, hCollisions.object, hPosZBeforeEvSel.object, hPosZAfterEvSel.object);
@@ -475,7 +471,7 @@ struct HfCandidateCreatorDstar {
475471
for (const auto& collision : collisions) {
476472

477473
/// bitmask with event. selection info
478-
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0M>(collision, std::array<float, 2>{centralityMin.value, centralityMax.value}, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
474+
const uint16_t rejectionMask = getHfCollisionRejectionMask<CentralityEstimator::FT0M>(collision, centralityMin, centralityMax, useSel8Trigger, maxPvPosZ, useTimeFrameBorderCut);
479475

480476
/// monitor the satisfied event selections
481477
monitorCollision(collision, rejectionMask, hCollisions.object, hPosZBeforeEvSel.object, hPosZAfterEvSel.object);

0 commit comments

Comments
 (0)