Skip to content

Commit 3bb4b47

Browse files
committed
V0: add to mctrack study
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 7244623 commit 3bb4b47

File tree

6 files changed

+151
-80
lines changed

6 files changed

+151
-80
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ struct TrackMCStudyConfig : o2::conf::ConfigurableParamHelper<TrackMCStudyConfig
2222
float minPtMC = 0.05;
2323
float maxTglMC = 1.5;
2424
float maxRMC = 33.;
25+
float minRMC = 0.;
2526
float maxPosTglMC = 2.;
2627
float maxPVZOffset = 15.;
2728
float decayMotherMaxT = 1.0f; // max TOF in ns for mother particles to study
@@ -31,6 +32,7 @@ struct TrackMCStudyConfig : o2::conf::ConfigurableParamHelper<TrackMCStudyConfig
3132
float rejectClustersResStat = 0.;
3233
float maxTPCRefExtrap = 2; // max dX to extrapolate the track ref when extrapolating track true posions
3334
int decayPDG[5] = {310, 3122, 411, 421, -1}; // decays to study, must end by -1
35+
std::string mcParticleFilter; // only accept these mc particle (comma separated), leave empty to accetable all species
3436
O2ParamDef(TrackMCStudyConfig, "trmcconf");
3537
};
3638
} // namespace o2::trackstudy

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

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,27 @@
2121
#include "ReconstructionDataFormats/PrimaryVertex.h"
2222
#include <array>
2323
#include <vector>
24+
#include <bit>
2425

2526
namespace o2::trackstudy
2627
{
27-
struct MCTrackInfo {
2828

29-
inline float getMCTimeMUS() const { return bcInTF * o2::constants::lhc::LHCBunchSpacingMUS; }
30-
inline bool hasITSHitOnLr(int i) const { return (pattITSCl & ((0x1 << i) & 0x7f)) != 0; }
29+
struct ITSTrackInfo {
30+
inline bool hasITSHitOnLr(int i) const { return (pattClITS & ((0x1 << i) & 0x7f)) != 0; }
3131
int getNITSClusCont() const;
3232
int getNITSClusForAB() const;
3333
int getLowestITSLayer() const;
3434
int getHighestITSLayer() const;
35+
int getNITSClusTrackable() const noexcept { return std::popcount(pattClITS); }
36+
37+
uint8_t nClITS = 0;
38+
uint8_t pattClITS = 0;
39+
40+
ClassDefNV(ITSTrackInfo, 1);
41+
};
42+
43+
struct MCTrackInfo : public ITSTrackInfo {
44+
inline float getMCTimeMUS() const { return bcInTF * o2::constants::lhc::LHCBunchSpacingMUS; }
3545

3646
o2::track::TrackPar track{};
3747
o2::MCCompLabel label{};
@@ -41,21 +51,20 @@ struct MCTrackInfo {
4151
int pdg = 0;
4252
int pdgParent = 0;
4353
int parentEntry = -1;
44-
int16_t nTPCCl = 0;
45-
int16_t nTPCClShared = 0;
54+
uint16_t nTPCCl = 0;
55+
uint16_t nTPCClShared = 0;
4656
int8_t parentDecID = -1;
47-
uint8_t minTPCRow = -1;
48-
uint8_t maxTPCRow = 0;
57+
int8_t minTPCRow = -1;
58+
int8_t maxTPCRow = 0;
4959
uint8_t nUsedPadRows = 0;
5060
uint8_t maxTPCRowInner = 0; // highest row in the sector containing the lowest one
51-
uint8_t minTPCRowSect = -1;
52-
uint8_t maxTPCRowSect = -1;
53-
int8_t nITSCl = 0;
54-
int8_t pattITSCl = 0;
55-
ClassDefNV(MCTrackInfo, 4);
61+
int8_t minTPCRowSect = -1;
62+
int8_t maxTPCRowSect = -1;
63+
uint8_t nITSClInv = 0;
64+
ClassDefNV(MCTrackInfo, 5);
5665
};
5766

58-
struct RecTrack {
67+
struct RecTrack : public ITSTrackInfo {
5968
enum FakeFlag {
6069
FakeITS = 0x1 << 0,
6170
FakeTPC = 0x1 << 1,
@@ -71,9 +80,7 @@ struct RecTrack {
7180
o2::MCEventLabel pvLabel{};
7281
short pvID = -1;
7382
uint8_t flags = 0;
74-
uint8_t nClITS = 0;
7583
uint8_t nClTPC = 0;
76-
uint8_t pattITS = 0;
7784
int8_t lowestPadRow = -1;
7885

7986
bool isFakeGLO() const { return flags & FakeGLO; }
@@ -83,7 +90,7 @@ struct RecTrack {
8390
bool isFakeTOF() const { return flags & FakeTOF; }
8491
bool isFakeITSTPC() const { return flags & FakeITSTPC; }
8592

86-
ClassDefNV(RecTrack, 1);
93+
ClassDefNV(RecTrack, 2);
8794
};
8895

8996
struct TrackPairInfo {

Detectors/GlobalTrackingWorkflow/study/src/GlobalTrackingStudyLinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#pragma link C++ class std::vector < o2::trackstudy::RecTrack> + ;
2828
#pragma link C++ class o2::trackstudy::TrackFamily + ;
2929
#pragma link C++ class std::vector < o2::trackstudy::TrackFamily> + ;
30+
#pragma link C++ class o2::trackstudy::ITSTrackInfo + ;
3031
#pragma link C++ class o2::trackstudy::MCTrackInfo + ;
3132
#pragma link C++ class std::vector < o2::trackstudy::MCTrackInfo> + ;
3233
#pragma link C++ class o2::trackstudy::RecPV + ;

0 commit comments

Comments
 (0)