]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/muon/AliMuonInfoStoreRD.h
Add the line to support the output tree; Change the type of the output histogram...
[u/mrichter/AliRoot.git] / PWG3 / 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 //***********************************************************
8 // Class AliMuonInfoStoreRD
9 // class used to extract and store reco info of muon track
10 // Author: X-M. Zhang, zhang@clermont.in2p3.fr
11 //                     zhangxm@iopp.ccnu.edu.cn
12 //***********************************************************
13
14 #include <TObject.h>
15 #include <TVector3.h>
16 #include <TString.h>
17
18 class AliAODTrack;
19 class AliESDMuonTrack;
20
21 class AliMuonInfoStoreRD : public TObject {
22  public:
23
24   AliMuonInfoStoreRD();
25   AliMuonInfoStoreRD(AliAODTrack *trk);
26   AliMuonInfoStoreRD(AliESDMuonTrack *trk);
27   AliMuonInfoStoreRD(const AliMuonInfoStoreRD &src);
28   AliMuonInfoStoreRD& operator=(const AliMuonInfoStoreRD &src);
29   virtual ~AliMuonInfoStoreRD();
30
31   TVector3 Momentum()      const { return fMomentum; }
32
33   void XYZAtDCA(Double_t dca[3]) const { for (Int_t i=3; i--;) dca[i]=fDCA[i]; }
34   Double_t DCA() const  { return TMath::Sqrt(fDCA[0]*fDCA[0]+fDCA[1]*fDCA[1]); }
35
36   Short_t  Charge()           const { return fCharge;           }
37   Int_t    MatchTrigger()     const { return fMatchTrigger;     }
38   Double_t Chi2FitMomentum()  const { return fChi2FitMomentum;  }
39   Double_t Chi2MatchTrigger() const { return fChi2MatchTrigger; }
40   Double_t RabsEnd()          const { return fRabsEnd;          }
41
42   Bool_t IsSelected();
43
44   static const char* StdBranchName()                  { return fgkStdBranchName.Data(); }
45   static void SelectionCust(Double_t cuts[12])  { for (Int_t i=12; i--;) cuts[i]=fgCuts[i]; }
46   static void SetSelectionCuts(Double_t cuts[12]) { for (Int_t i=12; i--;) fgCuts[i]=cuts[i]; }
47
48  private:
49
50   void FillMuonInfo(AliAODTrack *trk);
51   void FillMuonInfo(AliESDMuonTrack *trk);
52
53   void SetMomentum(Double_t p[3])      { fMomentum.SetXYZ(p[0],p[1],p[2]);      }
54
55   void SetDCA(Double_t dca[3]) { for (Int_t i=3; i--;) fDCA[i]=dca[i];    }
56   void SetCharge(Short_t charge)           { fCharge           = charge;  }
57   void SetMatchTrigger(Int_t trigger)      { fMatchTrigger     = trigger; }
58   void SetChi2FitMomentum(Double_t chi2)   { fChi2FitMomentum  = chi2;    }
59   void SetChi2MatchTrigger(Double_t chi2)  { fChi2MatchTrigger = chi2;    }
60   void SetRabsEnd(Double_t rAbsEnd)        { fRabsEnd          = rAbsEnd; }
61
62   static const TString fgkStdBranchName;  // Standard branch name
63   static Double_t fgCuts[12];  // 0, min of 3-momentum
64                                // 1, max of 3-momentum
65                                // 2, pt_Min
66                                // 3, pt_Max
67                                // 4, eta_Min
68                                // 5, eta_Max
69                                // 6, dca_Min
70                                // 7, dca_Max
71                                // 8, about trigger matching
72                                // 9, about trigger matching
73                                //10, rAbs_Min
74                                //11, rAbs_Max
75
76   TVector3 fMomentum;       // momentum corrected w vtx
77
78   Double_t fDCA[3];            // distance of closet approach
79   Short_t  fCharge;            // track charge
80   Int_t    fMatchTrigger;      // type of match trigger
81   Double_t fChi2FitMomentum;   // chi2/NDF of momentum fit
82   Double_t fChi2MatchTrigger;  // chi2 of trigger matching
83   Double_t fRabsEnd;  // position at the end of front absorber
84
85   ClassDef(AliMuonInfoStoreRD, 4);
86 };
87
88 #endif