7771752e |
1 | #ifndef ALIMUONTRACKHITPATTERN_H |
2 | #define ALIMUONTRACKHITPATTERN_H |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ |
5 | |
ea94c18b |
6 | /*$Id$*/ |
7 | |
7771752e |
8 | /// \ingroup rec |
9 | /// \class AliMUONTrackHitPattern |
10 | /// \brief Class for the MUON track hit pattern |
11 | /// |
12 | // Author: Diego Stocco |
13 | |
14 | #include <TObject.h> |
683cb6c5 |
15 | #include <TMatrixD.h> |
16 | #include <TArrayI.h> |
17 | #include <TArrayF.h> |
18 | #include <TH3.h> |
7771752e |
19 | |
7ec3b9cf |
20 | class AliMUONVTrackStore; |
21 | class AliMUONVTriggerStore; |
683cb6c5 |
22 | class AliMUONVTriggerTrackStore; |
7771752e |
23 | class AliMUONTrackParam; |
a721d89c |
24 | class AliMUONDigitMaker; |
7771752e |
25 | class AliMUONGeometryTransformer; |
7ec3b9cf |
26 | class AliMUONVDigitStore; |
683cb6c5 |
27 | class AliMUONTriggerTrack; |
28 | class AliMUONTrack; |
7771752e |
29 | |
7ec3b9cf |
30 | class AliMUONTrackHitPattern : public TObject |
31 | { |
7771752e |
32 | public: |
7ec3b9cf |
33 | |
34 | AliMUONTrackHitPattern(const AliMUONGeometryTransformer& transformer, |
35 | const AliMUONDigitMaker& digitMaker); |
36 | virtual ~AliMUONTrackHitPattern(); // Destructor |
7ec3b9cf |
37 | |
683cb6c5 |
38 | void ExecuteValidation(AliMUONVTrackStore& trackStore, |
39 | const AliMUONVTriggerTrackStore& triggerTrackStore, |
40 | const AliMUONVTriggerStore& triggerStore) const; |
41 | |
42 | AliMUONTriggerTrack* MatchTriggerTrack(AliMUONTrack* track, |
43 | AliMUONTrackParam& trackParam, |
44 | const AliMUONVTriggerTrackStore& triggerTrackStore, |
45 | const AliMUONVTriggerStore& triggerStore) const; |
7ec3b9cf |
46 | |
683cb6c5 |
47 | UShort_t GetHitPattern(AliMUONTrackParam& trackParam, |
48 | AliMUONTriggerTrack* matchedTriggerTrack, |
49 | AliMUONVDigitStore& digitStore) const; |
50 | |
51 | void UpdateQA() const; |
52 | |
53 | protected: |
54 | void ApplyMCSCorrections(AliMUONTrackParam& trackParam) const; |
55 | |
56 | Bool_t TriggerDigits(const AliMUONVTriggerStore& triggerStore, |
57 | AliMUONVDigitStore& digitStore) const; |
58 | |
59 | void InitMembers(); |
60 | |
61 | void SetBit(UShort_t& pattern, Int_t cathode, Int_t chamber) const; |
62 | |
63 | void AddEffInfo(UShort_t& pattern, Int_t slat, Int_t effType) const; |
64 | |
65 | |
66 | // Methods for hit pattern from tracker track |
67 | void FindPadMatchingTrack(AliMUONVDigitStore& digitStore, |
68 | const AliMUONTrackParam& trackParam, |
69 | Bool_t isMatch[2], Int_t iChamber) const; |
70 | |
71 | Float_t MinDistanceFromPad(Float_t xPad, Float_t yPad, Float_t zPad, |
72 | Float_t dpx, Float_t dpy, |
73 | const AliMUONTrackParam& trackParam) const; |
7771752e |
74 | |
683cb6c5 |
75 | // Methods for hit pattern from matched trigger track |
76 | Bool_t PerformTrigTrackMatch(UShort_t &pattern, |
77 | AliMUONTriggerTrack *matchedTrigTrack, |
78 | AliMUONVDigitStore& digitStore) const; |
79 | |
80 | Int_t FindPadMatchingTrig(AliMUONVDigitStore& digitStore, Int_t &detElemId, Float_t coor[2], |
81 | Bool_t isMatch[2], TArrayI nboard[2], |
82 | TArrayF &zRealMatch, Float_t y11) const; |
83 | |
84 | Float_t PadMatchTrack(Float_t xPad, Float_t yPad, Float_t dpx, Float_t dpy, |
85 | Float_t xTrackAtPad, Float_t yTrackAtPad) const; |
86 | |
87 | Int_t DetElemIdFromPos(Float_t x, Float_t y, Int_t chamber, Int_t cathode) const; |
88 | |
89 | void LocalBoardFromPos(Float_t x, Float_t y, Int_t detElemId, |
90 | Int_t cathode, Int_t localBoard[4]) const; |
7771752e |
91 | |
92 | private: |
683cb6c5 |
93 | /// Not implemented |
94 | AliMUONTrackHitPattern(const AliMUONTrackHitPattern& rhs); |
95 | /// Not implemented |
96 | AliMUONTrackHitPattern& operator = (const AliMUONTrackHitPattern& rhs); |
97 | |
98 | void CheckConstants() const; |
99 | /// Get max number of strips along x |
100 | Int_t GetMaxX(Int_t cath) const {return (cath==0) ? 7 : 112;} |
101 | /// Get max number of strips along x |
102 | Int_t GetMaxY(Int_t cath) const {return (cath==0) ? 64 : 1;} |
103 | |
104 | const AliMUONGeometryTransformer& fTransformer; //!< geometry transformer |
105 | const AliMUONDigitMaker& fDigitMaker; //!< pointer to digit maker |
106 | |
107 | Double_t fDeltaZ; //!< distance between stations |
108 | |
109 | TMatrixD* fTrigCovariance; //!< Covariance matrix 3x3 (X,Y,slopeY) for trigger tracks |
110 | |
111 | const Float_t fkMaxDistance; //!< Maximum distance for reference |
112 | static const Int_t fgkNcathodes=2; //!<Number of cathodes |
113 | static const Int_t fgkNchambers=4; //!<Number of chambers |
114 | static const Int_t fgkNplanes=8; //!<Number of planes |
115 | static const Int_t fgkNlocations=4; //!<Number of locations |
116 | |
117 | enum { |
118 | kNoEff, |
119 | kChEff, |
120 | kSlatEff, |
121 | kBoardEff |
122 | }; |
7dc68cf4 |
123 | |
683cb6c5 |
124 | TH3F *fPadFired[fgkNcathodes]; ///< Histo counting the fired pads |
7771752e |
125 | |
683cb6c5 |
126 | ClassDef(AliMUONTrackHitPattern, 0) // MUON track hit pattern |
7771752e |
127 | }; |
128 | |
129 | #endif |