2 // Manager (singleton) of corrections
4 #ifndef ALIFORWARDCORRECTIONMANAGER_H
5 #define ALIFORWARDCORRECTIONMANAGER_H
7 * @file AliForwardCorrectionManager.h
8 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9 * @date Wed Mar 23 14:04:27 2011
14 * @ingroup pwglf_forward_aod
16 #include "AliCorrectionManagerBase.h"
19 class AliFMDCorrELossFit;
20 class AliFMDCorrDoubleHit;
21 class AliFMDCorrVertexBias;
22 class AliFMDCorrMergingEfficiency;
23 class AliFMDCorrAcceptance;
24 class AliFMDCorrSecondaryMap;
28 * Manager (singleton) of corrections
30 * Note, that this class has a custom streamer. That is to ensure
31 * that the singleton pointer is correctly set on reading in an object
34 * @ingroup pwglf_forward_corr
35 * @ingroup pwglf_forward_aod
37 class AliForwardCorrectionManager : public AliCorrectionManagerBase
41 * Enumeration of things that can be read in
53 * Enumeration of things that can be read in
59 kMergingEfficiency = 0x08,
62 kDefault = (kSecondaryMap|kELossFits|kAcceptance),
63 kAll = (kSecondaryMap|
71 * Default constructor. This is public for the sake of the ROOT I/O
72 * system, but should never be used outside of that system - that
73 * is, do not use this constructor
75 AliForwardCorrectionManager();
77 * Access to the singleton object
79 * @return Reference to the singleton object
81 static AliForwardCorrectionManager& Instance();
84 * Append the content of the file @a addition to the @a destination
85 * file for this manager. This used TFileMerger::PartialMerge
87 * @param destination Filename of destination storage (in OADB_PATH)
88 * @param addition Filename of addition.
90 * @return true on success
92 virtual Bool_t Append(const TString& addition,
93 const TString& destination="") const;
96 * @return name of object
98 const Char_t* GetName() const { return "forwardCorrections"; }
100 * Set path to corrections
104 void SetSecondaryMapPath(const char* d)
106 SetCorrectionFile(kIdSecondaryMap, d);
109 * Set path to corrections
113 void SetDoubleHitPath(const char* d)
115 SetCorrectionFile(kIdDoubleHit, d);
118 * Set path to corrections
122 void SetELossFitsPath(const char* d)
124 SetCorrectionFile(kIdELossFits, d);
127 * Set path to corrections
131 void SetVertexBiasPath(const char* d)
133 SetCorrectionFile(kIdVertexBias, d);
136 * Set path to corrections
140 void SetMergingEffPath(const char* d)
142 SetCorrectionFile(kIdMergingEfficiency, d);
145 * Set path to corrections
149 void SetAcceptancePath(const char* d)
151 SetCorrectionFile(kIdAcceptance, d);
154 * Read in corrections based on the parameters given
156 * @param collisionSystem Collision system
157 * @param cmsNN Center of mass energy per nuclean pair [GeV]
158 * @param field Magnetic field setting [kG]
159 * @param mc Monte-carlo switch
160 * @param what What to read in.
161 * @param force Force (re-)reading of specified things
165 Bool_t Init(ULong_t runNumber,
166 UShort_t collisionSystem,
170 Bool_t satelliteCollisions=false,
171 UInt_t what=kDefault,
174 * Read in correction based on passed parameters
176 * @param collisionSystem Collision system string
177 * @param cmsNN Center of mass energy per nucleon pair [GeV]
178 * @param field Magnetic field [kG]
179 * @param mc Monte-carlo switch
180 * @param what What to read in
181 * @param force Force (re-)reading of specified things
183 * @return true on success
185 Bool_t Init(ULong_t runNumber,
186 const char* collisionSystem,
190 Bool_t satelliteCollisions=false,
191 UInt_t what=kDefault,
194 * Parse string with fields in it, and return the corresponding bit mask
196 * @param what The string
198 * @return The corresponding bit mask
200 static UInt_t ParseFields(const TString& what);
204 * @return Eta axis or null
206 const TAxis* GetEtaAxis() const;
208 * Get the vertex axis
210 * @return The vertex axis or null
212 const TAxis* GetVertexAxis() const;
214 * Get the energy loss fit correction object.
216 * @return Get the energy loss fits corrections object or null pointer
218 const AliFMDCorrELossFit* GetELossFit() const;
220 * Alias for GetELossFit
222 * @return Get the energy loss fits corrections object or null pointer
224 const AliFMDCorrELossFit* GetELossFits() const { return GetELossFits(); }
226 * Get the secondary correction map
228 * @return Get the secondary correction map object or null
230 const AliFMDCorrSecondaryMap* GetSecondaryMap() const;
232 * Get the double hit correction object
234 * @return Get the double hit correction object or null
236 const AliFMDCorrDoubleHit* GetDoubleHit() const;
238 * Get the vertex bias correction object
240 * @return Get the vertex bias correction object or null
242 const AliFMDCorrVertexBias* GetVertexBias() const;
244 * Get the merging efficiency
247 * @return Get the vertex efficiency correction
249 const AliFMDCorrMergingEfficiency* GetMergingEfficiency() const;
251 * Get the acceptance correction due to dead channels
254 * @return Acceptance correction due to dead channels
256 const AliFMDCorrAcceptance* GetAcceptance() const;
259 * Non-default constructor - initializes corrections - used by
260 * singleton access member function Instance
262 * @param notUsed Ignored
264 AliForwardCorrectionManager(Bool_t notUsed);
266 /** Static singleton instance */
267 static AliForwardCorrectionManager* fgInstance; // Skeleton
273 static const Char_t* fgkSecondaryMapSkel; // Name of correction object
274 static const Char_t* fgkDoubleHitSkel; // Name of correction object
275 static const Char_t* fgkELossFitsSkel; // Name of correction object
276 static const Char_t* fgkVertexBiasSkel; // Name of correction object
277 static const Char_t* fgkMergingEffSkel; // Name of correction object
278 static const Char_t* fgkAcceptanceSkel; // Name of correction object
282 ClassDef(AliForwardCorrectionManager,4) // Manager of corrections