]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/AliHFEextraEventCuts.h
from Andrea to check 10-20% v2
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEextraEventCuts.h
1 #ifndef ALIHFEEXTRAEVENTCUTS_H
2 #define ALIHFEEXTRAEVENTCUTS_H
3 /**************************************************************************
4  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  *                                                                        *
6  * Author: The ALICE Off-line Project.                                    *
7  * Contributors are mentioned in the code where appropriate.              *
8  *                                                                        *
9  * Permission to use, copy, modify and distribute this software and its   *
10  * documentation strictly for non-commercial purposes is hereby granted   *
11  * without fee, provided that the above copyright notice appears in all   *
12  * copies and that both the copyright notice and this permission notice   *
13  * appear in the supporting documentation. The authors make no claims     *
14  * about the suitability of this software for any purpose. It is          *
15  * provided "as is" without express or implied warranty.                  *
16  **************************************************************************/
17 // Cut on the Event at reconstructed level: for the moment 
18 // just the requirements on the number of charged tracks and on 
19 // the vertex position and resolution are implemented
20 // The argument of IsSelected member function (passed object) is cast into 
21 // an AliESDEvent. In the future may be modified to use AliVEvent interface
22 // and include more cut variables.
23 // The class derives from AliCFCutBase
24 // Author:R.Bailhache
25
26
27 #include "AliCFCutBase.h"
28 class TH1F;
29 class TBits;
30 class AliVVertex;
31 class AliVEvent;
32 class AliAnalysisUtils;
33 //_____________________________________________________________________________
34 class AliHFEextraEventCuts: public AliCFCutBase 
35 {
36  public :
37   AliHFEextraEventCuts() ;
38   AliHFEextraEventCuts(Char_t* name, Char_t* title) ;
39   AliHFEextraEventCuts(const AliHFEextraEventCuts& c) ;
40   AliHFEextraEventCuts& operator=(const AliHFEextraEventCuts& c) ;
41   ~AliHFEextraEventCuts();
42   Bool_t IsSelected(TObject* obj);
43   Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
44
45   void SetRequireVtxCuts(Bool_t vtx=kFALSE) {fRequireVtxCuts=vtx;} // cut values setter
46   void SetVertexZCut(Double_t zMin=-1.e99, Double_t zMax=1.e99) { fVtxZMin=zMin; fVtxZMax=zMax;} // cut values setter
47
48   void SetVertexNContributors(Int_t min) {fVtxNCtrbMin=min;}
49   void SetUseMixedVertex() {fVtxMixed=kTRUE; fVtxSPD=kFALSE;} //default is vertex from tracks
50   void SetUseSPDVertex() {fVtxSPD=kTRUE; fVtxMixed=kFALSE;} //default is vertex from tracks
51   void SetCheckCorrelationSPDVtx() {fCheckCorrelationSPDVtx=kTRUE;} // check the correlation between z of different vertices
52   void SetCheckSPDResolution() {fVtxResolution = kTRUE;} // check resolution on the SPD vertex
53   void SetpAPileupCut() { fPApileupCut = kTRUE; } 
54  
55   Bool_t   GetRequireVtxCuts() const {return fRequireVtxCuts;} // cut value getter
56   Double_t GetVertexZMax() const {return fVtxZMax;} // cut values getter
57   Double_t GetVertexZMin() const {return fVtxZMin;} // cut values getter
58   
59   // QA histogram setter
60   // please use indices from the enumeration below
61   void SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins);
62   void SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax);
63   enum{kVtxPosZ,
64        kVtxNCtrb,
65        kCorrelation,
66        kResolution,
67        kpApileup,
68        kNCuts,
69        kNStepQA=2
70   };
71   
72  protected:
73   void SelectionBitMap(TObject* obj);
74   void AddQAHistograms(TList *qaList) ;
75   void DefineHistograms();              // books histograms 
76   void Initialise();                    // sets everything to 0
77   void FillHistograms(TObject* obj, Bool_t b);
78   const AliVVertex *GetPrimaryVertexSPD(const AliVEvent * const inputEvent);
79   const AliVVertex *GetPrimaryVertexTracks(const AliVEvent *const inputEvent);
80
81   AliAnalysisUtils *fAnalysisUtils;     // Analysis Utils for pA pileup cut
82   Bool_t fRequireVtxCuts ;              // The type of trigger to be checked
83   Double_t fVtxZMax ;                   // Z vertex position, maximum value
84   Double_t fVtxZMin ;                   // Z vertex position, minimum value
85   Int_t    fVtxNCtrbMin;                // Min number of contributors to vertex
86   Bool_t   fVtxMixed;                   // Flag for use of mixed vertex (primary vertex with track, if not SPD vertex)
87   Bool_t   fVtxSPD;                     // Flag for use of SPD vertex 
88   Bool_t   fCheckCorrelationSPDVtx;     // Check the correlation SPD, track vertex
89   Bool_t   fVtxResolution;              // Check vertex resolution cut
90   Bool_t   fPApileupCut;                // Apply pA-pileup cut
91  
92   TBits *fBitMap ; //cut mask
93
94   TH1F* fhQA[kNCuts][kNStepQA];         // QA Histograms
95
96   ClassDef(AliHFEextraEventCuts,3);
97 };
98
99 #endif