X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=CORRFW%2FAliCFManager.h;h=0527fc112356c812b0ad14463ae6f76eea669da9;hb=45bc8986d30dbea32bc31e405c54cf724dc5398b;hp=093321499a0e59703980e2845e96384bc15c4477;hpb=9f6be3a24cc4b64aa0d233b86f79c1a3cd3e0618;p=u%2Fmrichter%2FAliRoot.git diff --git a/CORRFW/AliCFManager.h b/CORRFW/AliCFManager.h index 093321499a0..0527fc11235 100644 --- a/CORRFW/AliCFManager.h +++ b/CORRFW/AliCFManager.h @@ -18,9 +18,15 @@ // selections/correction containers inside the Analysis job // Author:S.Arcelli. Silvia.Arcelli@cern.ch -#include "TNamed.h" +// +// updated by renaud.vernet@cern.ch (2008/10/08) : +// removed predefined maximum number of steps +// now the number of steps are fixed by the particle/event containers themselves. +// -class AliCFContainer ; +#include "TNamed.h" +#include "AliCFContainer.h" +#include "AliLog.h" //____________________________________________________________________________ class AliCFManager : public TNamed @@ -38,39 +44,48 @@ class AliCFManager : public TNamed // enum{ kEvtGenCuts=0, - kEvtTrigCuts, - kEvtRecCuts, - kNEvtSel=3 - }; + kEvtTrigCuts, + kEvtRecCuts + }; // //Currently foreseen selection steps for particle-level cuts: //generator, acceptance, reconstruction, user selection // - enum{ - kPartGenCuts=0, - kPartAccCuts, - kPartRecCuts, - kPartSelCuts, - kNPartSel=4 - }; + kPartGenCuts=0, + kPartAccCuts, + kPartRecCuts, + kPartSelCuts + }; // // Setters: // - //pass the pointer to the correction container - virtual void SetEventContainer(AliCFContainer* c) {fEvtContainer=c;} ; //pass the pointer to the correction container - virtual void SetParticleContainer(AliCFContainer* c) {fPartContainer=c;} ; + virtual void SetEventContainer(AliCFContainer* c) { + fEvtContainer=c; + SetNStepEvent(c->GetNStep()); + AliWarning(Form("Please dont forget to set the cut list (event empty) for the %d event-selection step requested",fNStepEvt)); + } + + //pass the pointer to the correction container + virtual void SetParticleContainer(AliCFContainer* c) { + fPartContainer=c; + SetNStepParticle(c->GetNStep()); + AliWarning(Form("Please dont forget to set the cut list (even empty) for the %d particle-selection step requested",fNStepPart)); + } + + //Set the number of steps (already done if you have defined your containers) + virtual void SetNStepEvent (Int_t nstep) {fNStepEvt = nstep;} + virtual void SetNStepParticle(Int_t nstep) {fNStepPart = nstep;} //Setter for event-level selection cut list at selection step isel - virtual void SetEventCutsList(Int_t isel, TObjArray* array) {fEvtCutList[isel]=array;} ; - + virtual void SetEventCutsList(Int_t isel, TObjArray* array) ; + //Setter for particle-level selection cut list at selection step isel - virtual void SetParticleCutsList(Int_t isel, TObjArray* array) {fPartCutList[isel]=array;} ; - + virtual void SetParticleCutsList(Int_t isel, TObjArray* array) ; // //Getters @@ -90,7 +105,9 @@ class AliCFManager : public TNamed //Pass the pointer to obj to the selections (used to access MC/rec global //event info when requested - virtual void SetEventInfo(TObject *obj) const; + virtual void SetMCEventInfo(const TObject *obj) const; + virtual void SetRecEventInfo(const TObject *obj) const; + virtual void SetEventInfo(TObject*) const {AliError("DEPRECATED !! -> use SetMCEventInfo of SetRecEventInfo instead");} //Cut Checkers: by default *all* the cuts of a given input list is checked //(.and. of all cuts), but the user can select a subsample of cuts in the @@ -100,19 +117,22 @@ class AliCFManager : public TNamed virtual Bool_t CheckParticleCuts(Int_t isel, TObject *obj, const TString &selcuts="all") const; private: - + + //number of steps + Int_t fNStepEvt; // number of steps in event selection + Int_t fNStepPart; // number of steps in particle selection //the correction grid AliCFContainer *fEvtContainer; //ptr to Evt-Level correction container //the correction grid AliCFContainer *fPartContainer; //ptr to Particle-level correction container //Evt-Level Selections - TObjArray *fEvtCutList[kNEvtSel]; //arrays of cuts: gen,trig,rec-level + TObjArray **fEvtCutList; //[fNStepEvt] arrays of cuts for each event-selection level //Particle-level selections - TObjArray *fPartCutList[kNPartSel]; //arrays of cuts: gen,acceptance,rec,sel-level + TObjArray **fPartCutList ; //[fNStepPart] arrays of cuts for each particle-selection level Bool_t CompareStrings(const TString &cutname,const TString &selcuts) const; - ClassDef(AliCFManager,1); + ClassDef(AliCFManager,2); };