CbmRoot
CbmMuchFindVectorsGem.h
Go to the documentation of this file.
1 
11 #ifndef CBMMUCHFINDVECTORSGEM_H_
12 #define CBMMUCHFINDVECTORSGEM_H_ 1
13 
14 #include "CbmMuchGeoScheme.h"
15 #include "FairTask.h"
16 #include "FairTrackParam.h"
17 #include <TDecompLU.h>
18 #include <map>
19 #include <set>
20 #include <vector>
21 
22 class CbmMuchPixelHit;
23 class CbmMuchTrack;
24 class CbmMCDataArray;
25 class TClonesArray;
26 
27 class CbmMuchFindVectorsGem : public FairTask {
28 public:
31 
33  virtual ~CbmMuchFindVectorsGem();
34 
36  virtual InitStatus Init();
37 
39  virtual void Exec(Option_t* opt);
40 
42  virtual void Finish();
43 
45  virtual void SetParContainers();
46 
48  Int_t GetNofTracks() { return fNofTracks; };
49  Int_t GetNofStat() const { return fgkStat; }
50 
51  // Return info about absorbers
52  Int_t GetAbsorbers(Double_t zabs[9][2], Double_t* x0abs);
53 
54 private:
55  // Some constants
56  //static const Int_t fgkStat = 2; // Number of stations - 2 GEMs
57  static const Int_t fgkStat = 4; // Number of stations - 4 GEMs
58  static const Int_t fgkPlanes = 6; // Number of GEM planes per station
59 
60 private:
61  CbmMuchGeoScheme* fGeoScheme; // Geometry scheme
62  TClonesArray* fTrackArray; // Output array of CbmMuchVectors
63  TClonesArray*
64  fVecPool; // Transient array of CbmMuchVectors (instead of heap)
65  Int_t fNofTracks; // Number of tracks created
66  TClonesArray* fHits; // Input array of CbmMuchHit
67  TClonesArray* fClusters; // Input array of CbmMuchCluster
68  TClonesArray* fDigiMatches; // Input array of CbmMatch
69  TClonesArray* fTrdVectors; // Input array of CbmMuchTrack
70  CbmMCDataArray* fPoints; // Input array of CbmMuchPoint
71  Int_t fStatFirst; // First straw station No.
72  std::multimap<Int_t, Int_t>
73  fHitPl[fgkStat][fgkPlanes]; // hit indices on planes vs tube No
74  std::multimap<Double_t, Int_t>
75  fHitX[fgkStat][fgkPlanes]; // hit indices on planes vs X-coord.
76  std::vector<CbmMuchTrack*> fVectors[fgkStat]; // track vectors for stations
77  //std::vector<CbmMuchTrack*> fVectorsHigh[fgkStat]; // track vectors for stations (high resolution)
78  Double_t fXy[fgkPlanes][5]; // hit float data
79  Double_t fXyi[fgkPlanes][3]; // hit int data
80  Double_t fDz[fgkPlanes]; // geometrical constants (Z-distances from layer 0)
81  std::map<Int_t, TDecompLU*>
82  fLus; // system matrices (for different hit layer patterns)
83  Double_t fErrX[9]; // hit measurement error in X
84  Double_t fErrY[9]; // hit measurement error in Y
85  Double_t fCutChi2[9]; // Chi2-cuts for each station
86  Double_t fZ0[fgkStat]; // Z-positions of the first layers
87  Double_t fRmin[fgkStat]; // inner radii of stations
88  Double_t fRmax[fgkStat]; // outer radii of stations
89  Int_t fNsect[fgkStat]; // number of sectors per layer
90  //Double_t fDtubes[fgkStat][fgkPlanes]; // max. tube difference between views
91  std::map<Int_t, TMatrixDSym*>
92  fMatr; // system matrices (for different hit layer patterns)
93  std::multimap<Int_t, CbmMuchTrack*>
94  fSecVec[fgkStat]; // to arrange vectors according to sectors
95  Double_t fZabs0[9][2]; // Z-positions of absorber faces
96  Double_t fX0abs[9]; // radiation lengths of the absorbers
97 
98  //std::vector<pair<Int_t,Int_t> > fHit2d[fgkStat][fgkPlanes/2]; // Indx1,Indx2 of doublet hits
99 
100  void ComputeMatrix();
101  void GetHits();
102  Bool_t SelectHitId(const CbmMuchPixelHit* hit);
103  Int_t GetDowns(Int_t ista,
104  std::vector<std::pair<Double_t, Double_t>>& vecDowns);
105  void MakeVectors(Int_t ista);
106  Int_t GetTrdVectors(std::vector<std::pair<Double_t, Double_t>>& vecDowns);
107  void ProcessPlane(Int_t ista, Int_t lay2, Int_t patt, Int_t flag);
108  void AddVector(Int_t ista, Int_t patt, Double_t chi2, Double_t* pars);
109  void SetTrackId(CbmMuchTrack* vec);
110  void FindLine(Int_t patt, Double_t* pars);
111  Double_t FindChi2(Int_t ista, Int_t patt, Double_t* pars);
112  void CheckParams(Int_t ista);
113  void RemoveClones(Int_t ista);
114  void StoreVectors();
115  Int_t CountBits(Int_t x);
116  void Refit(Int_t patt, Double_t& chi2, Double_t* pars, TMatrixDSym& cov);
117  void MatchVectors();
118 
121 
122  ClassDef(CbmMuchFindVectorsGem, 0)
123 };
124 
125 #endif
CbmMuchFindVectorsGem::CountBits
Int_t CountBits(Int_t x)
Definition: CbmMuchFindVectorsGem.cxx:1127
CbmMuchFindVectorsGem::ComputeMatrix
void ComputeMatrix()
Definition: CbmMuchFindVectorsGem.cxx:292
CbmMuchFindVectorsGem::fGeoScheme
CbmMuchGeoScheme * fGeoScheme
Definition: CbmMuchFindVectorsGem.h:61
CbmMuchGeoScheme
Definition: CbmMuchGeoScheme.h:43
CbmMuchFindVectorsGem::fHitPl
std::multimap< Int_t, Int_t > fHitPl[fgkStat][fgkPlanes]
Definition: CbmMuchFindVectorsGem.h:73
CbmMuchFindVectorsGem::Exec
virtual void Exec(Option_t *opt)
Definition: CbmMuchFindVectorsGem.cxx:242
CbmMuchFindVectorsGem::fTrdVectors
TClonesArray * fTrdVectors
Definition: CbmMuchFindVectorsGem.h:69
CbmMuchFindVectorsGem::fTrackArray
TClonesArray * fTrackArray
Definition: CbmMuchFindVectorsGem.h:62
CbmMuchFindVectorsGem::MakeVectors
void MakeVectors(Int_t ista)
Definition: CbmMuchFindVectorsGem.cxx:484
CbmMuchFindVectorsGem::fCutChi2
Double_t fCutChi2[9]
Definition: CbmMuchFindVectorsGem.h:85
CbmMuchFindVectorsGem::StoreVectors
void StoreVectors()
Definition: CbmMuchFindVectorsGem.cxx:1087
CbmMuchFindVectorsGem::fErrY
Double_t fErrY[9]
Definition: CbmMuchFindVectorsGem.h:84
CbmMuchFindVectorsGem::fgkPlanes
static const Int_t fgkPlanes
Definition: CbmMuchFindVectorsGem.h:58
CbmMuchFindVectorsGem::ProcessPlane
void ProcessPlane(Int_t ista, Int_t lay2, Int_t patt, Int_t flag)
Definition: CbmMuchFindVectorsGem.cxx:641
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmMuchFindVectorsGem::fHits
TClonesArray * fHits
Definition: CbmMuchFindVectorsGem.h:66
CbmMuchFindVectorsGem::fVecPool
TClonesArray * fVecPool
Definition: CbmMuchFindVectorsGem.h:64
CbmMuchFindVectorsGem::GetTrdVectors
Int_t GetTrdVectors(std::vector< std::pair< Double_t, Double_t >> &vecDowns)
Definition: CbmMuchFindVectorsGem.cxx:620
CbmMuchFindVectorsGem::CheckParams
void CheckParams(Int_t ista)
Definition: CbmMuchFindVectorsGem.cxx:869
CbmMuchTrack
Definition: CbmMuchTrack.h:16
CbmMuchFindVectorsGem::fZ0
Double_t fZ0[fgkStat]
Definition: CbmMuchFindVectorsGem.h:86
CbmMuchFindVectorsGem::fRmin
Double_t fRmin[fgkStat]
Definition: CbmMuchFindVectorsGem.h:87
CbmMuchFindVectorsGem::AddVector
void AddVector(Int_t ista, Int_t patt, Double_t chi2, Double_t *pars)
Definition: CbmMuchFindVectorsGem.cxx:725
CbmMuchFindVectorsGem::Refit
void Refit(Int_t patt, Double_t &chi2, Double_t *pars, TMatrixDSym &cov)
Definition: CbmMuchFindVectorsGem.cxx:1137
CbmMuchFindVectorsGem::operator=
CbmMuchFindVectorsGem & operator=(const CbmMuchFindVectorsGem &)
CbmMuchFindVectorsGem::Init
virtual InitStatus Init()
Definition: CbmMuchFindVectorsGem.cxx:75
CbmMuchFindVectorsGem::fNofTracks
Int_t fNofTracks
Definition: CbmMuchFindVectorsGem.h:65
CbmMuchFindVectorsGem::GetHits
void GetHits()
Definition: CbmMuchFindVectorsGem.cxx:383
CbmMuchFindVectorsGem::~CbmMuchFindVectorsGem
virtual ~CbmMuchFindVectorsGem()
Definition: CbmMuchFindVectorsGem.cxx:64
CbmMuchFindVectorsGem::GetNofTracks
Int_t GetNofTracks()
Definition: CbmMuchFindVectorsGem.h:48
CbmMuchFindVectorsGem::SetParContainers
virtual void SetParContainers()
Definition: CbmMuchFindVectorsGem.cxx:238
CbmMuchFindVectorsGem::FindChi2
Double_t FindChi2(Int_t ista, Int_t patt, Double_t *pars)
Definition: CbmMuchFindVectorsGem.cxx:847
CbmMuchFindVectorsGem::fZabs0
Double_t fZabs0[9][2]
Definition: CbmMuchFindVectorsGem.h:95
CbmMuchFindVectorsGem::fHitX
std::multimap< Double_t, Int_t > fHitX[fgkStat][fgkPlanes]
Definition: CbmMuchFindVectorsGem.h:75
CbmMuchFindVectorsGem::fVectors
std::vector< CbmMuchTrack * > fVectors[fgkStat]
Definition: CbmMuchFindVectorsGem.h:76
CbmMuchFindVectorsGem::CbmMuchFindVectorsGem
CbmMuchFindVectorsGem()
Definition: CbmMuchFindVectorsGem.cxx:42
CbmMuchFindVectorsGem::GetDowns
Int_t GetDowns(Int_t ista, std::vector< std::pair< Double_t, Double_t >> &vecDowns)
Definition: CbmMuchFindVectorsGem.cxx:455
CbmMuchFindVectorsGem::fClusters
TClonesArray * fClusters
Definition: CbmMuchFindVectorsGem.h:67
CbmMuchFindVectorsGem::fLus
std::map< Int_t, TDecompLU * > fLus
Definition: CbmMuchFindVectorsGem.h:82
CbmMuchFindVectorsGem::fXy
Double_t fXy[fgkPlanes][5]
Definition: CbmMuchFindVectorsGem.h:78
CbmMuchFindVectorsGem::GetAbsorbers
Int_t GetAbsorbers(Double_t zabs[9][2], Double_t *x0abs)
Definition: CbmMuchFindVectorsGem.cxx:1356
CbmMuchFindVectorsGem::RemoveClones
void RemoveClones(Int_t ista)
Definition: CbmMuchFindVectorsGem.cxx:994
CbmMuchFindVectorsGem::fRmax
Double_t fRmax[fgkStat]
Definition: CbmMuchFindVectorsGem.h:88
CbmMuchFindVectorsGem::fX0abs
Double_t fX0abs[9]
Definition: CbmMuchFindVectorsGem.h:96
CbmMuchFindVectorsGem::fErrX
Double_t fErrX[9]
Definition: CbmMuchFindVectorsGem.h:83
CbmMuchFindVectorsGem::fMatr
std::map< Int_t, TMatrixDSym * > fMatr
Definition: CbmMuchFindVectorsGem.h:92
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmMuchFindVectorsGem::fDigiMatches
TClonesArray * fDigiMatches
Definition: CbmMuchFindVectorsGem.h:68
CbmMuchFindVectorsGem::CbmMuchFindVectorsGem
CbmMuchFindVectorsGem(const CbmMuchFindVectorsGem &)
CbmMuchFindVectorsGem::fDz
Double_t fDz[fgkPlanes]
Definition: CbmMuchFindVectorsGem.h:80
CbmMuchFindVectorsGem::fXyi
Double_t fXyi[fgkPlanes][3]
Definition: CbmMuchFindVectorsGem.h:79
CbmMuchFindVectorsGem::fgkStat
static const Int_t fgkStat
Definition: CbmMuchFindVectorsGem.h:57
CbmMuchFindVectorsGem::MatchVectors
void MatchVectors()
Definition: CbmMuchFindVectorsGem.cxx:1239
CbmMuchFindVectorsGem::fNsect
Int_t fNsect[fgkStat]
Definition: CbmMuchFindVectorsGem.h:89
CbmMuchPixelHit
Definition: CbmMuchPixelHit.h:17
CbmMuchFindVectorsGem::FindLine
void FindLine(Int_t patt, Double_t *pars)
Definition: CbmMuchFindVectorsGem.cxx:817
CbmMuchFindVectorsGem::Finish
virtual void Finish()
Definition: CbmMuchFindVectorsGem.cxx:281
CbmMuchGeoScheme.h
CbmMuchFindVectorsGem::fSecVec
std::multimap< Int_t, CbmMuchTrack * > fSecVec[fgkStat]
Definition: CbmMuchFindVectorsGem.h:94
CbmMuchFindVectorsGem::fPoints
CbmMCDataArray * fPoints
Definition: CbmMuchFindVectorsGem.h:70
CbmMuchFindVectorsGem::SetTrackId
void SetTrackId(CbmMuchTrack *vec)
Definition: CbmMuchFindVectorsGem.cxx:770
CbmMuchFindVectorsGem::fStatFirst
Int_t fStatFirst
Definition: CbmMuchFindVectorsGem.h:71
CbmMuchFindVectorsGem::GetNofStat
Int_t GetNofStat() const
Definition: CbmMuchFindVectorsGem.h:49
CbmMuchFindVectorsGem
Definition: CbmMuchFindVectorsGem.h:27
CbmMuchFindVectorsGem::SelectHitId
Bool_t SelectHitId(const CbmMuchPixelHit *hit)
Definition: CbmMuchFindVectorsGem.cxx:424