CbmRoot
CbmTrdToTofVector.h
Go to the documentation of this file.
1 
11 #ifndef CBMTRDTOTOFVECTOR_H_
12 #define CBMTRDTOTOFVECTOR_H_ 1
13 
14 #include "FairTask.h"
15 #include <TLine.h>
16 
17 #include <map>
18 #include <set>
19 #include <vector>
20 
21 class CbmMuchTrack;
22 class CbmMCDataArray;
23 
24 class CbmTrdToTofVector : public FairTask {
25 public:
28 
30  virtual ~CbmTrdToTofVector();
31 
33  virtual InitStatus Init();
34 
36  virtual void Exec(Option_t* opt);
37 
39  virtual void Finish();
40 
42  virtual void SetParContainers();
43 
45  Int_t GetNofTracks() { return fNofTracks; };
46 
47 private:
48  // Some constants
49  static const Int_t fgkPlanes = 4; // Number of TRD layers
50 
51 private:
52  TClonesArray* fTrackArray; // Output array of CbmMuchTracks
53  Int_t fNofTracks; // Number of tracks created
54  TClonesArray* fHits; // Input array of CbmTofHit
55  TClonesArray* fHitMatches; // Input array of CbmMatch
56  //TClonesArray* fPoints; // Input array of CbmTofPoint
57  CbmMCDataArray* fPoints; // Input array of CbmTofPoint
58  TClonesArray* fDigis; // Input array of CbmDigi
59  TClonesArray* fDigiMatches; // Input array of CbmMatch
60  TClonesArray* fTrdTracks; // Input array of
61  Double_t fZ[2]; // TOF location in Z
62  Double_t fErrX; // hit measurement error in X
63  Double_t fErrY; // hit measurement error in Y
64  Double_t fCutChi2; // Chi2-cuts
65  std::multimap<Double_t, Int_t> fHitX; // hit index vs X
66  std::multimap<Double_t, Int_t> fHitY; // hit index vs Y
67  std::map<Int_t, Double_t>
68  fHitTime; // hit time (min. of all contributing points)
69  std::map<Int_t, std::set<Int_t>>
70  fHitIds; // hit index - to - contributing track IDs
71  std::vector<CbmMuchTrack*> fVectors; // track vectors for stations
72  std::multimap<Double_t, TLine> fLineX; // projected TRD vectors vs min X
73  Double_t fXy[fgkPlanes][5]; // hit float data
74  Double_t fXyi[fgkPlanes][3]; // hit int data
75 
76  void GetHits(); // get TRD hits
77  void MakeVectors(); // make vectors
78  void MatchTofToTrd(); // match TOF hits to TRD vectors
79  void CheckParams(); // check vector parameters (apriory constraints)
80  void RemoveClones(); // remove clones
81  void StoreVectors(); // store vectors
82  void ProcessPlane(Int_t lay, Int_t patt, Int_t flag); // process next plane
83  void FindLine(Int_t patt, Double_t* pars); // line fit
84  Double_t FindChi2(Int_t patt, Double_t* pars); // fit chi2
85  void AddVector(Int_t patt,
86  Double_t chi2,
87  Double_t* pars); // add vector to temp. container
88  void SetTrackId(CbmMuchTrack* vec); // set track ID
89 
92 
93  ClassDef(CbmTrdToTofVector, 0)
94 };
95 
96 #endif
CbmTrdToTofVector::fHitIds
std::map< Int_t, std::set< Int_t > > fHitIds
Definition: CbmTrdToTofVector.h:70
CbmTrdToTofVector::fCutChi2
Double_t fCutChi2
Definition: CbmTrdToTofVector.h:64
CbmTrdToTofVector::GetHits
void GetHits()
Definition: CbmTrdToTofVector.cxx:142
CbmTrdToTofVector::fXy
Double_t fXy[fgkPlanes][5]
Definition: CbmTrdToTofVector.h:73
CbmTrdToTofVector::fVectors
std::vector< CbmMuchTrack * > fVectors
Definition: CbmTrdToTofVector.h:71
CbmTrdToTofVector::fErrX
Double_t fErrX
Definition: CbmTrdToTofVector.h:62
CbmTrdToTofVector::fTrdTracks
TClonesArray * fTrdTracks
Definition: CbmTrdToTofVector.h:60
CbmTrdToTofVector::MatchTofToTrd
void MatchTofToTrd()
Definition: CbmTrdToTofVector.cxx:227
CbmTrdToTofVector::CbmTrdToTofVector
CbmTrdToTofVector()
Definition: CbmTrdToTofVector.cxx:36
CbmTrdToTofVector::fXyi
Double_t fXyi[fgkPlanes][3]
Definition: CbmTrdToTofVector.h:74
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmTrdToTofVector::RemoveClones
void RemoveClones()
Definition: CbmTrdToTofVector.cxx:377
CbmTrdToTofVector::FindLine
void FindLine(Int_t patt, Double_t *pars)
Definition: CbmTrdToTofVector.cxx:559
CbmTrdToTofVector::SetTrackId
void SetTrackId(CbmMuchTrack *vec)
Definition: CbmTrdToTofVector.cxx:654
CbmMuchTrack
Definition: CbmMuchTrack.h:16
CbmTrdToTofVector::FindChi2
Double_t FindChi2(Int_t patt, Double_t *pars)
Definition: CbmTrdToTofVector.cxx:589
CbmTrdToTofVector::MakeVectors
void MakeVectors()
Definition: CbmTrdToTofVector.cxx:191
CbmTrdToTofVector::AddVector
void AddVector(Int_t patt, Double_t chi2, Double_t *pars)
Definition: CbmTrdToTofVector.cxx:613
CbmTrdToTofVector::CbmTrdToTofVector
CbmTrdToTofVector(const CbmTrdToTofVector &)
CbmTrdToTofVector::fHitX
std::multimap< Double_t, Int_t > fHitX
Definition: CbmTrdToTofVector.h:65
CbmTrdToTofVector::fZ
Double_t fZ[2]
Definition: CbmTrdToTofVector.h:61
CbmTrdToTofVector::fNofTracks
Int_t fNofTracks
Definition: CbmTrdToTofVector.h:53
CbmTrdToTofVector::fHitMatches
TClonesArray * fHitMatches
Definition: CbmTrdToTofVector.h:55
CbmTrdToTofVector::operator=
CbmTrdToTofVector & operator=(const CbmTrdToTofVector &)
CbmTrdToTofVector::Finish
virtual void Finish()
Definition: CbmTrdToTofVector.cxx:138
CbmTrdToTofVector::GetNofTracks
Int_t GetNofTracks()
Definition: CbmTrdToTofVector.h:45
CbmTrdToTofVector::fgkPlanes
static const Int_t fgkPlanes
Definition: CbmTrdToTofVector.h:49
CbmTrdToTofVector::fHitY
std::multimap< Double_t, Int_t > fHitY
Definition: CbmTrdToTofVector.h:66
CbmTrdToTofVector::fHits
TClonesArray * fHits
Definition: CbmTrdToTofVector.h:54
CbmTrdToTofVector::fHitTime
std::map< Int_t, Double_t > fHitTime
Definition: CbmTrdToTofVector.h:68
CbmTrdToTofVector::Init
virtual InitStatus Init()
Definition: CbmTrdToTofVector.cxx:57
CbmTrdToTofVector::fErrY
Double_t fErrY
Definition: CbmTrdToTofVector.h:63
CbmTrdToTofVector::fLineX
std::multimap< Double_t, TLine > fLineX
Definition: CbmTrdToTofVector.h:72
CbmTrdToTofVector::fPoints
CbmMCDataArray * fPoints
Definition: CbmTrdToTofVector.h:57
CbmTrdToTofVector::~CbmTrdToTofVector
virtual ~CbmTrdToTofVector()
Definition: CbmTrdToTofVector.cxx:53
CbmTrdToTofVector::StoreVectors
void StoreVectors()
Definition: CbmTrdToTofVector.cxx:455
CbmTrdToTofVector::fTrackArray
TClonesArray * fTrackArray
Definition: CbmTrdToTofVector.h:52
CbmTrdToTofVector::fDigiMatches
TClonesArray * fDigiMatches
Definition: CbmTrdToTofVector.h:59
CbmTrdToTofVector::SetParContainers
virtual void SetParContainers()
Definition: CbmTrdToTofVector.cxx:100
CbmTrdToTofVector::Exec
virtual void Exec(Option_t *opt)
Definition: CbmTrdToTofVector.cxx:110
CbmTrdToTofVector
Definition: CbmTrdToTofVector.h:24
CbmTrdToTofVector::fDigis
TClonesArray * fDigis
Definition: CbmTrdToTofVector.h:58
CbmTrdToTofVector::CheckParams
void CheckParams()
Definition: CbmTrdToTofVector.cxx:344
CbmTrdToTofVector::ProcessPlane
void ProcessPlane(Int_t lay, Int_t patt, Int_t flag)
Definition: CbmTrdToTofVector.cxx:485