]>
Commit | Line | Data |
---|---|---|
1 | #ifndef AliMuonForwardTrack_H | |
2 | #define AliMuonForwardTrack_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | //==================================================================================================================================================== | |
8 | // | |
9 | // Description of an ALICE muon forward track, combining the information of the Muon Spectrometer and the Muon Forward Tracker | |
10 | // | |
11 | // Contact author: antonio.uras@cern.ch | |
12 | // | |
13 | //==================================================================================================================================================== | |
14 | ||
15 | #include "AliLog.h" | |
16 | #include "AliMUONTrack.h" | |
17 | #include "AliMFTCluster.h" | |
18 | #include "AliMUONVCluster.h" | |
19 | #include "AliMUONTrackParam.h" | |
20 | #include "TMatrixD.h" | |
21 | #include "TClonesArray.h" | |
22 | #include "TParticle.h" | |
23 | #include "AliMFTConstants.h" | |
24 | ||
25 | //==================================================================================================================================================== | |
26 | ||
27 | class AliMuonForwardTrack : public AliMUONTrack { | |
28 | ||
29 | public: | |
30 | ||
31 | static const Int_t fgkNParentsMax = 5; ///< maximum number of parents | |
32 | ||
33 | AliMuonForwardTrack(); | |
34 | AliMuonForwardTrack(AliMUONTrack *MUONTrack); | |
35 | ||
36 | AliMuonForwardTrack(const AliMuonForwardTrack&); | |
37 | AliMuonForwardTrack &operator=(const AliMuonForwardTrack&); | |
38 | ||
39 | virtual ~AliMuonForwardTrack(); | |
40 | virtual void Clear(const Option_t* /*opt*/); | |
41 | ||
42 | void SetMUONTrack(AliMUONTrack *MUONTrack); | |
43 | void SetMCTrackRef(TParticle *MCTrackRef); | |
44 | AliMUONTrack* GetMUONTrack() { return fMUONTrack; } | |
45 | TParticle* GetMCTrackRef() { return fMCTrackRef; } | |
46 | ||
47 | Int_t GetCharge() { return TMath::Nint(GetTrackParamAtMUONCluster(0)->GetCharge()); } | |
48 | ||
49 | AliMUONVCluster* GetMUONCluster(Int_t iMUONCluster); | |
50 | AliMFTCluster* GetMFTCluster(Int_t iMFTCluster); | |
51 | ||
52 | AliMUONTrackParam* GetTrackParamAtMUONCluster(Int_t iMUONCluster); | |
53 | AliMUONTrackParam* GetTrackParamAtMFTCluster(Int_t iMFTCluster); | |
54 | ||
55 | void SetPlaneExists(Int_t iPlane, Bool_t value=kTRUE) { fPlaneExists[iPlane] = value; } | |
56 | Bool_t PlaneExists(Int_t iPlane) { return fPlaneExists[iPlane]; } | |
57 | ||
58 | Int_t GetNMUONClusters() { return fMUONTrack->GetNClusters(); } | |
59 | Int_t GetNMFTClusters() { return fMFTClusters->GetEntries(); } | |
60 | ||
61 | Int_t GetMCLabelMUONTrack() { return fMUONTrack->GetMCLabel(); } | |
62 | ||
63 | void AddTrackParamAtMFTCluster(AliMUONTrackParam &trackParam, AliMFTCluster &mftCluster); | |
64 | ||
65 | Double_t RunKalmanFilter(AliMUONTrackParam &trackParamAtCluster); | |
66 | ||
67 | Double_t GetWeightedOffset(Double_t x, Double_t y, Double_t z); | |
68 | Double_t GetOffset(Double_t x, Double_t y, Double_t z); | |
69 | Double_t GetOffsetX(Double_t x, Double_t z); | |
70 | Double_t GetOffsetY(Double_t y, Double_t z); | |
71 | ||
72 | void SetParentMCLabel(Int_t iParent, Int_t MClabel) { if (0<=iParent && iParent<fgkNParentsMax) fParentMCLabel[iParent] = MClabel; } | |
73 | void SetParentPDGCode(Int_t iParent, Int_t PDGCode) { if (0<=iParent && iParent<fgkNParentsMax) fParentPDGCode[iParent] = PDGCode; } | |
74 | ||
75 | Int_t GetParentMCLabel(Int_t iParent) { if (0<=iParent && iParent<fgkNParentsMax) return fParentMCLabel[iParent]; else return -1; } | |
76 | Int_t GetParentPDGCode(Int_t iParent) { if (0<=iParent && iParent<fgkNParentsMax) return fParentPDGCode[iParent]; else return 0; } | |
77 | ||
78 | void SetNWrongClustersMC(Int_t nClusters) { fNWrongClustersMC = nClusters; } | |
79 | Int_t GetNWrongClustersMC() { return fNWrongClustersMC; } | |
80 | ||
81 | Double_t Pt() { return TMath::Sqrt(TMath::Power(GetTrackParamAtMFTCluster(0)->Px(),2)+TMath::Power(GetTrackParamAtMFTCluster(0)->Py(),2)); } | |
82 | ||
83 | void SetTrackMCId(Int_t id) { fTrackMCId = id; } | |
84 | Int_t GetTrackMCId() { return fTrackMCId; } | |
85 | ||
86 | protected: | |
87 | ||
88 | static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes; // max number of MFT planes | |
89 | ||
90 | Bool_t fPlaneExists[fNMaxPlanes]; | |
91 | ||
92 | AliMUONTrack *fMUONTrack; | |
93 | TParticle *fMCTrackRef; | |
94 | ||
95 | TClonesArray *fMFTClusters; | |
96 | ||
97 | Int_t fParentMCLabel[fgkNParentsMax]; ///< MC label of parents and grandparents | |
98 | Int_t fParentPDGCode[fgkNParentsMax]; ///< PDG code of parents and grandparents | |
99 | ||
100 | Int_t fNWrongClustersMC; // number of wrong associated MC clusters | |
101 | ||
102 | Int_t fTrackMCId; // this number will identify the track within a MC simulation: run, event, MUON track | |
103 | ||
104 | ClassDef(AliMuonForwardTrack,1) | |
105 | ||
106 | }; | |
107 | ||
108 | //==================================================================================================================================================== | |
109 | ||
110 | #endif | |
111 | ||
112 | ||
113 |