CbmRoot
CbmTrdFindVectors.h
Go to the documentation of this file.
1 
11 #ifndef CBMTRDFINDVECTORS_H_
12 #define CBMTRDFINDVECTORS_H_ 1
13 
14 //#include "CbmMuchGeoScheme.h"
15 #include "FairTask.h"
16 //#include "FairTrackParam.h"
17 #include <TDecompLU.h>
18 
19 #include <map>
20 //#include <set>
21 #include <vector>
22 
23 //class CbmMuchPixelHit;
24 class CbmMuchTrack;
25 //class TClonesArray;
26 //class CbmTrdDigiPar;
27 class CbmMCDataArray;
28 
29 class CbmTrdFindVectors : public FairTask {
30 public:
33 
35  virtual ~CbmTrdFindVectors();
36 
38  virtual InitStatus Init();
39 
41  virtual void Exec(Option_t* opt);
42 
44  virtual void Finish();
45 
47  virtual void SetParContainers();
48 
50  Int_t GetNofTracks() { return fNofTracks; };
51  //Int_t GetNofStat() const { return fgkStat; }
52 
53 private:
54  // Some constants
55  //static const Int_t fgkStat = 1; // Number of stations - 1
56  static const Int_t fgkPlanes = 4; // Number of TRD layers
57 
58 private:
59  /*
60  CbmMuchGeoScheme* fGeoScheme; // Geometry scheme
61  TClonesArray* fTrackArray; // Output array of CbmMuchVectors
62  Int_t fNofTracks; // Number of tracks created
63  TClonesArray* fHits; // Input array of CbmMuchHit
64  TClonesArray* fClusters; // Input array of CbmMuchCluster
65  TClonesArray* fPoints; // Input array of CbmMuchHit
66  TClonesArray* fDigiMatches; // Input array of CbmMuchHit
67  Int_t fStatFirst; // First straw station No.
68  std::multimap<Int_t,Int_t> fHitPl[fgkStat][fgkPlanes]; // hit indices on planes vs tube No
69  std::multimap<Double_t,Int_t> fHitX[fgkStat][fgkPlanes]; // hit indices on planes vs X-coord.
70  std::vector<CbmMuchTrack*> fVectors[fgkStat]; // track vectors for stations
71  //std::vector<CbmMuchTrack*> fVectorsHigh[fgkStat]; // track vectors for stations (high resolution)
72  Double_t fXy[fgkPlanes][5]; // hit float data
73  Double_t fXyi[fgkPlanes][3]; // hit int data
74  Double_t fDz[fgkPlanes]; // geometrical constants (Z-distances from layer 0)
75  std::map<Int_t,TDecompLU*> fLus; // system matrices (for different hit layer patterns)
76  Double_t fErrX[9]; // hit measurement error in X
77  Double_t fErrY[9]; // hit measurement error in Y
78  Double_t fCutChi2[9]; // Chi2-cuts for each station
79  Double_t fZ0[fgkStat]; // Z-positions of the first layers
80  Double_t fRmin[fgkStat]; // inner radii of stations
81  Double_t fRmax[fgkStat]; // outer radii of stations
82  Int_t fNsect[fgkStat]; // number of sectors per layer
83  //Double_t fDtubes[fgkStat][fgkPlanes]; // max. tube difference between views
84  std::map<Int_t,TMatrixDSym*> fMatr; // system matrices (for different hit layer patterns)
85  std::multimap<Int_t,CbmMuchTrack*> fSecVec[fgkStat]; // to arrange vectors according to sectors
86  Double_t fZabs0[9][2]; // Z-positions of absorber faces
87  Double_t fX0abs[9]; // radiation lengths of the absorbers
88 
89  //std::vector<pair<Int_t,Int_t> > fHit2d[fgkStat][fgkPlanes/2]; // Indx1,Indx2 of doublet hits
90 
91  void ComputeMatrix();
92  void GetHits();
93  Bool_t SelectHitId(const CbmMuchPixelHit *hit);
94  Int_t GetDowns(Int_t ista, std::vector<std::pair<Double_t,Double_t> >& vecDowns);
95  void MakeVectors();
96  //void ProcessDouble(Int_t ista, Int_t lay2, Int_t patt, Int_t flag, Int_t tube0, Int_t segment0);
97  void ProcessPlane(Int_t ista, Int_t lay2, Int_t patt, Int_t flag);
98  void AddVector(Int_t ista, Int_t patt, Double_t chi2, Double_t *pars);
99  void SetTrackId(CbmMuchTrack *vec);
100  void FindLine(Int_t patt, Double_t *pars);
101  Double_t FindChi2(Int_t ista, Int_t patt, Double_t *pars);
102  void CheckParams();
103  //void HighRes();
104  //void ProcessSingleHigh(Int_t ista, Int_t plane, Int_t patt, Int_t flag, Int_t nok, Double_t uu[fgkPlanes][2]);
105  void RemoveClones();
106  void StoreVectors();
107  Int_t CountBits(Int_t x);
108  void Refit(Int_t patt, Double_t &chi2, Double_t *pars, TMatrixDSym &cov);
109  void MatchVectors();
110  */
111  //CbmTrdDigiPar *fDigiPar; // digi params
112  TClonesArray* fTrackArray; // Output array of CbmMuchVectors
113  Int_t fNofTracks; // Number of tracks created
114  TClonesArray* fHits; // Input array of CbmTrdHit
115  TClonesArray* fClusters; // Input array of CbmTrdCluster
116  TClonesArray* fDigiMatches; // Input array of
117  //TClonesArray* fPoints; // Input array of CbmTrdPoint
118  CbmMCDataArray* fPoints; // Input array of CbmTrdPoint
119  Double_t fXy[fgkPlanes][5]; // hit float data
120  Double_t fXyi[fgkPlanes][3]; // hit int data
121  Double_t fDz[fgkPlanes]; // geometrical constants (Z-distances from layer 0)
122  std::map<Int_t, TDecompLU*>
123  fLus; // system matrices (for different hit layer patterns)
124  Double_t fZ0; // Z-positions of the first layers
125  Double_t fErrX; // hit measurement error in X
126  Double_t fErrY; // hit measurement error in Y
127  Double_t fCutChi2; // Chi2-cuts
128  std::map<Int_t, TMatrixDSym*>
129  fMatr; // system matrices (for different hit layer patterns)
130  std::multimap<Int_t, Int_t>
131  fHitPl[fgkPlanes]; // hit indices on planes vs tube No
132  std::multimap<Double_t, Int_t>
133  fHitX[fgkPlanes]; // hit indices on planes vs X-coord.
134  std::vector<CbmMuchTrack*> fVectors; // track vectors for stations
135 
136  void ComputeMatrix(); // compute system matrix
137  void GetHits(); // get TRD hits
138  void MakeVectors(); // make vectors
139  void CheckParams(); // check vector parameters (apriory constraints)
140  void RemoveClones(); // remove clones
141  void StoreVectors(); // store vectors
142  void ProcessPlane(Int_t lay, Int_t patt, Int_t flag); // process next plane
143  void FindLine(Int_t patt, Double_t* pars); // line fit
144  Double_t FindChi2(Int_t patt, Double_t* pars); // fit chi2
145  void AddVector(Int_t patt,
146  Double_t chi2,
147  Double_t* pars); // add vector to temp. container
148  void SetTrackId(CbmMuchTrack* vec); // set track ID
149 
152 
153  ClassDef(CbmTrdFindVectors, 0)
154 };
155 
156 #endif
CbmTrdFindVectors::CheckParams
void CheckParams()
Definition: CbmTrdFindVectors.cxx:353
CbmTrdFindVectors::~CbmTrdFindVectors
virtual ~CbmTrdFindVectors()
Definition: CbmTrdFindVectors.cxx:52
CbmTrdFindVectors::fCutChi2
Double_t fCutChi2
Definition: CbmTrdFindVectors.h:127
CbmTrdFindVectors::FindLine
void FindLine(Int_t patt, Double_t *pars)
Definition: CbmTrdFindVectors.cxx:584
CbmTrdFindVectors::fDigiMatches
TClonesArray * fDigiMatches
Definition: CbmTrdFindVectors.h:116
CbmTrdFindVectors::Exec
virtual void Exec(Option_t *opt)
Definition: CbmTrdFindVectors.cxx:159
CbmTrdFindVectors::GetHits
void GetHits()
Definition: CbmTrdFindVectors.cxx:286
CbmTrdFindVectors::fNofTracks
Int_t fNofTracks
Definition: CbmTrdFindVectors.h:113
CbmTrdFindVectors::fMatr
std::map< Int_t, TMatrixDSym * > fMatr
Definition: CbmTrdFindVectors.h:129
CbmTrdFindVectors::RemoveClones
void RemoveClones()
Definition: CbmTrdFindVectors.cxx:386
CbmTrdFindVectors::fTrackArray
TClonesArray * fTrackArray
Definition: CbmTrdFindVectors.h:112
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmTrdFindVectors::fZ0
Double_t fZ0
Definition: CbmTrdFindVectors.h:124
CbmTrdFindVectors::SetParContainers
virtual void SetParContainers()
Definition: CbmTrdFindVectors.cxx:149
CbmMuchTrack
Definition: CbmMuchTrack.h:16
CbmTrdFindVectors::fXyi
Double_t fXyi[fgkPlanes][3]
Definition: CbmTrdFindVectors.h:120
CbmTrdFindVectors::CbmTrdFindVectors
CbmTrdFindVectors(const CbmTrdFindVectors &)
CbmTrdFindVectors::CbmTrdFindVectors
CbmTrdFindVectors()
Definition: CbmTrdFindVectors.cxx:36
CbmTrdFindVectors::FindChi2
Double_t FindChi2(Int_t patt, Double_t *pars)
Definition: CbmTrdFindVectors.cxx:613
CbmTrdFindVectors::Finish
virtual void Finish()
Definition: CbmTrdFindVectors.cxx:192
CbmTrdFindVectors::Init
virtual InitStatus Init()
Definition: CbmTrdFindVectors.cxx:56
CbmTrdFindVectors::ComputeMatrix
void ComputeMatrix()
Definition: CbmTrdFindVectors.cxx:196
CbmTrdFindVectors::fErrX
Double_t fErrX
Definition: CbmTrdFindVectors.h:125
CbmTrdFindVectors::fErrY
Double_t fErrY
Definition: CbmTrdFindVectors.h:126
CbmTrdFindVectors::fHits
TClonesArray * fHits
Definition: CbmTrdFindVectors.h:114
CbmTrdFindVectors::ProcessPlane
void ProcessPlane(Int_t lay, Int_t patt, Int_t flag)
Definition: CbmTrdFindVectors.cxx:485
CbmTrdFindVectors::fClusters
TClonesArray * fClusters
Definition: CbmTrdFindVectors.h:115
CbmTrdFindVectors::fPoints
CbmMCDataArray * fPoints
Definition: CbmTrdFindVectors.h:118
CbmTrdFindVectors::GetNofTracks
Int_t GetNofTracks()
Definition: CbmTrdFindVectors.h:50
CbmTrdFindVectors::MakeVectors
void MakeVectors()
Definition: CbmTrdFindVectors.cxx:317
CbmTrdFindVectors::AddVector
void AddVector(Int_t patt, Double_t chi2, Double_t *pars)
Definition: CbmTrdFindVectors.cxx:637
CbmTrdFindVectors::fDz
Double_t fDz[fgkPlanes]
Definition: CbmTrdFindVectors.h:121
CbmTrdFindVectors::fVectors
std::vector< CbmMuchTrack * > fVectors
Definition: CbmTrdFindVectors.h:134
CbmTrdFindVectors::fgkPlanes
static const Int_t fgkPlanes
Definition: CbmTrdFindVectors.h:56
CbmTrdFindVectors::StoreVectors
void StoreVectors()
Definition: CbmTrdFindVectors.cxx:464
CbmTrdFindVectors::fLus
std::map< Int_t, TDecompLU * > fLus
Definition: CbmTrdFindVectors.h:123
CbmTrdFindVectors::fHitX
std::multimap< Double_t, Int_t > fHitX[fgkPlanes]
Definition: CbmTrdFindVectors.h:133
CbmTrdFindVectors::SetTrackId
void SetTrackId(CbmMuchTrack *vec)
Definition: CbmTrdFindVectors.cxx:677
CbmTrdFindVectors
Definition: CbmTrdFindVectors.h:29
CbmTrdFindVectors::operator=
CbmTrdFindVectors & operator=(const CbmTrdFindVectors &)
CbmTrdFindVectors::fXy
Double_t fXy[fgkPlanes][5]
Definition: CbmTrdFindVectors.h:119
CbmTrdFindVectors::fHitPl
std::multimap< Int_t, Int_t > fHitPl[fgkPlanes]
Definition: CbmTrdFindVectors.h:131