]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/AliHFEextraEventCuts.h
add method to check if some cuts where on
[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 //_____________________________________________________________________________
33 class AliHFEextraEventCuts: public AliCFCutBase 
34 {
35  public :
36   AliHFEextraEventCuts() ;
37   AliHFEextraEventCuts(Char_t* name, Char_t* title) ;
38   AliHFEextraEventCuts(const AliHFEextraEventCuts& c) ;
39   AliHFEextraEventCuts& operator=(const AliHFEextraEventCuts& c) ;
40   ~AliHFEextraEventCuts();
41   Bool_t IsSelected(TObject* obj);
42   Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
43
44   void SetRequireVtxCuts(Bool_t vtx=kFALSE) {fRequireVtxCuts=vtx;} // cut values setter
45   void SetVertexZCut(Double_t zMin=-1.e99, Double_t zMax=1.e99) { fVtxZMin=zMin; fVtxZMax=zMax;} // cut values setter
46
47   void SetVertexNContributors(Int_t min) {fVtxNCtrbMin=min;}
48   void SetUseMixedVertex() {fVtxMixed=kTRUE; fVtxSPD=kFALSE;} //default is vertex from tracks
49   void SetUseSPDVertex() {fVtxSPD=kTRUE; fVtxMixed=kFALSE;} //default is vertex from tracks
50   void SetCheckCorrelationSPDVtx() {fCheckCorrelationSPDVtx=kTRUE;} // check the correlation between z of different vertices
51   void SetCheckSPDResolution() {fVtxResolution = kTRUE;} // check resolution on the SPD vertex
52  
53   Bool_t   GetRequireVtxCuts() const {return fRequireVtxCuts;} // cut value getter
54   Double_t GetVertexZMax() const {return fVtxZMax;} // cut values getter
55   Double_t GetVertexZMin() const {return fVtxZMin;} // cut values getter
56   
57   // QA histogram setter
58   // please use indices from the enumeration below
59   void SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins);
60   void SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax);
61   enum{kVtxPosZ,
62        kVtxNCtrb,
63        kCorrelation,
64        kResolution,
65        kNCuts,
66        kNStepQA=2
67   };
68   
69  protected:
70   void SelectionBitMap(TObject* obj);
71   void AddQAHistograms(TList *qaList) ;
72   void DefineHistograms();              // books histograms 
73   void Initialise();                    // sets everything to 0
74   void FillHistograms(TObject* obj, Bool_t b);
75   const AliVVertex *GetPrimaryVertexSPD(const AliVEvent * const inputEvent);
76   const AliVVertex *GetPrimaryVertexTracks(const AliVEvent *const inputEvent);
77
78   Bool_t fRequireVtxCuts ; //The type of trigger to be checked
79   Double_t fVtxZMax ; //Z vertex position, maximum value
80   Double_t fVtxZMin ; //Z vertex position, minimum value
81   Int_t    fVtxNCtrbMin; //Min number of contributors to vertex
82   Bool_t   fVtxMixed;  //Flag for use of mixed vertex (primary vertex with track, if not SPD vertex)
83   Bool_t   fVtxSPD;    //Flag for use of SPD vertex 
84   Bool_t   fCheckCorrelationSPDVtx;   //Check the correlation SPD, track vertex
85   Bool_t   fVtxResolution;            //Check vertex resolution cut
86  
87   TBits *fBitMap ; //cut mask
88
89   TH1F* fhQA[kNCuts][kNStepQA];         // QA Histograms
90
91   ClassDef(AliHFEextraEventCuts,3);
92 };
93
94 #endif