|
1 | | -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. |
| 1 | + // Copyright 2019-2020 CERN and copyright holders of ALICE O2. |
2 | 2 | // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. |
3 | 3 | // All rights not expressly granted are reserved. |
4 | 4 | // |
@@ -89,10 +89,31 @@ void PostProcessingLuminometer::update(Trigger t, framework::ServiceRegistryRef) |
89 | 89 | auto moEfficiency = mDatabase->retrieveMO(mCCDBPath, mMOEfficiency, t.timestamp, t.activity); |
90 | 90 | auto moActiveChannels = mDatabase->retrieveMO(mCCDBPath, mMOActiveChannels, t.timestamp, t.activity); |
91 | 91 | auto moMultiplicity = mDatabase->retrieveMO(mCCDBPath, mMOMultiplicity, t.timestamp, t.activity); |
| 92 | + auto moDecodingErrors = mDatabase->retrieveMO(mCCDBPath, mMOdecodingErrors, t.timestamp, t.activity); |
92 | 93 |
|
93 | 94 | float ROeff = 1.; |
94 | 95 | float hitMult = 0.; |
95 | 96 | float activeCh = 1.; |
| 97 | + float decodingEff = 1.; |
| 98 | + |
| 99 | + // Decoding Errors |
| 100 | + if (moDecodingErrors) { |
| 101 | + TH2D* htemp = static_cast<TH2D*>(moDecodingErrors->getObject()); |
| 102 | + TH1D* hproj = (TH1D*)htemp->ProjectionY(); |
| 103 | + hproj->SetName("decodErr_pro"); |
| 104 | + if (hproj->GetBinContent(1) > 0) { |
| 105 | + hproj->Scale(0.1 / hproj->GetBinContent(1)); // normalize to the first bin content and divide by 10 (TRMs) |
| 106 | + for (int ibin = 3; ibin < hproj->GetNbinsX() - 1; ibin++) { // count on TRM errors (skip last bin = DRM errors) |
| 107 | + decodingEff -= hproj->GetBinContent(ibin); |
| 108 | + } |
| 109 | + if (decodingEff < 1E-2) { |
| 110 | + ILOG(Warning) << "decodingEff = " << decodingEff << " -> it is too low? Why? ... skipping such a correction " << ENDM; |
| 111 | + decodingEff = 1.; |
| 112 | + } |
| 113 | + } |
| 114 | + } else { |
| 115 | + ILOG(Warning) << "Did not find MO " << moDecodingErrors << " in path " << mCCDBPath << ENDM; |
| 116 | + } |
96 | 117 |
|
97 | 118 | // Readout efficiency |
98 | 119 | TH2F* moHEfficiency = static_cast<TH2F*>(moEfficiency ? moEfficiency->getObject() : nullptr); |
@@ -142,7 +163,14 @@ void PostProcessingLuminometer::update(Trigger t, framework::ServiceRegistryRef) |
142 | 163 | ILOG(Warning) << "Did not find MO " << mMOMultiplicity << " in path " << mCCDBPath << ENDM; |
143 | 164 | } |
144 | 165 |
|
145 | | - mHistoLuminometer->Fill(hitMult / (activeCh * ROeff)); |
| 166 | + mHistoLuminometer->Fill(hitMult / (activeCh * ROeff * decodingEff)); |
| 167 | + ILOG(Info) << "____________________" << ENDM; |
| 168 | + ILOG(Info) << "Luminometer summary " << ENDM; |
| 169 | + ILOG(Info) << "decodingEff = " << decodingEff << ENDM; |
| 170 | + ILOG(Info) << "activeCh = " << activeCh << ENDM; |
| 171 | + ILOG(Info) << "ROeff = " << ROeff << ENDM; |
| 172 | + ILOG(Info) << "hitMult = " << hitMult << ENDM; |
| 173 | + ILOG(Info) << "____________________" << ENDM; |
146 | 174 | } |
147 | 175 |
|
148 | 176 | void PostProcessingLuminometer::finalize(Trigger, framework::ServiceRegistryRef) |
|
0 commit comments