1 #ifndef AliMuonForwardTrack_H
2 #define AliMuonForwardTrack_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 //====================================================================================================================================================
9 // Description of an ALICE muon forward track, combining the information of the Muon Spectrometer and the Muon Forward Tracker
11 // Contact author: antonio.uras@cern.ch
13 //====================================================================================================================================================
16 #include "AliMUONTrack.h"
17 #include "AliMFTCluster.h"
18 #include "AliMUONVCluster.h"
19 #include "AliMUONTrackParam.h"
21 #include "TClonesArray.h"
22 #include "TParticle.h"
23 #include "AliMFTConstants.h"
25 //====================================================================================================================================================
27 class AliMuonForwardTrack : public AliMUONTrack {
31 static const Int_t fgkNParentsMax = 5; ///< maximum number of parents
33 AliMuonForwardTrack();
34 AliMuonForwardTrack(AliMUONTrack *MUONTrack);
36 AliMuonForwardTrack(const AliMuonForwardTrack&);
37 AliMuonForwardTrack &operator=(const AliMuonForwardTrack&);
39 virtual ~AliMuonForwardTrack();
41 void SetMUONTrack(AliMUONTrack *MUONTrack);
42 void SetMCTrackRef(TParticle *MCTrackRef);
43 AliMUONTrack* GetMUONTrack() { return fMUONTrack; }
44 TParticle* GetMCTrackRef() { return fMCTrackRef; }
46 AliMUONVCluster* GetMUONCluster(Int_t iMUONCluster);
47 AliMFTCluster* GetMFTCluster(Int_t iMFTCluster);
49 AliMUONTrackParam* GetTrackParamAtMUONCluster(Int_t iMUONCluster);
50 AliMUONTrackParam* GetTrackParamAtMFTCluster(Int_t iMFTCluster);
52 void SetPlaneExists(Int_t iPlane, Bool_t value=kTRUE) { fPlaneExists[iPlane] = value; }
53 Bool_t PlaneExists(Int_t iPlane) { return fPlaneExists[iPlane]; }
55 Int_t GetNMUONClusters() { return fMUONTrack->GetNClusters(); }
56 Int_t GetNMFTClusters() { return fMFTClusters->GetEntries(); }
58 Int_t GetMCLabelMUONTrack() { return fMUONTrack->GetMCLabel(); }
60 void AddTrackParamAtMFTCluster(AliMUONTrackParam &trackParam, AliMFTCluster &mftCluster);
62 Double_t RunKalmanFilter(AliMUONTrackParam &trackParamAtCluster);
64 Double_t GetWeightedOffset(Double_t x, Double_t y, Double_t z);
65 Double_t GetOffset(Double_t x, Double_t y, Double_t z);
66 Double_t GetOffsetX(Double_t x, Double_t z);
67 Double_t GetOffsetY(Double_t y, Double_t z);
69 void SetParentMCLabel(Int_t iParent, Int_t MClabel) { if (0<=iParent && iParent<fgkNParentsMax) fParentMCLabel[iParent] = MClabel; }
70 void SetParentPDGCode(Int_t iParent, Int_t PDGCode) { if (0<=iParent && iParent<fgkNParentsMax) fParentPDGCode[iParent] = PDGCode; }
72 Int_t GetParentMCLabel(Int_t iParent) { if (0<=iParent && iParent<fgkNParentsMax) return fParentMCLabel[iParent]; else return -1; }
73 Int_t GetParentPDGCode(Int_t iParent) { if (0<=iParent && iParent<fgkNParentsMax) return fParentPDGCode[iParent]; else return 0; }
75 void SetNWrongClustersMC(Int_t nClusters) { fNWrongClustersMC = nClusters; }
76 Int_t GetNWrongClustersMC() { return fNWrongClustersMC; }
78 Double_t Pt() { return TMath::Sqrt(TMath::Power(GetTrackParamAtMFTCluster(0)->Px(),2)+TMath::Power(GetTrackParamAtMFTCluster(0)->Py(),2)); }
80 void SetTrackMCId(Int_t id) { fTrackMCId = id; }
81 Int_t GetTrackMCId() { return fTrackMCId; }
85 static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes; // max number of MFT planes
87 Bool_t fPlaneExists[fNMaxPlanes];
89 AliMUONTrack *fMUONTrack;
90 TParticle *fMCTrackRef;
92 TClonesArray *fMFTClusters;
94 Int_t fParentMCLabel[fgkNParentsMax]; ///< MC label of parents and grandparents
95 Int_t fParentPDGCode[fgkNParentsMax]; ///< PDG code of parents and grandparents
97 Int_t fNWrongClustersMC; // number of wrong associated MC clusters
99 Int_t fTrackMCId; // this number will identify the track within a MC simulation: run, event, MUON track
101 ClassDef(AliMuonForwardTrack,1)
105 //====================================================================================================================================================