memory leak fixed
[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;
7771752e 23class AliMUONGeometryTransformer;
7ec3b9cf 24class AliMUONVDigitStore;
683cb6c5 25class AliMUONTriggerTrack;
26class AliMUONTrack;
a0dc65b4 27class AliMUONRecoParam;
7771752e 28
7ec3b9cf 29class AliMUONTrackHitPattern : public TObject
30{
7771752e 31public:
7ec3b9cf 32
a0dc65b4 33 AliMUONTrackHitPattern(const AliMUONRecoParam* recoParam,
34 const AliMUONGeometryTransformer& transformer,
64f628e9 35 const AliMUONVDigitStore& digitStore);
7ec3b9cf 36 virtual ~AliMUONTrackHitPattern(); // Destructor
7ec3b9cf 37
9b1e069f 38 void ExecuteValidation(const AliMUONVTrackStore& trackStore,
683cb6c5 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;
67c201be 46
64f628e9 47 UShort_t GetHitPattern(AliMUONTriggerTrack* matchedTriggerTrack) const;
67c201be 48
64f628e9 49 UShort_t GetHitPattern(AliMUONTrackParam* trackParam) const;
683cb6c5 50
683cb6c5 51protected:
52 void ApplyMCSCorrections(AliMUONTrackParam& trackParam) const;
53
683cb6c5 54 // Methods for hit pattern from tracker track
64f628e9 55 void FindPadMatchingTrack(const AliMUONTrackParam& trackParam,
683cb6c5 56 Bool_t isMatch[2], Int_t iChamber) const;
57
58 Float_t MinDistanceFromPad(Float_t xPad, Float_t yPad, Float_t zPad,
59 Float_t dpx, Float_t dpy,
60 const AliMUONTrackParam& trackParam) const;
7771752e 61
683cb6c5 62 // Methods for hit pattern from matched trigger track
63 Bool_t PerformTrigTrackMatch(UShort_t &pattern,
64f628e9 64 const AliMUONTriggerTrack* matchedTrigTrack) const;
683cb6c5 65
64f628e9 66 Int_t FindPadMatchingTrig(Int_t &detElemId, Float_t coor[2],
683cb6c5 67 Bool_t isMatch[2], TArrayI nboard[2],
68 TArrayF &zRealMatch, Float_t y11) const;
69
70 Float_t PadMatchTrack(Float_t xPad, Float_t yPad, Float_t dpx, Float_t dpy,
71 Float_t xTrackAtPad, Float_t yTrackAtPad) const;
72
73 Int_t DetElemIdFromPos(Float_t x, Float_t y, Int_t chamber, Int_t cathode) const;
74
75 void LocalBoardFromPos(Float_t x, Float_t y, Int_t detElemId,
76 Int_t cathode, Int_t localBoard[4]) const;
7771752e 77
21973f26 78 /// Return reco parameters
9b1e069f 79 const AliMUONRecoParam* GetRecoParam() const { return fkRecoParam; }
a0dc65b4 80
7771752e 81private:
683cb6c5 82 /// Not implemented
83 AliMUONTrackHitPattern(const AliMUONTrackHitPattern& rhs);
84 /// Not implemented
85 AliMUONTrackHitPattern& operator = (const AliMUONTrackHitPattern& rhs);
86
87 void CheckConstants() const;
683cb6c5 88
9b1e069f 89 const AliMUONRecoParam* fkRecoParam; //!< pointer to reco parameters
90 const AliMUONGeometryTransformer& fkTransformer; //!< geometry transformer
64f628e9 91 const AliMUONVDigitStore& fkDigitStore; //!< digitStore
683cb6c5 92
683cb6c5 93 const Float_t fkMaxDistance; //!< Maximum distance for reference
94 static const Int_t fgkNcathodes=2; //!<Number of cathodes
95 static const Int_t fgkNchambers=4; //!<Number of chambers
96 static const Int_t fgkNplanes=8; //!<Number of planes
97 static const Int_t fgkNlocations=4; //!<Number of locations
a0dc65b4 98
683cb6c5 99 ClassDef(AliMUONTrackHitPattern, 0) // MUON track hit pattern
7771752e 100};
101
102#endif