]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/muon/AliMuonInfoStoreRD.h
Changes for #90436: Misuse of TClonesArray containing AliESDMuonCluster
[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
20 class AliAODTrack;
21 class AliESDMuonTrack;
22
23 class AliMuonInfoStoreRD : public TObject {
24  public:
25
26   AliMuonInfoStoreRD();
27   AliMuonInfoStoreRD(AliAODTrack *trk);
28   AliMuonInfoStoreRD(AliESDMuonTrack *trk);
29   AliMuonInfoStoreRD(const AliMuonInfoStoreRD &src);
30   AliMuonInfoStoreRD& operator=(const AliMuonInfoStoreRD &src);
31   virtual ~AliMuonInfoStoreRD();
32
33   TVector3 Momentum()      const { return fMomentum; }
34
35   void XYZAtDCA(Double_t dca[3]) const { for (Int_t i=3; i--;) dca[i]=fDCA[i]; }
36   Double_t DCA() const  { return TMath::Sqrt(fDCA[0]*fDCA[0]+fDCA[1]*fDCA[1]); }
37
38   Short_t  Charge()       const { return fCharge;           }
39   Int_t    MatchTrigger() const { return fMatchTrigger;     }
40   Double_t Chi2Tracker()  const { return fChi2FitMomentum;  }
41   Double_t Chi2Trigger()  const { return fChi2MatchTrigger; }
42   Double_t RabsEnd()      const { return fRabsEnd;          }
43
44   Bool_t IsSelected();
45
46   static const char* StdBranchName()              { return fgkStdBranchName.Data(); }
47   static void SelectionCust(Double_t cuts[16])    { for (Int_t i=16; i--;) cuts[i]=fgCuts[i]; }
48   static void SetSelectionCuts(Double_t cuts[16]) { for (Int_t i=16; i--;) fgCuts[i]=cuts[i]; }
49
50  private:
51
52   void FillMuonInfo(AliAODTrack *trk);
53   void FillMuonInfo(AliESDMuonTrack *trk);
54
55   void SetMomentum(Double_t p[3])      { fMomentum.SetXYZ(p[0],p[1],p[2]);      }
56
57   void SetDCA(Double_t dca[3]) { for (Int_t i=3; i--;) fDCA[i]=dca[i];    }
58   void SetCharge(Short_t charge)           { fCharge           = charge;  }
59   void SetMatchTrigger(Int_t trigger)      { fMatchTrigger     = trigger; }
60   void SetChi2FitMomentum(Double_t chi2)   { fChi2FitMomentum  = chi2;    }
61   void SetChi2MatchTrigger(Double_t chi2)  { fChi2MatchTrigger = chi2;    }
62   void SetRabsEnd(Double_t rAbsEnd)        { fRabsEnd          = rAbsEnd; }
63
64   static const TString fgkStdBranchName;  // Standard branch name
65   static Double_t fgCuts[16];  // 0, min of 3-momentum
66                                // 1, max of 3-momentum
67                                // 2, pt_Min
68                                // 3, pt_Max
69                                // 4, eta_Min
70                                // 5, eta_Max
71                                // 6, dca_Min
72                                // 7, dca_Max
73                                // 8, about trigger matching
74                                // 9, about trigger matching
75                                //10, rAbs_Min
76                                //11, rAbs_Max
77                                //12, chi2Tracker Min
78                                //13, chi2Tracker Max
79                                //14, chi2Trigger Min
80                                //15, chi2Trigger Max
81
82   TVector3 fMomentum;       // momentum corrected w vtx
83
84   Double_t fDCA[3];            // distance of closet approach
85   Short_t  fCharge;            // track charge
86   Int_t    fMatchTrigger;      // type of match trigger
87   Double_t fChi2FitMomentum;   // chi2/NDF of momentum fit
88   Double_t fChi2MatchTrigger;  // chi2 of trigger matching
89   Double_t fRabsEnd;  // position at the end of front absorber
90
91   ClassDef(AliMuonInfoStoreRD, 5);
92 };
93
94 #endif