Skip to content

Commit 8e069e5

Browse files
committed
Follow MC single track and decays reco status
1 parent 32159e7 commit 8e069e5

File tree

9 files changed

+543
-228
lines changed

9 files changed

+543
-228
lines changed

Detectors/GlobalTrackingWorkflow/study/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
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-
# add_compile_options(-O0 -g -fPIC)
12+
add_compile_options(-O0 -g -fPIC)
1313

1414
o2_add_library(GlobalTrackingStudy
1515
SOURCES src/TPCTrackStudy.cxx
@@ -21,6 +21,8 @@ o2_add_library(GlobalTrackingStudy
2121
src/DumpTracks.cxx
2222
src/V0Ext.cxx
2323
src/TrackInfoExt.cxx
24+
src/TrackMCStudyConfig.cxx
25+
src/TrackMCStudyTypes.cxx
2426
PUBLIC_LINK_LIBRARIES O2::GlobalTracking
2527
O2::GlobalTrackingWorkflowReaders
2628
O2::GlobalTrackingWorkflowHelpers
@@ -33,6 +35,8 @@ o2_target_root_dictionary(
3335
GlobalTrackingStudy
3436
HEADERS include/GlobalTrackingStudy/V0Ext.h
3537
include/GlobalTrackingStudy/TrackInfoExt.h
38+
include/GlobalTrackingStudy/TrackMCStudyConfig.h
39+
include/GlobalTrackingStudy/TrackMCStudyTypes.h
3640
)
3741

3842
o2_add_executable(study-workflow

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@
1212
#ifndef O2_TRACKING_STUDY_H
1313
#define O2_TRACKING_STUDY_H
1414

15-
#include "ReconstructionDataFormats/GlobalTrackID.h"
16-
#include "Framework/Task.h"
1715
#include "Framework/DataProcessorSpec.h"
18-
#include "ReconstructionDataFormats/Track.h"
19-
#include "MathUtils/detail/Bracket.h"
20-
#include "DataFormatsTPC/ClusterNative.h"
16+
#include "Framework/Task.h"
17+
#include "ReconstructionDataFormats/GlobalTrackID.h"
2118

2219
namespace o2::trackstudy
2320
{
21+
2422
/// create a processor spec
25-
o2::framework::DataProcessorSpec getTrackMCStudySpec(o2::dataformats::GlobalTrackID::mask_t srcTracks, o2::dataformats::GlobalTrackID::mask_t srcClus, bool checkMatching);
23+
o2::framework::DataProcessorSpec getTrackMCStudySpec(o2::dataformats::GlobalTrackID::mask_t srcTracks, o2::dataformats::GlobalTrackID::mask_t srcClus);
2624

2725
} // namespace o2::trackstudy
2826

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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_TRACKING_STUDY_CONFIG_H
13+
#define O2_TRACKING_STUDY_CONFIG_H
14+
#include "CommonUtils/ConfigurableParam.h"
15+
#include "CommonUtils/ConfigurableParamHelper.h"
16+
17+
namespace o2::trackstudy
18+
{
19+
struct TrackMCStudyConfig : o2::conf::ConfigurableParamHelper<TrackMCStudyConfig> {
20+
float minPt = 0.05;
21+
float maxTgl = 1.2;
22+
float minPtMC = 0.05;
23+
float maxTglMC = 1.2;
24+
float minRMC = 33.;
25+
float maxPosTglMC = 2.;
26+
float maxPVZOffset = 15.;
27+
float decayMotherMaxT = 0.1; // max TOF in ns for mother particles to study
28+
bool requireITSorTPCTrackRefs = true;
29+
int decayPDG[5] = {310, 3122, -1, -1, -1}; // decays to study, must end by -1
30+
O2ParamDef(TrackMCStudyConfig, "trmcconf");
31+
};
32+
} // namespace o2::trackstudy
33+
34+
#endif
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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_TRACKING_STUDY_TYPES_H
13+
#define O2_TRACKING_STUDY_TYPES_H
14+
#include "ReconstructionDataFormats/GlobalTrackID.h"
15+
#include "ReconstructionDataFormats/VtxTrackIndex.h"
16+
#include "ReconstructionDataFormats/Track.h"
17+
#include "SimulationDataFormat/MCCompLabel.h"
18+
#include "Framework/Task.h"
19+
20+
namespace o2::trackstudy
21+
{
22+
struct MCTrackInfo {
23+
o2::track::TrackPar track{};
24+
o2::MCCompLabel label{};
25+
float occTPC = -1.f;
26+
int bcInTF = -1;
27+
int pdg = 0;
28+
int pdgParent = 0;
29+
int16_t nTPCCl = 0;
30+
int16_t nTPCClShared = 0;
31+
uint8_t minTPCRow = -1;
32+
uint8_t maxTPCRow = 0;
33+
int8_t nITSCl = 0;
34+
int8_t pattITSCl = 0;
35+
ClassDefNV(MCTrackInfo, 1);
36+
};
37+
38+
struct RecTrack {
39+
o2::track::TrackParCov track{};
40+
o2::dataformats::VtxTrackIndex gid{};
41+
uint8_t nClITS = 0;
42+
uint8_t nClTPC = 0;
43+
uint8_t pattITS = 0;
44+
int8_t lowestPadRow = -1;
45+
bool isFake = false;
46+
ClassDefNV(RecTrack, 1);
47+
};
48+
49+
struct TrackFamily { // set of tracks related to the same MC label
50+
MCTrackInfo mcTrackInfo{};
51+
std::vector<RecTrack> recTracks{};
52+
int8_t entITS = -1;
53+
int8_t entTPC = -1;
54+
int8_t entITSTPC = -1;
55+
bool contains(const o2::dataformats::VtxTrackIndex& ref) const
56+
{
57+
for (const auto& tr : recTracks) {
58+
if (ref == tr.gid) {
59+
return true;
60+
}
61+
}
62+
return false;
63+
}
64+
65+
ClassDefNV(TrackFamily, 1);
66+
};
67+
} // namespace o2::trackstudy
68+
#endif

Detectors/GlobalTrackingWorkflow/study/src/GlobalTrackingStudyLinkDef.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,12 @@
2121
#pragma link C++ class std::vector < o2::dataformats::TrackInfoExt> + ;
2222
#pragma link C++ class std::vector < o2::dataformats::ProngInfoExt> + ;
2323
#pragma link C++ class std::vector < o2::dataformats::V0Ext> + ;
24-
24+
#pragma link C++ class o2::trackstudy::TrackMCStudyConfig + ;
25+
#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::trackstudy::TrackMCStudyConfig> + ;
26+
#pragma link C++ class o2::trackstudy::RecTrack + ;
27+
#pragma link C++ class std::vector < o2::trackstudy::RecTrack> + ;
28+
#pragma link C++ class o2::trackstudy::TrackFamily + ;
29+
#pragma link C++ class std::vector < o2::trackstudy::TrackFamily> + ;
30+
#pragma link C++ class o2::trackstudy::MCTrackInfo + ;
31+
#pragma link C++ class std::vector < o2::trackstudy::MCTrackInfo> + ;
2532
#endif

0 commit comments

Comments
 (0)