Skip to content

Commit d7dd067

Browse files
committed
fixes to the event selection
1 parent 4330ad0 commit d7dd067

28 files changed

+1343
-389
lines changed

PWGJE/Core/JetDerivedDataUtilities.h

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
/// \file JetDetivedDataUtilities.h
12+
/// \file JetDerivedDataUtilities.h
1313
/// \brief Jet derived data related utilities
1414
///
1515
/// \author Nima Zardoshti <nima.zardoshti@cern.ch>
@@ -54,16 +54,32 @@ enum JCollisionSubGeneratorId {
5454
};
5555

5656
template <typename T>
57-
bool selectCollision(T const& collision, const std::vector<int>& eventSelectionMaskBits, bool skipMBGapEvents = true, bool rctSelection = true, std::string rctLabel = "CBT_hadronPID", bool rejectLimitedAcceptanceRct = false, bool requireZDCRct = false)
57+
bool commonCollisionSelection(T const& collision, bool skipMBGapEvents = true, bool rctSelection = true, std::string rctLabel = "CBT_hadronPID", bool rejectLimitedAcceptanceRct = false, bool requireZDCRct = false)
5858
{
59-
if (skipMBGapEvents && collision.subGeneratorId() == JCollisionSubGeneratorId::mbGap) {
59+
if (skipMBGapEvents && collision.getSubGeneratorId() == JCollisionSubGeneratorId::mbGap) {
6060
return false;
6161
}
6262
o2::aod::rctsel::RCTFlagsChecker rctChecker;
6363
rctChecker.init(rctLabel, requireZDCRct, rejectLimitedAcceptanceRct);
6464
if (rctSelection && !rctChecker.checkTable(collision)) { // CBT_hadronPID given as default so that TOF is included in RCT selection to benefit from better timing for tracks. Impact of this for inclusive jets should be studied
6565
return false;
6666
}
67+
return true;
68+
}
69+
70+
template <typename T>
71+
bool selectMcCollision(T const& mcCollision, bool skipMBGapEvents = true, bool rctSelection = true, std::string rctLabel = "CBT_hadronPID", bool rejectLimitedAcceptanceRct = false, bool requireZDCRct = false)
72+
{
73+
return commonCollisionSelection(mcCollision, skipMBGapEvents, rctSelection, rctLabel, rejectLimitedAcceptanceRct, requireZDCRct);
74+
}
75+
76+
template <typename T>
77+
bool selectCollision(T const& collision, const std::vector<int>& eventSelectionMaskBits, bool skipMBGapEvents = true, bool rctSelection = true, std::string rctLabel = "CBT_hadronPID", bool rejectLimitedAcceptanceRct = false, bool requireZDCRct = false)
78+
{
79+
80+
if (!commonCollisionSelection(collision, skipMBGapEvents, rctSelection, rctLabel, rejectLimitedAcceptanceRct, requireZDCRct)) {
81+
return false;
82+
}
6783
if (eventSelectionMaskBits.size() == 0) {
6884
return true;
6985
}
@@ -648,7 +664,7 @@ float trackEnergy(T const& track, float mass = mPion)
648664
template <typename T>
649665
bool selectTrackDcaZ(T const& track, double dcaZmax = 99.)
650666
{
651-
return abs(track.dcaZ()) < dcaZmax;
667+
return std::abs(track.dcaZ()) < dcaZmax;
652668
}
653669

654670
} // namespace jetderiveddatautilities

PWGJE/DataModel/JetReducedData.h

Lines changed: 50 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ DECLARE_SOA_COLUMN(Timestamp, timestamp, uint64_t);
3939
DECLARE_SOA_BITMAP_COLUMN(Alias, alias, 32);
4040
DECLARE_SOA_BITMAP_COLUMN(Selection, selection, 64);
4141
DECLARE_SOA_BITMAP_COLUMN(Rct, rct, 32);
42-
DECLARE_SOA_COLUMN(ReadCounts, readCounts, std::vector<int>);
43-
DECLARE_SOA_COLUMN(ReadCountsWithTVX, readCountsWithTVX, std::vector<int>);
44-
DECLARE_SOA_COLUMN(ReadCountsWithTVXAndNoTFB, readCountsWithTVXAndNoTFB, std::vector<int>);
45-
DECLARE_SOA_COLUMN(ReadCountsWithTVXAndNoTFBAndNoITSROFB, readCountsWithTVXAndNoTFBAndNoITSROFB, std::vector<int>);
42+
DECLARE_SOA_COLUMN(Counts, counts, int);
43+
DECLARE_SOA_COLUMN(CountsWithTVX, countsWithTVX, int);
44+
DECLARE_SOA_COLUMN(CountsWithTVXAndNoTFB, countsWithTVXAndNoTFB, int);
45+
DECLARE_SOA_COLUMN(CountsWithTVXAndNoTFBAndNoITSROFB, countsWithTVXAndNoTFBAndNoITSROFB, int);
4646
} // namespace jbc
4747

4848
DECLARE_SOA_TABLE_STAGED(JBCs, "JBC",
@@ -61,10 +61,10 @@ DECLARE_SOA_TABLE_STAGED(JBCPIs, "JBCPI",
6161
jbc::BCId);
6262

6363
DECLARE_SOA_TABLE_STAGED(BCCounts, "BCCOUNT",
64-
jbc::ReadCounts,
65-
jbc::ReadCountsWithTVX,
66-
jbc::ReadCountsWithTVXAndNoTFB,
67-
jbc::ReadCountsWithTVXAndNoTFBAndNoITSROFB);
64+
jbc::Counts,
65+
jbc::CountsWithTVX,
66+
jbc::CountsWithTVXAndNoTFB,
67+
jbc::CountsWithTVXAndNoTFBAndNoITSROFB);
6868

6969
namespace jcollision
7070
{
@@ -90,7 +90,7 @@ DECLARE_SOA_COLUMN(CentFT0CVariant1, centFT0CVariant1, float);
9090
DECLARE_SOA_COLUMN(CentralityVariant1, centralityVariant1, float);
9191
DECLARE_SOA_COLUMN(HadronicRate, hadronicRate, float);
9292
DECLARE_SOA_COLUMN(Weight, weight, float);
93-
DECLARE_SOA_COLUMN(SubGeneratorId, subGeneratorId, int);
93+
DECLARE_SOA_COLUMN(GetSubGeneratorId, getSubGeneratorId, int);
9494
DECLARE_SOA_COLUMN(EventSel, eventSel, uint16_t);
9595
DECLARE_SOA_BITMAP_COLUMN(Alias, alias, 32);
9696
DECLARE_SOA_BITMAP_COLUMN(Rct, rct, 32);
@@ -99,19 +99,19 @@ DECLARE_SOA_COLUMN(TriggerSel, triggerSel, uint64_t);
9999
DECLARE_SOA_COLUMN(ChargedTriggerSel, chargedTriggerSel, uint8_t);
100100
DECLARE_SOA_COLUMN(FullTriggerSel, fullTriggerSel, uint32_t);
101101
DECLARE_SOA_COLUMN(ChargedHFTriggerSel, chargedHFTriggerSel, uint8_t);
102-
DECLARE_SOA_COLUMN(ReadCounts, readCounts, std::vector<int>);
103-
DECLARE_SOA_COLUMN(ReadCountsWithTVX, readCountsWithTVX, std::vector<int>);
104-
DECLARE_SOA_COLUMN(ReadCountsWithTVXAndZVertexAndSel8, readCountsWithTVXAndZVertexAndSel8, std::vector<int>);
105-
DECLARE_SOA_COLUMN(ReadCountsWithTVXAndZVertexAndSel8Full, readCountsWithTVXAndZVertexAndSel8Full, std::vector<int>);
106-
DECLARE_SOA_COLUMN(ReadCountsWithTVXAndZVertexAndSel8FullPbPb, readCountsWithTVXAndZVertexAndSel8FullPbPb, std::vector<int>);
107-
DECLARE_SOA_COLUMN(ReadCountsWithTVXAndZVertexAndSelMC, readCountsWithTVXAndZVertexAndSelMC, std::vector<int>);
108-
DECLARE_SOA_COLUMN(ReadCountsWithTVXAndZVertexAndSelMCFull, readCountsWithTVXAndZVertexAndSelMCFull, std::vector<int>);
109-
DECLARE_SOA_COLUMN(ReadCountsWithTVXAndZVertexAndSelMCFullPbPb, readCountsWithTVXAndZVertexAndSelMCFullPbPb, std::vector<int>);
110-
DECLARE_SOA_COLUMN(ReadCountsWithTVXAndZVertexAndSelUnanchoredMC, readCountsWithTVXAndZVertexAndSelUnanchoredMC, std::vector<int>);
111-
DECLARE_SOA_COLUMN(ReadCountsWithTVXAndZVertexAndSelTVX, readCountsWithTVXAndZVertexAndSelTVX, std::vector<int>);
112-
DECLARE_SOA_COLUMN(ReadCountsWithTVXAndZVertexAndSel7, readCountsWithTVXAndZVertexAndSel7, std::vector<int>);
113-
DECLARE_SOA_COLUMN(ReadCountsWithTVXAndZVertexAndSel7KINT7, readCountsWithTVXAndZVertexAndSel7KINT7, std::vector<int>);
114-
DECLARE_SOA_COLUMN(ReadCountsWithCustom, readCountsWithCustom, std::vector<int>);
102+
DECLARE_SOA_COLUMN(Counts, counts, int);
103+
DECLARE_SOA_COLUMN(CountsWithTVX, countsWithTVX, int);
104+
DECLARE_SOA_COLUMN(CountsWithTVXAndZVertexAndSel8, countsWithTVXAndZVertexAndSel8, int);
105+
DECLARE_SOA_COLUMN(CountsWithTVXAndZVertexAndSel8Full, countsWithTVXAndZVertexAndSel8Full, int);
106+
DECLARE_SOA_COLUMN(CountsWithTVXAndZVertexAndSel8FullPbPb, countsWithTVXAndZVertexAndSel8FullPbPb, int);
107+
DECLARE_SOA_COLUMN(CountsWithTVXAndZVertexAndSelMC, countsWithTVXAndZVertexAndSelMC, int);
108+
DECLARE_SOA_COLUMN(CountsWithTVXAndZVertexAndSelMCFull, countsWithTVXAndZVertexAndSelMCFull, int);
109+
DECLARE_SOA_COLUMN(CountsWithTVXAndZVertexAndSelMCFullPbPb, countsWithTVXAndZVertexAndSelMCFullPbPb, int);
110+
DECLARE_SOA_COLUMN(CountsWithTVXAndZVertexAndSelUnanchoredMC, countsWithTVXAndZVertexAndSelUnanchoredMC, int);
111+
DECLARE_SOA_COLUMN(CountsWithTVXAndZVertexAndSelTVX, countsWithTVXAndZVertexAndSelTVX, int);
112+
DECLARE_SOA_COLUMN(CountsWithTVXAndZVertexAndSel7, countsWithTVXAndZVertexAndSel7, int);
113+
DECLARE_SOA_COLUMN(CountsWithTVXAndZVertexAndSel7KINT7, countsWithTVXAndZVertexAndSel7KINT7, int);
114+
DECLARE_SOA_COLUMN(CountsWithCustomSelection, countsWithCustomSelection, int);
115115
DECLARE_SOA_COLUMN(IsAmbiguous, isAmbiguous, bool);
116116
DECLARE_SOA_COLUMN(IsEMCALReadout, isEmcalReadout, bool);
117117
DECLARE_SOA_COLUMN(IsOutlier, isOutlier, bool);
@@ -146,7 +146,7 @@ using StoredJCollision = StoredJCollisions::iterator;
146146

147147
DECLARE_SOA_TABLE_STAGED(JCollisionMcInfos, "JCOLLISIONMCINFO",
148148
jcollision::Weight,
149-
jcollision::SubGeneratorId);
149+
jcollision::GetSubGeneratorId);
150150

151151
DECLARE_SOA_TABLE_STAGED(JCollisionOutliers, "JCOLLISIONOUTLR",
152152
jcollision::IsOutlier);
@@ -173,19 +173,19 @@ DECLARE_SOA_TABLE(JChHFTrigSels, "AOD", "JCHHFTRIGSEL",
173173
jcollision::ChargedHFTriggerSel);
174174

175175
DECLARE_SOA_TABLE_STAGED(CollisionCounts, "COLLCOUNT",
176-
jcollision::ReadCounts,
177-
jcollision::ReadCountsWithTVX,
178-
jcollision::ReadCountsWithTVXAndZVertexAndSel8,
179-
jcollision::ReadCountsWithTVXAndZVertexAndSel8Full,
180-
jcollision::ReadCountsWithTVXAndZVertexAndSel8FullPbPb,
181-
jcollision::ReadCountsWithTVXAndZVertexAndSelMC,
182-
jcollision::ReadCountsWithTVXAndZVertexAndSelMCFull,
183-
jcollision::ReadCountsWithTVXAndZVertexAndSelMCFullPbPb,
184-
jcollision::ReadCountsWithTVXAndZVertexAndSelUnanchoredMC,
185-
jcollision::ReadCountsWithTVXAndZVertexAndSelTVX,
186-
jcollision::ReadCountsWithTVXAndZVertexAndSel7,
187-
jcollision::ReadCountsWithTVXAndZVertexAndSel7KINT7,
188-
jcollision::ReadCountsWithCustom);
176+
jcollision::Counts,
177+
jcollision::CountsWithTVX,
178+
jcollision::CountsWithTVXAndZVertexAndSel8,
179+
jcollision::CountsWithTVXAndZVertexAndSel8Full,
180+
jcollision::CountsWithTVXAndZVertexAndSel8FullPbPb,
181+
jcollision::CountsWithTVXAndZVertexAndSelMC,
182+
jcollision::CountsWithTVXAndZVertexAndSelMCFull,
183+
jcollision::CountsWithTVXAndZVertexAndSelMCFullPbPb,
184+
jcollision::CountsWithTVXAndZVertexAndSelUnanchoredMC,
185+
jcollision::CountsWithTVXAndZVertexAndSelTVX,
186+
jcollision::CountsWithTVXAndZVertexAndSel7,
187+
jcollision::CountsWithTVXAndZVertexAndSel7KINT7,
188+
jcollision::CountsWithCustomSelection);
189189

190190
namespace jmccollision
191191
{
@@ -198,13 +198,19 @@ DECLARE_SOA_COLUMN(MultFT0A, multFT0A, float);
198198
DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float);
199199
DECLARE_SOA_COLUMN(CentFT0M, centFT0M, float);
200200
DECLARE_SOA_COLUMN(Weight, weight, float);
201-
DECLARE_SOA_COLUMN(SubGeneratorId, subGeneratorId, int);
202201
DECLARE_SOA_COLUMN(Accepted, accepted, uint64_t);
203202
DECLARE_SOA_COLUMN(Attempted, attempted, uint64_t);
204203
DECLARE_SOA_COLUMN(XsectGen, xsectGen, float);
205204
DECLARE_SOA_COLUMN(XsectErr, xsectErr, float);
206205
DECLARE_SOA_COLUMN(PtHard, ptHard, float);
207206
DECLARE_SOA_COLUMN(IsOutlier, isOutlier, bool);
207+
DECLARE_SOA_BITMAP_COLUMN(Rct, rct, 32);
208+
DECLARE_SOA_COLUMN(GetGeneratorId, getGeneratorId, int);
209+
DECLARE_SOA_COLUMN(GetSubGeneratorId, getSubGeneratorId, int);
210+
DECLARE_SOA_COLUMN(GetSourceId, getSourceId, int);
211+
DECLARE_SOA_COLUMN(ImpactParameter, impactParameter, float);
212+
DECLARE_SOA_COLUMN(EventPlaneAngle, eventPlaneAngle, float);
213+
208214
} // namespace jmccollision
209215
DECLARE_SOA_TABLE_STAGED(JMcCollisions, "JMCCOLLISION",
210216
o2::soa::Index<>,
@@ -216,12 +222,17 @@ DECLARE_SOA_TABLE_STAGED(JMcCollisions, "JMCCOLLISION",
216222
jmccollision::MultFT0C,
217223
jmccollision::CentFT0M,
218224
jmccollision::Weight,
219-
jmccollision::SubGeneratorId,
220225
jmccollision::Accepted,
221226
jmccollision::Attempted,
222227
jmccollision::XsectGen,
223228
jmccollision::XsectErr,
224-
jmccollision::PtHard);
229+
jmccollision::PtHard,
230+
jmccollision::Rct,
231+
jmccollision::GetGeneratorId,
232+
jmccollision::GetSubGeneratorId,
233+
jmccollision::GetSourceId,
234+
jmccollision::ImpactParameter,
235+
jmccollision::EventPlaneAngle);
225236

226237
using JMcCollision = JMcCollisions::iterator;
227238
using StoredJMcCollision = StoredJMcCollisions::iterator;

0 commit comments

Comments
 (0)