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
18 changes: 9 additions & 9 deletions PWGCF/TableProducer/dptdptfilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ struct DptDptFilter {
Configurable<std::string> cfgCentMultEstimator{"centmultestimator", "V0M", "Centrality/multiplicity estimator detector: V0M,CL0,CL1,FV0A,FT0M,FT0A,FT0C,NTPV,NOCM: none. Default V0M"};
Configurable<std::string> cfgSystem{"syst", "PbPb", "System: pp, PbPb, Pbp, pPb, XeXe, ppRun3, PbPbRun3. Default PbPb"};
Configurable<std::string> cfgDataType{"datatype", "data", "Data type: data, datanoevsel, MC, FastMC, OnTheFlyMC. Default data"};
Configurable<std::string> cfgTriggSel{"triggsel", "MB", "Trigger selection: MB, None. Default MB"};
Configurable<std::string> cfgTriggSel{"triggsel", "MB", "Trigger selection: MB,VTXTOFMATCHED,VTXTRDMATCHED,VTXTRDTOFMATCHED,None. Default MB"};
Configurable<std::string> cfgCentSpec{"centralities", "00-10,10-20,20-30,30-40,40-50,50-60,60-70,70-80", "Centrality/multiplicity ranges in min-max separated by commas"};
Configurable<float> cfgOverallMinP{"overallminp", 0.0f, "The overall minimum momentum for the analysis. Default: 0.0"};
Configurable<o2::analysis::DptDptBinningCuts> cfgBinning{"binning",
Expand Down Expand Up @@ -515,7 +515,7 @@ struct DptDptFilterTracks {
std::string cfgCCDBPeriod{"LHC22o"};

Configurable<bool> cfgFullDerivedData{"fullderiveddata", false, "Produce the full derived data for external storage. Default false"};
Configurable<int> cfgTrackType{"trktype", 4, "Type of selected tracks: 0 = no selection, 1 = Run2 global tracks FB96, 3 = Run3 tracks, 4 = Run3 tracks MM sel, 5 = Run2 TPC only tracks, 7 = Run 3 TPC only tracks. Default 4"};
Configurable<int> cfgTrackType{"trktype", 4, "Type of selected tracks: 0 = no selection;1 = Run2 global tracks FB96;3 = Run3 tracks;4 = Run3 tracks MM sel;5 = Run2 TPC only tracks;7 = Run 3 TPC only tracks;30-33 = any/two on 3 ITS,any/all in 7 ITS;40-43 same as 30-33 w tighter DCAxy. Default 4"};
Configurable<o2::analysis::CheckRangeCfg> cfgTraceDCAOutliers{"trackdcaoutliers", {false, 0.0, 0.0}, "Track the generator level DCAxy outliers: false/true, low dcaxy, up dcaxy. Default {false,0.0,0.0}"};
Configurable<float> cfgTraceOutOfSpeciesParticles{"trackoutparticles", false, "Track the particles which are not e,mu,pi,K,p: false/true. Default false"};
Configurable<int> cfgRecoIdMethod{"recoidmethod", 0, "Method for identifying reconstructed tracks: 0 No PID, 1 PID, 2 mcparticle. Default 0"};
Expand Down Expand Up @@ -1092,7 +1092,7 @@ template <typename CollisionObjects, typename TrackObject>
int8_t DptDptFilterTracks::selectTrackAmbiguousCheck(CollisionObjects const& collisions, TrackObject const& track)
{
bool ambiguoustrack = false;
int tracktype = 0; /* no ambiguous */
int ambtracktype = 0; /* no ambiguous */
std::vector<double> zvertexes{};
/* ambiguous tracks checks if required */
if constexpr (has_type_v<aod::track_association::CollisionIds, typename TrackObject::all_columns>) {
Expand All @@ -1102,17 +1102,17 @@ int8_t DptDptFilterTracks::selectTrackAmbiguousCheck(CollisionObjects const& col
/* ambiguous track! */
ambiguoustrack = true;
/* in principle we should not be here because the track is associated to two collisions at least */
tracktype = 2;
ambtracktype = 2;
zvertexes.push_back(collisions.iteratorAt(track.collisionId()).posZ());
zvertexes.push_back(collisions.iteratorAt(track.compatibleCollIds()[0]).posZ());
} else {
/* we consider the track as no ambiguous */
tracktype = 1;
ambtracktype = 1;
}
} else {
/* ambiguous track! */
ambiguoustrack = true;
tracktype = 3;
ambtracktype = 3;
/* the track is associated to more than one collision */
for (const auto& collIdx : track.compatibleCollIds()) {
zvertexes.push_back(collisions.iteratorAt(collIdx).posZ());
Expand All @@ -1124,10 +1124,10 @@ int8_t DptDptFilterTracks::selectTrackAmbiguousCheck(CollisionObjects const& col
float multiplicityclass = (track.template collision_as<soa::Join<aod::Collisions, aod::DptDptCFCollisionsInfo>>()).centmult();
if (ambiguoustrack) {
/* keep track of ambiguous tracks */
fhAmbiguousTrackType->Fill(tracktype, multiplicityclass);
fhAmbiguousTrackType->Fill(ambtracktype, multiplicityclass);
fhAmbiguousTrackPt->Fill(track.pt(), multiplicityclass);
fhAmbiguityDegree->Fill(zvertexes.size(), multiplicityclass);
if (tracktype == 2) {
if (ambtracktype == 2) {
fhCompatibleCollisionsZVtxRms->Fill(-computeRMS(zvertexes), multiplicityclass);
} else {
fhCompatibleCollisionsZVtxRms->Fill(computeRMS(zvertexes), multiplicityclass);
Expand All @@ -1136,7 +1136,7 @@ int8_t DptDptFilterTracks::selectTrackAmbiguousCheck(CollisionObjects const& col
} else {
if (checkAmbiguousTracks) {
/* feedback of no ambiguous tracks only if checks required */
fhAmbiguousTrackType->Fill(tracktype, multiplicityclass);
fhAmbiguousTrackType->Fill(ambtracktype, multiplicityclass);
}
return selectTrack(track);
}
Expand Down
44 changes: 38 additions & 6 deletions PWGCF/TableProducer/dptdptfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,12 @@ enum CentMultEstimatorType {
/// \enum TriggerSelectionType
/// \brief The type of trigger to apply for event selection
enum TriggerSelectionType {
kNONE = 0, ///< do not use trigger selection
kMB, ///< Minimum bias trigger
knEventSelection ///< number of triggers for event selection
kNONE = 0, ///< do not use trigger selection
kMB, ///< Minimum bias trigger
kVTXTOFMATCHED, ///< at least one vertex contributor is matched to TOF
kVTXTRDMATCHED, ///< at least one vertex contributor is matched to TRD
kVTXTRDTOFMATCHED, ///< at least one vertex contributor is matched to TRD and TOF
knEventSelection ///< number of triggers for event selection
};

//============================================================================================
Expand Down Expand Up @@ -278,6 +281,12 @@ inline TriggerSelectionType getTriggerSelection(std::string const& triggstr)
{
if (triggstr.empty() || triggstr == "MB") {
return kMB;
} else if (triggstr == "VTXTOFMATCHED") {
return kVTXTOFMATCHED;
} else if (triggstr == "VTXTRDMATCHED") {
return kVTXTRDMATCHED;
} else if (triggstr == "VTXTRDTOFMATCHED") {
return kVTXTRDTOFMATCHED;
} else if (triggstr == "None") {
return kNONE;
} else {
Expand Down Expand Up @@ -439,10 +448,33 @@ inline bool triggerSelectionReco(CollisionObject const& collision)
}
break;
case kppRun3:
case kPbPbRun3:
case kPbPbRun3: {
auto run3Accepted = [](auto const& coll) {
return coll.sel8() &&
coll.selection_bit(aod::evsel::kNoITSROFrameBorder) &&
coll.selection_bit(aod::evsel::kNoTimeFrameBorder) &&
coll.selection_bit(aod::evsel::kNoSameBunchPileup) &&
coll.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) &&
coll.selection_bit(aod::evsel::kIsVertexITSTPC);
};
switch (fTriggerSelection) {
case kMB:
if (collision.sel8() && collision.selection_bit(aod::evsel::kNoITSROFrameBorder) && collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) {
if (run3Accepted(collision)) {
trigsel = true;
}
break;
case kVTXTOFMATCHED:
if (run3Accepted(collision) && collision.selection_bit(aod::evsel::kIsVertexTOFmatched)) {
trigsel = true;
}
break;
case kVTXTRDMATCHED:
if (run3Accepted(collision) && collision.selection_bit(aod::evsel::kIsVertexTRDmatched)) {
trigsel = true;
}
break;
case kVTXTRDTOFMATCHED:
if (run3Accepted(collision) && collision.selection_bit(aod::evsel::kIsVertexTRDmatched) && collision.selection_bit(aod::evsel::kIsVertexTOFmatched)) {
trigsel = true;
}
break;
Expand All @@ -452,7 +484,7 @@ inline bool triggerSelectionReco(CollisionObject const& collision)
default:
break;
}
break;
} break;
default:
break;
}
Expand Down