]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/AliESDv0Cuts.h
o Add pid response handler needed for managing the AliPIDResponse setup in case
[u/mrichter/AliRoot.git] / ANALYSIS / AliESDv0Cuts.h
1 //
2 //  Class for handling of ESD v0 cuts.
3 //
4 //
5
6 #ifndef ALIESDV0CUTS_H
7 #define ALIESDV0CUTS_H
8
9 #include <TF1.h>
10 #include <TH2.h>
11 #include "AliAnalysisCuts.h"
12
13 class AliESD;
14 class AliESDEvent;
15 class AliESDVertex;
16 class AliESDtrack;
17 class AliESDv0;
18 class AliLog;
19 class TTree;
20
21 class AliESDv0Cuts : public AliAnalysisCuts
22 {
23 public:
24   AliESDv0Cuts(const Char_t* name = "AliESDv0Cuts", const Char_t* title = "");
25   virtual ~AliESDv0Cuts();
26
27   Bool_t IsSelected(TObject* /*obj*/) {return kTRUE;}
28   Bool_t IsSelected(TList* listObj);
29   Bool_t IsSelected(TObject* const obj1, TObject* const obj2, TObject* const obj3, TObject* const obj4)
30   {return AcceptV0((AliESDv0*) obj1, (AliESDtrack*) obj2, (AliESDtrack*) obj3, (const AliESDVertex*) obj4);}
31   Bool_t AcceptV0(AliESDv0* const esdV0, AliESDtrack* const trackPos, AliESDtrack* const trackNeg, const AliESDVertex*  esdVertex);
32   TObjArray* GetAcceptedV0s(const AliESD* esd);
33   Int_t CountAcceptedV0s(const AliESD* esd);
34   TObjArray* GetAcceptedV0s(const AliESDEvent* esd);
35   Int_t CountAcceptedV0s(const AliESDEvent* esd);
36
37   virtual Long64_t Merge(TCollection* list);
38   virtual void Copy(TObject &c) const;
39   AliESDv0Cuts(const AliESDv0Cuts& pd);  // Copy Constructor
40   AliESDv0Cuts &operator=(const AliESDv0Cuts &c);
41
42   //######################################################
43   // v0 quality cut setters  
44   void SetMinDcaPosToVertex(Float_t min=-1)          {fCutMinDcaPosToVertex=min;}
45   void SetMinDcaNegToVertex(Float_t min=-1)          {fCutMinDcaNegToVertex=min;}
46   void SetMaxChi2(Float_t max=1e10)                  {fCutMaxChi2=max;}
47   void SetMaxDcaV0Daughters(Float_t max=1e10)        {fCutMaxDcaV0Daughters=max;}
48   void SetMinRadius(Float_t min=-1)                  {fCutMinRadius=min;}
49   void SetMaxRadius(Float_t max=1e10)                {fCutMaxRadius=max;}
50   void SetMinCosinePointingAngle(Float_t min=-1)     {fCutMinCosinePointingAngle=min;}
51   void SetRequireOnFlyStatus(Bool_t b=kFALSE)        {fCutRequireOnFlyStatus=b;}
52   void SetMaxDcaV0ToVertex(Float_t max=1e10)         {fCutMaxDcaV0ToVertex=max;}
53
54   // v0 kinematic cut setters
55   void SetPRange(Float_t r1=0, Float_t r2=1e10)      {fPMin=r1;   fPMax=r2;}
56   void SetPtRange(Float_t r1=0, Float_t r2=1e10)     {fPtMin=r1;  fPtMax=r2;}
57   void SetPxRange(Float_t r1=-1e10, Float_t r2=1e10) {fPxMin=r1;  fPxMax=r2;}
58   void SetPyRange(Float_t r1=-1e10, Float_t r2=1e10) {fPyMin=r1;  fPyMax=r2;}
59   void SetPzRange(Float_t r1=-1e10, Float_t r2=1e10) {fPzMin=r1;  fPzMax=r2;}
60
61   //######################################################
62   void SetHistogramsOn(Bool_t b=kFALSE) {fHistogramsOn = b;}
63   void DefineHistograms(Int_t color=1);
64   virtual Bool_t LoadHistograms(const Char_t* dir = 0);
65   void SaveHistograms(const Char_t* dir = 0);
66   void DrawHistograms();
67
68   static void EnableNeededBranches(TTree* tree);
69
70   // void SaveQualityCuts(Char_t* file)
71   // void LoadQualityCuts(Char_t* file)
72
73 protected:
74   void Init(); // sets everything to 0
75
76   enum { kNCuts = 14 };
77
78   //######################################################
79   // esd v0 quality cuts
80   static const Char_t* fgkCutNames[kNCuts]; //! names of cuts (for internal use)
81
82   Float_t fCutMinDcaPosToVertex;      // min dca of the positive daughter to the primary vertex
83   Float_t fCutMinDcaNegToVertex;      // min dca of the negative daughter to the primary vertex
84   Float_t fCutMaxChi2;                // max chi2
85   Float_t fCutMaxDcaV0Daughters;      // max dca between the two v0 daughters
86   Float_t fCutMinRadius;              // min reconstruction radius (fiducial volume)
87   Float_t fCutMaxRadius;              // max reconstruction radius (fiducial volume)
88   Float_t fCutMinCosinePointingAngle; // min cosine of pointing angle
89   Bool_t  fCutRequireOnFlyStatus;     // require on fly status
90   Float_t fCutMaxDcaV0ToVertex;       // max dca of the v0 to the primary vertex
91
92   // v0 kinematics cuts
93   Float_t fPMin,   fPMax;             // definition of the range of the P
94   Float_t fPtMin,  fPtMax;            // definition of the range of the Pt
95   Float_t fPxMin,  fPxMax;            // definition of the range of the Px
96   Float_t fPyMin,  fPyMax;            // definition of the range of the Py
97   Float_t fPzMin,  fPzMax;            // definition of the range of the Pz
98
99   //######################################################
100   // diagnostics histograms
101   Bool_t fHistogramsOn;               // histograms on/off
102
103   TH1F* fhDcaPosToVertex[2];          //->
104   TH1F* fhDcaNegToVertex[2];          //->
105   TH1F* fhChi2[2];                    //->
106   TH1F* fhDcaV0Daughters[2];          //->
107   TH1F* fhRadius[2];                  //->
108   TH1F* fhCosinePointingAngle[2];     //->
109   TH1F* fhOnFlyStatus[2];             //->
110   TH1F* fhDcaV0ToVertex[2];           //->
111   
112   TH1F* fhPt[2];                      //-> pt of esd v0s
113
114   TH1F* fhCutStatistics;              //-> statistics of what cuts the v0s did not survive
115   TH2F* fhCutCorrelation;             //-> 2d statistics plot
116
117   ClassDef(AliESDv0Cuts, 1)
118 };
119
120
121 #endif