Skip to content

Commit 81b0e04

Browse files
author
Victor
committed
[PWGCF] DptDpt - Event selection expansion and flexibilization
1 parent 0f3b1ea commit 81b0e04

File tree

2 files changed

+272
-417
lines changed

2 files changed

+272
-417
lines changed

PWGCF/TableProducer/dptDptFilter.cxx

Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -97,32 +97,12 @@ const char* speciesName[kDptDptNoOfSpecies] = {"h", "e", "mu", "pi", "ka", "p"};
9797

9898
const char* speciesTitle[kDptDptNoOfSpecies] = {"", "e", "#mu", "#pi", "K", "p"};
9999

100-
const char* eventSelectionSteps[knCollisionSelectionFlags] = {
101-
"IN",
102-
"MB",
103-
"INT7",
104-
"SEL7",
105-
"SEL8",
106-
"NOSAMEBUNCHPUP",
107-
"ISGOODZVTXFT0VSPV",
108-
"ISVERTEXITSTPC",
109-
"ISVERTEXTOFMATCHED",
110-
"ISVERTEXTRDMATCHED",
111-
"NOCOLLINTIMERANGE",
112-
"NOCOLLINROF",
113-
"OCCUPANCY",
114-
"ISGOODITSLAYER3",
115-
"ISGOODITSLAYER0123",
116-
"ISGOODITSLAYERALL",
117-
"CENTRALITY",
118-
"ZVERTEX",
119-
"SELECTED"};
120-
121100
//============================================================================================
122101
// The DptDptFilter histogram objects
123102
// TODO: consider registering in the histogram registry
124103
//============================================================================================
125104
TH1D* fhEventSelection = nullptr;
105+
TH1D* fhTriggerSelection = nullptr;
126106
TH1F* fhCentMultB = nullptr;
127107
TH1F* fhCentMultA = nullptr;
128108
TH1F* fhVertexZB = nullptr;
@@ -374,7 +354,6 @@ struct DptDptFilter {
374354

375355
struct : ConfigurableGroup {
376356
std::string prefix = "cfgEventSelection";
377-
Configurable<std::string> itsDeadMaps{"itsDeadMaps", "", "Level of inactive chips: nocheck(empty), goodIts3, goodIts0123, goodItsAll. Default empty"};
378357
Configurable<int64_t> minOrbit{"minOrbit", -1, "Lowest orbit to track"};
379358
Configurable<int64_t> maxOrbit{"maxOrbit", INT64_MAX, "Highest orbit to track"};
380359
struct : ConfigurableGroup {
@@ -433,21 +412,19 @@ struct DptDptFilter {
433412
/* the track types and combinations */
434413
/* the centrality/multiplicity estimation */
435414
if (doprocessWithoutCent || doprocessWithoutCentDetectorLevel || doprocessWithoutCentGeneratorLevel) {
436-
fCentMultEstimator = kNOCM;
415+
fCentMultEstimator = CentMultNOCM;
437416
} else if (doprocessOnTheFlyGeneratorLevel) {
438-
fCentMultEstimator = kFV0A;
417+
fCentMultEstimator = CentMultFV0A;
439418
} else {
440419
fCentMultEstimator = getCentMultEstimator(cfgCentMultEstimator);
441420
}
442421
/* the occupancy selection */
443422
fOccupancyEstimation = getOccupancyEstimator(cfgEventSelection.cfgOccupancySelection.cfgOccupancyEstimation);
444423
fMinOccupancy = cfgEventSelection.cfgOccupancySelection.cfgMinOccupancy;
445424
fMaxOccupancy = cfgEventSelection.cfgOccupancySelection.cfgMaxOccupancy;
446-
/* the ITS dead map check */
447-
fItsDeadMapCheck = getItsDeadMapCheck(cfgEventSelection.itsDeadMaps);
448425

449426
/* the trigger selection */
450-
fTriggerSelection = getTriggerSelection(cfgTriggSel);
427+
triggerSelectionFlags = getTriggerSelection(cfgTriggSel);
451428
traceCollId0 = cfgTraceCollId0;
452429

453430
/* if the system type is not known at this time, we have to put the initialization somewhere else */
@@ -461,9 +438,13 @@ struct DptDptFilter {
461438

462439
if ((fDataType == kData) || (fDataType == kDataNoEvtSel) || (fDataType == kMC)) {
463440
/* create the reconstructed data histograms */
464-
fhEventSelection = new TH1D("EventSelection", ";;counts", knCollisionSelectionFlags, -0.5f, static_cast<float>(knCollisionSelectionFlags) - 0.5f);
465-
for (int ix = 0; ix < knCollisionSelectionFlags; ++ix) {
466-
fhEventSelection->GetXaxis()->SetBinLabel(ix + 1, eventSelectionSteps[ix]);
441+
fhEventSelection = new TH1D("EventSelection", ";;counts", CollSelNOOFFLAGS, -0.5f, static_cast<float>(CollSelNOOFFLAGS) - 0.5f);
442+
for (int ix = 0; ix < CollSelNOOFFLAGS; ++ix) {
443+
fhEventSelection->GetXaxis()->SetBinLabel(ix + 1, CollisionSelectionExternalNames.at(ix).c_str());
444+
}
445+
fhTriggerSelection = new TH1D("TriggerSelection", ";;counts", TriggSelNOOFTRIGGERS, -0.5f, static_cast<float>(TriggSelNOOFTRIGGERS) - 0.5f);
446+
for (int ix = 0; ix < TriggSelNOOFTRIGGERS; ++ix) {
447+
fhTriggerSelection->GetXaxis()->SetBinLabel(ix + 1, TString::Format("#color[%d]{%s}", triggerSelectionFlags.test(ix) ? 2 : 1, TriggerSelectionExternalNames.at(ix).c_str()).Data());
467448
}
468449
/* TODO: proper axes and axes titles according to the system; still incomplete */
469450
std::string multestimator = getCentMultEstimatorName(fCentMultEstimator);
@@ -485,6 +466,7 @@ struct DptDptFilter {
485466

486467
/* add the hstograms to the output list */
487468
fOutputList->Add(fhEventSelection);
469+
fOutputList->Add(fhTriggerSelection);
488470
fOutputList->Add(fhCentMultB);
489471
fOutputList->Add(fhCentMultA);
490472
fOutputList->Add(fhMultB);
@@ -617,8 +599,13 @@ void DptDptFilter::processReconstructed(CollisionObject const& collision, Tracks
617599
collisionsinfo(uint8_t(false), 105.0);
618600
}
619601
}
620-
/* report the event selection */
621-
for (int iflag = 0; iflag < knCollisionSelectionFlags; ++iflag) {
602+
/* report the trigger and event selection */
603+
for (int iflag = 0; iflag < TriggSelNOOFTRIGGERS; ++iflag) {
604+
if (triggerFlags.test(iflag)) {
605+
fhTriggerSelection->Fill(iflag);
606+
}
607+
}
608+
for (int iflag = 0; iflag < CollSelNOOFFLAGS; ++iflag) {
622609
if (collisionFlags.test(iflag)) {
623610
fhEventSelection->Fill(iflag);
624611
}
@@ -1757,10 +1744,8 @@ void DptDptFilterTracks::fillParticleHistosAfterSelection(ParticleObject const&
17571744

17581745
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
17591746
{
1760-
WorkflowSpec workflow{adaptAnalysisTask<DptDptFilter>(cfgc,
1761-
SetDefaultProcesses{
1762-
{{"processWithoutCent", true},
1763-
{"processWithoutCentMC", true}}}),
1747+
metadataInfo.initMetadata(cfgc);
1748+
WorkflowSpec workflow{adaptAnalysisTask<DptDptFilter>(cfgc),
17641749
adaptAnalysisTask<DptDptFilterTracks>(cfgc)};
17651750
return workflow;
17661751
}

0 commit comments

Comments
 (0)