CbmRoot
CbmL1TrdTrackFinderSts.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------
2 // ----- CbmL1TrdTrackFinderSts -----
3 // ----- Created 6/12/05 by D. Kresan -----
4 // -----------------------------------------------------------------------
5 
6 #ifndef CBM_L1_TRD_TRACK_FINDER_STS
7 #define CBM_L1_TRD_TRACK_FINDER_STS
8 
9 #include "CbmTrdTrackFinder.h"
10 
11 #include "CbmTrdTrack.h"
12 
13 #include <map>
14 #include <vector>
15 
16 class TClonesArray;
17 class CbmTrdHit;
18 class CbmKFTrack;
19 class TH1F;
20 class TH2F;
21 
22 
24 private:
27 
28 private:
29  Int_t fEvents; // Number of events processed
30  Int_t fVerbose; // Verbosity level
31  TClonesArray* fArrayTrdPoint; // Array of TRD points
32  TClonesArray* fArrayTrdHit; // Array of TRD hits
33  TClonesArray* fArrayStsTrack; // Array of STS tracks
34  TClonesArray* fArrayStsTrackM; // Array of STS tracks
35  TClonesArray* fArrayKFTrdHit; // Array of KF TRD hits
36  std::vector<CbmTrdTrack*> fvTrdTrack; // Working array of TRD tracks
37  TClonesArray* fArrayTrdTrack; // Output Array of TRD tracks
38  Int_t fPid; // PID assumption
39  Int_t fNoTrdStations; // Number of TRD stations
40  Int_t fNoTrdPerStation; // Number of TRD layers per station
41  Int_t fNoTrdHits[12]; // Number of TRD hits per station
42  Int_t fTrdHitIndex[12][10000]; // Indices of TRD hits per station
43  std::map<Int_t, Bool_t> fmapHitUsed; // Map from hit index to boolean flag
44  TH1F* fh_chi2hit; // Control histogramm
45  TH2F* fh_chi2hit_plane; // Control histogramm
46  TH2F* fh_resx_plane_true; // Control histogramm
47  TH2F* fh_resy_plane_true; // Control histogramm
48  TH2F* fh_resx_plane_fake; // Control histogramm
49  TH2F* fh_resy_plane_fake; // Control histogramm
50  TH2F* fh_resx_mom_true; // Control histogramm
51  TH2F* fh_resy_mom_true; // Control histogramm
52  TH2F* fh_pullx_plane_true; // Control histogramm
53  TH2F* fh_pully_plane_true; // Control histogramm
54  TH2F* fh_pullx_plane_fake; // Control histogramm
55  TH2F* fh_pully_plane_fake; // Control histogramm
56  std::map<Int_t, Bool_t> fLostTracks;
57 
58  void CreateHistogramms();
59  void DataBranches();
60  void TrdLayout();
61  void SortTrdHits();
62  void Process();
63  void
64  Sts2Trd(Double_t pmin, Double_t pmax, Double_t chi2min, Double_t chi2max);
65  void ProcessAllStations();
66  void MoveOut();
67  void ProcessStation(CbmTrdTrack* pTrack, const Int_t& station);
68  void UpdateTrack(Int_t station, CbmTrdTrack* track);
69  virtual void Clear(const Option_t* a = 0);
70  void RemoveFakes();
71  Bool_t Overlap(CbmKFTrack& track, CbmTrdHit* pHit);
72  Double_t GetChi2Hit(CbmKFTrack& track, CbmTrdHit* pHit);
73 
74 public:
76  CbmL1TrdTrackFinderSts(Int_t verbose);
77  virtual ~CbmL1TrdTrackFinderSts();
78 
79  void Init();
80  Int_t DoFind(TClonesArray* hitArray, TClonesArray* trackArray);
81  void WriteHistogramms();
82 
83  inline void SetVerbose(Int_t verbose) { fVerbose = verbose; }
84 
85  static Bool_t CompareChi2(const CbmTrdTrack* a, const CbmTrdTrack* b) {
86  return (a->GetChiSq() / static_cast<Double_t>(a->GetNDF())
87  < b->GetChiSq() / static_cast<Double_t>(b->GetNDF()));
88  };
89 
91 };
92 
93 
94 #endif
CbmL1TrdTrackFinderSts::fArrayKFTrdHit
TClonesArray * fArrayKFTrdHit
Definition: CbmL1TrdTrackFinderSts.h:35
CbmTrack::GetChiSq
Double_t GetChiSq() const
Definition: CbmTrack.h:58
CbmL1TrdTrackFinderSts::fh_resx_plane_true
TH2F * fh_resx_plane_true
Definition: CbmL1TrdTrackFinderSts.h:46
CbmL1TrdTrackFinderSts::fNoTrdPerStation
Int_t fNoTrdPerStation
Definition: CbmL1TrdTrackFinderSts.h:40
CbmL1TrdTrackFinderSts::Overlap
Bool_t Overlap(CbmKFTrack &track, CbmTrdHit *pHit)
Definition: CbmL1TrdTrackFinderSts.cxx:652
CbmL1TrdTrackFinderSts::ClassDef
ClassDef(CbmL1TrdTrackFinderSts, 1)
CbmL1TrdTrackFinderSts::SortTrdHits
void SortTrdHits()
Definition: CbmL1TrdTrackFinderSts.cxx:890
CbmL1TrdTrackFinderSts::fArrayTrdTrack
TClonesArray * fArrayTrdTrack
Definition: CbmL1TrdTrackFinderSts.h:37
CbmL1TrdTrackFinderSts::fmapHitUsed
std::map< Int_t, Bool_t > fmapHitUsed
Definition: CbmL1TrdTrackFinderSts.h:43
CbmL1TrdTrackFinderSts
Definition: CbmL1TrdTrackFinderSts.h:23
CbmL1TrdTrackFinderSts::fArrayTrdHit
TClonesArray * fArrayTrdHit
Definition: CbmL1TrdTrackFinderSts.h:32
CbmL1TrdTrackFinderSts::fh_pully_plane_fake
TH2F * fh_pully_plane_fake
Definition: CbmL1TrdTrackFinderSts.h:55
CbmL1TrdTrackFinderSts::~CbmL1TrdTrackFinderSts
virtual ~CbmL1TrdTrackFinderSts()
Definition: CbmL1TrdTrackFinderSts.cxx:160
CbmTrdHit
data class for a reconstructed Energy-4D measurement in the TRD
Definition: CbmTrdHit.h:35
CbmL1TrdTrackFinderSts::RemoveFakes
void RemoveFakes()
Definition: CbmL1TrdTrackFinderSts.cxx:588
CbmL1TrdTrackFinderSts::fvTrdTrack
std::vector< CbmTrdTrack * > fvTrdTrack
Definition: CbmL1TrdTrackFinderSts.h:36
CbmTrdTrackFinder
Definition: CbmTrdTrackFinder.h:24
CbmL1TrdTrackFinderSts::fEvents
Int_t fEvents
Definition: CbmL1TrdTrackFinderSts.h:29
CbmL1TrdTrackFinderSts::Clear
virtual void Clear(const Option_t *a=0)
Definition: CbmL1TrdTrackFinderSts.cxx:570
CbmL1TrdTrackFinderSts::fVerbose
Int_t fVerbose
Definition: CbmL1TrdTrackFinderSts.h:30
CbmL1TrdTrackFinderSts::fh_resx_mom_true
TH2F * fh_resx_mom_true
Definition: CbmL1TrdTrackFinderSts.h:50
CbmL1TrdTrackFinderSts::fPid
Int_t fPid
Definition: CbmL1TrdTrackFinderSts.h:38
CbmTrdTrackFinder.h
CbmL1TrdTrackFinderSts::CbmL1TrdTrackFinderSts
CbmL1TrdTrackFinderSts()
Definition: CbmL1TrdTrackFinderSts.cxx:52
CbmL1TrdTrackFinderSts::fLostTracks
std::map< Int_t, Bool_t > fLostTracks
Definition: CbmL1TrdTrackFinderSts.h:56
CbmL1TrdTrackFinderSts::CreateHistogramms
void CreateHistogramms()
Definition: CbmL1TrdTrackFinderSts.cxx:745
CbmL1TrdTrackFinderSts::ProcessAllStations
void ProcessAllStations()
Definition: CbmL1TrdTrackFinderSts.cxx:338
CbmL1TrdTrackFinderSts::operator=
CbmL1TrdTrackFinderSts operator=(const CbmL1TrdTrackFinderSts &)
CbmL1TrdTrackFinderSts::fh_pullx_plane_fake
TH2F * fh_pullx_plane_fake
Definition: CbmL1TrdTrackFinderSts.h:54
CbmL1TrdTrackFinderSts::fh_resy_plane_fake
TH2F * fh_resy_plane_fake
Definition: CbmL1TrdTrackFinderSts.h:49
CbmL1TrdTrackFinderSts::fNoTrdHits
Int_t fNoTrdHits[12]
Definition: CbmL1TrdTrackFinderSts.h:41
CbmL1TrdTrackFinderSts::fTrdHitIndex
Int_t fTrdHitIndex[12][10000]
Definition: CbmL1TrdTrackFinderSts.h:42
CbmL1TrdTrackFinderSts::fh_resy_mom_true
TH2F * fh_resy_mom_true
Definition: CbmL1TrdTrackFinderSts.h:51
CbmL1TrdTrackFinderSts::CompareChi2
static Bool_t CompareChi2(const CbmTrdTrack *a, const CbmTrdTrack *b)
Definition: CbmL1TrdTrackFinderSts.h:85
CbmL1TrdTrackFinderSts::ProcessStation
void ProcessStation(CbmTrdTrack *pTrack, const Int_t &station)
Definition: CbmL1TrdTrackFinderSts.cxx:381
CbmTrack::GetNDF
Int_t GetNDF() const
Definition: CbmTrack.h:59
CbmL1TrdTrackFinderSts::Process
void Process()
Definition: CbmL1TrdTrackFinderSts.cxx:243
CbmL1TrdTrackFinderSts::fArrayStsTrack
TClonesArray * fArrayStsTrack
Definition: CbmL1TrdTrackFinderSts.h:33
CbmL1TrdTrackFinderSts::Init
void Init()
Definition: CbmL1TrdTrackFinderSts.cxx:174
CbmL1TrdTrackFinderSts::GetChi2Hit
Double_t GetChi2Hit(CbmKFTrack &track, CbmTrdHit *pHit)
Definition: CbmL1TrdTrackFinderSts.cxx:717
CbmTrdTrack
Definition: CbmTrdTrack.h:22
CbmL1TrdTrackFinderSts::MoveOut
void MoveOut()
Definition: CbmL1TrdTrackFinderSts.cxx:362
CbmL1TrdTrackFinderSts::fArrayStsTrackM
TClonesArray * fArrayStsTrackM
Definition: CbmL1TrdTrackFinderSts.h:34
CbmL1TrdTrackFinderSts::fh_pully_plane_true
TH2F * fh_pully_plane_true
Definition: CbmL1TrdTrackFinderSts.h:53
CbmL1TrdTrackFinderSts::fh_chi2hit
TH1F * fh_chi2hit
Definition: CbmL1TrdTrackFinderSts.h:44
CbmL1TrdTrackFinderSts::fh_resy_plane_true
TH2F * fh_resy_plane_true
Definition: CbmL1TrdTrackFinderSts.h:47
CbmL1TrdTrackFinderSts::DataBranches
void DataBranches()
Definition: CbmL1TrdTrackFinderSts.cxx:786
CbmL1TrdTrackFinderSts::WriteHistogramms
void WriteHistogramms()
Definition: CbmL1TrdTrackFinderSts.cxx:932
CbmL1TrdTrackFinderSts::fh_pullx_plane_true
TH2F * fh_pullx_plane_true
Definition: CbmL1TrdTrackFinderSts.h:52
CbmL1TrdTrackFinderSts::Sts2Trd
void Sts2Trd(Double_t pmin, Double_t pmax, Double_t chi2min, Double_t chi2max)
Definition: CbmL1TrdTrackFinderSts.cxx:291
CbmTrdTrack.h
CbmL1TrdTrackFinderSts::CbmL1TrdTrackFinderSts
CbmL1TrdTrackFinderSts(const CbmL1TrdTrackFinderSts &)
CbmL1TrdTrackFinderSts::fh_resx_plane_fake
TH2F * fh_resx_plane_fake
Definition: CbmL1TrdTrackFinderSts.h:48
CbmL1TrdTrackFinderSts::TrdLayout
void TrdLayout()
Definition: CbmL1TrdTrackFinderSts.cxx:822
CbmKFTrack
Definition: CbmKFTrack.h:21
CbmL1TrdTrackFinderSts::fNoTrdStations
Int_t fNoTrdStations
Definition: CbmL1TrdTrackFinderSts.h:39
CbmL1TrdTrackFinderSts::fArrayTrdPoint
TClonesArray * fArrayTrdPoint
Definition: CbmL1TrdTrackFinderSts.h:31
CbmL1TrdTrackFinderSts::fh_chi2hit_plane
TH2F * fh_chi2hit_plane
Definition: CbmL1TrdTrackFinderSts.h:45
CbmL1TrdTrackFinderSts::DoFind
Int_t DoFind(TClonesArray *hitArray, TClonesArray *trackArray)
Definition: CbmL1TrdTrackFinderSts.cxx:190
CbmL1TrdTrackFinderSts::SetVerbose
void SetVerbose(Int_t verbose)
Definition: CbmL1TrdTrackFinderSts.h:83
CbmL1TrdTrackFinderSts::UpdateTrack
void UpdateTrack(Int_t station, CbmTrdTrack *track)
Definition: CbmL1TrdTrackFinderSts.cxx:523