CbmRoot
CbmMuchFindVectors.h
Go to the documentation of this file.
1 
11 #ifndef CBMMUCHFINDVECTORS_H_
12 #define CBMMUCHFINDVECTORS_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 CbmMuchTrack;
23 class TClonesArray;
24 
25 class CbmMuchFindVectors : public FairTask {
26 public:
29 
31  virtual ~CbmMuchFindVectors();
32 
34  virtual InitStatus Init();
35 
37  virtual void Exec(Option_t* opt);
38 
40  virtual void Finish();
41 
43  virtual void SetParContainers();
44 
46  Int_t GetNofTracks() { return fNofTracks; }
47  Int_t GetNofStat() const { return fgkStat; }
48 
49 private:
50  // Some constants
51  static const Int_t fgkStat = 2; // Number of stations
52  static const Int_t fgkPlanes = 8; // Number of straw planes per station
53  static const Int_t fgkPlanes2 = 16; // Number of straw planes in 2 stations
54 
55 private:
56  CbmMuchGeoScheme* fGeoScheme; // Geometry scheme
57  TClonesArray* fTrackArray; // Output array of CbmMuchVectors
58  Int_t fNofTracks; // Number of tracks created
59  TClonesArray* fHits; // Input array of CbmMuchHit
60  TClonesArray* fPoints; // Input array of CbmMuchHit
61  TClonesArray* fDigiMatches; // Input array of CbmMuchHit
62  Int_t fStatFirst; // First straw station No.
63  std::multimap<Int_t, Int_t>
64  fHitPl[fgkStat][fgkPlanes2]; // hit indices on planes vs tube No
65  std::vector<CbmMuchTrack*> fVectors[fgkStat]; // track vectors for stations
66  std::vector<CbmMuchTrack*>
67  fVectorsHigh[fgkStat]; // track vectors for stations (high resolution)
68  Double_t fUz[fgkPlanes2][3]; // hit float data
69  Double_t fUzi[fgkPlanes2][3]; // hit int data
70  Double_t fDz[fgkPlanes2]; // geometrical constants (Z-distances from layer 0)
71  Double_t fCosa[fgkPlanes2]; // geometrical constants (cos of stereo angles)
72  Double_t fSina[fgkPlanes2]; // geometrical constants (sin of stereo angles)
73  std::map<Int_t, TDecompLU*>
74  fLus; // system matrices (for different hit layer patterns)
75  Double_t fErrU; // hit measurement error
76  Double_t fDiam; // tube diameter
77  Double_t fCutChi2; // Chi2-cut
78  Int_t fMinHits; // Min. number of hits on track to do fit
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  Double_t fDtubes[fgkStat][fgkPlanes2]; // max. tube difference between views
83  std::map<Int_t, TMatrixDSym*>
84  fMatr; // system matrices (for different hit layer patterns)
85  std::vector<std::pair<Int_t, Int_t>>
86  fHit2d[fgkStat][fgkPlanes2]; // Indx1,Indx2 of doublet hits
87  Double_t fZabs0[9][2]; // Z-positions of absorber faces
88  Double_t fX0abs[9]; // radiation lengths of the absorbers
89  std::multimap<Double_t, Int_t> fChi2Map; // chi2 vs plane
90  std::multimap<Int_t, std::multimap<Double_t, Int_t>> fFailed;
91 
92  void ComputeMatrix();
93  void GetHits();
94  void MakeVectors();
95  void ProcessDouble(Int_t ista,
96  Int_t lay2,
97  Int_t patt,
98  Int_t flag,
99  Int_t tube0,
100  Int_t segment0);
101  Bool_t IntersectViews(Int_t ista,
102  Int_t curLay,
103  Int_t indx1,
104  Int_t indx2,
105  Int_t patt);
106  void AddVector(Int_t ista,
107  Int_t patt,
108  Double_t chi2,
109  Double_t* pars,
110  Bool_t lowRes = kTRUE);
111  void SetTrackId(CbmMuchTrack* vec);
112  Bool_t SelDoubleId(Int_t indx1, Int_t indx2);
113  void FindLine(Int_t patt, Double_t* pars);
114  Double_t FindChi2(Int_t ista, Int_t patt, Double_t* pars);
115  void CheckParams();
116  void HighRes();
117  void ProcessSingleHigh(Int_t ista,
118  Int_t plane,
119  Int_t patt,
120  Int_t flag,
121  Int_t nok,
122  Double_t uu[fgkPlanes][2]);
123  void MoveVectors();
124  void RemoveClones();
125  void RemoveShorts();
126  void StoreVectors();
127  Int_t CountBits(Int_t x);
128  void MatchVectors();
129  void RemoveOutliers(Int_t ista, Int_t patt, Double_t uu[fgkPlanes][2]);
130 
133 
134  ClassDef(CbmMuchFindVectors, 0)
135 };
136 
137 #endif
CbmMuchFindVectors::RemoveShorts
void RemoveShorts()
Definition: CbmMuchFindVectors.cxx:1200
CbmMuchFindVectors::MoveVectors
void MoveVectors()
Definition: CbmMuchFindVectors.cxx:1085
CbmMuchGeoScheme
Definition: CbmMuchGeoScheme.h:43
CbmMuchFindVectors::fgkPlanes
static const Int_t fgkPlanes
Definition: CbmMuchFindVectors.h:52
CbmMuchFindVectors::~CbmMuchFindVectors
virtual ~CbmMuchFindVectors()
Definition: CbmMuchFindVectors.cxx:54
CbmMuchFindVectors::fZ0
Double_t fZ0[fgkStat]
Definition: CbmMuchFindVectors.h:79
CbmMuchFindVectors::operator=
CbmMuchFindVectors & operator=(const CbmMuchFindVectors &)
CbmMuchFindVectors::fMinHits
Int_t fMinHits
Definition: CbmMuchFindVectors.h:78
CbmMuchFindVectors::fCosa
Double_t fCosa[fgkPlanes2]
Definition: CbmMuchFindVectors.h:71
CbmMuchFindVectors::StoreVectors
void StoreVectors()
Definition: CbmMuchFindVectors.cxx:1266
CbmMuchFindVectors::HighRes
void HighRes()
Definition: CbmMuchFindVectors.cxx:969
CbmMuchFindVectors::CbmMuchFindVectors
CbmMuchFindVectors(const CbmMuchFindVectors &)
CbmMuchFindVectors::GetNofTracks
Int_t GetNofTracks()
Definition: CbmMuchFindVectors.h:46
CbmMuchFindVectors::Init
virtual InitStatus Init()
Definition: CbmMuchFindVectors.cxx:70
CbmMuchFindVectors::ComputeMatrix
void ComputeMatrix()
failed fits
Definition: CbmMuchFindVectors.cxx:250
CbmMuchFindVectors::fRmax
Double_t fRmax[fgkStat]
Definition: CbmMuchFindVectors.h:81
CbmMuchFindVectors::fDigiMatches
TClonesArray * fDigiMatches
Definition: CbmMuchFindVectors.h:61
CbmMuchFindVectors::fMatr
std::map< Int_t, TMatrixDSym * > fMatr
Definition: CbmMuchFindVectors.h:84
CbmMuchFindVectors::fX0abs
Double_t fX0abs[9]
Definition: CbmMuchFindVectors.h:88
CbmMuchFindVectors::fHits
TClonesArray * fHits
Definition: CbmMuchFindVectors.h:59
CbmMuchFindVectors::ProcessDouble
void ProcessDouble(Int_t ista, Int_t lay2, Int_t patt, Int_t flag, Int_t tube0, Int_t segment0)
Definition: CbmMuchFindVectors.cxx:608
CbmMuchFindVectors::fUz
Double_t fUz[fgkPlanes2][3]
Definition: CbmMuchFindVectors.h:68
CbmMuchTrack
Definition: CbmMuchTrack.h:16
CbmMuchFindVectors::GetHits
void GetHits()
Definition: CbmMuchFindVectors.cxx:341
CbmMuchFindVectors::RemoveOutliers
void RemoveOutliers(Int_t ista, Int_t patt, Double_t uu[fgkPlanes][2])
Definition: CbmMuchFindVectors.cxx:1433
CbmMuchFindVectors::SetTrackId
void SetTrackId(CbmMuchTrack *vec)
Definition: CbmMuchFindVectors.cxx:799
CbmMuchFindVectors::fVectors
std::vector< CbmMuchTrack * > fVectors[fgkStat]
Definition: CbmMuchFindVectors.h:65
CbmMuchFindVectors::fgkStat
static const Int_t fgkStat
Definition: CbmMuchFindVectors.h:51
CbmMuchFindVectors::fFailed
std::multimap< Int_t, std::multimap< Double_t, Int_t > > fFailed
Definition: CbmMuchFindVectors.h:90
CbmMuchFindVectors::fHitPl
std::multimap< Int_t, Int_t > fHitPl[fgkStat][fgkPlanes2]
Definition: CbmMuchFindVectors.h:64
CbmMuchFindVectors::GetNofStat
Int_t GetNofStat() const
Definition: CbmMuchFindVectors.h:47
CbmMuchFindVectors::AddVector
void AddVector(Int_t ista, Int_t patt, Double_t chi2, Double_t *pars, Bool_t lowRes=kTRUE)
Definition: CbmMuchFindVectors.cxx:759
CbmMuchFindVectors::fTrackArray
TClonesArray * fTrackArray
Definition: CbmMuchFindVectors.h:57
CbmMuchFindVectors::fLus
std::map< Int_t, TDecompLU * > fLus
Definition: CbmMuchFindVectors.h:74
CbmMuchFindVectors::SelDoubleId
Bool_t SelDoubleId(Int_t indx1, Int_t indx2)
Definition: CbmMuchFindVectors.cxx:517
CbmMuchFindVectors::fVectorsHigh
std::vector< CbmMuchTrack * > fVectorsHigh[fgkStat]
Definition: CbmMuchFindVectors.h:67
CbmMuchFindVectors::RemoveClones
void RemoveClones()
Definition: CbmMuchFindVectors.cxx:1102
CbmMuchFindVectors::fHit2d
std::vector< std::pair< Int_t, Int_t > > fHit2d[fgkStat][fgkPlanes2]
Definition: CbmMuchFindVectors.h:86
CbmMuchFindVectors::FindChi2
Double_t FindChi2(Int_t ista, Int_t patt, Double_t *pars)
Definition: CbmMuchFindVectors.cxx:876
CbmMuchFindVectors::fSina
Double_t fSina[fgkPlanes2]
Definition: CbmMuchFindVectors.h:72
CbmMuchFindVectors::fGeoScheme
CbmMuchGeoScheme * fGeoScheme
Definition: CbmMuchFindVectors.h:56
CbmMuchFindVectors::fDtubes
Double_t fDtubes[fgkStat][fgkPlanes2]
Definition: CbmMuchFindVectors.h:82
CbmMuchFindVectors::Finish
virtual void Finish()
Definition: CbmMuchFindVectors.cxx:234
CbmMuchFindVectors::CountBits
Int_t CountBits(Int_t x)
Definition: CbmMuchFindVectors.cxx:1306
CbmMuchFindVectors::fErrU
Double_t fErrU
Definition: CbmMuchFindVectors.h:75
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmMuchFindVectors::CbmMuchFindVectors
CbmMuchFindVectors()
Definition: CbmMuchFindVectors.cxx:36
CbmMuchFindVectors::fNofTracks
Int_t fNofTracks
Definition: CbmMuchFindVectors.h:58
CbmMuchFindVectors::CheckParams
void CheckParams()
Definition: CbmMuchFindVectors.cxx:937
CbmMuchFindVectors
Definition: CbmMuchFindVectors.h:25
CbmMuchFindVectors::fChi2Map
std::multimap< Double_t, Int_t > fChi2Map
Definition: CbmMuchFindVectors.h:89
CbmMuchFindVectors::ProcessSingleHigh
void ProcessSingleHigh(Int_t ista, Int_t plane, Int_t patt, Int_t flag, Int_t nok, Double_t uu[fgkPlanes][2])
Definition: CbmMuchFindVectors.cxx:1015
CbmMuchFindVectors::SetParContainers
virtual void SetParContainers()
Definition: CbmMuchFindVectors.cxx:178
CbmMuchFindVectors::FindLine
void FindLine(Int_t patt, Double_t *pars)
Definition: CbmMuchFindVectors.cxx:847
CbmMuchFindVectors::fStatFirst
Int_t fStatFirst
Definition: CbmMuchFindVectors.h:62
CbmMuchFindVectors::fUzi
Double_t fUzi[fgkPlanes2][3]
Definition: CbmMuchFindVectors.h:69
CbmMuchFindVectors::fZabs0
Double_t fZabs0[9][2]
Definition: CbmMuchFindVectors.h:87
CbmMuchGeoScheme.h
CbmMuchFindVectors::fDiam
Double_t fDiam
Definition: CbmMuchFindVectors.h:76
CbmMuchFindVectors::fCutChi2
Double_t fCutChi2
Definition: CbmMuchFindVectors.h:77
CbmMuchFindVectors::Exec
virtual void Exec(Option_t *opt)
Definition: CbmMuchFindVectors.cxx:182
CbmMuchFindVectors::fRmin
Double_t fRmin[fgkStat]
Definition: CbmMuchFindVectors.h:80
CbmMuchFindVectors::MatchVectors
void MatchVectors()
Definition: CbmMuchFindVectors.cxx:1316
CbmMuchFindVectors::fPoints
TClonesArray * fPoints
Definition: CbmMuchFindVectors.h:60
CbmMuchFindVectors::IntersectViews
Bool_t IntersectViews(Int_t ista, Int_t curLay, Int_t indx1, Int_t indx2, Int_t patt)
Definition: CbmMuchFindVectors.cxx:721
CbmMuchFindVectors::MakeVectors
void MakeVectors()
Definition: CbmMuchFindVectors.cxx:564
CbmMuchFindVectors::fDz
Double_t fDz[fgkPlanes2]
Definition: CbmMuchFindVectors.h:70
CbmMuchFindVectors::fgkPlanes2
static const Int_t fgkPlanes2
Definition: CbmMuchFindVectors.h:53