]>
Commit | Line | Data |
---|---|---|
b2a297fa | 1 | #ifndef ALIDIELECTRONVARCUTS_H |
2 | #define ALIDIELECTRONVARCUTS_H | |
3 | ||
4 | /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | //############################################################# | |
8 | //# # | |
9 | //# Class AliDielectronVarCuts # | |
10 | //# Provide cuts for all variables handled in # | |
11 | //# AliDielectronVarManager # | |
12 | //# # | |
13 | //# Authors: # | |
14 | //# Anton Andronic, GSI / A.Andronic@gsi.de # | |
15 | //# Ionut C. Arsene, GSI / I.C.Arsene@gsi.de # | |
16 | //# Julian Book, Uni Ffm / Julian.Book@cern.ch # | |
17 | //# Frederick Kramer, Uni Ffm, / Frederick.Kramer@cern.ch # | |
18 | //# Magnus Mager, CERN / Magnus.Mager@cern.ch # | |
19 | //# WooJin J. Park, GSI / W.J.Park@gsi.de # | |
20 | //# Jens Wiechula, Uni HD / Jens.Wiechula@cern.ch # | |
21 | //# # | |
22 | //############################################################# | |
23 | ||
24 | #include <Rtypes.h> | |
a94c2e7e | 25 | #include <TBits.h> |
572b0139 | 26 | |
b2a297fa | 27 | #include <AliAnalysisCuts.h> |
572b0139 | 28 | #include "AliDielectronVarManager.h" |
b2a297fa | 29 | |
30 | class AliDielectronVarCuts : public AliAnalysisCuts { | |
31 | public: | |
e123f993 | 32 | // Whether all cut criteria have to be fulfilled of just any |
33 | enum CutType { kAll=0, kAny }; | |
34 | ||
b2a297fa | 35 | AliDielectronVarCuts(); |
36 | AliDielectronVarCuts(const char* name, const char* title); | |
37 | virtual ~AliDielectronVarCuts(); | |
38 | //TODO: make copy constructor and assignment operator public | |
572b0139 | 39 | void AddCut(AliDielectronVarManager::ValueTypes type, Double_t min, Double_t max, Bool_t excludeRange=kFALSE); |
40 | void AddCut(AliDielectronVarManager::ValueTypes type, Double_t value, Bool_t excludeRange=kFALSE); | |
a655b716 | 41 | |
e123f993 | 42 | // setters |
43 | void SetCutOnMCtruth(Bool_t mc=kTRUE) { fCutOnMCtruth=mc; } | |
44 | void SetCutType(CutType type) { fCutType=type; } | |
45 | ||
46 | // getters | |
47 | Bool_t GetCutOnMCtruth() const { return fCutOnMCtruth; } | |
48 | CutType GetCutType() const { return fCutType; } | |
e123f993 | 49 | |
b2a297fa | 50 | // |
51 | //Analysis cuts interface | |
52 | // | |
53 | virtual Bool_t IsSelected(TObject* track); | |
54 | virtual Bool_t IsSelected(TList* /* list */ ) {return kFALSE;} | |
55 | ||
56 | // virtual Bool_t IsSelected(TObject* track, TObject */*event*/=0); | |
57 | // virtual Long64_t Merge(TCollection* /* list */) { return 0; } | |
58 | ||
59 | // | |
60 | // Cut information | |
61 | // | |
62 | virtual UInt_t GetSelectedCutsMask() const { return fSelectedCutsMask; } | |
b2a297fa | 63 | |
78091935 | 64 | virtual void Print(const Option_t* option = "") const; |
5720c765 | 65 | |
78091935 | 66 | |
f2d9961b | 67 | private: |
b2a297fa | 68 | |
a94c2e7e | 69 | TBits *fUsedVars; // list of used variables |
e123f993 | 70 | UShort_t fActiveCuts[AliDielectronVarManager::kNMaxValues]; // list of activated cuts |
71 | UShort_t fNActiveCuts; // number of acive cuts | |
72 | UInt_t fActiveCutsMask; // mask of active cuts | |
b2a297fa | 73 | |
74 | UInt_t fSelectedCutsMask; // Maks of selected cuts, is available after calling IsSelected | |
e123f993 | 75 | |
76 | Bool_t fCutOnMCtruth; // whether to cut on the MC truth of the particle | |
77 | ||
78 | CutType fCutType; // type of the cut: any, all | |
b2a297fa | 79 | |
80 | Double_t fCutMin[AliDielectronVarManager::kNMaxValues]; // minimum values for the cuts | |
81 | Double_t fCutMax[AliDielectronVarManager::kNMaxValues]; // maximum values for the cuts | |
572b0139 | 82 | Bool_t fCutExclude[AliDielectronVarManager::kNMaxValues]; // inverse cut logic? |
ee5e4fc5 | 83 | |
b2a297fa | 84 | AliDielectronVarCuts(const AliDielectronVarCuts &c); |
85 | AliDielectronVarCuts &operator=(const AliDielectronVarCuts &c); | |
86 | ||
a94c2e7e | 87 | ClassDef(AliDielectronVarCuts,3) //Cut class providing cuts to all infomation available for the AliVParticle interface |
b2a297fa | 88 | }; |
89 | ||
90 | ||
91 | // | |
92 | //Inline functions | |
93 | // | |
572b0139 | 94 | inline void AliDielectronVarCuts::AddCut(AliDielectronVarManager::ValueTypes type, Double_t value, Bool_t excludeRange) |
a655b716 | 95 | { |
96 | // | |
97 | // Set cut in a small delta around value | |
98 | // | |
99 | const Double_t kDelta=1e-20; | |
572b0139 | 100 | AddCut(type,value-kDelta,value+kDelta, excludeRange); |
a655b716 | 101 | } |
b2a297fa | 102 | |
103 | #endif | |
104 |