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