Skip to content

Commit 6f2520d

Browse files
committed
Study: add v0 mc
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 42c3bc9 commit 6f2520d

File tree

6 files changed

+692
-1
lines changed

6 files changed

+692
-1
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: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define ALICEO2_V0EXT_H
1616

1717
#include "ReconstructionDataFormats/V0.h"
18-
#include "SimulationDataFormat/MCCompLabel.h"
18+
#include "SimulationDataFormat/MCTrack.h"
1919

2020
namespace o2::dataformats
2121
{
@@ -44,6 +44,30 @@ struct V0Ext {
4444
ClassDefNV(V0Ext, 2);
4545
};
4646

47+
enum PoolInfo : uint8_t {
48+
Unset = (1 << 0),
49+
Considered = (1 << 1), // considered (should be all not unassigned?)
50+
Accepted = (1 << 2), // accepted into pool
51+
Unassigned = (1 << 3), // tracks that were not assigned to a collision
52+
};
53+
struct ProngMCInfoExt {
54+
detectors::DetID::mask_t recoMask; // detector mask
55+
o2::track::TrackPar trk; // most global reco'd track
56+
MCTrack mcTrk;
57+
uint8_t poolStatus = PoolInfo::Unset;
58+
ClassDefNV(ProngMCInfoExt, 1);
59+
};
60+
61+
struct V0MCExt {
62+
V0 v0; // reconstructed v0
63+
MCTrack mcTrk;
64+
std::array<ProngMCInfoExt, 2> prInfo{};
65+
const ProngMCInfoExt& getPrInfo(int i) const { return prInfo[i]; }
66+
bool hasBothProngs() const noexcept { return prInfo[0].recoMask.any() && prInfo[1].recoMask.any(); }
67+
68+
ClassDefNV(V0MCExt, 1);
69+
};
70+
4771
} // namespace o2::dataformats
4872

4973
#endif

Detectors/GlobalTrackingWorkflow/study/src/GlobalTrackingStudyLinkDef.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
#pragma link off all functions;
1717

1818
#pragma link C++ class o2::dataformats::ProngInfoExt + ;
19+
#pragma link C++ class o2::dataformats::ProngMCInfoExt + ;
1920
#pragma link C++ class o2::dataformats::V0Ext + ;
21+
#pragma link C++ class o2::dataformats::V0MCExt + ;
2022
#pragma link C++ class o2::dataformats::TrackInfoExt + ;
2123
#pragma link C++ class std::vector < o2::dataformats::TrackInfoExt> + ;
2224
#pragma link C++ class std::vector < o2::dataformats::ProngInfoExt> + ;

0 commit comments

Comments
 (0)