]>
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 | |
775970eb | 30 | class TH1; |
b2a297fa | 31 | class AliDielectronVarCuts : public AliAnalysisCuts { |
32 | public: | |
e123f993 | 33 | // Whether all cut criteria have to be fulfilled of just any |
34 | enum CutType { kAll=0, kAny }; | |
35 | ||
b2a297fa | 36 | AliDielectronVarCuts(); |
37 | AliDielectronVarCuts(const char* name, const char* title); | |
38 | virtual ~AliDielectronVarCuts(); | |
39 | //TODO: make copy constructor and assignment operator public | |
572b0139 | 40 | void AddCut(AliDielectronVarManager::ValueTypes type, Double_t min, Double_t max, Bool_t excludeRange=kFALSE); |
41 | void AddCut(AliDielectronVarManager::ValueTypes type, Double_t value, Bool_t excludeRange=kFALSE); | |
775970eb | 42 | void AddCut(AliDielectronVarManager::ValueTypes type, Double_t min, TH1 * const max, Bool_t excludeRange=kFALSE); |
a655b716 | 43 | |
e123f993 | 44 | // setters |
45 | void SetCutOnMCtruth(Bool_t mc=kTRUE) { fCutOnMCtruth=mc; } | |
46 | void SetCutType(CutType type) { fCutType=type; } | |
47 | ||
48 | // getters | |
49 | Bool_t GetCutOnMCtruth() const { return fCutOnMCtruth; } | |
50 | CutType GetCutType() const { return fCutType; } | |
e123f993 | 51 | |
b2a297fa | 52 | // |
53 | //Analysis cuts interface | |
54 | // | |
55 | virtual Bool_t IsSelected(TObject* track); | |
56 | virtual Bool_t IsSelected(TList* /* list */ ) {return kFALSE;} | |
57 | ||
58 | // virtual Bool_t IsSelected(TObject* track, TObject */*event*/=0); | |
59 | // virtual Long64_t Merge(TCollection* /* list */) { return 0; } | |
60 | ||
61 | // | |
62 | // Cut information | |
63 | // | |
64 | virtual UInt_t GetSelectedCutsMask() const { return fSelectedCutsMask; } | |
b2a297fa | 65 | |
78091935 | 66 | virtual void Print(const Option_t* option = "") const; |
5720c765 | 67 | |
78091935 | 68 | |
f2d9961b | 69 | private: |
b2a297fa | 70 | |
a94c2e7e | 71 | TBits *fUsedVars; // list of used variables |
e123f993 | 72 | UShort_t fActiveCuts[AliDielectronVarManager::kNMaxValues]; // list of activated cuts |
73 | UShort_t fNActiveCuts; // number of acive cuts | |
74 | UInt_t fActiveCutsMask; // mask of active cuts | |
b2a297fa | 75 | |
76 | UInt_t fSelectedCutsMask; // Maks of selected cuts, is available after calling IsSelected | |
e123f993 | 77 | |
78 | Bool_t fCutOnMCtruth; // whether to cut on the MC truth of the particle | |
79 | ||
80 | CutType fCutType; // type of the cut: any, all | |
b2a297fa | 81 | |
82 | Double_t fCutMin[AliDielectronVarManager::kNMaxValues]; // minimum values for the cuts | |
83 | Double_t fCutMax[AliDielectronVarManager::kNMaxValues]; // maximum values for the cuts | |
572b0139 | 84 | Bool_t fCutExclude[AliDielectronVarManager::kNMaxValues]; // inverse cut logic? |
775970eb | 85 | TH1 *fUpperCut[AliDielectronVarManager::kNMaxValues]; // use object as upper cut |
ee5e4fc5 | 86 | |
b2a297fa | 87 | AliDielectronVarCuts(const AliDielectronVarCuts &c); |
88 | AliDielectronVarCuts &operator=(const AliDielectronVarCuts &c); | |
89 | ||
775970eb | 90 | ClassDef(AliDielectronVarCuts,4) //Cut class providing cuts to all infomation available for the AliVParticle interface |
b2a297fa | 91 | }; |
92 | ||
93 | ||
94 | // | |
95 | //Inline functions | |
96 | // | |
572b0139 | 97 | inline void AliDielectronVarCuts::AddCut(AliDielectronVarManager::ValueTypes type, Double_t value, Bool_t excludeRange) |
a655b716 | 98 | { |
99 | // | |
100 | // Set cut in a small delta around value | |
101 | // | |
102 | const Double_t kDelta=1e-20; | |
572b0139 | 103 | AddCut(type,value-kDelta,value+kDelta, excludeRange); |
a655b716 | 104 | } |
b2a297fa | 105 | |
106 | #endif | |
107 |