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