Skip to content

Commit 3743398

Browse files
author
Marcello Di Costanzo
committed
Study ass. tracks and triggers efficiencies
1 parent 5c4c4cc commit 3743398

5 files changed

Lines changed: 934 additions & 44 deletions

File tree

‎PWGHF/HFC/TableProducer/correlatorFlowCharmHadronsReduced.cxx‎

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@ struct HfCorrelatorFlowCharmHadronsReduced {
9292
Configurable<bool> fillSparses{"fillSparses", true, "Fill sparse histograms"};
9393
Configurable<bool> fillTables{"fillTables", false, "Fill tables"};
9494
Configurable<int> numberEventsMixed{"numberEventsMixed", 5, "Number of events mixed in ME process"};
95-
Configurable<std::vector<double>> binsPtTrig{"binsPtTrig", std::vector<double>{0., 3., 5., 8., 16., 36.}, "pT bin limits for trigger candidates"};
9695
Configurable<std::vector<double>> bdtScore0PtMaxs{"bdtScore0PtMaxs", std::vector<double>{0.1, 0.1, 0.1, 0.1, 0.1}, "pT-differential maximum score 0 for charm candidates"};
9796
Configurable<std::vector<double>> bdtScore1PtMins{"bdtScore1PtMins", std::vector<double>{0.1, 0.1, 0.1, 0.1, 0.1}, "pT-differential minimum score 1 for charm candidates"};
98-
Configurable<std::vector<double>> binsPtAssoc{"binsPtAssoc", std::vector<double>{0.3, 1., 2., 50.}, "pT bin limits for associated particles"};
9997
Configurable<bool> selCentrality{"selCentrality", false, "Use centrality to select events"};
10098
Configurable<bool> selMultiplicity{"selMultiplicity", false, "Use multiplicity to select events"};
10199
Configurable<float> centMin{"centMin", 0, "min. centrality"};
@@ -128,9 +126,11 @@ struct HfCorrelatorFlowCharmHadronsReduced {
128126
Preslice<AssocTracks> assocTracksPerCol = aod::hf_correl_charm_had_reduced::hfcRedCorrCollId;
129127
Preslice<TrigCharmCands> trigCharmCandsPerCol = aod::hf_correl_charm_had_reduced::hfcRedCorrCollId;
130128

131-
ConfigurableAxis zPoolBins{"zPoolBins", {VARIABLE_WIDTH, -10.0, -2.5, 2.5, 10.0}, "Z vertex position pools"};
132-
ConfigurableAxis multPoolBins{"multPoolBins", {VARIABLE_WIDTH, 0., 900., 1800., 6000.}, "Event multiplicity pools (FT0M)"};
133-
ConfigurableAxis centPoolBins{"centPoolBins", {VARIABLE_WIDTH, 0., 10., 20., 30., 40., 50., 60., 70., 80., 90., 100}, "Event centrality pools"};
129+
ConfigurableAxis binsPtTrig{"binsPtTrig", {VARIABLE_WIDTH, 0., 1., 2., 3., 4., 5., 6., 8., 10., 12., 16., 24.}, "Trigger candidate pT bins"};
130+
ConfigurableAxis binsPtAssoc{"binsPtAssoc", {VARIABLE_WIDTH, 0.3, 1., 2., 50.}, "Associated particle pT bins"};
131+
ConfigurableAxis binsZPool{"binsZPool", {VARIABLE_WIDTH, -10.0, -2.5, 2.5, 10.0}, "Z vertex position pools"};
132+
ConfigurableAxis binsMultPool{"binsMultPool", {VARIABLE_WIDTH, 0., 900., 1800., 6000.}, "Event multiplicity pools (FT0M)"};
133+
ConfigurableAxis binsCentPool{"binsCentPool", {VARIABLE_WIDTH, 0., 10., 20., 30., 40., 50., 60., 70., 80., 90., 100}, "Event centrality pools"};
134134
ConfigurableAxis binsInvMass{"binsInvMass", {300, 1.6, 2.2}, "Invariant mass bins"};
135135
ConfigurableAxis binsMultFT0M{"binsMultFT0M", {100, 0., 10000.}, "Multiplicity as FT0M signal amplitude"};
136136
ConfigurableAxis binsCent{"binsCent", {100, 0., 100.}, "Centrality bins"};
@@ -168,14 +168,18 @@ struct HfCorrelatorFlowCharmHadronsReduced {
168168
if (!fillSparses && !fillTables) {
169169
LOGP(fatal, "At least one of fillSparses or fillTables must be true!");
170170
}
171-
if ((binsPtTrig.value.size() != (bdtScore0PtMaxs.value.size() + 1) || binsPtTrig.value.size() != (bdtScore1PtMins.value.size() + 1))) {
171+
if (((binsPtTrig.value.size() - 1) != (bdtScore0PtMaxs.value.size() + 1) ||
172+
(binsPtTrig.value.size() - 1) != (bdtScore1PtMins.value.size() + 1))) {
173+
LOG(info) << "binsPtTrig.value.size(): " << binsPtTrig.value.size();
174+
LOG(info) << "bdtScore0PtMaxs.value.size(): " << bdtScore0PtMaxs.value.size();
175+
LOG(info) << "bdtScore1PtMins.value.size(): " << bdtScore1PtMins.value.size();
172176
LOGP(fatal, "The size of bdtScore0PtMaxs and bdtScore1PtMins must be the one of binsPtTrig minus one!");
173177
}
174178

175179
if (doprocessSameEventCharmHadWCentMix || doprocessSameEventHadHadWCentMix || doprocessMixedEventCharmHadWCentMix || doprocessMixedEventHadHadWCentMix || doprocessSameEventCharmHadWCentMixBase || doprocessMixedEventCharmHadWCentMixBase) {
176-
poolBins = (centPoolBins->size() - 2) * (zPoolBins->size() - 2);
180+
poolBins = (binsCentPool->size() - 2) * (binsZPool->size() - 2);
177181
} else {
178-
poolBins = (multPoolBins->size() - 2) * (zPoolBins->size() - 2);
182+
poolBins = (binsMultPool->size() - 2) * (binsZPool->size() - 2);
179183
}
180184

181185
const AxisSpec axisInvMass{binsInvMass, "Inv. mass (GeV/#it{c}^{2})"};
@@ -185,8 +189,8 @@ struct HfCorrelatorFlowCharmHadronsReduced {
185189
const AxisSpec axisPoolBin = {poolBins, 0., static_cast<float>(poolBins), "PoolBin"};
186190
const AxisSpec axisDeltaEta = {binsDeltaEta, "#Delta#it{#eta}"};
187191
const AxisSpec axisDeltaPhi = {binsDeltaPhi, "#Delta#it{#varphi}"};
188-
const AxisSpec axisPtTrig = {std::vector<double>(binsPtTrig), "#it{p}_{T} Trig (GeV/#it{c})"};
189-
const AxisSpec axisPtAssoc = {std::vector<double>(binsPtAssoc), "#it{p}_{T} Assoc (GeV/#it{c})"};
192+
const AxisSpec axisPtTrig = {binsPtTrig, "#it{p}_{T} Trig (GeV/#it{c})"};
193+
const AxisSpec axisPtAssoc = {binsPtAssoc, "#it{p}_{T} Assoc (GeV/#it{c})"};
190194
const AxisSpec axisMlOne{binsMlOne, "bdtScore0"};
191195
const AxisSpec axisMlTwo{binsMlTwo, "bdtScore1"};
192196

@@ -509,7 +513,7 @@ struct HfCorrelatorFlowCharmHadronsReduced {
509513
aod::HfcRedTrigCharms const&,
510514
aod::HfcRedCorrColls const&)
511515
{
512-
BinningMultPosZ binPolicyPosZMult{{zPoolBins, multPoolBins}};
516+
BinningMultPosZ binPolicyPosZMult{{binsZPool, binsMultPool}};
513517
auto trigCand = pair.template hfcRedTrigCharm_as<aod::HfcRedTrigCharms>();
514518
if (fillSparses && fillTables) {
515519
fillSameEvent<true, true>(pair, trigCand, binPolicyPosZMult);
@@ -525,7 +529,7 @@ struct HfCorrelatorFlowCharmHadronsReduced {
525529
aod::HfcRedTrigTracks const&,
526530
aod::HfcRedCorrColls const&)
527531
{
528-
BinningMultPosZ binPolicyPosZMult{{zPoolBins, multPoolBins}};
532+
BinningMultPosZ binPolicyPosZMult{{binsZPool, binsMultPool}};
529533
auto trigCand = pair.template hfcRedTrigTrack_as<aod::HfcRedTrigTracks>();
530534
if (fillSparses && fillTables) {
531535
fillSameEvent<true, true>(pair, trigCand, binPolicyPosZMult);
@@ -541,7 +545,7 @@ struct HfCorrelatorFlowCharmHadronsReduced {
541545
aod::HfcRedTrigCharms const&,
542546
aod::HfcRedCorrColls const&)
543547
{
544-
BinningCentPosZ binPolicyPosZCent{{zPoolBins, centPoolBins}};
548+
BinningCentPosZ binPolicyPosZCent{{binsZPool, binsCentPool}};
545549
auto trigCand = pair.template hfcRedTrigCharm_as<aod::HfcRedTrigCharms>();
546550
if (fillSparses && fillTables) {
547551
fillSameEvent<true, true>(pair, trigCand, binPolicyPosZCent);
@@ -557,7 +561,7 @@ struct HfCorrelatorFlowCharmHadronsReduced {
557561
aod::HfcRedTrigTracks const&,
558562
aod::HfcRedCorrColls const&)
559563
{
560-
BinningCentPosZ binPolicyPosZCent{{zPoolBins, centPoolBins}};
564+
BinningCentPosZ binPolicyPosZCent{{binsZPool, binsCentPool}};
561565
auto trigCand = pair.template hfcRedTrigTrack_as<aod::HfcRedTrigTracks>();
562566
if (fillSparses && fillTables) {
563567
fillSameEvent<true, true>(pair, trigCand, binPolicyPosZCent);
@@ -573,7 +577,7 @@ struct HfCorrelatorFlowCharmHadronsReduced {
573577
TrigCharmCands const& candidates,
574578
AssocTracks const& tracks)
575579
{
576-
BinningCentPosZ binPolicyPosZCent{{zPoolBins, centPoolBins}};
580+
BinningCentPosZ binPolicyPosZCent{{binsZPool, binsCentPool}};
577581
auto pairsTuple = std::make_tuple(candidates, tracks);
578582
Pair<aod::HfcRedCorrColls, TrigCharmCands, AssocTracks, BinningCentPosZ> const pairs{binPolicyPosZCent, numberEventsMixed, -1, collisions, pairsTuple, &cache};
579583
if (fillSparses && fillTables) {
@@ -590,7 +594,7 @@ struct HfCorrelatorFlowCharmHadronsReduced {
590594
TrigCharmCands const& candidates,
591595
AssocTracks const& tracks)
592596
{
593-
BinningMultPosZ binPolicyPosZMult{{zPoolBins, multPoolBins}};
597+
BinningMultPosZ binPolicyPosZMult{{binsZPool, binsMultPool}};
594598
auto pairsTuple = std::make_tuple(candidates, tracks);
595599
Pair<aod::HfcRedCorrColls, TrigCharmCands, AssocTracks, BinningMultPosZ> const pairs{binPolicyPosZMult, numberEventsMixed, -1, collisions, pairsTuple, &cache};
596600
if (fillSparses && fillTables) {
@@ -606,7 +610,7 @@ struct HfCorrelatorFlowCharmHadronsReduced {
606610
void processMixedEventHadHadWCentMix(aod::HfcRedCorrColls const& collisions,
607611
AssocTracks const& tracks)
608612
{
609-
BinningCentPosZ binPolicyPosZCent{{zPoolBins, centPoolBins}};
613+
BinningCentPosZ binPolicyPosZCent{{binsZPool, binsCentPool}};
610614
auto tracksTuple = std::make_tuple(tracks);
611615
SameKindPair<aod::HfcRedCorrColls, AssocTracks, BinningCentPosZ> const pairs{binPolicyPosZCent, numberEventsMixed, -1, collisions, tracksTuple, &cache};
612616
if (fillSparses && fillTables) {
@@ -622,7 +626,7 @@ struct HfCorrelatorFlowCharmHadronsReduced {
622626
void processMixedEventHadHadWMultMix(aod::HfcRedCorrColls const& collisions,
623627
AssocTracks const& tracks)
624628
{
625-
BinningMultPosZ binPolicyPosZMult{{zPoolBins, multPoolBins}};
629+
BinningMultPosZ binPolicyPosZMult{{binsZPool, binsMultPool}};
626630
auto tracksTuple = std::make_tuple(tracks);
627631
SameKindPair<aod::HfcRedCorrColls, AssocTracks, BinningMultPosZ> const pairs{binPolicyPosZMult, numberEventsMixed, -1, collisions, tracksTuple, &cache};
628632
if (fillSparses && fillTables) {
@@ -656,7 +660,7 @@ struct HfCorrelatorFlowCharmHadronsReduced {
656660
TrigCharmCands const& candidates,
657661
aod::HfcRedAssBases const& tracks)
658662
{
659-
BinningCentPosZ binPolicyPosZCent{{zPoolBins, centPoolBins}};
663+
BinningCentPosZ binPolicyPosZCent{{binsZPool, binsCentPool}};
660664

661665
for (const auto& collision : collisions) {
662666
if (!isSelCollision(collision)) {
@@ -677,7 +681,7 @@ struct HfCorrelatorFlowCharmHadronsReduced {
677681
TrigCharmCands const& candidates,
678682
aod::HfcRedAssBases const& tracks)
679683
{
680-
BinningCentPosZ binPolicyPosZCent{{zPoolBins, centPoolBins}};
684+
BinningCentPosZ binPolicyPosZCent{{binsZPool, binsCentPool}};
681685

682686
doCorrelationsMixedEvent<true>(collisions, candidates, tracks, binPolicyPosZCent);
683687
}

0 commit comments

Comments
 (0)