]>
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 | ||
27de2dfb | 7 | /* $Id$ */ |
8 | ||
b2a297fa | 9 | //############################################################# |
10 | //# # | |
11 | //# Class AliDielectronVarCuts # | |
12 | //# Provide cuts for all variables handled in # | |
13 | //# AliDielectronVarManager # | |
14 | //# # | |
15 | //# Authors: # | |
16 | //# Anton Andronic, GSI / A.Andronic@gsi.de # | |
17 | //# Ionut C. Arsene, GSI / I.C.Arsene@gsi.de # | |
18 | //# Julian Book, Uni Ffm / Julian.Book@cern.ch # | |
19 | //# Frederick Kramer, Uni Ffm, / Frederick.Kramer@cern.ch # | |
20 | //# Magnus Mager, CERN / Magnus.Mager@cern.ch # | |
21 | //# WooJin J. Park, GSI / W.J.Park@gsi.de # | |
22 | //# Jens Wiechula, Uni HD / Jens.Wiechula@cern.ch # | |
23 | //# # | |
24 | //############################################################# | |
25 | ||
26 | #include <Rtypes.h> | |
572b0139 | 27 | |
b2a297fa | 28 | #include <AliAnalysisCuts.h> |
572b0139 | 29 | #include "AliDielectronVarManager.h" |
b2a297fa | 30 | |
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); | |
a655b716 | 42 | |
e123f993 | 43 | // setters |
44 | void SetCutOnMCtruth(Bool_t mc=kTRUE) { fCutOnMCtruth=mc; } | |
45 | void SetCutType(CutType type) { fCutType=type; } | |
46 | ||
47 | // getters | |
48 | Bool_t GetCutOnMCtruth() const { return fCutOnMCtruth; } | |
49 | CutType GetCutType() const { return fCutType; } | |
b2a297fa | 50 | |
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; |
67 | ||
b2a297fa | 68 | private: |
69 | ||
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? |
b2a297fa | 83 | |
84 | AliDielectronVarCuts(const AliDielectronVarCuts &c); | |
85 | AliDielectronVarCuts &operator=(const AliDielectronVarCuts &c); | |
86 | ||
e123f993 | 87 | ClassDef(AliDielectronVarCuts,2) //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 |