Skip to content

Commit cfd582d

Browse files
victor-gonzalezVictor
andauthored
[PWGCF] DptDpt - Event selection tune (#9710)
Co-authored-by: Victor <victor@cern.ch>
1 parent 07be9a7 commit cfd582d

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

PWGCF/TableProducer/dptdptfilter.cxx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ const char* eventSelectionSteps[knCollisionSelectionFlags] = {
105105
"ISVERTEXITSTPC",
106106
"ISVERTEXTOFMATCHED",
107107
"ISVERTEXTRDMATCHED",
108+
"NOCOLLINTIMERANGE",
109+
"NOCOLLINROF",
108110
"OCCUPANCY",
109111
"ISGOODITSLAYER3",
110112
"ISGOODITSLAYER0123",
@@ -364,11 +366,16 @@ struct DptDptFilter {
364366
} cfginputfile;
365367
Configurable<bool> cfgFullDerivedData{"fullderiveddata", false, "Produce the full derived data for external storage. Default false"};
366368
Configurable<std::string> cfgCentMultEstimator{"centmultestimator", "V0M", "Centrality/multiplicity estimator detector: V0M,CL0,CL1,FV0A,FT0M,FT0A,FT0C,NTPV,NOCM: none. Default V0M"};
367-
Configurable<std::string> cfgOccupancyEstimation{"occestimation", "None", "Occupancy estimation: None, Tracks, FT0C. Default None"};
368-
Configurable<float> cfgMaxOccupancy{"occmax", 1e6f, "Maximum allowed occupancy. Depends on the occupancy estimation"};
369+
369370
struct : ConfigurableGroup {
370371
std::string prefix = "cfgEventSelection";
371372
Configurable<std::string> itsDeadMaps{"itsDeadMaps", "", "Level of inactive chips: nocheck(empty), goodIts3, goodIts0123, goodItsAll. Default empty"};
373+
struct : ConfigurableGroup {
374+
std::string prefix = "cfgOccupancySelection";
375+
Configurable<std::string> cfgOccupancyEstimation{"cfgOccupancyEstimation", "None", "Occupancy estimation: None, Tracks, FT0C. Default None"};
376+
Configurable<float> cfgMinOccupancy{"cfgMinOccupancy", 0.0f, "Minimum allowed occupancy. Depends on the occupancy estimation"};
377+
Configurable<float> cfgMaxOccupancy{"cfgMaxOccupancy", 1e6f, "Maximum allowed occupancy. Depends on the occupancy estimation"};
378+
} cfgOccupancySelection;
372379
} cfgEventSelection;
373380
Configurable<std::string> cfgSystem{"syst", "PbPb", "System: pp, PbPb, Pbp, pPb, XeXe, ppRun3, PbPbRun3. Default PbPb"};
374381
Configurable<std::string> cfgDataType{"datatype", "data", "Data type: data, datanoevsel, MC, FastMC, OnTheFlyMC. Default data"};
@@ -426,8 +433,9 @@ struct DptDptFilter {
426433
fCentMultEstimator = getCentMultEstimator(cfgCentMultEstimator);
427434
}
428435
/* the occupancy selection */
429-
fOccupancyEstimation = getOccupancyEstimator(cfgOccupancyEstimation);
430-
fMaxOccupancy = cfgMaxOccupancy;
436+
fOccupancyEstimation = getOccupancyEstimator(cfgEventSelection.cfgOccupancySelection.cfgOccupancyEstimation);
437+
fMinOccupancy = cfgEventSelection.cfgOccupancySelection.cfgMinOccupancy;
438+
fMaxOccupancy = cfgEventSelection.cfgOccupancySelection.cfgMaxOccupancy;
431439
/* the ITS dead map check */
432440
fItsDeadMapCheck = getItsDeadMapCheck(cfgEventSelection.itsDeadMaps);
433441

PWGCF/TableProducer/dptdptfilter.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ enum CollisionSelectionFlags {
134134
kISVERTEXITSTPCBIT, ///< is vertex TPC and ITS
135135
kISVERTEXTOFMATCHEDBIT, ///< vertex contributor with TOF matched
136136
kISVERTEXTRDMATCHEDBIT, ///< vertex contributor with TRD matche
137+
kNOCOLLINTIMERANGEBIT, ///< no collision in time range
138+
kNOCOLLINROFBIT, ///< no collision in readout
137139
kOCCUPANCYBIT, ///< occupancy within limits
138140
kISGOODITSLAYER3BIT, ///< right level of inactive chips for ITS layer 3
139141
kISGOODITSLAYER0123BIT, ///< right level of inactive chips for ITS layers 0,1,2, and 3
@@ -381,6 +383,7 @@ TriggerSelectionType fTriggerSelection = kMB;
381383
OccupancyEstimationType fOccupancyEstimation = kNOOCC; /* the occupancy estimator to use */
382384
ItsDeadMapsCheckType fItsDeadMapCheck = kNOCHECK; /* the check of the ITS dead maps to use */
383385

386+
float fMinOccupancy = 0.0f; /* the minimum allowed occupancy */
384387
float fMaxOccupancy = 1e6f; /* the maximum allowed occupancy */
385388

386389
/* adaptations for the pp nightly checks */
@@ -612,7 +615,9 @@ inline bool triggerSelectionReco(CollisionObject const& collision)
612615
case kppRun3:
613616
case kPbPbRun3: {
614617
auto run3Accepted = [](auto const& coll) {
615-
return coll.sel8();
618+
return coll.sel8() &&
619+
coll.selection_bit(aod::evsel::kNoCollInTimeRangeStandard) &&
620+
coll.selection_bit(aod::evsel::kNoCollInRofStandard);
616621
};
617622
auto run3ExtraAccepted = [](auto const& coll) {
618623
return coll.sel8() &&
@@ -627,6 +632,8 @@ inline bool triggerSelectionReco(CollisionObject const& collision)
627632
flags.set(kISVERTEXITSTPCBIT, coll.selection_bit(aod::evsel::kIsVertexITSTPC));
628633
flags.set(kISVERTEXTOFMATCHEDBIT, coll.selection_bit(aod::evsel::kIsVertexTOFmatched));
629634
flags.set(kISVERTEXTRDMATCHEDBIT, coll.selection_bit(aod::evsel::kIsVertexTRDmatched));
635+
flags.set(kNOCOLLINTIMERANGEBIT, coll.selection_bit(aod::evsel::kNoCollInTimeRangeStandard));
636+
flags.set(kNOCOLLINROFBIT, coll.selection_bit(aod::evsel::kNoCollInRofStandard));
630637
flags.set(kISGOODITSLAYER3BIT, coll.selection_bit(aod::evsel::kIsGoodITSLayer3));
631638
flags.set(kISGOODITSLAYER0123BIT, coll.selection_bit(aod::evsel::kIsGoodITSLayer0123));
632639
flags.set(kISGOODITSLAYERALLBIT, coll.selection_bit(aod::evsel::kIsGoodITSLayersAll));
@@ -932,14 +939,14 @@ inline bool selectOnOccupancy(CollisionObject collision)
932939
collisionFlags.set(kOCCUPANCYBIT);
933940
return true;
934941
case kTRACKSOCC:
935-
if (collision.trackOccupancyInTimeRange() < fMaxOccupancy) {
942+
if ((fMinOccupancy <= collision.trackOccupancyInTimeRange()) && (collision.trackOccupancyInTimeRange() < fMaxOccupancy)) {
936943
collisionFlags.set(kOCCUPANCYBIT);
937944
return true;
938945
} else {
939946
return false;
940947
}
941948
case kFT0COCC:
942-
if (collision.ft0cOccupancyInTimeRange() < fMaxOccupancy) {
949+
if ((fMinOccupancy <= collision.ft0cOccupancyInTimeRange()) && (collision.ft0cOccupancyInTimeRange() < fMaxOccupancy)) {
943950
collisionFlags.set(kOCCUPANCYBIT);
944951
return true;
945952
} else {

0 commit comments

Comments
 (0)