3 /**************************************************************************
4 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * Author: The ALICE Off-line Project. *
7 * Contributors are mentioned in the code where appropriate. *
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
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.
28 #include "AliCFContainer.h"
31 //____________________________________________________________________________
32 class AliCFManager : public TNamed
36 AliCFManager(Char_t* name, Char_t* title) ;
37 AliCFManager(const AliCFManager& c) ;
38 AliCFManager& operator=(const AliCFManager& c) ;
39 virtual ~AliCFManager();
42 //Currently foreseen selection steps for event-level cuts:
43 //generator, trigger, reconstruction
52 //Currently foreseen selection steps for particle-level cuts:
53 //generator, acceptance, reconstruction, user selection
66 //pass the pointer to the correction container
67 virtual void SetEventContainer(AliCFContainer* c) {
69 SetNStepEvent(c->GetNStep());
70 AliWarning(Form("Please dont forget to set the cut list (event empty) for the %d event-selection step requested",fNStepEvt));
73 //pass the pointer to the correction container
74 virtual void SetParticleContainer(AliCFContainer* c) {
76 SetNStepParticle(c->GetNStep());
77 AliWarning(Form("Please dont forget to set the cut list (even empty) for the %d particle-selection step requested",fNStepPart));
80 //Set the number of steps (already done if you have defined your containers)
81 virtual void SetNStepEvent (Int_t nstep) {fNStepEvt = nstep;}
82 virtual void SetNStepParticle(Int_t nstep) {fNStepPart = nstep;}
84 //Setter for event-level selection cut list at selection step isel
85 virtual void SetEventCutsList(Int_t isel, TObjArray* array) ;
87 //Setter for particle-level selection cut list at selection step isel
88 virtual void SetParticleCutsList(Int_t isel, TObjArray* array) ;
93 // pointer to the Event-level correction container
94 virtual AliCFContainer* GetEventContainer() const {return fEvtContainer;} ;
96 // pointer to the Particle-level correction container
97 virtual AliCFContainer* GetParticleContainer() const {return fPartContainer;} ;
99 //pointer to the event-level cut list for event selection step isel
100 virtual TObjArray* GetEventCutsList(Int_t isel) const {return fEvtCutList[isel];};
102 //pointer to the particle-level cut list for particle selection step isel
103 virtual TObjArray* GetParticleCutsList(Int_t isel) const {return fPartCutList[isel];};
106 //Pass the pointer to obj to the selections (used to access MC/rec global
107 //event info when requested
108 virtual void SetMCEventInfo(const TObject *obj) const;
109 virtual void SetRecEventInfo(const TObject *obj) const;
110 virtual void SetEventInfo(TObject*) const {AliError("DEPRECATED !! -> use SetMCEventInfo of SetRecEventInfo instead");}
112 //Cut Checkers: by default *all* the cuts of a given input list is checked
113 //(.and. of all cuts), but the user can select a subsample of cuts in the
114 //list via the string argument selcuts
116 virtual Bool_t CheckEventCuts(Int_t isel, TObject *obj, const TString &selcuts="all") const;
117 virtual Bool_t CheckParticleCuts(Int_t isel, TObject *obj, const TString &selcuts="all") const;
122 Int_t fNStepEvt; // number of steps in event selection
123 Int_t fNStepPart; // number of steps in particle selection
124 //the correction grid
125 AliCFContainer *fEvtContainer; //ptr to Evt-Level correction container
126 //the correction grid
127 AliCFContainer *fPartContainer; //ptr to Particle-level correction container
128 //Evt-Level Selections
129 TObjArray **fEvtCutList; //[fNStepEvt] arrays of cuts for each event-selection level
130 //Particle-level selections
131 TObjArray **fPartCutList ; //[fNStepPart] arrays of cuts for each particle-selection level
133 Bool_t CompareStrings(const TString &cutname,const TString &selcuts) const;
135 ClassDef(AliCFManager,2);