]> git.uio.no Git - u/mrichter/AliRoot.git/blob - CORRFW/AliCFEventGenCuts.h
Fix for Coverity warning 16208
[u/mrichter/AliRoot.git] / CORRFW / AliCFEventGenCuts.h
1 #ifndef ALICFEVENTGENCUTS_H
2 #define ALICFEVENTGENCUTS_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 generator level: for the moment just
18 // the requirements on the MB process type, on the number of charged tracks 
19 // and on the vertex 3-D position are implemented
20 // The argument of IsSelected member function (passed object) is cast into 
21 // an AliMCEvent. In the future may be modified to use AliVEvent interface
22 // and to include more cut variables.
23 // The class derives from AliCFCutBase
24 // Author:S.Arcelli Silvia.Arcelli@cern.ch
25
26
27 #include "AliCFCutBase.h"
28 class TBits;
29 class AliGenEventHeader;
30 class AliMCEvent;
31 //____________________________________________________________________________
32 class AliCFEventGenCuts: public AliCFCutBase 
33 {
34  public :
35   AliCFEventGenCuts() ;
36   AliCFEventGenCuts(Char_t* name, Char_t* title) ;
37   AliCFEventGenCuts(const AliCFEventGenCuts& c) ;
38   AliCFEventGenCuts& operator=(const AliCFEventGenCuts& c) ;
39   ~AliCFEventGenCuts();
40   Bool_t IsSelected(TObject* obj);
41   Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
42
43   //number of embedded cuts
44   enum{kNCuts=5};
45
46   //Label the MB MC processes
47   enum PrType { 
48    kND, kSD, kDD 
49   }; 
50
51
52   static Int_t ProcType(AliGenEventHeader *genHeader); 
53   static Bool_t IsMBProcType(AliMCEvent *ev, PrType iproc);
54
55
56   void   SetMBSelProcType(PrType iproc = kND) {fMBProcType=iproc;} // cut values setter
57   Int_t  GetMBSelProcType()const {return fMBProcType;} // cut values getter
58
59
60
61   void SetNTracksCut(Int_t xMin=-1, Int_t xMax=1000000) {fNTracksMin=xMin; fNTracksMax=xMax;} // cut values setter
62
63   void SetRequireVtxCuts(Bool_t vtx=kFALSE) {fRequireVtxCuts=vtx;} // cut values setter
64   void SetVertexXCut(Double_t xMin=-1.e99, Double_t xMax=1.e99) { fVtxXMin=xMin; fVtxXMax=xMax;} // cut values setter
65   void SetVertexYCut(Double_t yMin=-1.e99, Double_t yMax=1.e99) { fVtxYMin=yMin; fVtxYMax=yMax;} // cut values setter
66   void SetVertexZCut(Double_t zMin=-1.e99, Double_t zMax=1.e99) { fVtxZMin=zMin; fVtxZMax=zMax;} // cut values setter
67
68   Int_t    GetNTracksMin() const {return fNTracksMin;} // cut values getter
69   Int_t    GetNTracksMax() const {return fNTracksMax;} // cut values getter
70   Bool_t   GetRequireVtxCuts() const {return fRequireVtxCuts;} // cut value getter
71   Double_t GetVertexXMax() const {return fVtxXMax;} // cut values getter
72   Double_t GetVertexYMax() const {return fVtxYMax;} // cut values getter
73   Double_t GetVertexZMax() const {return fVtxZMax;} // cut values getter
74   Double_t GetVertexXMin() const {return fVtxXMin;} // cut values getter
75   Double_t GetVertexYMin() const {return fVtxYMin;} // cut values getter
76   Double_t GetVertexZMin() const {return fVtxZMin;} // cut values getter
77   
78
79  protected:
80
81   void SelectionBitMap(TObject* obj);
82   
83   Int_t fMBProcType ; //the type of selected MB process 
84   Int_t fNTracksMin; //minimum number of particles in the event
85   Int_t fNTracksMax; //maximum number of particles in the event
86   Bool_t fRequireVtxCuts ; //The type of trigger to be checked
87   Double_t fVtxXMax ; //X vertex position, maximum value
88   Double_t fVtxYMax ; //Y vertex position, maximum value 
89   Double_t fVtxZMax ; //Z vertex position, maximum value
90   Double_t fVtxXMin ; //X vertex position, minimum value
91   Double_t fVtxYMin ; //Y vertex position, minimum value
92   Double_t fVtxZMin ; //Z vertex position, minimum value
93
94   TBits *fBitMap ; //cut mask
95
96   ClassDef(AliCFEventGenCuts,2);
97 };
98
99 #endif