]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONTrackLight.h
necessary fix in MUON
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackLight.h
CommitLineData
55fd51b0 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
929be614 9/// \ingroup evaluation
55fd51b0 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
b88403f3 26#include "TLorentzVector.h"
55fd51b0 27
28class AliMUONTrack;
29class AliESDMuonTrack;
bd5eb041 30class AliStack;
55fd51b0 31class TParticle;
bd5eb041 32class AliMUONVTrackStore;
55fd51b0 33
bd5eb041 34class AliMUONTrackLight : public TObject {
55fd51b0 35 public:
36 AliMUONTrackLight();
37 AliMUONTrackLight(AliESDMuonTrack* muonTrack);
38 AliMUONTrackLight(const AliMUONTrackLight &muonCopy);
e733e3dd 39 AliMUONTrackLight& operator=(const AliMUONTrackLight&);
b88403f3 40 virtual ~AliMUONTrackLight();
55fd51b0 41
b88403f3 42 /// Set 4-momentum of the generated particle
55fd51b0 43 void SetPGen(TLorentzVector pgen) {fPgen = pgen;}
b88403f3 44 /// Return 4-momentum of the generated particle
55fd51b0 45 TLorentzVector GetPGen() const {return fPgen;}
b88403f3 46 /// Set reconstructed 4-momentum
55fd51b0 47 void SetPRec(TLorentzVector prec) {fPrec = prec;}
b88403f3 48 /// Return reconstructed 4-momentum
55fd51b0 49 TLorentzVector GetPRec() const {return fPrec;}
b88403f3 50 /// Set primary vertex position from the ITS
55fd51b0 51 void SetVertex(Double_t *xyz) {for (Int_t i=0; i<3; i++) fXYZ[i]=xyz[i];}
b88403f3 52 /// Return primary vertex x position from the ITS
9ee1d6ff 53 Double_t GetX() const { return fXYZ[0]; }
b88403f3 54 /// Return primary vertex y position from the ITS
9ee1d6ff 55 Double_t GetY() const { return fXYZ[1]; }
b88403f3 56 /// Return primary vertex z position from the ITS
9ee1d6ff 57 Double_t GetZ() const { return fXYZ[2]; }
b88403f3 58 /// Return primary vertex position from the ITS
55fd51b0 59 Double_t* GetVertex() { return fXYZ; }
b88403f3 60 /// Set chi2 / ndf in the MUON track fit
61 void SetChi2(Double_t chi2) {fChi2=chi2;}
62 /// Return chi2 / ndf in the MUON track fit
9ee1d6ff 63 Double_t GetChi2() const { return fChi2; }
b88403f3 64 /// Set weight assigned to the muon
65 void SetWeight(Double_t w) {fWeight=w;}
66 /// Return weight assigned to the muon
9ee1d6ff 67 Double_t GetWeight() const { return fWeight; }
b88403f3 68
69 /// Set muon charge
55fd51b0 70 void SetCharge(Int_t charge) {fCharge = charge;}
b88403f3 71 /// Return muon charge
55fd51b0 72 Int_t GetCharge() const {return fCharge;}
b88403f3 73 /// Return hadronised parents and grandparents
55fd51b0 74 Int_t GetParentPDGCode(Int_t index = 0) const { return fParentPDGCode[index]; }
b88403f3 75 /// Return line of Pythia output for hadronised parents & grandparents
55fd51b0 76 Int_t GetParentPythiaLine(Int_t index = 0) const { return fParentPythiaLine[index]; }
b88403f3 77 /// Return pdg of the string [0], quarks/gluons [1,2], sometimes proton [3]
55fd51b0 78 Int_t GetQuarkPDGCode(Int_t index = 0) const { return fQuarkPDGCode[index]; }
b88403f3 79 /// Return line of Pythia output for string [0] and quarks [1,2], sometimes proton [3]
55fd51b0 80 Int_t GetQuarkPythiaLine(Int_t index = 0) const { return fQuarkPythiaLine[index]; }
b88403f3 81 /// Return line of Pythia output for string [0] and quarks [1,2], sometimes proton [3]
55fd51b0 82 Int_t GetTrackPythiaLine() const {return fTrackPythiaLine;}
b88403f3 83 /// Return pdg code of the rec. track (in general will be a muon)
55fd51b0 84 Int_t GetTrackPDGCode() const {return fTrackPDGCode;}
b88403f3 85 /// Set line of kin. stack where rec. track (in general, the muon) is stored
55fd51b0 86 void SetTrackPythiaLine(Int_t trackLine) {fTrackPythiaLine = trackLine;}
b88403f3 87 /// Set pdg code of the rec. track (in general will be a muon)
55fd51b0 88 void SetTrackPDGCode(Int_t trackPdg) {fTrackPDGCode = trackPdg;}
b88403f3 89 void FillFromESD(AliESDMuonTrack* muonTrack, Double_t zvert=-9999);
bd5eb041 90 void FillFromAliMUONTrack(AliMUONTrack *trackReco,Double_t zvert=-9999);
b88403f3 91 /// Return info if is a muon
55fd51b0 92 Bool_t IsAMuon() const { return (TMath::Abs(fTrackPDGCode)==13); }
b88403f3 93 Bool_t IsParentPionOrKaon(Int_t idParent = 0);
55fd51b0 94 void SetPxPyPz(Double_t px, Double_t py, Double_t pz);
b88403f3 95 /// Set flag for trigger
55fd51b0 96 void SetTriggered(Bool_t isTriggered) { fIsTriggered = isTriggered; }
b88403f3 97 /// Return flag for trigger
55fd51b0 98 Bool_t IsTriggered() const { return fIsTriggered; }
b88403f3 99 /// Return acually filled no. of *fragmented* parents
55fd51b0 100 Int_t GetNParents() const {return fNParents;}
b88403f3 101 void FillMuonHistory(AliStack *stack, TParticle *part);
55fd51b0 102 Bool_t IsB0(Int_t intTest) const;//checks if the provided PDG code corresponds to a neutral B meson
103 Bool_t IsMotherAResonance(Int_t index=0) const;
b88403f3 104 /// Return flag for oscillation
55fd51b0 105 Bool_t GetOscillation() const {return fOscillation;}
57e2ad1a 106 virtual void PrintInfo(const Option_t* opt); //"H" muon's decay history
55fd51b0 107 //"K" muon kinematics
108 //"A" all variables
109 Int_t GetParentFlavour(Int_t idParent=0) const;
9ee1d6ff 110 Bool_t IsDiquark(Int_t pdg) const;
55fd51b0 111protected:
b88403f3 112 static const Int_t fgkNParentsMax = 5; ///< maximum number of parents
113 TLorentzVector fPrec; ///< reconstructed 4-momentum
114 Double_t fXYZ[3]; ///< primary vertex position from the ITS
115 Bool_t fIsTriggered; ///< flag for trigger
116 Int_t fCharge; ///< muon charge
117 Double_t fChi2; ///< chi2 / ndf in the MUON track fit
118 Float_t fCentr; ///< centrality
119 TLorentzVector fPgen; ///< 4-momentum of the generated particle
120 Int_t fTrackPythiaLine; ///< line of kin. stack where rec. track (in general, the muon) is stored
121 Int_t fTrackPDGCode; ///< pdg code of the rec. track (in general will be a muon)
122 Int_t fParentPDGCode[fgkNParentsMax]; ///< hadronised parents and grandparents
123 Int_t fParentPythiaLine[fgkNParentsMax];///< line of Pythia output for hadronised parents & grandparents
124 Int_t fQuarkPDGCode[4]; ///< pdg of the string [0], quarks/gluons [1,2], sometimes proton [3]
125 Int_t fQuarkPythiaLine[4]; ///< line of Pythia output for string [0] and quarks [1,2], sometimes proton [3]
126 Bool_t fOscillation; ///< flag for oscillation
127 Int_t fNParents; ///< acually filled no. of *fragmented* parents
128 Double_t fWeight; ///< weight assigned to the muon
129 /// Set flag for oscillation
55fd51b0 130 void SetOscillation(Bool_t oscillation) { fOscillation = oscillation; }
b88403f3 131 /// Set hadronised parents and grandparents
55fd51b0 132 void SetParentPDGCode(Int_t index, Int_t pdg) { fParentPDGCode[index] = pdg; }
b88403f3 133 /// Set line of Pythia output for hadronised parents & grandparents
55fd51b0 134 void SetParentPythiaLine(Int_t index, Int_t line) { fParentPythiaLine[index] = line; }
b88403f3 135 /// Set pdg of the string [0], quarks/gluons [1,2], sometimes proton [3]
55fd51b0 136 void SetQuarkPDGCode(Int_t index, Int_t pdg){ fQuarkPDGCode[index] = pdg; }
b88403f3 137 /// Set line of Pythia output for string [0] and quarks [1,2], sometimes proton [3]
55fd51b0 138 void SetQuarkPythiaLine(Int_t index, Int_t line){ fQuarkPythiaLine[index] = line; }
139 void ResetQuarkInfo();
140
141 ClassDef(AliMUONTrackLight,1) /// Muon Track for analysis
142};
143
144#endif