1 #ifndef ALIESDMUONTRACKCUTS_H
2 #define ALIESDMUONTRACKCUTS_H
7 // Class for handling of ESD Muon track cuts
8 // (based on ANALYSIS/AliESDtrackCuts).
10 // The class manages some kinematic cuts. Two methods
11 // can be used to figure out if an ESD Muon track survives the cuts:
12 // AcceptTrack which takes a single AliESDMuonTrack as argument and
13 // returns kTRUE/kFALSE or GetAcceptedTracks which takes an AliESD
14 // object and returns an TObjArray (of AliESDMuonTracks) with the tracks
15 // in the ESD that survived the cuts.
20 #include "AliAnalysisCuts.h"
24 class AliESDMuonTrack;
28 class AliESDMuonTrackCuts : public AliAnalysisCuts
31 AliESDMuonTrackCuts(const Char_t* name = "AliESDMuonTrackCuts", const Char_t* title = "");
32 virtual ~AliESDMuonTrackCuts();
33 Bool_t IsSelected(TObject* obj)
34 {return AcceptTrack((AliESDMuonTrack*)obj);}
35 Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
36 Bool_t AcceptTrack(AliESDMuonTrack* esdMuTrack);
37 TObjArray* GetAcceptedTracks(AliESD* esd);
38 Int_t CountAcceptedTracks(AliESD* esd);
39 TObjArray* GetAcceptedTracks(AliESDEvent* esd);
40 Int_t CountAcceptedTracks(AliESDEvent* esd);
42 virtual Long64_t Merge(TCollection* list);
43 virtual void Copy(TObject &c) const;
44 AliESDMuonTrackCuts(const AliESDMuonTrackCuts& pd); // Copy Constructor
45 AliESDMuonTrackCuts &operator=(const AliESDMuonTrackCuts &c);
47 //######################################################
49 // track kinematic cut setters
50 void SetPRange(Float_t r1=0, Float_t r2=1e10) {fPMin=r1; fPMax=r2;}
51 void SetPtRange(Float_t r1=0, Float_t r2=1e10) {fPtMin=r1; fPtMax=r2;}
52 void SetPxRange(Float_t r1=-1e10, Float_t r2=1e10) {fPxMin=r1; fPxMax=r2;}
53 void SetPyRange(Float_t r1=-1e10, Float_t r2=1e10) {fPyMin=r1; fPyMax=r2;}
54 void SetPzRange(Float_t r1=-1e10, Float_t r2=1e10) {fPzMin=r1; fPzMax=r2;}
55 void SetEtaRange(Float_t r1=-1e10, Float_t r2=1e10) {fEtaMin=r1; fEtaMax=r2;}
56 void SetRapRange(Float_t r1=-1e10, Float_t r2=1e10) {fRapMin=r1; fRapMax=r2;}
58 //######################################################
60 void SetHistogramsOn(Bool_t b=kFALSE) {fHistogramsOn = b;}
61 void DefineHistograms(Int_t color=1);
62 virtual Bool_t LoadHistograms(const Char_t* dir = 0);
63 void SaveHistograms(const Char_t* dir = 0);
64 void DrawHistograms();
66 static void EnableNeededBranches(TTree* tree);
69 void Init(); // sets everything to 0
73 //######################################################
74 static const Char_t* fgkCutNames[kNCuts]; //! names of cuts (for internal use)
76 // esd kinematics cuts
77 Float_t fPMin, fPMax; // definition of the range of the P
78 Float_t fPtMin, fPtMax; // definition of the range of the Pt
79 Float_t fPxMin, fPxMax; // definition of the range of the Px
80 Float_t fPyMin, fPyMax; // definition of the range of the Py
81 Float_t fPzMin, fPzMax; // definition of the range of the Pz
82 Float_t fEtaMin, fEtaMax; // definition of the range of the eta
83 Float_t fRapMin, fRapMax; // definition of the range of the y
85 //######################################################
86 // diagnostics histograms
87 Bool_t fHistogramsOn; // histograms on/off
89 TH1F* fhPt[2]; //-> pt of esd tracks
90 TH1F* fhEta[2]; //-> eta of esd tracks
92 TH1F* fhCutStatistics; //-> statistics of what cuts the tracks did not survive
93 TH2F* fhCutCorrelation; //-> 2d statistics plot
95 ClassDef(AliESDMuonTrackCuts, 1)