]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MFT/AliMuonForwardTrack.h
Reduce the number of histograms in case of SS plotting option is on, if it is requested
[u/mrichter/AliRoot.git] / MFT / AliMuonForwardTrack.h
CommitLineData
820b4d9e 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"
d4643a10 23#include "AliMFTConstants.h"
820b4d9e 24
25//====================================================================================================================================================
26
27class AliMuonForwardTrack : public AliMUONTrack {
28
29public:
30
d4643a10 31 static const Int_t fgkNParentsMax = 5; ///< maximum number of parents
32
820b4d9e 33 AliMuonForwardTrack();
34 AliMuonForwardTrack(AliMUONTrack *MUONTrack);
35
36 AliMuonForwardTrack(const AliMuonForwardTrack&);
37 AliMuonForwardTrack &operator=(const AliMuonForwardTrack&);
38
53b30119 39 virtual ~AliMuonForwardTrack();
820b4d9e 40
41 void SetMUONTrack(AliMUONTrack *MUONTrack);
42 void SetMCTrackRef(TParticle *MCTrackRef);
43 AliMUONTrack* GetMUONTrack() { return fMUONTrack; }
44 TParticle* GetMCTrackRef() { return fMCTrackRef; }
45
a6f7b1e5 46 Int_t GetCharge() { return TMath::Nint(GetTrackParamAtMUONCluster(0)->GetCharge()); }
47
820b4d9e 48 AliMUONVCluster* GetMUONCluster(Int_t iMUONCluster);
49 AliMFTCluster* GetMFTCluster(Int_t iMFTCluster);
50
51 AliMUONTrackParam* GetTrackParamAtMUONCluster(Int_t iMUONCluster);
52 AliMUONTrackParam* GetTrackParamAtMFTCluster(Int_t iMFTCluster);
53
54 void SetPlaneExists(Int_t iPlane, Bool_t value=kTRUE) { fPlaneExists[iPlane] = value; }
55 Bool_t PlaneExists(Int_t iPlane) { return fPlaneExists[iPlane]; }
56
57 Int_t GetNMUONClusters() { return fMUONTrack->GetNClusters(); }
d4643a10 58 Int_t GetNMFTClusters() { return fMFTClusters->GetEntries(); }
820b4d9e 59
60 Int_t GetMCLabelMUONTrack() { return fMUONTrack->GetMCLabel(); }
61
62 void AddTrackParamAtMFTCluster(AliMUONTrackParam &trackParam, AliMFTCluster &mftCluster);
63
64 Double_t RunKalmanFilter(AliMUONTrackParam &trackParamAtCluster);
65
66 Double_t GetWeightedOffset(Double_t x, Double_t y, Double_t z);
67 Double_t GetOffset(Double_t x, Double_t y, Double_t z);
68 Double_t GetOffsetX(Double_t x, Double_t z);
69 Double_t GetOffsetY(Double_t y, Double_t z);
70
d4643a10 71 void SetParentMCLabel(Int_t iParent, Int_t MClabel) { if (0<=iParent && iParent<fgkNParentsMax) fParentMCLabel[iParent] = MClabel; }
72 void SetParentPDGCode(Int_t iParent, Int_t PDGCode) { if (0<=iParent && iParent<fgkNParentsMax) fParentPDGCode[iParent] = PDGCode; }
73
74 Int_t GetParentMCLabel(Int_t iParent) { if (0<=iParent && iParent<fgkNParentsMax) return fParentMCLabel[iParent]; else return -1; }
75 Int_t GetParentPDGCode(Int_t iParent) { if (0<=iParent && iParent<fgkNParentsMax) return fParentPDGCode[iParent]; else return 0; }
76
77 void SetNWrongClustersMC(Int_t nClusters) { fNWrongClustersMC = nClusters; }
78 Int_t GetNWrongClustersMC() { return fNWrongClustersMC; }
79
80 Double_t Pt() { return TMath::Sqrt(TMath::Power(GetTrackParamAtMFTCluster(0)->Px(),2)+TMath::Power(GetTrackParamAtMFTCluster(0)->Py(),2)); }
7e3dd1af 81
82 void SetTrackMCId(Int_t id) { fTrackMCId = id; }
83 Int_t GetTrackMCId() { return fTrackMCId; }
d4643a10 84
820b4d9e 85protected:
86
d4643a10 87 static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes; // max number of MFT planes
820b4d9e 88
d4643a10 89 Bool_t fPlaneExists[fNMaxPlanes];
820b4d9e 90
91 AliMUONTrack *fMUONTrack;
92 TParticle *fMCTrackRef;
93
94 TClonesArray *fMFTClusters;
95
d4643a10 96 Int_t fParentMCLabel[fgkNParentsMax]; ///< MC label of parents and grandparents
97 Int_t fParentPDGCode[fgkNParentsMax]; ///< PDG code of parents and grandparents
98
99 Int_t fNWrongClustersMC; // number of wrong associated MC clusters
100
7e3dd1af 101 Int_t fTrackMCId; // this number will identify the track within a MC simulation: run, event, MUON track
102
820b4d9e 103 ClassDef(AliMuonForwardTrack,1)
104
105};
106
107//====================================================================================================================================================
108
109#endif
110
111
112