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