small fix
[u/mrichter/AliRoot.git] / PWG0 / esdTrackCuts / AliESDtrackCuts.h
index 65399f690ff64cc27a8080e08169c7664941a4dd..e5bdc03d4af538319889160f269e224198f806e2 100644 (file)
@@ -13,7 +13,8 @@
 //  - upper and lower cuts for all (non-boolean) cuts
 //  - update print method
 //  - is there a smarter way to manage the cuts?
-//
+//  - put comment to each variable
+//  - implement destructor !!!
 //
 //  NOTE: 
 //  - 
@@ -23,7 +24,6 @@
 #include "TObject.h"
 #include "TH1.h"
 #include "TH2.h"
-class TTree;
 
 #include "AliESD.h"
 #include "AliESDtrack.h"
@@ -31,12 +31,62 @@ class TTree;
 
 class AliESDtrackCuts : public TObject 
 {
+
+public:
+  AliESDtrackCuts();
+  virtual ~AliESDtrackCuts();
+  AliESDtrackCuts(const AliESDtrackCuts& pd);  // Copy Constructor
+
+  Bool_t AcceptTrack(AliESDtrack* esdTrack);
+
+  TObjArray* GetAcceptedTracks(AliESD* esd);
+
+  AliESDtrackCuts &operator=(const AliESDtrackCuts &c);
+  virtual void Copy(TObject &c) const;
+
+  //######################################################
+  // track quality cut setters  
+  void SetMinNClustersTPC(Int_t min=-1)          {fCut_MinNClusterTPC=min;}
+  void SetMinNClustersITS(Int_t min=-1)          {fCut_MinNClusterITS=min;}
+  void SetMaxChi2PerClusterTPC(Float_t max=1e99) {fCut_MaxChi2PerClusterTPC=max;}
+  void SetMaxChi2PerClusterITS(Float_t max=1e99) {fCut_MaxChi2PerClusterITS=max;}
+  void SetRequireTPCRefit(Bool_t b=kFALSE)       {fCut_RequireTPCRefit=b;}
+  void SetRequireITSRefit(Bool_t b=kFALSE)       {fCut_RequireITSRefit=b;}
+  void SetAcceptKingDaughters(Bool_t b=kFALSE)   {fCut_AcceptKinkDaughters=b;}
+  void SetMaxCovDiagonalElements(Float_t c1=1e99, Float_t c2=1e99, Float_t c3=1e99, Float_t c4=1e99, Float_t c5=1e99) 
+    {fCut_MaxC11=c1; fCut_MaxC22=c2; fCut_MaxC33=c3; fCut_MaxC44=c4; fCut_MaxC55=c5;}
+  
+  // track to vertex cut setters
+  void SetMinNsigmaToVertex(Float_t sigma=1e99)       {fCut_NsigmaToVertex = sigma;}
+  void SetRequireSigmaToVertex(Bool_t b=kTRUE )       {fCut_SigmaToVertexRequired = b;}
+  
+  // track kinmatic cut setters  
+  void SetPRange(Float_t r1=0, Float_t r2=1e99)       {fPMin=r1;   fPMax=r2;}
+  void SetPtRange(Float_t r1=0, Float_t r2=1e99)      {fPtMin=r1;  fPtMax=r2;}
+  void SetPxRange(Float_t r1=-1e99, Float_t r2=1e99)  {fPxMin=r1;  fPxMax=r2;}
+  void SetPyRange(Float_t r1=-1e99, Float_t r2=1e99)  {fPyMin=r1;  fPyMax=r2;}
+  void SetPzRange(Float_t r1=-1e99, Float_t r2=1e99)  {fPzMin=r1;  fPzMax=r2;}
+  void SetEtaRange(Float_t r1=-1e99, Float_t r2=1e99) {fEtaMin=r1; fEtaMax=r2;}
+  void SetRapRange(Float_t r1=-1e99, Float_t r2=1e99) {fRapMin=r1; fRapMax=r2;}
+
+  //######################################################
+  void SetHistogramsOn(Bool_t b=kFALSE) {fHistogramsOn = b;}
+  void DefineHistograms(Int_t color=1);
+  void SaveHistograms(Char_t* dir="track_selection");
+  
+  virtual void Print(const Option_t* = "") const;
+
+  // void SaveQualityCuts(Char_t* file)
+  // void LoadQualityCuts(Char_t* file)
+
 protected:
+  void Init(); // sets everything to 0
+
+  enum { kNCuts = 21 };
 
   //######################################################
   // esd track quality cuts
-  static const Int_t fNCuts = 21;
-  Char_t*            fCutNames[21];
+  static const Char_t* fCutNames[kNCuts];
 
   Int_t   fCut_MinNClusterTPC;        // min number of tpc clusters
   Int_t   fCut_MinNClusterITS;        // min number of its clusters  
@@ -67,85 +117,33 @@ protected:
   Float_t fEtaMin, fEtaMax;           // definition of the range of the eta
   Float_t fRapMin, fRapMax;           // definition of the range of the y
 
-  //######################################################
-  // array of accepted ESD tracks
-
-  TObjArray* fAcceptedTracks; // List of accepted esd tracks after cuts
-
-
   //######################################################
   // diagnostics histograms
   Bool_t fHistogramsOn;
 
-  TH1F *fhNClustersITS[2];
-  TH1F *fhNClustersTPC[2];
+  TH1F *fhNClustersITS[2];            //[2]
+  TH1F *fhNClustersTPC[2];            //[2]
   
-  TH1F* fhChi2PerClusterITS[2];
-  TH1F* fhChi2PerClusterTPC[2];
-
-  TH1F* fhC11[2];
-  TH1F* fhC22[2];
-  TH1F* fhC33[2];
-  TH1F* fhC44[2];
-  TH1F* fhC55[2];
-
-  TH1F* fhDXY[2];
-  TH1F* fhDZ[2];
-  TH2F* fhDXYvsDZ[2];
-
-  TH1F* fhDXYNormalized[2];
-  TH1F* fhDZNormalized[2];
-  TH2F* fhDXYvsDZNormalized[2];
+  TH1F* fhChi2PerClusterITS[2];            //[2]
+  TH1F* fhChi2PerClusterTPC[2];            //[2]
 
-  TH1F*  fhCutStatistics;
-  TH2F*  fhCutCorrelation;
-  
+  TH1F* fhC11[2];            //[2]
+  TH1F* fhC22[2];            //[2]
+  TH1F* fhC33[2];            //[2]
+  TH1F* fhC44[2];            //[2]
+  TH1F* fhC55[2];            //[2]
 
-  // dummy array
-  Int_t  fIdxInt[200];
+  TH1F* fhDXY[2];            //[2]
+  TH1F* fhDZ[2];            //[2]
+  TH2F* fhDXYvsDZ[2];            //[2]
 
-public:
-  AliESDtrackCuts();
-  
-  Bool_t AcceptTrack(AliESDtrack* esdTrack);
-  
-  TObjArray* GetAcceptedTracks(AliESD* esd);
+  TH1F* fhDXYNormalized[2];            //[2]
+  TH1F* fhDZNormalized[2];            //[2]
+  TH2F* fhDXYvsDZNormalized[2];            //[2]
 
-  //######################################################
-  // track quality cut setters  
-  void SetMinNClustersTPC(Int_t min=-1)          {fCut_MinNClusterTPC=min;}
-  void SetMinNClustersITS(Int_t min=-1)          {fCut_MinNClusterITS=min;}
-  void SetMaxChi2PerClusterTPC(Float_t max=1e99) {fCut_MaxChi2PerClusterTPC=max;}
-  void SetMaxChi2PerClusterITS(Float_t max=1e99) {fCut_MaxChi2PerClusterITS=max;}
-  void SetRequireTPCRefit(Bool_t b=kFALSE)       {fCut_RequireTPCRefit=b;}
-  void SetRequireITSRefit(Bool_t b=kFALSE)       {fCut_RequireITSRefit=b;}
-  void SetAcceptKingDaughters(Bool_t b=kFALSE)   {fCut_AcceptKinkDaughters=b;}
-  void SetMaxCovDiagonalElements(Float_t c1=1e99, Float_t c2=1e99, Float_t c3=1e99, Float_t c4=1e99, Float_t c5=1e99) 
-    {fCut_MaxC11=c1; fCut_MaxC22=c2; fCut_MaxC33=c3; fCut_MaxC44=c4; fCut_MaxC55=c5;}
+  TH1F*  fhCutStatistics;            //
+  TH2F*  fhCutCorrelation;            //
   
-  // track to vertex cut setters
-  void SetMinNsigmaToVertex(Float_t sigma=1e99)       {fCut_NsigmaToVertex = sigma;}
-  void SetRequireSigmaToVertex(Bool_t b=kTRUE )       {fCut_SigmaToVertexRequired = b;}
-  
-  // track kinmatic cut setters  
-  void SetPRange(Float_t r1=0, Float_t r2=1e99)       {fPMin=r1;   fPMax=r2;}
-  void SetPtRange(Float_t r1=0, Float_t r2=1e99)      {fPtMin=r1;  fPtMax=r2;}
-  void SetPxRange(Float_t r1=-1e99, Float_t r2=1e99)  {fPxMin=r1;  fPxMax=r2;}
-  void SetPyRange(Float_t r1=-1e99, Float_t r2=1e99)  {fPyMin=r1;  fPyMax=r2;}
-  void SetPzRange(Float_t r1=-1e99, Float_t r2=1e99)  {fPzMin=r1;  fPzMax=r2;}
-  void SetEtaRange(Float_t r1=-1e99, Float_t r2=1e99) {fEtaMin=r1; fEtaMax=r2;}
-  void SetRapRange(Float_t r1=-1e99, Float_t r2=1e99) {fRapMin=r1; fRapMax=r2;}
-
-  //######################################################
-  void SetHistogramsOn(Bool_t b=kFALSE) {fHistogramsOn = b;}
-  void DefineHistograms(Int_t color=1);
-  void SaveHistograms(Char_t* dir="track_selection");
-  
-  virtual void Print(const Option_t* = "") const;
-
-  // void SaveQualityCuts(Char_t* file)
-  // void LoadQualityCuts(Char_t* file)
-
   ClassDef(AliESDtrackCuts,0)
 };