]> git.uio.no Git - u/mrichter/AliRoot.git/blame - CORRFW/AliCFManager.h
Bug fix: corrected file name (Levente)
[u/mrichter/AliRoot.git] / CORRFW / AliCFManager.h
CommitLineData
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
23class TObject;
24class TList;
25class TBits;
26class AliCFContainer ;
27class AliMCEventHandler ;
28class AliGenEventHeader ;
29//____________________________________________________________________________
30class AliCFManager : public TNamed
31{
32 public :
33 AliCFManager() ;
34 AliCFManager(Char_t* name, Char_t* title) ;
35 AliCFManager(const AliCFManager& c) ;
36 AliCFManager& operator=(const AliCFManager& c) ;
37 virtual ~AliCFManager();
38
39 //
40 //Currently foreseen selection steps for event-level cuts:
41 //generator, trigger, reconstruction
42 //
43 enum{
44 kEvtGenCuts=0,
45 kEvtTrigCuts,
46 kEvtRecCuts,
47 kNEvtSel=3
48 };
49
50 //
51 //Currently foreseen selection steps for particle-level cuts:
52 //generator, acceptance, reconstruction, user selection
53 //
54
55 enum{
56 kPartGenCuts=0,
57 kPartAccCuts,
58 kPartRecCuts,
59 kPartSelCuts,
60 kNPartSel=4
61 };
62
63 //
64 // Setters:
65 //
66 //pass the pointer to the correction container
67 virtual void SetEventContainer(AliCFContainer* c) {fEvtContainer=c;} ;
68
69 //pass the pointer to the correction container
70 virtual void SetParticleContainer(AliCFContainer* c) {fPartContainer=c;} ;
71
72 //Setter for event-level selection cut list at selection step isel
73 virtual void SetEventCutsList(Int_t isel, TObjArray* array) {fEvtCutList[isel]=array;} ;
74
75 //Setter for particle-level selection cut list at selection step isel
76 virtual void SetParticleCutsList(Int_t isel, TObjArray* array) {fPartCutList[isel]=array;} ;
77
78
79 //
80 //Getters
81 //
82 // pointer to the Event-level correction container
83 virtual AliCFContainer* GetEventContainer() const {return fEvtContainer;} ;
84
85 // pointer to the Particle-level correction container
86 virtual AliCFContainer* GetParticleContainer() const {return fPartContainer;} ;
87
88 //pointer to the event-level cut list for event selection step isel
89 virtual TObjArray* GetEventCutsList(Int_t isel) const {return fEvtCutList[isel];};
90
91//pointer to the particle-level cut list for particle selection step isel
92 virtual TObjArray* GetParticleCutsList(Int_t isel) const {return fPartCutList[isel];};
93
94
95 //Pass the pointer to obj to the selections (used to access MC/rec global
96 //event info when requested
97 virtual void SetEventInfo(TObject *obj) const;
98
99 //Cut Checkers: by default *all* the cuts of a given input list is checked
100 //(.and. of all cuts), but the user can select a subsample of cuts in the
101 //list via the string argument selcuts
102
103 virtual Bool_t CheckEventCuts(Int_t isel, TObject *obj, const TString &selcuts="all") const;
104 virtual Bool_t CheckParticleCuts(Int_t isel, TObject *obj, const TString &selcuts="all") const;
105
106 virtual void FillQABeforeEventCuts(Int_t isel, TObject *obj) const;
107 virtual void FillQAAfterEventCuts(Int_t isel, TObject *obj) const;
108 virtual void FillQABeforeParticleCuts(Int_t isel, TObject *obj) const;
109 virtual void FillQAAfterParticleCuts(Int_t isel, TObject *obj) const;
110
111 virtual void InitQAHistos() const;//init QA histograms
112 virtual TBits* GetQAParticleSelBits(Int_t isel, TObject *obj);//get cut mask
113 virtual void AddQAHistosToList(TList *list) const; //put the QA histos in TList
114
115
116 private:
117
118 //the correction grid
119 AliCFContainer *fEvtContainer; //ptr to Evt-Level correction container
120 //the correction grid
121 AliCFContainer *fPartContainer; //ptr to Particle-level correction container
122 //Evt-Level Selections
123 TObjArray *fEvtCutList[kNEvtSel]; //arrays of cuts: gen,trig,rec-level
124 //Particle-level selections
125 TObjArray *fPartCutList[kNPartSel]; //arrays of cuts: gen,acceptance,rec,sel-level
126 TBits *fhQABits; // Global list of Cuts' QA BitMaps
127
128 Bool_t CompareStrings(const TString &cutname,const TString &selcuts) const;
129
130 ClassDef(AliCFManager,1);
131};
132
133
134#endif