2 # include "AliFMDParameters.h" 6 # include "AliCDBManager.h" 7 # include "AliCDBEntry.h" 8 # include "AliCDBStorage.h" 9 # include "AliGRPObject.h" 28 if (runNo <= 99999) year = 2009;
29 else if (runNo <= 139667) year = 2010;
30 else if (runNo <= 170718) year = 2011;
31 else if (runNo <= 194306) year = 2012;
32 else if (runNo <= 197709) year = 2013;
34 Error(
"",
"Couldn't deduce the year from the run number");
39 AliCDBManager* cdb = AliCDBManager::Instance();
41 cdb->SetDefaultStorageFromRun(runNo);
46 AliCDBId grpId(
"GRP/GRP/Data", runNo + 100, runNo - 100);
47 AliCDBEntry* grpE = cdb->GetDefaultStorage()->GetEntry(grpId);
49 Warning(
"ExtractForRun",
"No GRP entry found for run %d", runNo);
52 AliGRPObject*
grp =
static_cast<AliGRPObject*
>(grpE->GetObject());
54 Warning(
"ExtractForRun",
"No GRP object found for run %d", runNo);
57 Float_t beamE = grp->GetBeamEnergy();
58 TString beamT = grp->GetBeamType();
62 Float_t l3cur = grp->GetL3Current(AliGRPObject::kMean);
63 Char_t l3pol = grp->GetL3Polarity();
64 Bool_t l3lhc = grp->IsPolarityConventionLHC();
65 Bool_t l3uni = grp->IsUniformBMap();
67 AliMagF::CreateFieldMap(TMath::Abs(l3cur) * (l3pol ? -1:1), 0,
68 (l3lhc ? 0 : 1), l3uni, beamE, beamT.Data());
69 Float_t l3fld = fldM->SolenoidField();
71 Printf(
"=== From GRP: Beam: E=%f T=%s", beamE, beamT.Data());
72 if (beamE > 14000) beamE = 450;
73 if (beamT.IsNull()) beamT =
"pp";
78 Printf(
"=== Run=%d, year=%d, sys=%d, sNN=%d, fld=%d",
79 runNo, year, sys, sNN, fld);
86 AliFMDParameters* param = AliFMDParameters::Instance();
87 param->Init(
true, AliFMDParameters::kPulseGain|AliFMDParameters::kPedestal);
91 Float_t konst = param->GetDACPerMIP();
97 Char_t r = (q == 0 ?
'I' :
'O');
102 Float_t noise = param->GetPedestalWidth(d,r,s,t);
103 Float_t gain = param->GetPulseGain(d,r,s,t);
105 if (noise > .5 && gain > .5) corr = noise / (gain * konst);
106 if (corr > 1 || corr < 0) {
107 Warning(
"",
"FMD%d%c[%2d,%3d] corr= %f (=%f/(%f*%f))",
108 d, r, s, t, corr, noise, gain, konst);
111 ret->
Set(d,r,s,t,corr);
118 Printf(
"=== Writing to disk");
120 if (!cm.
Store(ret, runNo, sys, sNN, fld,
false,
false,
121 "fmd_corrections.root",
"OLDER")) {
122 Error(
"",
"Failed to store acceptance correction in local file");
142 75201, 75238, 75311, 75330, 75383, 75384, 75630, 75631,
143 77901, 80649, 80650, 80738, 82055, 82301, 85947, 85948,
144 87560, 87561, 91794, 91795, 92436, 92441, 93271, 93273,
145 93587, 93588, 93595, 94793, 96747, 96945, 96947, 96949,
146 96956, 96962, 96963, 97226, 97228, 97593, 97996, 98780,
147 98782, 98974, 98980, 99033, 99084, 99085, 99414, 99726,
148 100075, 100273, 100594, 100595, 100868, 100967, 101808, 101809,
149 102034, 102036, 102043, 102238, 102240, 103639, 103641, 103984,
150 103989, 104108, 104109, 104167, 104169, 104526, 104529, 104901,
151 104904, 104914, 105111, 105112,
153 105827, 105834, 105963, 107718, 110372, 110373, 113268, 113331,
154 113650, 113651, 114594, 114596, 115126, 115127, 115136, 115160,
155 115171, 115244, 115334, 115355, 115360, 115477, 115480, 115528,
156 115530, 115538, 115545, 115651, 115660, 116294, 116335, 116438,
157 116439, 116440, 116613, 116614, 116655, 117255, 117257, 117258,
158 117395, 117396, 117397, 117398, 117399, 117400, 117401, 117402,
159 117403, 117404, 117405, 117406, 117407, 117408, 117409, 117411,
160 117413, 117415, 117416, 117417, 117418, 117420, 117421, 117422,
161 117423, 117424, 117425, 117426, 117427, 117428, 117429, 117431,
162 117432, 117433, 117434, 117435, 117437, 117438, 117439, 117441,
163 117442, 117443, 117444, 117445, 117446, 117447, 117448, 117450,
164 117452, 117453, 117458, 117459, 117461, 117464, 117471, 117476,
165 117478, 117483, 117492, 117495, 117496, 117498, 117512, 117524,
166 117561, 117571, 117588, 117606, 117612, 117616, 117624, 117630,
167 117648, 117650, 117664, 117677, 117678, 117680, 117681, 117682,
168 117684, 117687, 117688, 117689, 117690, 117693, 117695, 117698,
169 117699, 117700, 117701, 117702, 117703, 117704, 117706, 117707,
170 117708, 117709, 117712, 117714, 117717, 117719, 117720, 117722,
171 117723, 117724, 117725, 117726, 117728, 117730, 117731, 117733,
172 117735, 117736, 117737, 117738, 117739, 117741, 117742, 117744,
173 117745, 117746, 117747, 117763, 117772, 117776, 117779, 117784,
174 119187, 119200, 120542, 120543, 121526, 121527, 121528, 121532,
175 121550, 121554, 121557, 121621, 121638, 121651, 121656, 121662,
176 121667, 121677, 121686, 121691, 121697, 121698, 121700, 121702,
177 121704, 121706, 121708, 121710, 121712, 121713, 121714, 121715,
178 121717, 121719, 121722, 121724, 121726, 121728, 121730, 121732,
179 121734, 121736, 121738, 121740, 121742, 121743, 121963, 121965,
180 121968, 121970, 121980, 121982, 121983, 121985, 121986, 121987,
181 121988, 121989, 121990, 121991, 121992, 121993, 121994, 121995,
182 121996, 121997, 121998, 121999, 122000, 122001, 122002, 122003,
183 122004, 122005, 122006, 122007, 122008, 122009, 122010, 122011,
184 122012, 122013, 124437, 124438, 125892, 125894, 125896, 125897,
185 126043, 126046, 126939, 126940, 128138, 128140, 128511, 128512,
186 129793, 129796, 129804, 130290, 130291, 131336, 131337, 131383,
187 131386, 131387, 131389, 131392, 131396, 131397, 131398, 131399,
188 131400, 132637, 132638, 132789, 132799, 135478, 135479, 136733,
189 136738, 136740, 138243, 138244, 138935,
191 144429, 144751, 144837, 144856, 145167, 145169, 145170, 146647,
192 146650, 147281, 147285, 147289, 147299, 147301, 147307, 147318,
193 149252, 149256, 154053, 154054, 154057, 155422, 155424, 155430,
194 155933, 155934, 156030, 156032, 156037, 156038, 156201, 156202,
195 156204, 156207, 156217, 156222, 156778, 156780, 157800, 157801,
196 157802, 157804, 157805, 157808, 158993, 158994, 165623, 165636,
197 165637, 166817, 166819, 167219, 167221, 169438, 169443, 169446,
198 169448, 169449, 169450, 169451, 169484, 169486,
200 172968, 172970, 175768, 175769, 176615, 176616, 176617, 177999,
201 178000, 178562, 178571, 179962, 179963, 182380, 182381, 183249,
202 183253, 183594, 183596, 184904, 184911, 184912, 185266, 185267,
203 185269, 185270, 185873, 186408, 186471, 187021, 187022, 187023,
204 187259, 187263, 187803, 187804, 188300, 188301, 188851, 188856,
205 189256, 189257, 191769, 191770,
207 194507, 194522, 194523, 194526, 194589, 194590, 195027, 195030,
215 Int_t next = *(pRun+1);
216 Int_t dist = next - *pRun;
218 if (next > 0 && dist <= 20) {
226 Printf(
"%-6d %s%d,%d,",dist,
url,last,*pRun);
233 Info(
"",
"Skipped %d of %d", skipped, total);
static UShort_t ParseCenterOfMassEnergy(UShort_t sys, Float_t cms)
void Set(UShort_t d, Char_t r, UShort_t s, UShort_t t, Float_t x)
virtual Bool_t Store(TObject *o, ULong_t runNo, UShort_t sys, UShort_t sNN, Short_t field, Bool_t mc, Bool_t sat, const char *file, const char *meth="NEAR") const
Various utilities used in PWGLF/FORWARD.
static UShort_t ParseCollisionSystem(const char *sys)
static AliForwardCorrectionManager & Instance()