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 runNumber Run number
157 * @param collisionSystem Collision system
158 * @param cmsNN Center of mass energy per nuclean pair [GeV]
159 * @param field Magnetic field setting [kG]
160 * @param mc Monte-carlo switch
161 * @param what What to read in.
162 * @param force Force (re-)reading of specified things
163 * @param satelliteCollisions For satellite collisions
167 Bool_t Init(ULong_t runNumber,
168 UShort_t collisionSystem,
172 Bool_t satelliteCollisions=false,
173 UInt_t what=kDefault,
176 * Read in correction based on passed parameters
178 * @param runNumber Run number
179 * @param collisionSystem Collision system string
180 * @param cmsNN Center of mass energy per nucleon pair [GeV]
181 * @param field Magnetic field [kG]
182 * @param mc Monte-carlo switch
183 * @param what What to read in
184 * @param force Force (re-)reading of specified things
185 * @param satelliteCollisions For satellite collisions
187 * @return true on success
189 Bool_t Init(ULong_t runNumber,
190 const char* collisionSystem,
194 Bool_t satelliteCollisions=false,
195 UInt_t what=kDefault,
198 * Parse string with fields in it, and return the corresponding bit mask
200 * @param what The string
202 * @return The corresponding bit mask
204 static UInt_t ParseFields(const TString& what);
208 * @return Eta axis or null
210 const TAxis* GetEtaAxis() const;
212 * Get the vertex axis
214 * @return The vertex axis or null
216 const TAxis* GetVertexAxis() const;
218 * Get the energy loss fit correction object.
220 * @return Get the energy loss fits corrections object or null pointer
222 const AliFMDCorrELossFit* GetELossFit() const;
224 * Alias for GetELossFit
226 * @return Get the energy loss fits corrections object or null pointer
228 const AliFMDCorrELossFit* GetELossFits() const { return GetELossFit(); }
230 * Get the secondary correction map
232 * @return Get the secondary correction map object or null
234 const AliFMDCorrSecondaryMap* GetSecondaryMap() const;
236 * Get the double hit correction object
238 * @return Get the double hit correction object or null
240 const AliFMDCorrDoubleHit* GetDoubleHit() const;
242 * Get the vertex bias correction object
244 * @return Get the vertex bias correction object or null
246 const AliFMDCorrVertexBias* GetVertexBias() const;
248 * Get the merging efficiency
251 * @return Get the vertex efficiency correction
253 const AliFMDCorrMergingEfficiency* GetMergingEfficiency() const;
255 * Get the acceptance correction due to dead channels
258 * @return Acceptance correction due to dead channels
260 const AliFMDCorrAcceptance* GetAcceptance() const;
263 * Non-default constructor - initializes corrections - used by
264 * singleton access member function Instance
266 * @param notUsed Ignored
268 AliForwardCorrectionManager(Bool_t notUsed);
270 /** Static singleton instance */
271 static AliForwardCorrectionManager* fgInstance; // Skeleton
277 static const Char_t* fgkSecondaryMapSkel; // Name of correction object
278 static const Char_t* fgkDoubleHitSkel; // Name of correction object
279 static const Char_t* fgkELossFitsSkel; // Name of correction object
280 static const Char_t* fgkVertexBiasSkel; // Name of correction object
281 static const Char_t* fgkMergingEffSkel; // Name of correction object
282 static const Char_t* fgkAcceptanceSkel; // Name of correction object
286 ClassDef(AliForwardCorrectionManager,4) // Manager of corrections