CbmRoot
CbmMuchToTofVectors.h
Go to the documentation of this file.
1 
11 #ifndef CBMMUCHTOTOFVECTORS_H_
12 #define CBMMUCHTOTOFVECTORS_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 CbmMuchToTofVectors : public FairTask {
25 public:
28 
30  virtual ~CbmMuchToTofVectors();
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* fMuchTracks; // 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 MatchTofToMuch(); // 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(CbmMuchToTofVectors, 0)
94 };
95 
96 #endif
CbmMuchToTofVectors::operator=
CbmMuchToTofVectors & operator=(const CbmMuchToTofVectors &)
CbmMuchToTofVectors::fErrY
Double_t fErrY
Definition: CbmMuchToTofVectors.h:63
CbmMuchToTofVectors::fVectors
std::vector< CbmMuchTrack * > fVectors
Definition: CbmMuchToTofVectors.h:71
CbmMuchToTofVectors::MakeVectors
void MakeVectors()
Definition: CbmMuchToTofVectors.cxx:191
CbmMuchToTofVectors::MatchTofToMuch
void MatchTofToMuch()
Definition: CbmMuchToTofVectors.cxx:229
CbmMuchToTofVectors::fDigiMatches
TClonesArray * fDigiMatches
Definition: CbmMuchToTofVectors.h:59
CbmMuchToTofVectors::fTrackArray
TClonesArray * fTrackArray
Definition: CbmMuchToTofVectors.h:52
CbmMuchToTofVectors::RemoveClones
void RemoveClones()
Definition: CbmMuchToTofVectors.cxx:380
CbmMuchToTofVectors
Definition: CbmMuchToTofVectors.h:24
CbmMuchToTofVectors::~CbmMuchToTofVectors
virtual ~CbmMuchToTofVectors()
Definition: CbmMuchToTofVectors.cxx:53
CbmMuchToTofVectors::Finish
virtual void Finish()
Definition: CbmMuchToTofVectors.cxx:138
CbmMuchToTofVectors::fXyi
Double_t fXyi[fgkPlanes][3]
Definition: CbmMuchToTofVectors.h:74
CbmMuchToTofVectors::fLineX
std::multimap< Double_t, TLine > fLineX
Definition: CbmMuchToTofVectors.h:72
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmMuchToTofVectors::fHits
TClonesArray * fHits
Definition: CbmMuchToTofVectors.h:54
CbmMuchTrack
Definition: CbmMuchTrack.h:16
CbmMuchToTofVectors::FindLine
void FindLine(Int_t patt, Double_t *pars)
Definition: CbmMuchToTofVectors.cxx:562
CbmMuchToTofVectors::GetHits
void GetHits()
Definition: CbmMuchToTofVectors.cxx:142
CbmMuchToTofVectors::Exec
virtual void Exec(Option_t *opt)
Definition: CbmMuchToTofVectors.cxx:110
CbmMuchToTofVectors::fHitIds
std::map< Int_t, std::set< Int_t > > fHitIds
Definition: CbmMuchToTofVectors.h:70
CbmMuchToTofVectors::fHitY
std::multimap< Double_t, Int_t > fHitY
Definition: CbmMuchToTofVectors.h:66
CbmMuchToTofVectors::CbmMuchToTofVectors
CbmMuchToTofVectors(const CbmMuchToTofVectors &)
CbmMuchToTofVectors::StoreVectors
void StoreVectors()
Definition: CbmMuchToTofVectors.cxx:458
CbmMuchToTofVectors::fXy
Double_t fXy[fgkPlanes][5]
Definition: CbmMuchToTofVectors.h:73
CbmMuchToTofVectors::fMuchTracks
TClonesArray * fMuchTracks
Definition: CbmMuchToTofVectors.h:60
CbmMuchToTofVectors::GetNofTracks
Int_t GetNofTracks()
Definition: CbmMuchToTofVectors.h:45
CbmMuchToTofVectors::fNofTracks
Int_t fNofTracks
Definition: CbmMuchToTofVectors.h:53
CbmMuchToTofVectors::fHitTime
std::map< Int_t, Double_t > fHitTime
Definition: CbmMuchToTofVectors.h:68
CbmMuchToTofVectors::fPoints
CbmMCDataArray * fPoints
Definition: CbmMuchToTofVectors.h:57
CbmMuchToTofVectors::ProcessPlane
void ProcessPlane(Int_t lay, Int_t patt, Int_t flag)
Definition: CbmMuchToTofVectors.cxx:488
CbmMuchToTofVectors::fgkPlanes
static const Int_t fgkPlanes
Definition: CbmMuchToTofVectors.h:49
CbmMuchToTofVectors::fHitMatches
TClonesArray * fHitMatches
Definition: CbmMuchToTofVectors.h:55
CbmMuchToTofVectors::fCutChi2
Double_t fCutChi2
Definition: CbmMuchToTofVectors.h:64
CbmMuchToTofVectors::Init
virtual InitStatus Init()
Definition: CbmMuchToTofVectors.cxx:57
CbmMuchToTofVectors::CheckParams
void CheckParams()
Definition: CbmMuchToTofVectors.cxx:347
CbmMuchToTofVectors::fDigis
TClonesArray * fDigis
Definition: CbmMuchToTofVectors.h:58
CbmMuchToTofVectors::fZ
Double_t fZ[2]
Definition: CbmMuchToTofVectors.h:61
CbmMuchToTofVectors::FindChi2
Double_t FindChi2(Int_t patt, Double_t *pars)
Definition: CbmMuchToTofVectors.cxx:592
CbmMuchToTofVectors::fHitX
std::multimap< Double_t, Int_t > fHitX
Definition: CbmMuchToTofVectors.h:65
CbmMuchToTofVectors::fErrX
Double_t fErrX
Definition: CbmMuchToTofVectors.h:62
CbmMuchToTofVectors::CbmMuchToTofVectors
CbmMuchToTofVectors()
Definition: CbmMuchToTofVectors.cxx:36
CbmMuchToTofVectors::SetParContainers
virtual void SetParContainers()
Definition: CbmMuchToTofVectors.cxx:100
CbmMuchToTofVectors::AddVector
void AddVector(Int_t patt, Double_t chi2, Double_t *pars)
Definition: CbmMuchToTofVectors.cxx:616
CbmMuchToTofVectors::SetTrackId
void SetTrackId(CbmMuchTrack *vec)
Definition: CbmMuchToTofVectors.cxx:657