Removed hardwired gain inefficiency. Will be taken from the gain map.
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackHitPattern.h
CommitLineData
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>
7771752e 18
7ec3b9cf 19class AliMUONVTrackStore;
20class AliMUONVTriggerStore;
683cb6c5 21class AliMUONVTriggerTrackStore;
7771752e 22class AliMUONTrackParam;
a721d89c 23class AliMUONDigitMaker;
7771752e 24class AliMUONGeometryTransformer;
7ec3b9cf 25class AliMUONVDigitStore;
683cb6c5 26class AliMUONTriggerTrack;
27class AliMUONTrack;
7771752e 28
7ec3b9cf 29class AliMUONTrackHitPattern : public TObject
30{
7771752e 31public:
7ec3b9cf 32
33 AliMUONTrackHitPattern(const AliMUONGeometryTransformer& transformer,
34 const AliMUONDigitMaker& digitMaker);
35 virtual ~AliMUONTrackHitPattern(); // Destructor
7ec3b9cf 36
683cb6c5 37 void ExecuteValidation(AliMUONVTrackStore& trackStore,
38 const AliMUONVTriggerTrackStore& triggerTrackStore,
39 const AliMUONVTriggerStore& triggerStore) const;
40
41 AliMUONTriggerTrack* MatchTriggerTrack(AliMUONTrack* track,
42 AliMUONTrackParam& trackParam,
43 const AliMUONVTriggerTrackStore& triggerTrackStore,
44 const AliMUONVTriggerStore& triggerStore) const;
7ec3b9cf 45
683cb6c5 46 UShort_t GetHitPattern(AliMUONTrackParam& trackParam,
47 AliMUONTriggerTrack* matchedTriggerTrack,
48 AliMUONVDigitStore& digitStore) const;
49
683cb6c5 50protected:
51 void ApplyMCSCorrections(AliMUONTrackParam& trackParam) const;
52
53 Bool_t TriggerDigits(const AliMUONVTriggerStore& triggerStore,
54 AliMUONVDigitStore& digitStore) const;
55
56 void InitMembers();
57
58 void SetBit(UShort_t& pattern, Int_t cathode, Int_t chamber) const;
59
60 void AddEffInfo(UShort_t& pattern, Int_t slat, Int_t effType) const;
61
62
63 // Methods for hit pattern from tracker track
64 void FindPadMatchingTrack(AliMUONVDigitStore& digitStore,
65 const AliMUONTrackParam& trackParam,
66 Bool_t isMatch[2], Int_t iChamber) const;
67
68 Float_t MinDistanceFromPad(Float_t xPad, Float_t yPad, Float_t zPad,
69 Float_t dpx, Float_t dpy,
70 const AliMUONTrackParam& trackParam) const;
7771752e 71
683cb6c5 72 // Methods for hit pattern from matched trigger track
73 Bool_t PerformTrigTrackMatch(UShort_t &pattern,
74 AliMUONTriggerTrack *matchedTrigTrack,
75 AliMUONVDigitStore& digitStore) const;
76
77 Int_t FindPadMatchingTrig(AliMUONVDigitStore& digitStore, Int_t &detElemId, Float_t coor[2],
78 Bool_t isMatch[2], TArrayI nboard[2],
79 TArrayF &zRealMatch, Float_t y11) const;
80
81 Float_t PadMatchTrack(Float_t xPad, Float_t yPad, Float_t dpx, Float_t dpy,
82 Float_t xTrackAtPad, Float_t yTrackAtPad) const;
83
84 Int_t DetElemIdFromPos(Float_t x, Float_t y, Int_t chamber, Int_t cathode) const;
85
86 void LocalBoardFromPos(Float_t x, Float_t y, Int_t detElemId,
87 Int_t cathode, Int_t localBoard[4]) const;
7771752e 88
89private:
683cb6c5 90 /// Not implemented
91 AliMUONTrackHitPattern(const AliMUONTrackHitPattern& rhs);
92 /// Not implemented
93 AliMUONTrackHitPattern& operator = (const AliMUONTrackHitPattern& rhs);
94
95 void CheckConstants() const;
683cb6c5 96
97 const AliMUONGeometryTransformer& fTransformer; //!< geometry transformer
98 const AliMUONDigitMaker& fDigitMaker; //!< pointer to digit maker
99
100 Double_t fDeltaZ; //!< distance between stations
101
102 TMatrixD* fTrigCovariance; //!< Covariance matrix 3x3 (X,Y,slopeY) for trigger tracks
103
104 const Float_t fkMaxDistance; //!< Maximum distance for reference
105 static const Int_t fgkNcathodes=2; //!<Number of cathodes
106 static const Int_t fgkNchambers=4; //!<Number of chambers
107 static const Int_t fgkNplanes=8; //!<Number of planes
108 static const Int_t fgkNlocations=4; //!<Number of locations
109
110 enum {
111 kNoEff,
112 kChEff,
113 kSlatEff,
114 kBoardEff
115 };
7dc68cf4 116
683cb6c5 117 ClassDef(AliMUONTrackHitPattern, 0) // MUON track hit pattern
7771752e 118};
119
120#endif