Skip to content

Commit c7d5036

Browse files
committed
Study: add v0 mc
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 910fc5e commit c7d5036

File tree

7 files changed

+1694
-0
lines changed

7 files changed

+1694
-0
lines changed

Detectors/GlobalTrackingWorkflow/study/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ o2_add_library(GlobalTrackingStudy
1616
SOURCES src/TPCTrackStudy.cxx
1717
src/TrackingStudy.cxx
1818
src/SVStudy.cxx
19+
src/SVMCStudy.cxx
1920
src/TrackMCStudy.cxx
2021
src/TPCDataFilter.cxx
2122
src/ITSOffsStudy.cxx
@@ -50,6 +51,11 @@ o2_add_executable(study-workflow
5051
SOURCES src/sv-study-workflow.cxx
5152
PUBLIC_LINK_LIBRARIES O2::GlobalTrackingStudy)
5253

54+
o2_add_executable(study-workflow
55+
COMPONENT_NAME sv-mc
56+
SOURCES src/sv-mc-study-workflow.cxx
57+
PUBLIC_LINK_LIBRARIES O2::GlobalTrackingStudy)
58+
5359
o2_add_executable(study-workflow
5460
COMPONENT_NAME tpc-track
5561
SOURCES src/tpc-track-study-workflow.cxx
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
#ifndef O2_SV_GAMMA_STUDY_H
13+
#define O2_SV_GAMMA_STUDY_H
14+
15+
#include "ReconstructionDataFormats/GlobalTrackID.h"
16+
#include "Framework/DataProcessorSpec.h"
17+
#include "TPCCalibration/CorrectionMapsLoader.h"
18+
19+
namespace o2::svstudy
20+
{
21+
22+
o2::framework::DataProcessorSpec getSVMCStudySpec(o2::dataformats::GlobalTrackID::mask_t srcTracks, o2::dataformats::GlobalTrackID::mask_t srcCls, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts);
23+
24+
} // namespace o2::svstudy
25+
26+
#endif

Detectors/GlobalTrackingWorkflow/study/include/GlobalTrackingStudy/V0Ext.h

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
#define ALICEO2_V0EXT_H
1616

1717
#include "ReconstructionDataFormats/V0.h"
18+
#include "ReconstructionDataFormats/PrimaryVertex.h"
1819
#include "SimulationDataFormat/MCCompLabel.h"
20+
#include "SimulationDataFormat/MCTrack.h"
1921

2022
namespace o2::dataformats
2123
{
@@ -44,6 +46,69 @@ struct V0Ext {
4446
ClassDefNV(V0Ext, 2);
4547
};
4648

49+
// Ordered enum: higher value = got further in the selection.
50+
// Use max-assign semantics so the deepest-reached stage is always recorded.
51+
enum PoolInfo : uint8_t {
52+
Unset = 0, // not yet processed
53+
Unassigned, // seen only in unassigned-track bucket (no collision match)
54+
Considered, // seen in vertex-associated loop
55+
RejTPCMaxX, // processTPCTrack: X position cut
56+
RejTPCCorr, // processTPCTrack: drift correction failed
57+
RejTPCPhotonCls, // processTPCTrack: photon-tune min TPC clusters
58+
RejTPCPhotonDPV, // processTPCTrack: photon-tune z-to-beam cut
59+
RejTPCPhotonRD2, // processTPCTrack: photon-tune transverse radius cut
60+
RejPVContrib, // acceptTrack: PV contributor cut
61+
RejDCAToPV, // acceptTrack: DCA to PV too small
62+
RejShortITS, // buildT2V: short ITS-only track
63+
Accepted, // entered the track pool
64+
};
65+
struct ProngMCInfoExt {
66+
detectors::DetID::mask_t recoMask; // detector mask
67+
o2::track::TrackPar trk; // most global reco'd track
68+
MCTrack mcTrk;
69+
PoolInfo poolStatus = PoolInfo::Unset;
70+
ClassDefNV(ProngMCInfoExt, 1);
71+
};
72+
73+
struct V0MCExt {
74+
V0 v0; // reconstructed v0
75+
MCTrack mcTrk;
76+
std::array<ProngMCInfoExt, 2> prInfo{};
77+
const ProngMCInfoExt& getPrInfo(int i) const { return prInfo[i]; }
78+
bool hasBothProngs() const noexcept { return prInfo[0].recoMask.any() && prInfo[1].recoMask.any(); }
79+
enum PairStatus : uint8_t {
80+
Unpaired = 0, // never reached pair loop
81+
NoOverlap, // bracket overlap check failed
82+
MaxPV, // PV contributor cut
83+
// checkV0 rejections, ordered by depth in the function:
84+
RejTgl, // |tgl_pos - tgl_neg| too large (TPC photon tune)
85+
RejD2R, // circle center distance vs radii sum (TPC photon tune)
86+
RejDR, // estimated conversion radius too large (TPC photon tune)
87+
RejDCAFitter, // DCAFitter found no candidate
88+
RejMinR, // V0 radius too close to beam line
89+
RejCausality, // causality check (V0 radius vs track inner radius)
90+
RejPropagation, // propagation to PCA failed
91+
RejPt, // V0 pT too low
92+
RejTgLambda, // V0 tgLambda too large
93+
RejHypothesis, // no mass hypothesis matched
94+
RejDCAToMV, // DCA or cosPAXY to mean vertex failed
95+
RejCosPA, // no PV passed cosPA cut
96+
Found, // reconstructed V0 added to output
97+
};
98+
PairStatus pairStatus = Unpaired;
99+
100+
ClassDefNV(V0MCExt, 1);
101+
};
102+
103+
struct V0MCFull {
104+
V0 v0;
105+
std::array<bool, 8> hypStatus{};
106+
int pdg = -1;
107+
o2::MCCompLabel label;
108+
109+
ClassDefNV(V0MCFull, 1);
110+
};
111+
47112
} // namespace o2::dataformats
48113

49114
#endif

0 commit comments

Comments
 (0)