70 void init(
const std::vector<DPID>& pids);
72 void process(
const gsl::span<const DPCOM> dps);
85 LOGP(info,
"mStartValidity {}", mStartValidity);
99 LOGP(info,
"mEndValidity {}", mStartValidity);
108 LOGP(info,
"mEndValidity {}", mStartValidity);
147 return mRunNumberFromGRP;
152 mRunNumberFromGRP = rn;
156 void processTRANS(
const DPCOM& dp);
157 void processHMPID(
const DPCOM& dp);
163 void fillEnvPressure(
const DPCOM& dpcom);
166 void fillHV(
const DPCOM& dpcom);
169 void fillTempIn(
const DPCOM& dpcom);
170 void fillTempOut(
const DPCOM& dpcom);
176 std::unique_ptr<TF1> finalizeEnvPressure();
177 std::unique_ptr<TF1> finalizeChPressure(
int iCh);
178 std::unique_ptr<TF1> finalizeHv(
int iCh,
int iSec);
179 bool finalizeTempOut(
int iCh,
int iRad);
180 bool finalizeTempIn(
int iCh,
int iRad);
195 bool evalCorrFactor(
const double& dRefArgon,
const double& dCellArgon,
const double& dRefFreon,
196 const double& dCellFreon,
const double& dPhotEn,
const int&
i);
197 TransparencyDpInfo dpVector2Double(
const std::vector<DPCOM>& dpVec,
const char* dpString,
int i);
198 double calculatePhotonEnergy(
int i);
209 TimeStampType firstTime = std::numeric_limits<uint64_t>::max();
210 for (
const auto& dp : dps) {
211 const auto time = dp.data.get_epoch_time();
212 firstTime = std::min(firstTime,
time);
222 for (
const auto& dp : dps) {
226 const auto time = dp.data.get_epoch_time();
227 lastTime = std::max(lastTime,
time);
233 uint64_t
first = std::numeric_limits<uint64_t>::max();
234 uint64_t
last = std::numeric_limits<uint64_t>::min();
237 const UInt_t kDefault = BIT(14);
238 bool isDefault(
const TF1*
f)
const {
return f->TestBit(kDefault); }
239 void setDefault(
TF1*
f,
bool v) {
f->SetBit(kDefault,
v); }
243 std::unordered_map<DPID, bool> mPids;
245 int mRunNumberFromGRP = -2;
254 bool mFirstTimeSet =
false;
256 bool mVerbose =
false;
263 std::vector<TF1> arNmean;
267 std::vector<TF1> arQthre;
274 int cntEnvPressure = 0;
275 std::vector<DPCOM> dpVecEnv;
278 int cntChPressure = 0;
279 std::vector<DPCOM> dpVecCh[7];
280 std::unique_ptr<TF1[]> pArrCh = std::unique_ptr<TF1[]>(
new TF1[7]);
286 std::vector<DPCOM> dpVecTempIn[21];
287 std::vector<DPCOM> dpVecTempOut[21];
291 std::vector<DPCOM> dpVecHV[42];
292 std::unique_ptr<TF1[]> pArrHv = std::unique_ptr<TF1[]>(
new TF1[24]);
296 static constexpr double eMeanDefault = 6.675;
299 double sEnergProb = 0, sProb = 0;
302 static constexpr double aCorrFactor[30] = {
303 0.937575212, 0.93805688, 0.938527113, 0.938986068, 0.939433897,
304 0.939870746, 0.940296755, 0.94071206, 0.941116795, 0.941511085,
305 0.941895054, 0.942268821, 0.942632502, 0.942986208, 0.943330047,
306 0.943664126, 0.943988544, 0.944303401, 0.944608794, 0.944904814,
307 0.945191552, 0.945469097, 0.945737533, 0.945996945, 0.946247412,
308 0.946489015, 0.94672183, 0.946945933, 0.947161396, 0.947368291};
311 static constexpr double arrWaveLenDefault[30] = {
312 162, 164, 166, 168, 170, 172, 174, 176, 178, 180,
313 182, 184, 186, 188, 190, 192, 194, 196, 198, 200,
314 202, 204, 206, 208, 210, 212, 214, 216, 218, 220};
316 static constexpr double nm2eV = 1239.842609;
321 std::vector<DPCOM> waveLenVec[30];
325 std::vector<DPCOM> argonRefVec[30];
329 std::vector<DPCOM> freonRefVec[30];
333 std::vector<DPCOM> argonCellVec[30];
337 std::vector<DPCOM> freonCellVec[30];
339 static constexpr double aConvFactor = 1.0 - 0.3 / 1.8;
345 double aTotConvolution;
352 static constexpr std::size_t indexChPr = 7;
355 static constexpr std::size_t indexChHv = 7;
356 static constexpr std::size_t indexSecHv = 13;
359 static constexpr std::size_t indexChTemp = 7;
360 static constexpr std::size_t indexRadTemp = 22;
365 uint64_t hvFirstTime, hvLastTime;
366 uint64_t chPrFirstTime, chPrLastTime;
367 uint64_t envPrFirstTime, envPrLastTime;
369 uint64_t timeTinFirst, timeTinLast;
370 uint64_t timeToutFirst, timeToutLast;
372 TimeRange mTimeEMean;
378 static constexpr auto HMPID_ID{
"HMP_"sv};
379 static constexpr auto TRANS_ID{
"HMP_TRANPLANT_MEASURE_"sv};
381 static constexpr auto TEMP_OUT_ID{
"OUT_TEMP"sv};
382 static constexpr auto TEMP_IN_ID{
"_IN_TEMP"sv};
383 static constexpr auto HV_ID{
"_HV_VMON"sv};
384 static constexpr auto ENV_PRESS_ID{
"ENV_PENV"sv};
385 static constexpr auto CH_PRESS_ID{
"AS_PMWPC"sv};
388 static constexpr auto WAVE_LEN_ID{
"WAVELENGHT"sv};
389 static constexpr auto REF_ID{
"REFERENCE"sv};
390 static constexpr auto ARGON_CELL_ID{
"ARGONCELL"sv};
391 static constexpr auto FREON_CELL_ID{
"C6F14CELL"sv};
393 static constexpr auto ARGON_REF_ID{
"ARGONREFERENCE"sv};
394 static constexpr auto FREON_REF_ID{
"C6F14REFERENCE"sv};