]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MFT/AliMuonForwardTrack.h
An effective FD corretion
[u/mrichter/AliRoot.git] / MFT / AliMuonForwardTrack.h
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 #include "TLorentzVector.h"
25
26 //====================================================================================================================================================
27
28 class AliMuonForwardTrack : public AliMUONTrack {
29
30 public:
31
32   static const Int_t fgkNParentsMax =  5;   ///< maximum number of parents
33
34   AliMuonForwardTrack();
35   AliMuonForwardTrack(AliMUONTrack *MUONTrack);
36
37   AliMuonForwardTrack(const AliMuonForwardTrack&);
38   AliMuonForwardTrack &operator=(const AliMuonForwardTrack&);
39   
40   virtual ~AliMuonForwardTrack(); 
41   virtual void Clear(const Option_t* /*opt*/);
42
43   void SetMUONTrack(AliMUONTrack *MUONTrack);
44   void SetMCTrackRef(TParticle *MCTrackRef);
45   AliMUONTrack* GetMUONTrack() { return fMUONTrack; }
46   TParticle* GetMCTrackRef() { return fMCTrackRef; }
47
48   Int_t GetCharge() { return TMath::Nint(GetTrackParamAtMUONCluster(0)->GetCharge()); }
49
50   AliMUONVCluster* GetMUONCluster(Int_t iMUONCluster);
51   AliMFTCluster*   GetMFTCluster(Int_t iMFTCluster);
52   
53   AliMUONTrackParam* GetTrackParamAtMUONCluster(Int_t iMUONCluster);
54   AliMUONTrackParam* GetTrackParamAtMFTCluster(Int_t iMFTCluster);
55
56   void SetPlaneExists(Int_t iPlane, Bool_t value=kTRUE) { fPlaneExists[iPlane] = value; }
57   Bool_t PlaneExists(Int_t iPlane) { return fPlaneExists[iPlane]; }
58
59   Int_t GetNMUONClusters() { return fMUONTrack->GetNClusters(); }
60   Int_t GetNMFTClusters()  { return fMFTClusters->GetEntries(); }
61
62   Int_t GetMCLabelMUONTrack() { return fMUONTrack->GetMCLabel(); }
63
64   void AddTrackParamAtMFTCluster(AliMUONTrackParam &trackParam, AliMFTCluster &mftCluster);
65   
66   Double_t RunKalmanFilter(AliMUONTrackParam &trackParamAtCluster);
67
68   Double_t GetWeightedOffset(Double_t x, Double_t y, Double_t z);
69   Double_t GetOffset(Double_t x, Double_t y, Double_t z);
70   Double_t GetOffsetX(Double_t x, Double_t z);
71   Double_t GetOffsetY(Double_t y, Double_t z);
72
73   void SetParentMCLabel(Int_t iParent, Int_t MClabel) { if (0<=iParent && iParent<fgkNParentsMax) fParentMCLabel[iParent] = MClabel; }
74   void SetParentPDGCode(Int_t iParent, Int_t PDGCode) { if (0<=iParent && iParent<fgkNParentsMax) fParentPDGCode[iParent] = PDGCode; }
75
76   Int_t GetParentMCLabel(Int_t iParent) { if (0<=iParent && iParent<fgkNParentsMax) return fParentMCLabel[iParent]; else return -1; }
77   Int_t GetParentPDGCode(Int_t iParent) { if (0<=iParent && iParent<fgkNParentsMax) return fParentPDGCode[iParent]; else return  0; }
78
79   void SetNWrongClustersMC(Int_t nClusters) { fNWrongClustersMC = nClusters; }
80   Int_t GetNWrongClustersMC() { return fNWrongClustersMC; }
81
82   Double_t Pt()       { return fKinem.Pt(); }
83   Double_t Eta()      { return fKinem.Eta(); }
84   Double_t Rapidity() { return fKinem.Rapidity(); }
85   Double_t Px()       { return fKinem.Px(); }
86   Double_t Py()       { return fKinem.Py(); }
87   Double_t Pz()       { return fKinem.Pz(); }
88   Double_t P()        { return fKinem.P();  }
89
90   TMatrixD GetParamCovMatrix() { return fParamCovMatrix; }
91
92   void EvalKinem(Double_t z);
93
94   void SetTrackMCId(Int_t id) { fTrackMCId = id; }
95   Int_t GetTrackMCId() { return fTrackMCId; }
96   
97   Bool_t IsFromResonance();
98   Bool_t IsFromCharm();
99   Bool_t IsFromBeauty();
100   Bool_t IsPDGCharm(Int_t pdg);
101   Bool_t IsPDGBeauty(Int_t pdg);
102   Bool_t IsFromBackground();
103
104 protected:
105
106   static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes;        // max number of MFT planes
107
108   Bool_t fPlaneExists[fNMaxPlanes];
109
110   AliMUONTrack *fMUONTrack;
111   TParticle *fMCTrackRef;
112
113   TClonesArray *fMFTClusters;
114
115   Int_t fParentMCLabel[fgkNParentsMax];    ///< MC label of parents and grandparents
116   Int_t fParentPDGCode[fgkNParentsMax];    ///< PDG code of parents and grandparents 
117
118   Int_t fNWrongClustersMC;    // number of wrong associated MC clusters
119
120   Int_t fTrackMCId;   // this number will identify the track within a MC simulation: run, event, MUON track
121
122   TLorentzVector fKinem;
123
124   TMatrixD fParamCovMatrix;
125
126   ClassDef(AliMuonForwardTrack,2)
127     
128 };
129
130 //====================================================================================================================================================
131
132 #endif
133
134
135