]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/muon/AliMuonInfoStoreRD.h
Merge branch 'master_patch'
[u/mrichter/AliRoot.git] / PWG / muon / AliMuonInfoStoreRD.h
1 #ifndef ALIMUONINFOSTORERD_H
2 #define ALIMUONINFOSTORERD_H
3
4 /* Copyright(c) 1998-2006, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */ 
8
9 //***********************************************************
10 // Class AliMuonInfoStoreRD
11 // class used to extract and store reco info of muon track
12 // Author: X-M. Zhang, zhang@clermont.in2p3.fr
13 //                     zhangxm@iopp.ccnu.edu.cn
14 //***********************************************************
15
16 #include <TObject.h>
17 #include <TVector3.h>
18 #include <TString.h>
19 #include <TMath.h>
20
21 class AliAODTrack;
22 class AliESDMuonTrack;
23
24 class AliMuonInfoStoreRD : public TObject {
25  public:
26
27   AliMuonInfoStoreRD();
28   AliMuonInfoStoreRD(AliAODTrack     *trk, UInt_t selMask);
29   AliMuonInfoStoreRD(AliESDMuonTrack *trk, UInt_t selMask);
30   AliMuonInfoStoreRD(const AliMuonInfoStoreRD &src);
31   AliMuonInfoStoreRD& operator=(const AliMuonInfoStoreRD &src);
32   virtual ~AliMuonInfoStoreRD();
33
34   TVector3 MomentumAtVtx() const { return fMomentumAtVtx; }
35   TVector3 MomentumAtDCA() const { return fMomentumAtDCA; }
36   TVector3 MomentumUncor() const { return fMomentumUncor; }
37
38   void XYZAtDCA(Double_t dca[3]) const { for (Int_t i=3; i--;) dca[i]=fDCA[i]; }
39   Double_t DCA() const  { return TMath::Sqrt(fDCA[0]*fDCA[0]+fDCA[1]*fDCA[1]); }
40
41   Short_t  Charge()       const { return fCharge;           }
42   Int_t    MatchTrigger() const { return fMatchTrigger;     }
43   Double_t Chi2Tracker()  const { return fChi2FitMomentum;  }
44   Double_t Chi2Trigger()  const { return fChi2MatchTrigger; }
45   Double_t RabsEnd()      const { return fRabsEnd;          }
46   UInt_t   SelMask()      const { return fSelMask;          }
47   Bool_t   IsSelected(const UInt_t filter) { return ((fSelMask & filter) == filter); }
48   static const char* StdBranchName()       { return fgkStdBranchName.Data();       }
49
50  private:
51
52   void FillMuonInfo(AliAODTrack *trk);
53   void FillMuonInfo(AliESDMuonTrack *trk);
54
55   void SetMomentumAtVtx(Double_t p[3]) { fMomentumAtVtx.SetXYZ(p[0],p[1],p[2]); }
56   void SetMomentumAtDCA(Double_t p[3]) { fMomentumAtDCA.SetXYZ(p[0],p[1],p[2]); }
57   void SetMomentumUncor(Double_t p[3]) { fMomentumUncor.SetXYZ(p[0],p[1],p[2]); }
58   void SetDCA(Double_t dca[3])         { for (Int_t i=3; i--;) fDCA[i]=dca[i];  }
59   void SetCharge(Short_t charge)           { fCharge           = charge;  }
60   void SetMatchTrigger(Int_t trigger)      { fMatchTrigger     = trigger; }
61   void SetChi2FitMomentum(Double_t chi2)   { fChi2FitMomentum  = chi2;    }
62   void SetChi2MatchTrigger(Double_t chi2)  { fChi2MatchTrigger = chi2;    }
63   void SetRabsEnd(Double_t rAbsEnd)        { fRabsEnd          = rAbsEnd; }
64
65   static const TString fgkStdBranchName;  // Standard branch name
66
67   TVector3 fMomentumAtVtx;  // momentum corrected w vtx
68   TVector3 fMomentumAtDCA;  // momentum at DCA in vtx plane
69   TVector3 fMomentumUncor;  // momentum at first station
70
71   Double_t fDCA[3];            // distance of closet approach
72   Short_t  fCharge;            // track charge
73   Int_t    fMatchTrigger;      // type of match trigger
74   Double_t fChi2FitMomentum;   // chi2/NDF of momentum fit
75   Double_t fChi2MatchTrigger;  // chi2 of trigger matching
76   Double_t fRabsEnd;  // position at the end of front absorber
77   UInt_t   fSelMask;  // mask of single muon selection
78
79   ClassDef(AliMuonInfoStoreRD, 7);
80 };
81
82 #endif