Bug in storage manager making possible to delete permanent event fixed
[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"
ec7c7172 24#include "TLorentzVector.h"
820b4d9e 25
26//====================================================================================================================================================
27
28class AliMuonForwardTrack : public AliMUONTrack {
29
30public:
31
d4643a10 32 static const Int_t fgkNParentsMax = 5; ///< maximum number of parents
33
820b4d9e 34 AliMuonForwardTrack();
35 AliMuonForwardTrack(AliMUONTrack *MUONTrack);
36
37 AliMuonForwardTrack(const AliMuonForwardTrack&);
38 AliMuonForwardTrack &operator=(const AliMuonForwardTrack&);
39
274c2dce 40 virtual ~AliMuonForwardTrack();
41 virtual void Clear(const Option_t* /*opt*/);
820b4d9e 42
43 void SetMUONTrack(AliMUONTrack *MUONTrack);
44 void SetMCTrackRef(TParticle *MCTrackRef);
45 AliMUONTrack* GetMUONTrack() { return fMUONTrack; }
46 TParticle* GetMCTrackRef() { return fMCTrackRef; }
47
a6f7b1e5 48 Int_t GetCharge() { return TMath::Nint(GetTrackParamAtMUONCluster(0)->GetCharge()); }
49
820b4d9e 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(); }
d4643a10 60 Int_t GetNMFTClusters() { return fMFTClusters->GetEntries(); }
820b4d9e 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);
94bd88d5 70 Double_t GetDCA(Double_t x, Double_t y, Double_t z);
71 Double_t GetMomentumSpectrometer(Double_t z);
820b4d9e 72 Double_t GetOffsetX(Double_t x, Double_t z);
73 Double_t GetOffsetY(Double_t y, Double_t z);
94bd88d5 74 Double_t GetThetaAbs();
820b4d9e 75
026547c6 76 Double_t GetRAtAbsorberEnd() { return fRAtAbsorberEnd; }
77 void SetRAtAbsorberEnd(Double_t rAtAbsorberEnd) { fRAtAbsorberEnd = rAtAbsorberEnd; }
78
79 Double_t GetChi2OverNdf() { return GetGlobalChi2()/Double_t(GetNMUONClusters()+GetNMFTClusters()-5); }; // chi2/ndf
80
d4643a10 81 void SetParentMCLabel(Int_t iParent, Int_t MClabel) { if (0<=iParent && iParent<fgkNParentsMax) fParentMCLabel[iParent] = MClabel; }
82 void SetParentPDGCode(Int_t iParent, Int_t PDGCode) { if (0<=iParent && iParent<fgkNParentsMax) fParentPDGCode[iParent] = PDGCode; }
83
84 Int_t GetParentMCLabel(Int_t iParent) { if (0<=iParent && iParent<fgkNParentsMax) return fParentMCLabel[iParent]; else return -1; }
85 Int_t GetParentPDGCode(Int_t iParent) { if (0<=iParent && iParent<fgkNParentsMax) return fParentPDGCode[iParent]; else return 0; }
86
87 void SetNWrongClustersMC(Int_t nClusters) { fNWrongClustersMC = nClusters; }
88 Int_t GetNWrongClustersMC() { return fNWrongClustersMC; }
89
ec7c7172 90 Double_t Pt() { return fKinem.Pt(); }
91 Double_t Eta() { return fKinem.Eta(); }
92 Double_t Rapidity() { return fKinem.Rapidity(); }
93 Double_t Px() { return fKinem.Px(); }
94 Double_t Py() { return fKinem.Py(); }
95 Double_t Pz() { return fKinem.Pz(); }
96 Double_t P() { return fKinem.P(); }
97
98 TMatrixD GetParamCovMatrix() { return fParamCovMatrix; }
99
100 void EvalKinem(Double_t z);
7e3dd1af 101
102 void SetTrackMCId(Int_t id) { fTrackMCId = id; }
103 Int_t GetTrackMCId() { return fTrackMCId; }
d4643a10 104
45c2d1ca 105 Bool_t IsFromDirectResonance();
106 Bool_t IsFromDirectCharm();
107 Bool_t IsFromDirectBeauty();
108 Bool_t IsFromChainResonance();
109 Bool_t IsFromChainCharm();
110 Bool_t IsFromChainBeauty();
111 Bool_t IsFromCharm() { return IsFromDirectCharm() || IsFromChainCharm(); }
112 Bool_t IsFromBeauty() { return IsFromDirectBeauty() || IsFromChainBeauty(); }
113 Bool_t IsMuon();
114 Bool_t IsFake();
115 Bool_t IsPDGResonance(Int_t pdg);
64185694 116 Bool_t IsPDGCharm(Int_t pdg);
117 Bool_t IsPDGBeauty(Int_t pdg);
45c2d1ca 118 Bool_t IsMuonFromBackground();
119
120 Int_t GetFirstMotherID();
121
122 void PrintHistory();
3a775f35 123
820b4d9e 124protected:
125
d4643a10 126 static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes; // max number of MFT planes
820b4d9e 127
d4643a10 128 Bool_t fPlaneExists[fNMaxPlanes];
820b4d9e 129
130 AliMUONTrack *fMUONTrack;
131 TParticle *fMCTrackRef;
132
133 TClonesArray *fMFTClusters;
134
d4643a10 135 Int_t fParentMCLabel[fgkNParentsMax]; ///< MC label of parents and grandparents
136 Int_t fParentPDGCode[fgkNParentsMax]; ///< PDG code of parents and grandparents
137
138 Int_t fNWrongClustersMC; // number of wrong associated MC clusters
139
7e3dd1af 140 Int_t fTrackMCId; // this number will identify the track within a MC simulation: run, event, MUON track
141
ec7c7172 142 TLorentzVector fKinem;
143
144 TMatrixD fParamCovMatrix;
145
026547c6 146 Double_t fRAtAbsorberEnd;
147
ca5d8012 148 ClassDef(AliMuonForwardTrack,2)
820b4d9e 149
150};
151
152//====================================================================================================================================================
153
154#endif
155
156
157