]>
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 | ||
84df86a7 | 21 | // |
22 | // updated by renaud.vernet@cern.ch (2008/10/08) : | |
23 | // removed predefined maximum number of steps | |
24 | // now the number of steps are fixed by the particle/event containers themselves. | |
25 | // | |
26 | ||
563113d0 | 27 | #include "TNamed.h" |
28 | ||
563113d0 | 29 | class AliCFContainer ; |
9f6be3a2 | 30 | |
563113d0 | 31 | //____________________________________________________________________________ |
32 | class AliCFManager : public TNamed | |
33 | { | |
34 | public : | |
35 | AliCFManager() ; | |
36 | AliCFManager(Char_t* name, Char_t* title) ; | |
37 | AliCFManager(const AliCFManager& c) ; | |
38 | AliCFManager& operator=(const AliCFManager& c) ; | |
39 | virtual ~AliCFManager(); | |
40 | ||
41 | // | |
42 | //Currently foreseen selection steps for event-level cuts: | |
43 | //generator, trigger, reconstruction | |
44 | // | |
45 | enum{ | |
46 | kEvtGenCuts=0, | |
84df86a7 | 47 | kEvtTrigCuts, |
48 | kEvtRecCuts | |
49 | }; | |
563113d0 | 50 | |
51 | // | |
52 | //Currently foreseen selection steps for particle-level cuts: | |
53 | //generator, acceptance, reconstruction, user selection | |
54 | // | |
563113d0 | 55 | enum{ |
84df86a7 | 56 | kPartGenCuts=0, |
57 | kPartAccCuts, | |
58 | kPartRecCuts, | |
59 | kPartSelCuts | |
60 | }; | |
563113d0 | 61 | |
62 | // | |
63 | // Setters: | |
64 | // | |
65 | //pass the pointer to the correction container | |
84df86a7 | 66 | virtual void SetEventContainer(AliCFContainer* c) {fEvtContainer=c;} ; |
563113d0 | 67 | |
68 | //pass the pointer to the correction container | |
69 | virtual void SetParticleContainer(AliCFContainer* c) {fPartContainer=c;} ; | |
70 | ||
71 | //Setter for event-level selection cut list at selection step isel | |
84df86a7 | 72 | virtual void SetEventCutsList(Int_t isel, TObjArray* array) ; |
73 | ||
563113d0 | 74 | //Setter for particle-level selection cut list at selection step isel |
84df86a7 | 75 | virtual void SetParticleCutsList(Int_t isel, TObjArray* array) ; |
563113d0 | 76 | |
77 | // | |
78 | //Getters | |
79 | // | |
80 | // pointer to the Event-level correction container | |
81 | virtual AliCFContainer* GetEventContainer() const {return fEvtContainer;} ; | |
82 | ||
83 | // pointer to the Particle-level correction container | |
84 | virtual AliCFContainer* GetParticleContainer() const {return fPartContainer;} ; | |
85 | ||
86 | //pointer to the event-level cut list for event selection step isel | |
87 | virtual TObjArray* GetEventCutsList(Int_t isel) const {return fEvtCutList[isel];}; | |
88 | ||
89 | //pointer to the particle-level cut list for particle selection step isel | |
90 | virtual TObjArray* GetParticleCutsList(Int_t isel) const {return fPartCutList[isel];}; | |
91 | ||
92 | ||
93 | //Pass the pointer to obj to the selections (used to access MC/rec global | |
94 | //event info when requested | |
95 | virtual void SetEventInfo(TObject *obj) const; | |
96 | ||
97 | //Cut Checkers: by default *all* the cuts of a given input list is checked | |
98 | //(.and. of all cuts), but the user can select a subsample of cuts in the | |
99 | //list via the string argument selcuts | |
100 | ||
101 | virtual Bool_t CheckEventCuts(Int_t isel, TObject *obj, const TString &selcuts="all") const; | |
102 | virtual Bool_t CheckParticleCuts(Int_t isel, TObject *obj, const TString &selcuts="all") const; | |
103 | ||
563113d0 | 104 | private: |
105 | ||
106 | //the correction grid | |
107 | AliCFContainer *fEvtContainer; //ptr to Evt-Level correction container | |
108 | //the correction grid | |
109 | AliCFContainer *fPartContainer; //ptr to Particle-level correction container | |
110 | //Evt-Level Selections | |
84df86a7 | 111 | TObjArray **fEvtCutList; //arrays of cuts for each event-selection level |
563113d0 | 112 | //Particle-level selections |
84df86a7 | 113 | TObjArray **fPartCutList ; //arrays of cuts for each particle-selection level |
563113d0 | 114 | |
115 | Bool_t CompareStrings(const TString &cutname,const TString &selcuts) const; | |
116 | ||
84df86a7 | 117 | ClassDef(AliCFManager,2); |
563113d0 | 118 | }; |
119 | ||
120 | ||
121 | #endif |