Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 21 additions & 36 deletions PWGCF/TableProducer/dptDptFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -97,32 +97,12 @@ const char* speciesName[kDptDptNoOfSpecies] = {"h", "e", "mu", "pi", "ka", "p"};

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

const char* eventSelectionSteps[knCollisionSelectionFlags] = {
"IN",
"MB",
"INT7",
"SEL7",
"SEL8",
"NOSAMEBUNCHPUP",
"ISGOODZVTXFT0VSPV",
"ISVERTEXITSTPC",
"ISVERTEXTOFMATCHED",
"ISVERTEXTRDMATCHED",
"NOCOLLINTIMERANGE",
"NOCOLLINROF",
"OCCUPANCY",
"ISGOODITSLAYER3",
"ISGOODITSLAYER0123",
"ISGOODITSLAYERALL",
"CENTRALITY",
"ZVERTEX",
"SELECTED"};

//============================================================================================
// The DptDptFilter histogram objects
// TODO: consider registering in the histogram registry
//============================================================================================
TH1D* fhEventSelection = nullptr;
TH1D* fhTriggerSelection = nullptr;
TH1F* fhCentMultB = nullptr;
TH1F* fhCentMultA = nullptr;
TH1F* fhVertexZB = nullptr;
Expand Down Expand Up @@ -374,7 +354,6 @@ struct DptDptFilter {

struct : ConfigurableGroup {
std::string prefix = "cfgEventSelection";
Configurable<std::string> itsDeadMaps{"itsDeadMaps", "", "Level of inactive chips: nocheck(empty), goodIts3, goodIts0123, goodItsAll. Default empty"};
Configurable<int64_t> minOrbit{"minOrbit", -1, "Lowest orbit to track"};
Configurable<int64_t> maxOrbit{"maxOrbit", INT64_MAX, "Highest orbit to track"};
struct : ConfigurableGroup {
Expand Down Expand Up @@ -433,21 +412,19 @@ struct DptDptFilter {
/* the track types and combinations */
/* the centrality/multiplicity estimation */
if (doprocessWithoutCent || doprocessWithoutCentDetectorLevel || doprocessWithoutCentGeneratorLevel) {
fCentMultEstimator = kNOCM;
fCentMultEstimator = CentMultNOCM;
} else if (doprocessOnTheFlyGeneratorLevel) {
fCentMultEstimator = kFV0A;
fCentMultEstimator = CentMultFV0A;
} else {
fCentMultEstimator = getCentMultEstimator(cfgCentMultEstimator);
}
/* the occupancy selection */
fOccupancyEstimation = getOccupancyEstimator(cfgEventSelection.cfgOccupancySelection.cfgOccupancyEstimation);
fMinOccupancy = cfgEventSelection.cfgOccupancySelection.cfgMinOccupancy;
fMaxOccupancy = cfgEventSelection.cfgOccupancySelection.cfgMaxOccupancy;
/* the ITS dead map check */
fItsDeadMapCheck = getItsDeadMapCheck(cfgEventSelection.itsDeadMaps);

/* the trigger selection */
fTriggerSelection = getTriggerSelection(cfgTriggSel);
triggerSelectionFlags = getTriggerSelection(cfgTriggSel);
traceCollId0 = cfgTraceCollId0;

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

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

/* add the hstograms to the output list */
fOutputList->Add(fhEventSelection);
fOutputList->Add(fhTriggerSelection);
fOutputList->Add(fhCentMultB);
fOutputList->Add(fhCentMultA);
fOutputList->Add(fhMultB);
Expand Down Expand Up @@ -617,8 +599,13 @@ void DptDptFilter::processReconstructed(CollisionObject const& collision, Tracks
collisionsinfo(uint8_t(false), 105.0);
}
}
/* report the event selection */
for (int iflag = 0; iflag < knCollisionSelectionFlags; ++iflag) {
/* report the trigger and event selection */
for (int iflag = 0; iflag < TriggSelNOOFTRIGGERS; ++iflag) {
if (triggerFlags.test(iflag)) {
fhTriggerSelection->Fill(iflag);
}
}
for (int iflag = 0; iflag < CollSelNOOFFLAGS; ++iflag) {
if (collisionFlags.test(iflag)) {
fhEventSelection->Fill(iflag);
}
Expand Down Expand Up @@ -1757,10 +1744,8 @@ void DptDptFilterTracks::fillParticleHistosAfterSelection(ParticleObject const&

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
WorkflowSpec workflow{adaptAnalysisTask<DptDptFilter>(cfgc,
SetDefaultProcesses{
{{"processWithoutCent", true},
{"processWithoutCentMC", true}}}),
metadataInfo.initMetadata(cfgc);
WorkflowSpec workflow{adaptAnalysisTask<DptDptFilter>(cfgc),
adaptAnalysisTask<DptDptFilterTracks>(cfgc)};
return workflow;
}
Loading
Loading