AliPhysics  9c66e61 (9c66e61)
AliEmcalAODFilterBitCuts.h
Go to the documentation of this file.
1 #ifndef ALIEMCALAODFILTERBITCUT_H
2 #define ALIEMCALAODFILTERBITCUT_H
3 /* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 #include "AliVCuts.h"
7 
8 class AliAODTrack;
9 
10 namespace PWG{
11 
12 namespace EMCAL {
13 
37 class AliEmcalAODFilterBitCuts : public AliVCuts {
38 public:
44  kSelAny = 0,
45  kSelAll = 1
46  };
47 
52 
58  AliEmcalAODFilterBitCuts(const char *name, const char *title);
59 
61 
66  void AddFilterBitNumber(ULong_t bitnumber) {if(bitnumber < sizeof(ULong_t)*8) fAODfilterBits |= 1 << bitnumber; }
67 
68  void AddStatusBitNumber(ULong_t bitnumber) {if(bitnumber < sizeof(ULong_t)*8) fAODstatusBits |= 1 << bitnumber; }
69 
78  void SetFilterBits(ULong_t filterbits, Bool_t doReset = false) { if(doReset) fAODfilterBits = 0; fAODfilterBits |= filterbits; }
79 
88  void SetStatusBits(ULong_t statusbits, Bool_t doReset = false) { if(doReset) fAODstatusBits = 0; fAODstatusBits |= statusbits; }
89 
100 
110  virtual Bool_t IsSelected(TObject *o);
111 
112 protected:
113 
119  Bool_t IsFilterBitsSelected(const AliAODTrack *const trk) const;
120 
126  Bool_t IsStatusBitsSelected(const AliAODTrack *const trk) const;
127 
131 
133  ClassDef(AliEmcalAODFilterBitCuts, 1)
135 };
136 
137 }
138 
139 }
140 
141 #endif /* ALIEMCALAODFILTERBITCUT_H */
Bool_t IsFilterBitsSelected(const AliAODTrack *const trk) const
Select track according to presence of track filter bits.
void SetFilterBits(ULong_t filterbits, Bool_t doReset=false)
Set the filter bits to be checked.
const char * title
Definition: MakeQAPdf.C:27
void SetSelectionMode(SelectionMode_t mode)
Set the selection mode.
Namespace for EMCAL framework classes and task.
Bool_t IsStatusBitsSelected(const AliAODTrack *const trk) const
Select track according to presence of track status bits.
unsigned long ULong_t
Definition: External.C:38
Namespace for PWG framework classes.
Int_t mode
Definition: anaM.C:41
SelectionMode_t fSelectionMode
Mode of the filter bit selection (any or all)
SelectionMode_t
Definition of the mode how multiple filter bits are selected.
Implementation of the AOD filter bit selection as virtual cut class.
void SetStatusBits(ULong_t statusbits, Bool_t doReset=false)
Set the track status bits to be checked.
bool Bool_t
Definition: External.C:53
ULong_t fAODstatusBits
Requested track status bits.
ULong_t fAODfilterBits
Requested filter bits.
All (all bits must be found in the AOD track)