]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTrackLight.h
In AliMUONTrackReconstructorK:
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackLight.h
1 #ifndef ALIMUONTRACKLIGHT_H
2 #define ALIMUONTRACKLIGHT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7 // Revision of includes 06/09/2006
8
9 /// \ingroup evaluation
10 /// \class AliMUONTrackLight
11 /// \brief Compact information for the muon generated tracks
12 /// 
13 /// Compact information for the muon generated tracks in the MUON arm 
14 /// useful at the last stage of the analysis chain
15 /// provides a link between the reconstructed track and the generated particle 
16 /// stores kinematical information at gen. and rec. level and 
17 /// the decay history of the muon, allowing the identification of the 
18 /// mother process 
19 /// 
20 /// To be used together with AliMUONPairLight
21 ///
22 /// \author This class was prepared by INFN Cagliari, July 2006
23 /// (authors: H.Woehri, A.de Falco)
24
25 // ROOT classes
26 #include "TLorentzVector.h"
27
28 class AliMUONTrack;
29 class AliESDMuonTrack;
30 class AliStack;
31 class TParticle;
32 class AliMUONVTrackStore;
33
34 class AliMUONTrackLight : public TObject {
35  public: 
36   AliMUONTrackLight(); 
37   AliMUONTrackLight(AliESDMuonTrack* muonTrack); 
38   AliMUONTrackLight(const AliMUONTrackLight &muonCopy);
39   virtual ~AliMUONTrackLight(); 
40   
41   /// Set 4-momentum of the generated particle
42   void SetPGen(TLorentzVector pgen) {fPgen = pgen;}
43   /// Return 4-momentum of the generated particle  
44   TLorentzVector GetPGen() const {return fPgen;}
45   /// Set reconstructed 4-momentum
46   void SetPRec(TLorentzVector prec) {fPrec = prec;}
47   /// Return reconstructed 4-momentum 
48   TLorentzVector GetPRec() const {return fPrec;}
49   /// Set primary vertex position from the ITS
50   void SetVertex(Double_t *xyz) {for (Int_t i=0; i<3; i++) fXYZ[i]=xyz[i];}
51   /// Return primary vertex x position from the ITS 
52   Double_t GetX() { return fXYZ[0]; } 
53   /// Return primary vertex y position from the ITS 
54   Double_t GetY() { return fXYZ[1]; } 
55   /// Return primary vertex z position from the ITS 
56   Double_t GetZ() { return fXYZ[2]; } 
57   /// Return  primary vertex position from the ITS
58   Double_t* GetVertex() { return fXYZ; } 
59   /// Set chi2 / ndf in the MUON track fit
60   void SetChi2(Double_t chi2) {fChi2=chi2;}
61   /// Return chi2 / ndf in the MUON track fit 
62   Double_t GetChi2() { return fChi2; } 
63   /// Set weight assigned to the muon
64   void SetWeight(Double_t w) {fWeight=w;}
65   /// Return weight assigned to the muon 
66   Double_t GetWeight() { return fWeight; } 
67   
68   /// Set muon charge 
69   void SetCharge(Int_t charge) {fCharge = charge;}
70   /// Return muon charge 
71   Int_t GetCharge() const {return fCharge;}
72   /// Return hadronised parents and grandparents 
73   Int_t GetParentPDGCode(Int_t index = 0) const { return fParentPDGCode[index]; } 
74   /// Return line of Pythia output for hadronised parents & grandparents 
75   Int_t GetParentPythiaLine(Int_t index = 0) const { return fParentPythiaLine[index]; } 
76   /// Return pdg of the string [0], quarks/gluons [1,2], sometimes proton [3] 
77   Int_t GetQuarkPDGCode(Int_t index = 0) const { return fQuarkPDGCode[index]; } 
78   /// Return line of Pythia output for string [0] and quarks [1,2], sometimes proton [3] 
79   Int_t GetQuarkPythiaLine(Int_t index = 0) const { return fQuarkPythiaLine[index]; } 
80   /// Return line of Pythia output for string [0] and quarks [1,2], sometimes proton [3] 
81   Int_t GetTrackPythiaLine() const {return fTrackPythiaLine;}
82   /// Return pdg code of the rec. track (in general will be a muon) 
83   Int_t GetTrackPDGCode() const {return fTrackPDGCode;}
84   /// Set line of kin. stack where rec. track (in general, the muon) is stored
85   void SetTrackPythiaLine(Int_t trackLine) {fTrackPythiaLine = trackLine;}
86   /// Set pdg code of the rec. track (in general will be a muon)
87   void SetTrackPDGCode(Int_t trackPdg) {fTrackPDGCode = trackPdg;}
88   void FillFromESD(AliESDMuonTrack* muonTrack, Double_t zvert=-9999);
89   void FillFromAliMUONTrack(AliMUONTrack *trackReco,Double_t zvert=-9999);
90   /// Return info if is a muon 
91   Bool_t IsAMuon() const { return (TMath::Abs(fTrackPDGCode)==13); }
92   Bool_t IsParentPionOrKaon(Int_t idParent = 0);
93   void SetPxPyPz(Double_t px, Double_t py, Double_t pz); 
94   /// Set flag for trigger 
95   void SetTriggered(Bool_t isTriggered) { fIsTriggered = isTriggered; } 
96   /// Return flag for trigger  
97   Bool_t IsTriggered() const { return fIsTriggered; } 
98   TParticle* FindRefTrack(AliMUONTrack* trackReco, AliMUONVTrackStore* trackRefArray, AliStack* stack);
99   Int_t TrackCheck(Bool_t *compTrack);
100   /// Return acually filled no. of *fragmented* parents 
101   Int_t GetNParents() const {return fNParents;}
102   void FillMuonHistory(AliStack *stack, TParticle *part);
103   Bool_t IsB0(Int_t intTest) const;//checks if the provided PDG code corresponds to a neutral B meson
104   Bool_t IsMotherAResonance(Int_t index=0) const;
105   /// Return flag for oscillation 
106   Bool_t GetOscillation() const {return fOscillation;}
107   virtual void PrintInfo(Option_t* opt); //"H" muon's decay history
108   //"K" muon kinematics
109   //"A" all variables
110   Int_t GetParentFlavour(Int_t idParent=0) const;
111   Bool_t IsDiquark(Int_t pdg);
112 protected:
113   static const Int_t fgkNParentsMax = 5;   ///< maximum number of parents
114   TLorentzVector fPrec; ///< reconstructed 4-momentum
115   Double_t fXYZ[3];     ///< primary vertex position from the ITS 
116   Bool_t fIsTriggered;  ///< flag for trigger 
117   Int_t fCharge;        ///< muon charge 
118   Double_t fChi2;       ///< chi2 / ndf in the MUON track fit 
119   Float_t fCentr;       ///< centrality 
120   TLorentzVector fPgen;   ///< 4-momentum of the generated particle
121   Int_t fTrackPythiaLine; ///< line of kin. stack where rec. track (in general, the muon) is stored
122   Int_t fTrackPDGCode; ///< pdg code of the rec. track (in general will be a muon)
123   Int_t fParentPDGCode[fgkNParentsMax]; ///< hadronised parents and grandparents 
124   Int_t fParentPythiaLine[fgkNParentsMax];///< line of Pythia output for hadronised parents & grandparents
125   Int_t fQuarkPDGCode[4]; ///< pdg of the string [0], quarks/gluons [1,2], sometimes proton [3] 
126   Int_t fQuarkPythiaLine[4]; ///< line of Pythia output for string [0] and quarks [1,2], sometimes proton [3]
127   Bool_t fOscillation; ///< flag for oscillation
128   Int_t fNParents; ///< acually filled no. of *fragmented* parents
129   Double_t fWeight; ///< weight assigned to the muon
130   /// Set flag for oscillation
131   void SetOscillation(Bool_t oscillation) { fOscillation = oscillation; }
132   /// Set hadronised parents and grandparents 
133   void SetParentPDGCode(Int_t index, Int_t pdg) { fParentPDGCode[index] = pdg; } 
134   /// Set line of Pythia output for hadronised parents & grandparents
135   void SetParentPythiaLine(Int_t index, Int_t line) { fParentPythiaLine[index] = line; } 
136   /// Set pdg of the string [0], quarks/gluons [1,2], sometimes proton [3] 
137   void SetQuarkPDGCode(Int_t index, Int_t pdg){ fQuarkPDGCode[index] = pdg; }
138   /// Set line of Pythia output for string [0] and quarks [1,2], sometimes proton [3]
139   void SetQuarkPythiaLine(Int_t index, Int_t line){ fQuarkPythiaLine[index] = line; }
140   void ResetQuarkInfo();
141
142   ClassDef(AliMUONTrackLight,1)  /// Muon Track for analysis
143 }; 
144
145 #endif