Skip to content

Commit c8bf5f2

Browse files
iarseneIonut Cristian Arsene
andauthored
[PWG-DQ] Adding MC workflows which consider track-collision associations (#6495)
* adding MC workflows which consider track-collision association * modified MC workflows to fix run time errors and optimizations Co-authored-by: Ionut Cristian Arsene <iarsene@cern.ch>
1 parent bb9d285 commit c8bf5f2

6 files changed

Lines changed: 3363 additions & 58 deletions

File tree

PWGDQ/Core/HistogramsLibrary.cxx

Lines changed: 89 additions & 58 deletions
Large diffs are not rendered by default.

PWGDQ/Core/VarManager.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,8 @@ class VarManager : public TObject
488488
kMftNClusters,
489489
kMftClusterSize,
490490
kMftMeanClusterSize,
491+
kMuonNAssocsInBunch,
492+
kMuonNAssocsOutOfBunch,
491493
kNMuonTrackVariables,
492494

493495
// MC particle variables
@@ -843,6 +845,8 @@ class VarManager : public TObject
843845
static void FillMuonPDca(const T& muon, const C& collision, float* values = nullptr);
844846
template <uint32_t fillMap, typename T, typename C>
845847
static void FillPropagateMuon(const T& muon, const C& collision, float* values = nullptr);
848+
template <typename T>
849+
static void FillBC(T const& bc, float* values = nullptr);
846850
template <uint32_t fillMap, typename T>
847851
static void FillEvent(T const& event, float* values = nullptr);
848852
template <typename T>
@@ -1198,6 +1202,19 @@ void VarManager::FillPropagateMuon(const T& muon, const C& collision, float* val
11981202
}
11991203
}
12001204

1205+
template <typename T>
1206+
void VarManager::FillBC(T const& bc, float* values)
1207+
{
1208+
if (!values) {
1209+
values = fgValues;
1210+
}
1211+
values[VarManager::kRunNo] = bc.runNumber();
1212+
values[VarManager::kBC] = bc.globalBC();
1213+
values[kBCOrbit] = bc.globalBC() % o2::constants::lhc::LHCMaxBunches;
1214+
values[VarManager::kTimestamp] = bc.timestamp();
1215+
values[VarManager::kRunIndex] = GetRunIndex(bc.runNumber());
1216+
}
1217+
12011218
template <uint32_t fillMap, typename T>
12021219
void VarManager::FillEvent(T const& event, float* values)
12031220
{

PWGDQ/TableProducer/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ o2physics_add_dpl_workflow(table-maker-mc
2424
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase O2Physics::AnalysisCCDB O2Physics::PWGDQCore
2525
COMPONENT_NAME Analysis)
2626

27+
o2physics_add_dpl_workflow(table-maker-mc-with-assoc
28+
SOURCES tableMakerMC_withAssoc.cxx
29+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase O2Physics::AnalysisCCDB O2Physics::PWGDQCore
30+
COMPONENT_NAME Analysis)
31+
2732
o2physics_add_dpl_workflow(table-maker-jpsi-hf
2833
SOURCES tableMakerJpsiHf.cxx
2934
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGDQCore KFParticle::KFParticle

0 commit comments

Comments
 (0)