AliPhysics  d497547 (d497547)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalAODFilterBitCuts.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
16 #include "AliAODTrack.h"
17 
21 
23  AliVCuts(),
24  fAODfilterBits(0),
25  fSelectionMode(kSelAny)
26 {
27 }
28 
30  AliAODTrack *testtrack = dynamic_cast<AliAODTrack *>(o);
31  if(!testtrack) return false;
32  Bool_t result = false;
33  switch(fSelectionMode){
34  case kSelAny: result = ((testtrack->GetFilterMap() & fAODfilterBits) > 0); break;
35  case kSelAll: result = ((testtrack->GetFilterMap() & fAODfilterBits) == fAODfilterBits);
36  }
37  return result;
38 }
Implementation of the AOD filter bit selection as virtual cut class.
SelectionMode_t fSelectionMode
Mode of the filter bit selection (any or all)
virtual Bool_t IsSelected(TObject *o)
All (all bits must be found in the AOD track)
ULong_t fAODfilterBits
Requested filter bits.
bool Bool_t
Definition: External.C:53