]>
Commit | Line | Data |
---|---|---|
27de2dfb | 1 | #ifndef ALIESDMUONTRACKCUTS_H |
2 | #define ALIESDMUONTRACKCUTS_H | |
3 | ||
4 | /* $Id$ */ | |
5 | ||
f70a1b5d | 6 | // |
7 | // Class for handling of ESD Muon track cuts | |
8 | // (based on ANALYSIS/AliESDtrackCuts). | |
9 | // | |
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. | |
16 | // | |
17 | ||
f70a1b5d | 18 | #include <TF1.h> |
19 | #include <TH2.h> | |
20 | #include "AliAnalysisCuts.h" | |
21 | ||
22 | class AliESD; | |
23 | class AliESDEvent; | |
24 | class AliESDMuonTrack; | |
25 | class AliLog; | |
26 | class TTree; | |
27 | ||
28 | class AliESDMuonTrackCuts : public AliAnalysisCuts | |
29 | { | |
30 | public: | |
31 | AliESDMuonTrackCuts(const Char_t* name = "AliESDMuonTrackCuts", const Char_t* title = ""); | |
32 | virtual ~AliESDMuonTrackCuts(); | |
9eeae5d5 | 33 | Bool_t IsSelected(TObject* obj) |
f70a1b5d | 34 | {return AcceptTrack((AliESDMuonTrack*)obj);} |
9eeae5d5 | 35 | Bool_t IsSelected(TList* /*list*/) {return kTRUE;} |
f70a1b5d | 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); | |
41 | ||
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); | |
46 | ||
47 | //###################################################### | |
48 | ||
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;} | |
57 | ||
58 | //###################################################### | |
59 | ||
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(); | |
65 | ||
66 | static void EnableNeededBranches(TTree* tree); | |
67 | ||
68 | protected: | |
69 | void Init(); // sets everything to 0 | |
70 | ||
71 | enum { kNCuts = 7 }; | |
72 | ||
73 | //###################################################### | |
74 | static const Char_t* fgkCutNames[kNCuts]; //! names of cuts (for internal use) | |
75 | ||
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 | |
84 | ||
85 | //###################################################### | |
86 | // diagnostics histograms | |
87 | Bool_t fHistogramsOn; // histograms on/off | |
88 | ||
89 | TH1F* fhPt[2]; //-> pt of esd tracks | |
90 | TH1F* fhEta[2]; //-> eta of esd tracks | |
91 | ||
92 | TH1F* fhCutStatistics; //-> statistics of what cuts the tracks did not survive | |
93 | TH2F* fhCutCorrelation; //-> 2d statistics plot | |
94 | ||
95 | ClassDef(AliESDMuonTrackCuts, 1) | |
96 | }; | |
97 | ||
98 | ||
99 | #endif |