-
Notifications
You must be signed in to change notification settings - Fork 621
[PWGLF,Tutorial] Add CollisionCutsGroup utility class with automatic configurable registration #14362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
BongHwi
merged 12 commits into
AliceO2Group:master
from
BongHwi:lf-util-collisioncut-dev
Jan 3, 2026
+730
−72
Merged
[PWGLF,Tutorial] Add CollisionCutsGroup utility class with automatic configurable registration #14362
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3e4ca78
Update the collision cut class
BongHwi 066bb38
modift readme
BongHwi 0291b48
Please consider the following formatting changes
alibuild 8868390
Merge pull request #38 from alibuild/alibot-cleanup-14362
BongHwi 88a53de
update file name
BongHwi c3a5609
Please consider the following formatting changes
alibuild 81dfc1f
Merge pull request #39 from alibuild/alibot-cleanup-14362
BongHwi 258a242
update linter avoid for inteded include
BongHwi 8a6fbbc
Please consider the following formatting changes
alibuild c1bed77
Merge pull request #40 from alibuild/alibot-cleanup-14362
BongHwi f5041cf
MegaLinter fixes
alibuild e35194c
Merge pull request #41 from alibuild/alibot-cleanup-ml-14362
BongHwi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| // Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| // All rights not expressly granted are reserved. | ||
| // | ||
| // This software is distributed under the terms of the GNU General Public | ||
| // License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // In applying this license CERN does not waive the privileges and immunities | ||
| // granted to it by virtue of its status as an Intergovernmental Organization | ||
| // or submit itself to any jurisdiction. | ||
|
|
||
| /// \file EventSelectionFlagsMapping.def | ||
| /// \brief X-macro mapping between EventSelectionFlags and collisionCutsGroup | ||
| /// | ||
| /// This file defines the canonical mapping between o2::aod::evsel::EventSelectionFlags | ||
| /// enum values and collisionCutsGroup boolean member variables. It is used via X-macros | ||
| /// to auto-generate member declarations, getters, setters, initialization, and metadata. | ||
| /// | ||
| /// IMPORTANT: This file should NOT have include guards as it is included multiple times | ||
| /// with different EVSEL_FLAG macro definitions. | ||
| /// | ||
| /// Format: EVSEL_FLAG(enumValue, memberName, defaultValue, evtSelEnum, setterName, getterName, label, description) | ||
| /// | ||
| /// Parameters: | ||
| /// enumValue - EventSelectionFlags enum (e.g., kIsTriggerTVX) | ||
| /// memberName - collisionCutsGroup bool member variable name | ||
| /// defaultValue - Default value (true/false) in constructor | ||
| /// evtSelEnum - CollisonCuts::EvtSel enum value for histogram binning | ||
| /// setterName - CollisonCuts setter method name | ||
| /// getterName - collisionCutsGroup getter method name suffix (without 'get') | ||
| /// label - Histogram axis label (short, no spaces) | ||
| /// description - Human-readable description | ||
| /// | ||
| /// To add a new event selection flag: | ||
| /// 1. Add a new EVSEL_FLAG line below following the format | ||
| /// 2. Ensure the EvtSel enum in collisionCuts.h has corresponding entry | ||
| /// 3. Ensure the setter method exists in CollisonCuts class | ||
| /// 4. Rebuild - all getters, members, logging, and metadata are auto-generated | ||
| /// | ||
| /// \author Bong-Hwi Lim <[email protected]> | ||
|
|
||
| // Trigger selection | ||
| EVSEL_FLAG(kIsTriggerTVX, triggerTVXSel, false, kFlagTrigerTVX, setTriggerTVX, TriggerTVXSel, "IsTriggerTVX", "Trigger TVX selection") | ||
|
|
||
| // Time frame and readout frame borders | ||
| EVSEL_FLAG(kNoTimeFrameBorder, applyTFBorderCut, false, kFlagTimeFrameBorder, setApplyTFBorderCut, ApplyTFBorderCut, "NoTimeFrameBorder", "Apply TF border cut") | ||
| EVSEL_FLAG(kNoITSROFrameBorder, applyNoITSROBorderCut, false, kFlagITSROFrameBorder, setApplyNoITSROBorderCut, ApplyNoITSROBorderCut, "NoITSROFrameBorder", "Apply NoITSRO frame border cut") | ||
|
|
||
| // Vertex quality | ||
| EVSEL_FLAG(kIsVertexITSTPC, applyITSTPCvertex, false, kFlagVertexITSTPC, setApplyITSTPCvertex, ApplyITSTPCvertex, "IsVertexITSTPC", "Apply ITS-TPC vertex") | ||
| EVSEL_FLAG(kIsGoodZvtxFT0vsPV, applyZvertexTimedifference, false, kFlagZvtxFT0vsPV, setApplyZvertexTimedifference, ApplyZvertexTimedifference, "IsGoodZvtxFT0vsPV", "Apply Z-vertex time difference") | ||
| EVSEL_FLAG(kIsVertexTRDmatched, applyVertexTRDmatched, false, kFlagVertexTRDmatched, setApplyVertexTRDmatched, ApplyVertexTRDmatched, "IsVertexTRDmatched", "Vertex has TRD-matched track") | ||
|
|
||
| // Pileup rejection | ||
| EVSEL_FLAG(kNoSameBunchPileup, applyPileupRejection, false, kFlagBunchPileup, setApplyPileupRejection, ApplyPileupRejection, "NoSameBunchPileup", "Apply Pileup rejection") | ||
|
|
||
| // Collision-in-time-range cuts | ||
| EVSEL_FLAG(kNoCollInTimeRangeStandard, applyCollInTimeRangeStandard, false, kNoCollInTimeRangeStandard, setApplyCollInTimeRangeStandard, ApplyCollInTimeRangeStandard, "NoCollInTimeRangeStandard", "Apply NoCollInTimeRangeStandard") | ||
| EVSEL_FLAG(kNoCollInTimeRangeNarrow, applyCollInTimeRangeNarrow, false, kNoCollInTimeRangeNarrow, setApplyCollInTimeRangeNarrow, ApplyCollInTimeRangeNarrow, "NoCollInTimeRangeNarrow", "Apply NoCollInTimeRangeNarrow") | ||
| EVSEL_FLAG(kNoCollInTimeRangeStrict, applyCollInTimeRangeStrict, false, kNoCollInTimeRangeStrict, setApplyCollInTimeRangeStrict, ApplyCollInTimeRangeStrict, "NoCollInTimeRangeStrict", "No collisions in time range (strict)") | ||
|
|
||
| // Collision-in-ROF cuts | ||
| EVSEL_FLAG(kNoCollInRofStandard, applyCollInRofStandard, false, kNoCollInRofStandard, setApplyCollInRofStandard, ApplyCollInRofStandard, "NoCollInRofStandard", "No high-mult collisions in this ROF") | ||
| EVSEL_FLAG(kNoCollInRofStrict, applyCollInRofStrict, false, kNoCollInRofStrict, setApplyCollInRofStrict, ApplyCollInRofStrict, "NoCollInRofStrict", "No collisions in this ROF (strict)") | ||
| EVSEL_FLAG(kNoHighMultCollInPrevRof, applyHighMultCollInPrevRof, false, kNoHighMultCollInPrevRof, setApplyHighMultCollInPrevRof, ApplyHighMultCollInPrevRof, "NoHighMultCollInPrevRof", "No high-mult collision in previous ROF") | ||
|
|
||
| // ITS layer quality | ||
| EVSEL_FLAG(kIsGoodITSLayersAll, applyGoodITSLayersAll, false, kIsGoodITSLayersAll, setApplyGoodITSLayersAll, ApplyGoodITSLayersAll, "IsGoodITSLayersAll", "Apply GoodITSLayersAll") | ||
| EVSEL_FLAG(kIsGoodITSLayer3, applyGoodITSLayer3, false, kIsGoodITSLayer3, setApplyGoodITSLayer3, ApplyGoodITSLayer3, "IsGoodITSLayer3", "Apply GoodITSLayer3") | ||
| EVSEL_FLAG(kIsGoodITSLayer0123, applyGoodITSLayer0123, false, kIsGoodITSLayer0123, setApplyGoodITSLayer0123, ApplyGoodITSLayer0123, "IsGoodITSLayer0123", "Apply GoodITSLayer0123") | ||
|
|
||
| // Beam-beam timing | ||
| EVSEL_FLAG(kIsBBT0A, applyBBT0A, false, kFlagBBT0A, setApplyBBT0A, ApplyBBT0A, "IsBBT0A", "T0A in beam-beam window") | ||
| EVSEL_FLAG(kIsBBT0C, applyBBT0C, false, kFlagBBT0C, setApplyBBT0C, ApplyBBT0C, "IsBBT0C", "T0C in beam-beam window") | ||
|
|
||
| // Future flags can be easily added here, for example: | ||
| // EVSEL_FLAG(kIsVertexTOFmatched, applyVertexTOFmatched, false, kFlagVertexTOFmatched, setApplyVertexTOFmatched, ApplyVertexTOFmatched, "IsVertexTOFmatched", "Apply vertex TOF matched") | ||
| // EVSEL_FLAG(kNoCollInTimeRangeStrict, applyCollInTimeRangeStrict, false, kNoCollInTimeRangeStrict, setApplyCollInTimeRangeStrict, ApplyCollInTimeRangeStrict, "NoCollInTimeRangeStrict", "Apply NoCollInTimeRangeStrict") |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the type of this file? Why does it have a
defextension?