]>
Commit | Line | Data |
---|---|---|
563113d0 | 1 | #ifndef ALICFMANAGER_H |
2 | #define ALICFMANAGER_H | |
3 | /************************************************************************** | |
4 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * * | |
6 | * Author: The ALICE Off-line Project. * | |
7 | * Contributors are mentioned in the code where appropriate. * | |
8 | * * | |
9 | * Permission to use, copy, modify and distribute this software and its * | |
10 | * documentation strictly for non-commercial purposes is hereby granted * | |
11 | * without fee, provided that the above copyright notice appears in all * | |
12 | * copies and that both the copyright notice and this permission notice * | |
13 | * appear in the supporting documentation. The authors make no claims * | |
14 | * about the suitability of this software for any purpose. It is * | |
15 | * provided "as is" without express or implied warranty. * | |
16 | **************************************************************************/ | |
17 | // Prototype class helping the user to handle event & particle-level | |
18 | // selections/correction containers inside the Analysis job | |
19 | // Author:S.Arcelli. Silvia.Arcelli@cern.ch | |
20 | ||
21 | #include "TNamed.h" | |
22 | ||
563113d0 | 23 | class AliCFContainer ; |
9f6be3a2 | 24 | |
563113d0 | 25 | //____________________________________________________________________________ |
26 | class AliCFManager : public TNamed | |
27 | { | |
28 | public : | |
29 | AliCFManager() ; | |
30 | AliCFManager(Char_t* name, Char_t* title) ; | |
31 | AliCFManager(const AliCFManager& c) ; | |
32 | AliCFManager& operator=(const AliCFManager& c) ; | |
33 | virtual ~AliCFManager(); | |
34 | ||
35 | // | |
36 | //Currently foreseen selection steps for event-level cuts: | |
37 | //generator, trigger, reconstruction | |
38 | // | |
39 | enum{ | |
40 | kEvtGenCuts=0, | |
41 | kEvtTrigCuts, | |
42 | kEvtRecCuts, | |
43 | kNEvtSel=3 | |
44 | }; | |
45 | ||
46 | // | |
47 | //Currently foreseen selection steps for particle-level cuts: | |
48 | //generator, acceptance, reconstruction, user selection | |
49 | // | |
50 | ||
51 | enum{ | |
52 | kPartGenCuts=0, | |
53 | kPartAccCuts, | |
54 | kPartRecCuts, | |
55 | kPartSelCuts, | |
56 | kNPartSel=4 | |
57 | }; | |
58 | ||
59 | // | |
60 | // Setters: | |
61 | // | |
62 | //pass the pointer to the correction container | |
63 | virtual void SetEventContainer(AliCFContainer* c) {fEvtContainer=c;} ; | |
64 | ||
65 | //pass the pointer to the correction container | |
66 | virtual void SetParticleContainer(AliCFContainer* c) {fPartContainer=c;} ; | |
67 | ||
68 | //Setter for event-level selection cut list at selection step isel | |
69 | virtual void SetEventCutsList(Int_t isel, TObjArray* array) {fEvtCutList[isel]=array;} ; | |
70 | ||
71 | //Setter for particle-level selection cut list at selection step isel | |
72 | virtual void SetParticleCutsList(Int_t isel, TObjArray* array) {fPartCutList[isel]=array;} ; | |
73 | ||
74 | ||
75 | // | |
76 | //Getters | |
77 | // | |
78 | // pointer to the Event-level correction container | |
79 | virtual AliCFContainer* GetEventContainer() const {return fEvtContainer;} ; | |
80 | ||
81 | // pointer to the Particle-level correction container | |
82 | virtual AliCFContainer* GetParticleContainer() const {return fPartContainer;} ; | |
83 | ||
84 | //pointer to the event-level cut list for event selection step isel | |
85 | virtual TObjArray* GetEventCutsList(Int_t isel) const {return fEvtCutList[isel];}; | |
86 | ||
87 | //pointer to the particle-level cut list for particle selection step isel | |
88 | virtual TObjArray* GetParticleCutsList(Int_t isel) const {return fPartCutList[isel];}; | |
89 | ||
90 | ||
91 | //Pass the pointer to obj to the selections (used to access MC/rec global | |
92 | //event info when requested | |
93 | virtual void SetEventInfo(TObject *obj) const; | |
94 | ||
95 | //Cut Checkers: by default *all* the cuts of a given input list is checked | |
96 | //(.and. of all cuts), but the user can select a subsample of cuts in the | |
97 | //list via the string argument selcuts | |
98 | ||
99 | virtual Bool_t CheckEventCuts(Int_t isel, TObject *obj, const TString &selcuts="all") const; | |
100 | virtual Bool_t CheckParticleCuts(Int_t isel, TObject *obj, const TString &selcuts="all") const; | |
101 | ||
563113d0 | 102 | private: |
103 | ||
104 | //the correction grid | |
105 | AliCFContainer *fEvtContainer; //ptr to Evt-Level correction container | |
106 | //the correction grid | |
107 | AliCFContainer *fPartContainer; //ptr to Particle-level correction container | |
108 | //Evt-Level Selections | |
109 | TObjArray *fEvtCutList[kNEvtSel]; //arrays of cuts: gen,trig,rec-level | |
110 | //Particle-level selections | |
111 | TObjArray *fPartCutList[kNPartSel]; //arrays of cuts: gen,acceptance,rec,sel-level | |
563113d0 | 112 | |
113 | Bool_t CompareStrings(const TString &cutname,const TString &selcuts) const; | |
114 | ||
115 | ClassDef(AliCFManager,1); | |
116 | }; | |
117 | ||
118 | ||
119 | #endif |