2 // Manager (singleton) of corrections
4 #ifndef ALICENTRALCORRECTIONMANAGER_H
5 #define ALICENTRALCORRECTIONMANAGER_H
7 * @file AliCentralCorrectionManager.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 AliCentralCorrAcceptance;
20 class AliCentralCorrSecondaryMap;
24 * Manager (singleton) of corrections
26 * Note, that this class has a custom streamer. That is to ensure
27 * that the singleton pointer is correctly set on reading in an object
30 * @ingroup pwglf_forward_corr
31 * @ingroup pwglf_forward_aod
33 class AliCentralCorrectionManager : public AliCorrectionManagerBase
37 * Enumeration of things that can be read in
45 * Enumeration of things that can be read in
50 kDefault = (kSecondaryMap|kAcceptance),
51 kAll = (kSecondaryMap|kAcceptance)
54 * Default constructor. This is public for the sake of the ROOT I/O
55 * system, but should never be used outside of that system - that
56 * is, do not use this constructor
58 AliCentralCorrectionManager();
60 * Access to the singleton object
62 * @return Reference to the singleton object
64 static AliCentralCorrectionManager& Instance();
67 * Append the content of the file @a addition to the @a destination
68 * file for this manager. This used TFileMerger::PartialMerge
70 * @param destination Filename of destination storage (in OADB_PATH)
71 * @param addition Filename of addition.
73 * @return true on success
75 virtual Bool_t Append(const TString& addition,
76 const TString& destination="") const;
79 * @return name of the object
81 const Char_t* GetName() const { return "centralCorrections"; }
83 * Set path to corrections
87 void SetSecondaryMapPath(const char* d)
89 SetCorrectionFile(kIdSecondaryMap, d);
92 * Set path to corrections
96 void SetAcceptancePath(const char* d)
98 SetCorrectionFile(kIdAcceptance, d);
101 * Read in corrections based on the parameters given
103 * @param runNumber Run number
104 * @param collisionSystem Collision system
105 * @param cmsNN Center of mass energy per nuclean pair [GeV]
106 * @param field Magnetic field setting [kG]
107 * @param mc Monte-carlo switch
108 * @param what What to read in.
109 * @param force Force (re-)reading of specified things
110 * @param satelliteCollisions For satellite collisions
114 Bool_t Init(ULong_t runNumber,
115 UShort_t collisionSystem,
119 Bool_t satelliteCollisions=false,
120 UInt_t what=kDefault,
123 * Read in correction based on passed parameters
125 * @param runNumber Run number
126 * @param collisionSystem Collision system string
127 * @param cmsNN Center of mass energy per nucleon pair [GeV]
128 * @param field Magnetic field [kG]
129 * @param mc Monte-carlo switch
130 * @param what What to read in
131 * @param force Force (re-)reading of specified things
132 * @param satelliteCollisions For satellite collisions
134 * @return true on success
136 Bool_t Init(ULong_t runNumber,
137 const char* collisionSystem,
141 Bool_t satelliteCollisions=false,
142 UInt_t what=kStandard,
145 * Get the vertex axis
147 * @return The vertex axis or null
149 const TAxis* GetVertexAxis() const;
151 * Get the @f$\eta@f$ axis
153 * @return The @f$\eta@f$ axis or null
155 const TAxis* GetEtaAxis() const { return 0; }
157 * Get the secondary correction map
159 * @return Get the secondary correction map object or null
161 const AliCentralCorrSecondaryMap* GetSecondaryMap() const;
163 * Get the acceptance correction due to dead channels
166 * @return Acceptance correction due to dead channels
168 const AliCentralCorrAcceptance* GetAcceptance() const;
171 * Non-default constructor - initializes corrections - used by
172 * singleton access member function Instance
174 * @param notUsed Ignored
176 AliCentralCorrectionManager(Bool_t notUsed);
178 /** Static singleton instance */
179 static AliCentralCorrectionManager* fgInstance; // Skeleton
185 static const Char_t* fgkSecondaryMapSkel; // Name of correction object
186 static const Char_t* fgkAcceptanceSkel; // Name of correction object
190 ClassDef(AliCentralCorrectionManager,2) // Manager of corrections