Skip to content

Commit 3e4ca78

Browse files
committed
Update the collision cut class
1 parent 69d6b62 commit 3e4ca78

File tree

10 files changed

+733
-72
lines changed

10 files changed

+733
-72
lines changed

PWGLF/Utils/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,12 @@ o2physics_add_library(v0SelectionGroup
1515

1616
o2physics_target_root_dictionary(v0SelectionGroup
1717
HEADERS v0SelectionGroup.h
18-
LINKDEF v0SelectionGroupLinkDef.h)
18+
LINKDEF v0SelectionGroupLinkDef.h)
19+
20+
o2physics_add_library(collisionCutsGroup
21+
SOURCES collisionCutsGroup.cxx
22+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore)
23+
24+
o2physics_target_root_dictionary(collisionCutsGroup
25+
HEADERS collisionCutsGroup.h
26+
LINKDEF collisionCutsGroupLinkDef.h)
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
/// \file EventSelectionFlagsMapping.def
13+
/// \brief X-macro mapping between EventSelectionFlags and collisionCutsGroup
14+
///
15+
/// This file defines the canonical mapping between o2::aod::evsel::EventSelectionFlags
16+
/// enum values and collisionCutsGroup boolean member variables. It is used via X-macros
17+
/// to auto-generate member declarations, getters, setters, initialization, and metadata.
18+
///
19+
/// IMPORTANT: This file should NOT have include guards as it is included multiple times
20+
/// with different EVSEL_FLAG macro definitions.
21+
///
22+
/// Format: EVSEL_FLAG(enumValue, memberName, defaultValue, evtSelEnum, setterName, getterName, label, description)
23+
///
24+
/// Parameters:
25+
/// enumValue - EventSelectionFlags enum (e.g., kIsTriggerTVX)
26+
/// memberName - collisionCutsGroup bool member variable name
27+
/// defaultValue - Default value (true/false) in constructor
28+
/// evtSelEnum - CollisonCuts::EvtSel enum value for histogram binning
29+
/// setterName - CollisonCuts setter method name
30+
/// getterName - collisionCutsGroup getter method name suffix (without 'get')
31+
/// label - Histogram axis label (short, no spaces)
32+
/// description - Human-readable description
33+
///
34+
/// To add a new event selection flag:
35+
/// 1. Add a new EVSEL_FLAG line below following the format
36+
/// 2. Ensure the EvtSel enum in collisionCuts.h has corresponding entry
37+
/// 3. Ensure the setter method exists in CollisonCuts class
38+
/// 4. Rebuild - all getters, members, logging, and metadata are auto-generated
39+
///
40+
/// \author Bong-Hwi Lim <[email protected]>
41+
42+
// Trigger selection
43+
EVSEL_FLAG(kIsTriggerTVX, triggerTVXSel, false, kFlagTrigerTVX, setTriggerTVX, TriggerTVXSel, "IsTriggerTVX", "Trigger TVX selection")
44+
45+
// Time frame and readout frame borders
46+
EVSEL_FLAG(kNoTimeFrameBorder, applyTFBorderCut, false, kFlagTimeFrameBorder, setApplyTFBorderCut, ApplyTFBorderCut, "NoTimeFrameBorder", "Apply TF border cut")
47+
EVSEL_FLAG(kNoITSROFrameBorder, applyNoITSROBorderCut, false, kFlagITSROFrameBorder, setApplyNoITSROBorderCut, ApplyNoITSROBorderCut, "NoITSROFrameBorder", "Apply NoITSRO frame border cut")
48+
49+
// Vertex quality
50+
EVSEL_FLAG(kIsVertexITSTPC, applyITSTPCvertex, false, kFlagVertexITSTPC, setApplyITSTPCvertex, ApplyITSTPCvertex, "IsVertexITSTPC", "Apply ITS-TPC vertex")
51+
EVSEL_FLAG(kIsGoodZvtxFT0vsPV, applyZvertexTimedifference, false, kFlagZvtxFT0vsPV, setApplyZvertexTimedifference, ApplyZvertexTimedifference, "IsGoodZvtxFT0vsPV", "Apply Z-vertex time difference")
52+
EVSEL_FLAG(kIsVertexTRDmatched, applyVertexTRDmatched, false, kFlagVertexTRDmatched, setApplyVertexTRDmatched, ApplyVertexTRDmatched, "IsVertexTRDmatched", "Vertex has TRD-matched track")
53+
54+
// Pileup rejection
55+
EVSEL_FLAG(kNoSameBunchPileup, applyPileupRejection, false, kFlagBunchPileup, setApplyPileupRejection, ApplyPileupRejection, "NoSameBunchPileup", "Apply Pileup rejection")
56+
57+
// Collision-in-time-range cuts
58+
EVSEL_FLAG(kNoCollInTimeRangeStandard, applyCollInTimeRangeStandard, false, kNoCollInTimeRangeStandard, setApplyCollInTimeRangeStandard, ApplyCollInTimeRangeStandard, "NoCollInTimeRangeStandard", "Apply NoCollInTimeRangeStandard")
59+
EVSEL_FLAG(kNoCollInTimeRangeNarrow, applyCollInTimeRangeNarrow, false, kNoCollInTimeRangeNarrow, setApplyCollInTimeRangeNarrow, ApplyCollInTimeRangeNarrow, "NoCollInTimeRangeNarrow", "Apply NoCollInTimeRangeNarrow")
60+
EVSEL_FLAG(kNoCollInTimeRangeStrict, applyCollInTimeRangeStrict, false, kNoCollInTimeRangeStrict, setApplyCollInTimeRangeStrict, ApplyCollInTimeRangeStrict, "NoCollInTimeRangeStrict", "No collisions in time range (strict)")
61+
62+
// Collision-in-ROF cuts
63+
EVSEL_FLAG(kNoCollInRofStandard, applyCollInRofStandard, false, kNoCollInRofStandard, setApplyCollInRofStandard, ApplyCollInRofStandard, "NoCollInRofStandard", "No high-mult collisions in this ROF")
64+
EVSEL_FLAG(kNoCollInRofStrict, applyCollInRofStrict, false, kNoCollInRofStrict, setApplyCollInRofStrict, ApplyCollInRofStrict, "NoCollInRofStrict", "No collisions in this ROF (strict)")
65+
EVSEL_FLAG(kNoHighMultCollInPrevRof, applyHighMultCollInPrevRof, false, kNoHighMultCollInPrevRof, setApplyHighMultCollInPrevRof, ApplyHighMultCollInPrevRof, "NoHighMultCollInPrevRof", "No high-mult collision in previous ROF")
66+
67+
// ITS layer quality
68+
EVSEL_FLAG(kIsGoodITSLayersAll, applyGoodITSLayersAll, false, kIsGoodITSLayersAll, setApplyGoodITSLayersAll, ApplyGoodITSLayersAll, "IsGoodITSLayersAll", "Apply GoodITSLayersAll")
69+
EVSEL_FLAG(kIsGoodITSLayer3, applyGoodITSLayer3, false, kIsGoodITSLayer3, setApplyGoodITSLayer3, ApplyGoodITSLayer3, "IsGoodITSLayer3", "Apply GoodITSLayer3")
70+
EVSEL_FLAG(kIsGoodITSLayer0123, applyGoodITSLayer0123, false, kIsGoodITSLayer0123, setApplyGoodITSLayer0123, ApplyGoodITSLayer0123, "IsGoodITSLayer0123", "Apply GoodITSLayer0123")
71+
72+
// Beam-beam timing
73+
EVSEL_FLAG(kIsBBT0A, applyBBT0A, false, kFlagBBT0A, setApplyBBT0A, ApplyBBT0A, "IsBBT0A", "T0A in beam-beam window")
74+
EVSEL_FLAG(kIsBBT0C, applyBBT0C, false, kFlagBBT0C, setApplyBBT0C, ApplyBBT0C, "IsBBT0C", "T0C in beam-beam window")
75+
76+
// Future flags can be easily added here, for example:
77+
// EVSEL_FLAG(kIsVertexTOFmatched, applyVertexTOFmatched, false, kFlagVertexTOFmatched, setApplyVertexTOFmatched, ApplyVertexTOFmatched, "IsVertexTOFmatched", "Apply vertex TOF matched")
78+
// EVSEL_FLAG(kNoCollInTimeRangeStrict, applyCollInTimeRangeStrict, false, kNoCollInTimeRangeStrict, setApplyCollInTimeRangeStrict, ApplyCollInTimeRangeStrict, "NoCollInTimeRangeStrict", "Apply NoCollInTimeRangeStrict")

0 commit comments

Comments
 (0)