CbmRoot
Simple/LxTrackAna.h
Go to the documentation of this file.
1 #ifndef LXTRACKANA_INCLUDED
2 #define LXTRACKANA_INCLUDED
3 
4 #pragma GCC diagnostic ignored "-Weffc++"
5 
6 #include "CbmMuchPixelHit.h"
7 #include "FairTask.h"
8 #include "LxSettings.h"
9 #include "LxTrackAnaSegments.h"
10 #include "TClonesArray.h"
11 #include <list>
12 #include <vector>
13 
14 struct LxSimplePoint {
20  LxSimplePoint() : x(0), y(0), z(0), tx(0), ty(0) {}
22  : x(X), y(Y), z(Z), tx(Tx), ty(Ty) {}
23 };
24 
25 struct LxSimpleTrack {
26  Int_t pdgCode;
27  Int_t motherId;
35  LxSimpleTrack(Int_t pdgc,
36  Int_t mid,
37  scaltype P,
38  scaltype Pt,
39  scaltype Px,
40  scaltype Py,
41  scaltype Pz,
42  scaltype E)
43  : pdgCode(pdgc)
44  , motherId(mid)
45  , p(P)
46  , pt(Pt)
47  , px(Px)
48  , py(Py)
49  , pz(Pz)
50  , e(E)
51  , charge(0)
52  , linkedMuchTrack(0, 0)
53  , linkedStsTrack(0) {}
54  std::list<LxSimplePoint> stsPoints[LXSTSSTATIONS];
55  std::list<LxSimplePoint> muchPoints[LXSTATIONS][LXLAYERS];
56  std::list<LxSimplePoint> muchMCPts
57  [LXSTATIONS]
58  [LXLAYERS]; // These array is used for storing MUCH MC points when the 'main' array contains hits.
59  std::pair<LxSimpleTrack*, scaltype> linkedMuchTrack;
60  std::list<std::pair<LxSimpleTrack*, scaltype>>
61  linkedStsTracks; // The front() contains STS track with the minimal chi2.
63  void RebindMuchTrack();
64 };
65 
66 class LxTrackAna : public FairTask {
67 public:
68  LxTrackAna();
69  ~LxTrackAna();
70  InitStatus Init(); // Inherited virtual.
71  void Exec(Option_t* opt); // Inherited virtual.
72  void FinishTask(); // Inherited virtual.
73  bool GetUseHitsInStat() const { return useHitsInStat; }
74  void SetUseHitsInStat(bool v) { useHitsInStat = v; }
75  bool GetAveragePoints() const { return averagePoints; }
76  void SetAveragePoints(bool v) { averagePoints = v; }
81  bool GetBuildConnectStat() const { return buildConnectStat; }
83  bool GetBuildBgrInvMass() const { return buildBgrInvMass; }
85  bool GetBuildSigInvMass() const { return buildSigInvMass; }
87  bool GetJoinData() const { return joinData; }
88  void SetJoinData(bool v) { joinData = v; }
91  bool GetCropHits() const { return cropHits; }
92  void SetCropHits(bool v) { cropHits = v; }
93  bool GetBuildSegmentsStat() const { return buildSegmentsStat; }
95  TString GetParticleType() const { return particleType; }
96  void SetParticleType(TString v) {
97  particleType = v;
99  }
100 
101 private:
102  void Clean();
103  void AveragePoints();
104  void BuildStatistics();
105  void Connect(bool useCuts);
106  void Connect(LxSimpleTrack* muchTrack,
107  LxSimplePoint muchPt0,
108  scaltype txMuch,
109  scaltype tyMuch,
110  bool useCuts);
111 
112  TClonesArray* listMCTracks;
113  TClonesArray* listStsPts;
114  TClonesArray* listMuchPts;
115  TClonesArray* listMuchPixelHits;
116  TClonesArray* listMuchClusters;
118  std::vector<LxSimpleTrack*> allTracks;
119  std::list<LxSimpleTrack*> posTracks;
120  std::list<LxSimpleTrack*> negTracks;
130  bool joinData;
132  bool cropHits;
134  TString particleType;
136 
137  friend class LxTrackAnaSegments;
138 
140 };
141 
142 #endif //LXTRACKANA_INCLUDED
LxTrackAna::listMuchPts
TClonesArray * listMuchPts
Definition: Simple/LxTrackAna.h:114
LxTrackAna::negTracks
std::list< LxSimpleTrack * > negTracks
Definition: Simple/LxTrackAna.h:120
LxSimpleTrack::motherId
Int_t motherId
Definition: Simple/LxTrackAna.h:27
LxTrackAna::cropHits
bool cropHits
Definition: Simple/LxTrackAna.h:132
LxTrackAna::SetAveragePoints
void SetAveragePoints(bool v)
Definition: Simple/LxTrackAna.h:76
LxTrackAna::averagePoints
bool averagePoints
Definition: Simple/LxTrackAna.h:124
LxTrackAna::GetJoinData
bool GetJoinData() const
Definition: Simple/LxTrackAna.h:87
LxTrackAna::GetAveragePoints
bool GetAveragePoints() const
Definition: Simple/LxTrackAna.h:75
LxTrackAna::SetBuildNearestHitDist
void SetBuildNearestHitDist(bool v)
Definition: Simple/LxTrackAna.h:90
LxTrackAnaSegments
Definition: Simple/LxTrackAnaSegments.h:11
LxTrackAna::GetParticleType
TString GetParticleType() const
Definition: Simple/LxTrackAna.h:95
LxSettings.h
LxSimpleTrack::linkedMuchTrack
std::pair< LxSimpleTrack *, scaltype > linkedMuchTrack
Definition: Simple/LxTrackAna.h:59
LxTrackAna::GetBuildSegmentsStat
bool GetBuildSegmentsStat() const
Definition: Simple/LxTrackAna.h:93
scaltype
#define scaltype
Definition: CbmGlobalTrackingDefs.h:17
LxTrackAna::useChargeSignInCuts
bool useChargeSignInCuts
Definition: Simple/LxTrackAna.h:126
LxTrackAna::LxTrackAna
LxTrackAna()
Definition: Simple/LxTrackAna.cxx:116
LxTrackAna::SetDontTouchNonPrimary
void SetDontTouchNonPrimary(bool v)
Definition: Simple/LxTrackAna.h:78
LxSimpleTrack::py
scaltype py
Definition: Simple/LxTrackAna.h:31
LxTrackAna::particleType
TString particleType
Definition: Simple/LxTrackAna.h:134
LxTrackAnaSegments::SetParticleType
void SetParticleType(TString v)
Definition: Simple/LxTrackAnaSegments.cxx:56
LxSimpleTrack::linkedStsTracks
std::list< std::pair< LxSimpleTrack *, scaltype > > linkedStsTracks
Definition: Simple/LxTrackAna.h:61
LxTrackAna::segmentsAnalyzer
LxTrackAnaSegments segmentsAnalyzer
Definition: Simple/LxTrackAna.h:135
LxTrackAna::buildSigInvMass
bool buildSigInvMass
Definition: Simple/LxTrackAna.h:129
LxSimpleTrack::pz
scaltype pz
Definition: Simple/LxTrackAna.h:32
LxSimpleTrack::RebindMuchTrack
void RebindMuchTrack()
Definition: Simple/LxTrackAna.cxx:95
LxTrackAna::SetJoinData
void SetJoinData(bool v)
Definition: Simple/LxTrackAna.h:88
LxTrackAna::GetCropHits
bool GetCropHits() const
Definition: Simple/LxTrackAna.h:91
LXLAYERS
#define LXLAYERS
Definition: Simple/LxSettings.h:8
LxSimplePoint::y
scaltype y
Definition: Simple/LxTrackAna.h:16
LxSimpleTrack::pt
scaltype pt
Definition: Simple/LxTrackAna.h:29
LxTrackAna::SetUseChargeSignInCuts
void SetUseChargeSignInCuts(bool v)
Definition: Simple/LxTrackAna.h:80
LxTrackAna::dontTouchNonPrimary
bool dontTouchNonPrimary
Definition: Simple/LxTrackAna.h:125
LxSimpleTrack
Definition: Simple/LxTrackAna.h:25
LxTrackAna::GetDontTouchNonPrimary
bool GetDontTouchNonPrimary() const
Definition: Simple/LxTrackAna.h:77
LxTrackAna::SetBuildConnectStat
void SetBuildConnectStat(bool v)
Definition: Simple/LxTrackAna.h:82
LxTrackAna::buildBgrInvMass
bool buildBgrInvMass
Definition: Simple/LxTrackAna.h:128
LxTrackAna::Exec
void Exec(Option_t *opt)
Definition: Simple/LxTrackAna.cxx:503
LxTrackAna::GetBuildBgrInvMass
bool GetBuildBgrInvMass() const
Definition: Simple/LxTrackAna.h:83
LxTrackAna::posTracks
std::list< LxSimpleTrack * > posTracks
Definition: Simple/LxTrackAna.h:119
LxTrackAna::GetBuildConnectStat
bool GetBuildConnectStat() const
Definition: Simple/LxTrackAna.h:81
LxTrackAna::superEventBrachTrack
LxSimpleTrack superEventBrachTrack
Definition: Simple/LxTrackAna.h:122
LxTrackAna::Clean
void Clean()
Definition: Simple/LxTrackAna.cxx:144
LxTrackAna::FinishTask
void FinishTask()
Definition: Simple/LxTrackAna.cxx:406
LxTrackAna::GetUseHitsInStat
bool GetUseHitsInStat() const
Definition: Simple/LxTrackAna.h:73
LxTrackAna::SetBuildSegmentsStat
void SetBuildSegmentsStat(bool v)
Definition: Simple/LxTrackAna.h:94
LxSimplePoint::z
scaltype z
Definition: Simple/LxTrackAna.h:17
LXSTSSTATIONS
#define LXSTSSTATIONS
Definition: Simple/LxSettings.h:12
LxTrackAna::buildNearestHitDist
bool buildNearestHitDist
Definition: Simple/LxTrackAna.h:131
LxTrackAna::allTracks
std::vector< LxSimpleTrack * > allTracks
Definition: Simple/LxTrackAna.h:118
LxSimpleTrack::stsPoints
std::list< LxSimplePoint > stsPoints[LXSTSSTATIONS]
Definition: Simple/LxTrackAna.h:54
LxTrackAna::listMuchClusters
TClonesArray * listMuchClusters
Definition: Simple/LxTrackAna.h:116
LxSimplePoint::x
scaltype x
Definition: Simple/LxTrackAna.h:15
LxTrackAna::ClassDef
ClassDef(LxTrackAna, 1)
LxTrackAna::listMuchPixelHits
TClonesArray * listMuchPixelHits
Definition: Simple/LxTrackAna.h:115
LxTrackAna::buildSegmentsStat
bool buildSegmentsStat
Definition: Simple/LxTrackAna.h:133
LxSimpleTrack::muchMCPts
std::list< LxSimplePoint > muchMCPts[LXSTATIONS][LXLAYERS]
Definition: Simple/LxTrackAna.h:58
LxSimpleTrack::charge
scaltype charge
Definition: Simple/LxTrackAna.h:34
LxTrackAna::joinData
bool joinData
Definition: Simple/LxTrackAna.h:130
LxTrackAna::Init
InitStatus Init()
Definition: Simple/LxTrackAna.cxx:155
LxTrackAna::buildConnectStat
bool buildConnectStat
Definition: Simple/LxTrackAna.h:127
LxSimpleTrack::LxSimpleTrack
LxSimpleTrack(Int_t pdgc, Int_t mid, scaltype P, scaltype Pt, scaltype Px, scaltype Py, scaltype Pz, scaltype E)
Definition: Simple/LxTrackAna.h:35
LxTrackAnaSegments.h
LxTrackAna
Definition: Simple/LxTrackAna.h:66
LxTrackAna::listMCTracks
TClonesArray * listMCTracks
Definition: Simple/LxTrackAna.h:112
v
__m128 v
Definition: L1/vectors/P4_F32vec4.h:1
LxSimpleTrack::e
scaltype e
Definition: Simple/LxTrackAna.h:33
LxSimplePoint::ty
scaltype ty
Definition: Simple/LxTrackAna.h:19
LxTrackAna::SetBuildBgrInvMass
void SetBuildBgrInvMass(bool v)
Definition: Simple/LxTrackAna.h:84
LxTrackAna::GetUseChargeSignInCuts
bool GetUseChargeSignInCuts() const
Definition: Simple/LxTrackAna.h:79
LxSimpleTrack::linkedStsTrack
LxSimpleTrack * linkedStsTrack
Definition: Simple/LxTrackAna.h:62
LxTrackAna::~LxTrackAna
~LxTrackAna()
Definition: Simple/LxTrackAna.cxx:142
CbmMuchPixelHit.h
Class for pixel hits in MUCH detector.
LxTrackAna::listMuchPixelDigiMatches
TClonesArray * listMuchPixelDigiMatches
Definition: Simple/LxTrackAna.h:117
LxSimpleTrack::muchPoints
std::list< LxSimplePoint > muchPoints[LXSTATIONS][LXLAYERS]
Definition: Simple/LxTrackAna.h:55
LxTrackAna::Connect
void Connect(bool useCuts)
Definition: Simple/LxTrackAna.cxx:958
LxTrackAna::listStsPts
TClonesArray * listStsPts
Definition: Simple/LxTrackAna.h:113
LxTrackAna::AveragePoints
void AveragePoints()
Definition: Simple/LxTrackAna.cxx:684
LxTrackAna::SetParticleType
void SetParticleType(TString v)
Definition: Simple/LxTrackAna.h:96
LxTrackAna::SetCropHits
void SetCropHits(bool v)
Definition: Simple/LxTrackAna.h:92
LxTrackAna::superEventTracks
TTree * superEventTracks
Definition: Simple/LxTrackAna.h:121
LxSimplePoint::tx
scaltype tx
Definition: Simple/LxTrackAna.h:18
LxTrackAna::GetBuildSigInvMass
bool GetBuildSigInvMass() const
Definition: Simple/LxTrackAna.h:85
LxTrackAna::SetUseHitsInStat
void SetUseHitsInStat(bool v)
Definition: Simple/LxTrackAna.h:74
LxTrackAna::BuildStatistics
void BuildStatistics()
Definition: Simple/LxTrackAna.cxx:917
LxSimplePoint::LxSimplePoint
LxSimplePoint()
Definition: Simple/LxTrackAna.h:20
LxTrackAna::useHitsInStat
bool useHitsInStat
Definition: Simple/LxTrackAna.h:123
LxSimpleTrack::px
scaltype px
Definition: Simple/LxTrackAna.h:30
LxSimpleTrack::p
scaltype p
Definition: Simple/LxTrackAna.h:28
LxTrackAna::GetBuildNearestHitDist
bool GetBuildNearestHitDist() const
Definition: Simple/LxTrackAna.h:89
LXSTATIONS
#define LXSTATIONS
Definition: Simple/LxSettings.h:9
LxSimpleTrack::pdgCode
Int_t pdgCode
Definition: Simple/LxTrackAna.h:26
LxSimplePoint::LxSimplePoint
LxSimplePoint(scaltype X, scaltype Y, scaltype Z, scaltype Tx, scaltype Ty)
Definition: Simple/LxTrackAna.h:21
LxTrackAna::SetBuildSigInvMass
void SetBuildSigInvMass(bool v)
Definition: Simple/LxTrackAna.h:86
LxSimplePoint
Definition: Simple/LxTrackAna.h:14