10#include <beast/analysis/modules/NtuplePhase1_v6Module.h>
11#include <beast/analysis/modules/BEASTTree_v5.h>
14#include <framework/datastore/DataStore.h>
15#include <framework/datastore/StoreObjPtr.h>
18#include <framework/logging/Logger.h>
19#include <framework/core/RandomNumbers.h>
22#include <framework/io/RootIOUtilities.h>
23#include <framework/dataobjects/EventMetaData.h>
47 setDescription(
"Read SKB PVs, simulated measurements of BEAST sensors, and write scaled simulated Ntuple in BEAST phase 1 data format");
52 "List of files with SKB PVs ");
99 "List of root files with histograms");
102 "List of rate histograms");
104 "List of dose histograms");
106 "List of rate histograms");
108 "List of dose histograms");
137 B2FATAL(
"No valid files specified!");
141 TDirectory* dir = gDirectory;
143 TFile* f = TFile::Open(fileName.c_str(),
"READ");
144 if (!f or !f->IsOpen()) {
145 B2FATAL(
"Couldn't open input file " + fileName);
153 m_tree =
new TChain(
"tout");
155 m_tree->AddFile(fileName.c_str());
248 B2FATAL(
"No valid files specified!");
251 fctRate_HB =
new TF1(
"fctRate_HB",
"[0] * x*x * log([1] / TMath::Power(x,1./3.) + [2])", 1.0, 19.0);
252 fctRate_LB =
new TF1(
"fctRate_LB",
"[0] * x*x * log([1] / TMath::Power(x,1./3.) + [2])", 1.0, 19.0);
253 fctRate_HC =
new TF1(
"fctRate_HC",
"[0] * x*x / TMath::Power( ([1] / TMath::Power(x,1./3.) + [2]), 2.)", 1.0, 19.0);
254 fctRate_LC =
new TF1(
"fctRate_LC",
"[0] * x*x / TMath::Power( ([1] / TMath::Power(x,1./3.) + [2]), 2.)", 1.0, 19.0);
255 fctRate_HB->SetParameters(0.183373, 0.117173, 1.23431);
256 fctRate_LB->SetParameters(0.900838, 0.0455552, 1.10098);
257 fctRate_HC->SetParameters(1.80992, -0.000115401, 8.4047);
258 fctRate_LC->SetParameters(0.210872, -4.50637e-06, 1.64209);
272 const double RadConv = 6.24e7;
275 TDirectory* dirh = gDirectory;
279 const TString& fileName = (TString)fileNameTmp;
280 fh[iter] = TFile::Open(fileName,
"READ");
281 if (!fh[iter] or !fh[iter]->IsOpen()) {
282 B2FATAL(
"Couldn't open input file " + fileName);
284 if (fileName.Contains(
"Touschek") || fileName.Contains(
"Coulomb") || fileName.Contains(
"Brems")) {
286 const TString& HistoRateName = (TString)HistoRateNameTmp;
289 if (HistoRateName.Contains(
"csi")) h1D = (TH1F*)fh[iter]->Get(TString::Format(
"csi_rate_%d",
m_DayBin));
290 else h1D = (TH1F*)fh[iter]->Get(HistoRateName);
292 for (
int i = 0; i < h1D->GetNbinsX(); i++) {
293 double counts = h1D->GetBinContent(i + 1);
296 if (fileName.Contains(
"Coulomb")) {
300 if (fileName.Contains(
"Brems")) {
307 if (fileName.Contains(
"HER")) {
308 if (HistoRateName.Contains(
"qcss") && fileName.Contains(
"Touschek"))
m_input_HT_QCSS_rate.push_back(rate);
309 if (HistoRateName.Contains(
"claws") && fileName.Contains(
"Touschek"))
m_input_HT_CLAWS_rate.push_back(rate);
310 if (HistoRateName.Contains(
"csi") && fileName.Contains(
"Touschek"))
m_input_HT_CSI_rate.push_back(rate);
311 if (HistoRateName.Contains(
"Def") && fileName.Contains(
"Touschek"))
m_input_HT_HE3_rate.push_back(rate);
312 if (HistoRateName.Contains(
"tpc_rate") && fileName.Contains(
"Touschek"))
m_input_HT_TPC_rate.push_back(rate);
319 if (HistoRateName.Contains(
"tpc_rate") && fileName.Contains(
"Brems"))
m_input_HB_TPC_rate_av.push_back(rate);
324 if (HistoRateName.Contains(
"csi") && fileName.Contains(
"Coulomb"))
m_input_HC_CSI_rate_av.push_back(rate);
325 if (HistoRateName.Contains(
"Def") && fileName.Contains(
"Coulomb"))
m_input_HC_HE3_rate_av.push_back(rate);
326 if (HistoRateName.Contains(
"tpc_rate") && fileName.Contains(
"Coulomb"))
m_input_HC_TPC_rate_av.push_back(rate);
330 if (fileName.Contains(
"LER")) {
331 if (HistoRateName.Contains(
"qcss") && fileName.Contains(
"Touschek"))
m_input_LT_QCSS_rate.push_back(rate);
332 if (HistoRateName.Contains(
"claws") && fileName.Contains(
"Touschek"))
m_input_LT_CLAWS_rate.push_back(rate);
333 if (HistoRateName.Contains(
"csi") && fileName.Contains(
"Touschek"))
m_input_LT_CSI_rate.push_back(rate);
334 if (HistoRateName.Contains(
"Def") && fileName.Contains(
"Touschek"))
m_input_LT_HE3_rate.push_back(rate);
335 if (HistoRateName.Contains(
"tpc_rate") && fileName.Contains(
"Touschek"))
m_input_LT_TPC_rate.push_back(rate);
342 if (HistoRateName.Contains(
"tpc_rate") && fileName.Contains(
"Brems"))
m_input_LB_TPC_rate_av.push_back(rate);
347 if (HistoRateName.Contains(
"csi") && fileName.Contains(
"Coulomb"))
m_input_LC_CSI_rate_av.push_back(rate);
348 if (HistoRateName.Contains(
"Def") && fileName.Contains(
"Coulomb"))
m_input_LC_HE3_rate_av.push_back(rate);
349 if (HistoRateName.Contains(
"tpc_rate") && fileName.Contains(
"Coulomb"))
m_input_LC_TPC_rate_av.push_back(rate);
357 const TString& HistoDoseName = (TString)HistoDoseNameTmp;
360 if (HistoDoseName.Contains(
"csi")) imax = 18;
361 if (HistoDoseName.Contains(
"bgo")) imax = 8;
362 if (HistoDoseName.Contains(
"pin")) {
366 mass = rho * volume * 1e-3;
368 if (HistoDoseName.Contains(
"dia")) {
370 volume = 0.4 * 0.4 * 0.05;
372 mass = rho * volume * 1e-3;
374 if (HistoDoseName.Contains(
"dosi")) {
376 volume = 0.265 * 0.265 * 0.01;
378 mass = rho * volume * 1e-3;
380 if (HistoDoseName.Contains(
"tpc")) {
382 volume = 10.8537 * 2.0 * 1.68;
384 mass = rho * volume * 1e-3;
386 for (
int i = 0; i < imax; i++) {
389 if (HistoDoseName.Contains(
"csi")) {
390 he = (TH1F*)fh[iter]->Get(TString::Format(
"csi_dedep_%d_%d", i,
m_DayBin));
392 he = (TH1F*)fh[iter]->Get(TString::Format(
"%s_%d", HistoDoseName.Data(), i));
397 for (
int j = 0; j < he->GetNbinsX(); j++) {
398 double co = he->GetBinContent(j + 1);
399 double va = he->GetXaxis()->GetBinCenter(j + 1);
400 double esumbin = va * co;
402 if (fileName.Contains(
"Coulomb")) {
406 if (fileName.Contains(
"Brems")) {
412 if (HistoDoseName.Contains(
"csi_energy")) {
413 if (fileName.Contains(
"HER")) {
418 if (fileName.Contains(
"LER")) {
425 if (fileName.Contains(
"HER")) {
426 if (HistoDoseName.Contains(
"csi") && HistoDoseName.Contains(
"edep")
428 if (HistoDoseName.Contains(
"bgo")
430 if (HistoDoseName.Contains(
"pin")
432 if (HistoDoseName.Contains(
"dosi")
434 if (HistoDoseName.Contains(
"tpc_dose")
439 if (HistoDoseName.Contains(
"dia")
441 if (HistoDoseName.Contains(
"csi") && HistoDoseName.Contains(
"edep")
443 if (HistoDoseName.Contains(
"bgo")
445 if (HistoDoseName.Contains(
"pin")
447 if (HistoDoseName.Contains(
"dosi")
449 if (HistoDoseName.Contains(
"tpc_dose")
454 if (HistoDoseName.Contains(
"dia")
456 if (HistoDoseName.Contains(
"csi") && HistoDoseName.Contains(
"edep")
458 if (HistoDoseName.Contains(
"bgo")
460 if (HistoDoseName.Contains(
"pin")
462 if (HistoDoseName.Contains(
"dosi")
464 if (HistoDoseName.Contains(
"tpc_dose")
469 if (HistoDoseName.Contains(
"dia")
472 if (fileName.Contains(
"LER")) {
473 if (HistoDoseName.Contains(
"csi") && HistoDoseName.Contains(
"edep")
475 if (HistoDoseName.Contains(
"bgo")
477 if (HistoDoseName.Contains(
"pin")
479 if (HistoDoseName.Contains(
"dosi")
481 if (HistoDoseName.Contains(
"tpc_dose")
486 if (HistoDoseName.Contains(
"dia")
488 if (HistoDoseName.Contains(
"csi") && HistoDoseName.Contains(
"edep")
490 if (HistoDoseName.Contains(
"bgo")
492 if (HistoDoseName.Contains(
"pin")
494 if (HistoDoseName.Contains(
"dosi")
496 if (HistoDoseName.Contains(
"tpc_dose")
501 if (HistoDoseName.Contains(
"dia")
503 if (HistoDoseName.Contains(
"csi") && HistoDoseName.Contains(
"edep")
505 if (HistoDoseName.Contains(
"bgo")
507 if (HistoDoseName.Contains(
"pin")
509 if (HistoDoseName.Contains(
"dosi")
511 if (HistoDoseName.Contains(
"tpc_dose")
516 if (HistoDoseName.Contains(
"dia")
523 if (fileName.Contains(
"Coulomb") || fileName.Contains(
"Brems")) {
525 const TString& HistoRateName = (TString)HistoRateNameTmp;
528 if (HistoRateName.Contains(
"csi")) h2D = (TH2F*)fh[iter]->Get(TString::Format(
"csi_rs_drate_%d",
m_DayBin));
529 else h2D = (TH2F*)fh[iter]->Get(HistoRateName);
531 for (
int k = 0; k < h2D->GetNbinsY(); k++) {
532 for (
int i = 0; i < h2D->GetNbinsX(); i++) {
533 double counts = h2D->GetBinContent(i + 1, k + 1);
536 if (fileName.Contains(
"Coulomb")) {
540 if (fileName.Contains(
"Brems")) {
547 if (fileName.Contains(
"Coulomb_HER")) {
556 if (fileName.Contains(
"Coulomb_LER")) {
565 if (fileName.Contains(
"Brems_HER")) {
574 if (fileName.Contains(
"Brems_LER")) {
589 const TString& HistoDoseName = (TString)HistoDoseNameTmp;
591 if (HistoDoseName.Contains(
"csi")) imax = 18;
592 if (HistoDoseName.Contains(
"bgo")) imax = 8;
593 if (HistoDoseName.Contains(
"pin")) {
597 mass = rho * volume * 1e-3;
599 if (HistoDoseName.Contains(
"dia")) {
601 volume = 0.4 * 0.4 * 0.05;
603 mass = rho * volume * 1e-3;
605 if (HistoDoseName.Contains(
"dosi")) {
607 volume = 0.265 * 0.265 * 0.01;
609 mass = rho * volume * 1e-3;
611 if (HistoDoseName.Contains(
"tpc")) {
613 volume = 10.8537 * 2.0 * 1.68;
615 mass = rho * volume * 1e-3;
617 for (
int i = 0; i < imax; i++) {
620 if (HistoDoseName.Contains(
"csi")) {
621 he = (TH2F*)fh[iter]->Get(TString::Format(
"csi_rs_dedep_%d_%d", i,
m_DayBin));
623 he = (TH2F*)fh[iter]->Get(TString::Format(
"%s_%d", HistoDoseName.Data(), i));
627 for (
int k = 0; k < he->GetNbinsY(); k++) {
629 for (
int j = 0; j < he->GetNbinsX(); j++) {
630 double co = he->GetBinContent(j + 1, k + 1);
631 double va = he->GetXaxis()->GetBinCenter(j + 1);
632 double esumbin = va * co;
634 if (fileName.Contains(
"Coulomb")) {
638 if (fileName.Contains(
"Brems")) {
644 if (HistoDoseName.Contains(
"csi_energy")) {
645 if (fileName.Contains(
"HER")) {
649 if (fileName.Contains(
"LER")) {
656 if (fileName.Contains(
"Coulomb_HER")) {
657 if (HistoDoseName.Contains(
"csi")
668 if (fileName.Contains(
"Coulomb_LER")) {
669 if (HistoDoseName.Contains(
"csi")
680 if (fileName.Contains(
"Brems_HER")) {
681 if (HistoDoseName.Contains(
"csi")
692 if (fileName.Contains(
"Brems_LER")) {
693 if (HistoDoseName.Contains(
"csi")
724 m_treeTruth =
new TTree(
"truth",
"Truth table (simulation)");
726 m_treeBEAST =
new TTree(
"tout",
"BEAST data tree (simulation)");
884 for (
int i = 0; i < 12; i ++) {
1048 evtMetaData->setEndOfData();
1054 double Zeff_LER = 2.7;
1064 if (Zeff_LER > 0 && Zeff_LER < 40) {
1092 double P_corrected_HER = 0;
1095 0) * 0.00750062 * 1e9;
1097 double P_corrected_LER = 0;
1100 0) * 0.00750062 * 1e9;
1103 double sigma_y_HER = 0;
1104 double sigma_x_HER = 0;
1123 double sigma_y_LER = 0;
1124 double sigma_x_LER = 0;
1143 double bunch_nb_HER = 0;
1148 double bunch_nb_LER = 0;
1160 if (I_HER < 0) I_HER = 0;
1161 if (I_LER < 0) I_LER = 0;
1164 if (P_corrected_HER < 0) P_corrected_HER = 0;
1165 if (P_corrected_LER < 0) P_corrected_LER = 0;
1170 P_corrected_HER = 0;
1174 P_corrected_LER = 0;
1178 if (bunch_nb_HER > 0) Ib_HER = I_HER / bunch_nb_HER * 1e-3;
1180 if (bunch_nb_LER > 0) Ib_LER = I_LER / bunch_nb_LER * 1e-3;
1183 if (Ib_HER > 0) Nb_HER = Ib_HER * 3000. / TMath::C() / (1.6e-19);
1185 if (Ib_LER > 0) Nb_LER = Ib_LER * 3000. / TMath::C() / (1.6e-19);
1201 double ScaleFacBGav_HER = 0;
1202 double ScaleFacBGav_LER = 0;
1217 if (I_LER > 0 && P_corrected_LER > 0) {
1223 if (I_HER > 0 && P_corrected_HER > 0) {
1231 double ScaleFacBG_HER[12];
1232 double ScaleFacBG_LER[12];
1236 ScaleFacBG_HER[i] = 0;
1240 if (iP_HER < 0 || iP_HER > 260.) iP_HER = 0;
1241 if (I_HER > 0 && iP_HER > 0) {
1251 ScaleFacBG_LER[i] = 0;
1255 if (iP_LER < 0 || iP_LER > 260.) iP_LER = 0;
1256 if (I_LER > 0 && iP_LER > 0) {
1267 ScaleFacBG_HER[i] = 0;
1271 if (iP_HER < 0 || iP_HER > 260.) iP_HER = 0;
1272 if (I_HER > 0 && iP_HER > 0) {
1282 ScaleFacBG_LER[i] = 0;
1286 if (iP_LER < 0 || iP_LER > 260.) iP_LER = 0;
1287 if (I_LER > 0 && iP_LER > 0) {
1296 double ScaleFacTo_HER = 0;
1297 double ScaleFacTo_LER = 0;
1298 if (bunch_nb_LER > 0 && sigma_y_LER > 0 && I_LER > 0) {
1305 if (bunch_nb_HER > 0 && sigma_y_HER > 0 && I_HER > 0) {
1316 for (
int i = 0; i < 12; i ++) {
1330 ScaleFacBGav_HER = 0;
1331 ScaleFacBGav_LER = 0;
1332 for (
int i = 0; i < 12; i ++) {
1333 ScaleFacBG_HER[i] = 0;
1334 ScaleFacBG_LER[i] = 0;
1379 float BG = LBG * ScaleFacBGav_LER;
1386 for (
int j = 0; j < 12; j++) {
1389 BG += LBG * ScaleFacBG_LER[j];
1401 float BG = HBG * ScaleFacBGav_HER;
1409 for (
int j = 0; j < 12; j++) {
1413 BG += HBG * ScaleFacBG_HER[j];
1426 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1437 for (
int j = 0; j < 12; j++) {
1445 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1457 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1463 for (
int j = 0; j < 12; j++) {
1468 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1483 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1489 for (
int j = 0; j < 12; j++) {
1494 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1506 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1512 for (
int j = 0; j < 12; j++) {
1517 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1540 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1546 for (
int j = 0; j < 12; j++) {
1551 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1563 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1565 int tpc_ch = (int)(i / 5);
1566 int n_type = i - 5 * tpc_ch;
1569 for (
int j = 0; j < 12; j++) {
1574 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1585 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1592 for (
int j = 0; j < 12; j++) {
1597 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1607 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1609 int tpc_ch = (int)(i / (9 * 18));
1610 int angle = i - (9 * 18) * tpc_ch;
1611 int i_theta = (int)(angle / 18);
1612 int i_phi = angle - 9 * i_theta;
1615 for (
int j = 0; j < 12; j++) {
1620 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1630 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1632 int tpc_ch = (int)(i / (9 * 18));
1633 int angle = i - (9 * 18) * tpc_ch;
1634 int i_theta = (int)(angle / 18);
1635 int i_phi = angle - 9 * i_theta;
1638 for (
int j = 0; j < 12; j++) {
1643 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1654 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1660 for (
int j = 0; j < 12; j++) {
1665 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1677 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1683 for (
int j = 0; j < 12; j++) {
1688 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1700 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1706 for (
int j = 0; j < 12; j++) {
1711 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1721 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1727 for (
int j = 0; j < 12; j++) {
1732 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1742 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1748 for (
int j = 0; j < 12; j++) {
1753 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
void setDescription(const std::string &description)
Sets the description of the module.
std::vector< Double_t > m_input_LB_HE3_rate_av
list of HE3 LB rate
std::vector< Double_t > m_input_HB_HE3_rate_av
list of HE3 HB rate
Int_t m_input_BGSol
time stamp start and stop
std::vector< Double_t > m_input_HB_PIN_dose_av
list of PIN HB dose
std::vector< Double_t > m_input_I_HER
HER current and error.
std::vector< Double_t > m_input_LT_DOSI
list of PIN LT dose
std::vector< Double_t > m_input_LT_DIA_dose
list of DIA LT dose
std::vector< Double_t > m_input_HT_TPC_rate
list of TPC HT rate
std::vector< Double_t > m_input_sigma_y_HER
HER beam size and errors.
std::vector< Double_t > m_input_HC_HE3_rate_av
list of HE3 HC rate
std::vector< Double_t > m_input_LC_TPC_angular_dose[12]
list of TPC_angular LC dose
std::vector< Double_t > m_input_HB_SAD_RLR_av
list of SAD_RLR HB dose
std::vector< Double_t > m_input_bunchNb_HER
HER bunch number and error.
std::vector< Double_t > m_input_HC_DIA_dose_av
list of DIA HC dose
std::vector< Double_t > m_input_LB_TPC_angular_dose[12]
list of TPC_angular LB dose
std::vector< Double_t > m_input_sigma_x_LER
LER beam size and errors.
std::vector< Double_t > m_input_HB_TPC_angular_dose[12]
list of TPC_angular HB dose
std::vector< Double_t > m_input_LC_PIN_dose[12]
list of PIN LC dose
std::vector< Double_t > m_input_LC_CLAWS_rate_av
list of CLAWS_rate LC
std::vector< Double_t > m_input_LC_CSI_rate_av
list of CSI LC rate
std::vector< Double_t > m_input_P_HER
HER pressure and error.
std::vector< Double_t > m_input_HC_TPC_angular_rate[12]
list of TPC_angular HC rate
std::vector< Double_t > m_input_LB_PIN_dose_av
list of PIN LB dose
std::vector< Double_t > m_input_HC_CSI_rate[12]
list of CSI HC rate
std::vector< Double_t > m_input_sigma_x_HER
HER beam size and errors.
std::vector< Double_t > m_input_HT_SAD_RLR
list of SAD_RLR HT dose
std::vector< std::string > m_inputRateHistoNamesVrs
list of file names
std::vector< Double_t > m_input_LB_BGO_dose_av
list of BGO LB dose
std::vector< Double_t > m_input_LC_QCSS_rate[12]
list of QCSS_rate LC
std::vector< Double_t > m_input_HB_PIN_dose[12]
list of PIN HB dose
std::vector< Double_t > m_input_HC_HE3_rate[12]
list of HE3 HC rate
Double_t m_input_data_bunchNb_LER
LER bunch number and error.
std::vector< Double_t > m_input_LC_TPC_rate[12]
list of TPC LC rate
std::vector< Double_t > m_input_HB_DOSI_av
list of PIN HB dose
std::vector< Double_t > m_input_HB_CLAWS_rate_av
list of CLAWS_rate HB
std::vector< Double_t > m_input_LT_TPC_angular_rate
list of TPC_angular LT rate
std::vector< Double_t > m_input_LB_CSI_dose_binE[12]
list of CSI LB dose_binE
std::vector< Double_t > m_input_LC_DOSI_av
list of PIN LC dose
std::vector< Double_t > m_input_HC_CSI_dose_binE_av
list of CSI HC dose_binE
virtual void initialize() override
Initialize the Module.
std::vector< Double_t > m_input_LC_DIA_dose_av
list of DIA LC dose
std::vector< Double_t > m_input_LC_TPC_dose[12]
list of TPC LC dose
std::vector< Double_t > m_input_HT_QCSS_rate
list of QCSS_rate HT
std::vector< Double_t > m_input_HB_TPC_dose_av
list of TPC HB dose
std::vector< Double_t > m_input_HT_HE3_rate
list of HE3 HT rate
virtual ~NtuplePhase1_v6Module()
Destructor.
std::vector< Double_t > m_input_HC_TPC_angular_dose[12]
list of TPC_angular HC dose
std::vector< Double_t > m_input_LB_SAD_RLR_av
list of SAD_RLR LB dose
std::vector< Double_t > m_input_HB_TPC_rate_av
list of TPC HB rate
std::vector< Double_t > m_input_LC_SAD_RLR_av
list of SAD_RLR LC dose
TChain * m_tree
tree pointer
std::vector< Double_t > m_input_HB_CSI_dose_binE[12]
list of CSI HB dose_binE
std::vector< Double_t > m_input_HT_CLAWS_rate
list of CLAWS_rate HT
std::vector< Double_t > m_input_LC_CLAWS_rate[12]
list of CLAWS_rate LC
std::vector< Double_t > m_input_HB_CSI_rate[12]
list of CSI HB rate
virtual void event() override
Event processor.
int m_numEntries
number of ntuple entries
std::vector< Double_t > m_input_LB_TPC_angular_rate_av
list of TPC_angular LB rate
std::vector< Double_t > m_input_HT_DOSI
list of PIN HT dose
int m_entryCounter
entry counter
std::vector< Double_t > m_input_LB_CSI_dose_binE_av
list of CSI LB dose_binE
std::vector< Double_t > m_input_LB_TPC_dose_av
list of TPC LB dose
std::vector< Double_t > m_input_HC_CSI_dose_av
list of CSI HC dose
std::vector< Double_t > m_input_LT_CSI_dose
list of CSI LT dose
std::vector< Double_t > m_input_LB_CLAWS_rate_av
list of CLAWS_rate LB
std::vector< Double_t > m_input_LT_HE3_rate
list of HE3 LT rate
std::vector< Double_t > m_input_LC_CSI_dose_av
list of CSI LC dose
std::vector< Double_t > m_input_HC_BGO_dose[12]
list of BGO HC dose
std::vector< Double_t > m_input_HB_TPC_dose[12]
list of TPC HB dose
std::vector< Double_t > m_input_HC_TPC_angular_rate_av
list of TPC_angular HC rate
virtual void endRun() override
End-of-run action.
std::vector< Double_t > m_input_HB_QCSS_rate[12]
list of QCSS_rate HB
std::vector< Double_t > m_input_HT_CSI_dose
list of CSI HT dose
std::vector< Double_t > m_input_LC_BGO_dose_av
list of BGO LC dose
std::vector< Double_t > m_input_LC_HE3_rate_av
list of HE3 LC rate
virtual void terminate() override
Termination action.
Double_t m_input_data_bunchNb_HER
HER bunch number and error.
std::vector< Double_t > m_input_HB_CSI_rate_av
list of CSI HB rate
std::vector< Double_t > m_input_LT_TPC_dose
list of TPC LT dose
std::vector< Double_t > m_input_HC_QCSS_rate[12]
list of QCSS_rate HC
std::vector< Double_t > m_input_HC_SAD_RLR
list of SAD_RLR HC dose
std::vector< Double_t > m_input_LT_CSI_rate
list of CSI LT rate
std::vector< Double_t > m_input_LB_TPC_rate_av
list of TPC LB rate
std::vector< Double_t > m_input_LB_SAD_RLR
list of SAD_RLR LB dose
std::vector< Double_t > m_input_LB_HE3_rate[12]
list of HE3 LB rate
unsigned m_exp
Date of the day.
Int_t m_input_part
which components to take into account
std::vector< std::string > m_inputFileNames
list of file names
std::vector< Double_t > m_input_LC_TPC_angular_rate[12]
list of TPC_angular LC rate
std::string m_input_data_SingleBeam
LER or HER or Both.
std::vector< Double_t > m_input_HC_CLAWS_rate_av
list of CLAWS_rate HC
std::vector< Double_t > m_input_LC_QCSS_rate_av
list of QCSS_rate LC
std::vector< Double_t > m_input_HC_CSI_dose_binE[12]
list of CSI HC dose_binE
std::vector< Double_t > m_input_HE3_EfCor
HE3 inefficiency correction.
std::vector< Double_t > m_input_LB_TPC_rate[12]
list of TPC LB rate
std::vector< Double_t > m_input_GasCorrection
time stamp start and stop
std::vector< Double_t > m_input_HC_SAD_RLR_av
list of SAD_RLR HC dose
std::vector< std::string > m_inputDoseHistoNamesVrs
list of file names
std::vector< Double_t > m_input_LB_DIA_dose[12]
list of DIA LB dose
std::vector< Double_t > m_input_HB_DIA_dose[12]
list of DIA HB dose
std::vector< Double_t > m_input_HB_SAD_RLR
list of SAD_RLR HB dose
std::vector< Double_t > m_input_HC_PIN_dose_av
list of PIN HC dose
std::vector< Double_t > m_input_HC_CLAWS_rate[12]
list of CLAWS_rate HC
std::vector< Double_t > m_input_HC_TPC_rate_av
list of TPC HC rate
std::vector< Double_t > m_input_LB_DIA_dose_av
list of DIA LB dose
BEAST_v5::BEASTTree_v5 m_beast
BEAST structure.
std::vector< Double_t > m_input_HB_TPC_angular_rate_av
list of TPC_angular HB rate
std::vector< Double_t > m_input_LC_HE3_rate[12]
list of HE3 LC rate
Double_t m_input_Z_scaling[4]
time stamp start and stop
Double_t m_input_PIN_width
PIN width.
std::vector< Double_t > m_input_LB_CSI_dose_av
list of CSI LB dose
std::vector< Double_t > m_input_LT_QCSS_rate
list of QCSS_rate LT
std::vector< Double_t > m_input_HC_TPC_dose_av
list of TPC HC dose
std::vector< Double_t > m_input_HT_TPC_angular_rate
list of TPC_angular HT rate
virtual void beginRun() override
Called when entering a new run.
std::vector< Double_t > m_input_HB_DIA_dose_av
list of DIA HB dose
std::vector< Double_t > m_input_HB_QCSS_rate_av
list of QCSS_rate HB
std::vector< Double_t > m_input_LB_CLAWS_rate[12]
list of CLAWS_rate LB
std::vector< Double_t > m_input_HT_CSI_dose_binE
list of CSI HT dose_binE
std::vector< Double_t > m_input_LC_CSI_dose_binE_av
list of CSI LC dose_binE
std::vector< Double_t > m_input_LC_DOSI[12]
list of PIN LC dose
std::vector< Double_t > m_input_LB_DOSI[12]
list of PIN LB dose
std::vector< Double_t > m_input_HC_BGO_dose_av
list of BGO HC dose
std::vector< Double_t > m_input_LB_CSI_dose[12]
list of CSI LB dose
std::vector< Double_t > m_input_HB_HE3_rate[12]
list of HE3 HB rate
std::vector< Double_t > m_input_LC_TPC_dose_av
list of TPC LC dose
std::vector< std::string > m_inputDoseHistoNames
list of file names
std::vector< Double_t > m_input_HC_TPC_rate[12]
list of TPC HC rate
double m_input_Time_eqv
time stamp eqv
std::vector< Double_t > m_input_HC_TPC_dose[12]
list of TPC HC dose
std::vector< Double_t > m_input_HT_TPC_angular_dose
list of TPC_angular HT dose
Int_t m_input_ToSol
time stamp start and stop
std::vector< Double_t > m_input_LB_TPC_angular_dose_av
list of TPC_angular LB dose
std::vector< Double_t > m_input_HT_BGO_dose
list of BGO HT dose
std::vector< Double_t > m_input_LB_PIN_dose[12]
list of PIN LB dose
std::vector< Double_t > m_input_LT_SAD_RLR
list of SAD_RLR LT dose
std::vector< Double_t > m_input_LC_TPC_angular_dose_av
list of TPC_angular LC dose
std::vector< Double_t > m_input_LB_BGO_dose[12]
list of BGO LB dose
void printModuleParams() const
Prints module parameters.
std::vector< std::string > m_inputRateHistoNames
list of file names
std::vector< Double_t > m_input_HT_TPC_dose
list of TPC HT dose
std::vector< Double_t > m_input_LC_CSI_rate[12]
list of CSI LC rate
std::vector< Double_t > m_input_LC_CSI_dose[12]
list of CSI LC dose
std::vector< Double_t > m_input_HC_QCSS_rate_av
list of QCSS_rate HC
std::vector< Double_t > m_input_LC_CSI_dose_binE[12]
list of CSI LC dose_binE
std::vector< Double_t > m_input_HB_TPC_rate[12]
list of TPC HB rate
std::vector< Double_t > m_input_LC_TPC_rate_av
list of TPC LC rate
std::vector< Double_t > m_input_HC_DIA_dose[12]
list of DIA HC dose
std::vector< Double_t > m_input_HB_CSI_dose_av
list of CSI HB dose
TTree * m_treeTruth
Truth tree pointer.
std::vector< Double_t > m_input_LT_TPC_angular_dose
list of TPC_angular LT dose
std::vector< Double_t > m_input_HC_DOSI_av
list of PIN HC dose
std::vector< Double_t > m_input_P_LER
LER pressure and error.
std::vector< Double_t > m_input_HB_TPC_angular_rate[12]
list of TPC_angular HB rate
NtuplePhase1_v6Module()
Constructor.
std::vector< Double_t > m_input_LB_QCSS_rate_av
list of QCSS_rate LB
std::vector< Double_t > m_input_HT_CSI_rate
list of CSI HT rate
std::vector< Double_t > m_input_HB_TPC_angular_dose_av
list of TPC_angular HB dose
std::vector< Double_t > m_input_LB_CSI_rate_av
list of CSI LB rate
std::vector< Double_t > m_input_LB_TPC_dose[12]
list of TPC LB dose
std::vector< Double_t > m_input_HB_DOSI[12]
list of PIN HB dose
std::vector< Double_t > m_input_HC_CSI_dose[12]
list of CSI HC dose
std::vector< Double_t > m_input_HB_CSI_dose_binE_av
list of CSI HB dose_binE
std::vector< Double_t > m_input_I_LER
LER current and error.
std::vector< Double_t > m_input_LB_DOSI_av
list of PIN LB dose
unsigned m_eventCount
current event (tree entry)
std::vector< Double_t > m_input_sigma_y_LER
LER beam size and errors.
std::vector< Double_t > m_input_LB_QCSS_rate[12]
list of QCSS_rate LB
std::vector< Double_t > m_input_HB_CLAWS_rate[12]
list of CLAWS_rate HB
TTree * m_treeBEAST
BEAST tree pointer.
std::vector< Double_t > m_input_LT_CSI_dose_binE
list of CSI LT dose_binE
std::vector< Double_t > m_input_LT_CLAWS_rate
list of CLAWS_rate LT
std::vector< Double_t > m_input_LC_TPC_angular_rate_av
list of TPC_angular LC rate
std::vector< Double_t > m_input_HC_CSI_rate_av
list of CSI HC rate
std::vector< Double_t > m_input_Z
input Z
std::vector< Double_t > m_input_HC_DOSI[12]
list of PIN HC dose
std::vector< Double_t > m_input_LT_PIN_dose
list of PIN LT dose
std::vector< Double_t > m_input_LC_SAD_RLR
list of SAD_RLR LC dose
std::vector< Double_t > m_input_LT_TPC_rate
list of TPC LT rate
std::vector< std::string > m_inputHistoFileNames
list of histo.
unsigned m_numEvents
number of events (tree entries) in the sample
std::vector< Double_t > m_input_LC_DIA_dose[12]
list of DIA LC dose
std::vector< Double_t > m_input_HB_BGO_dose[12]
list of BGO HB dose
std::vector< Double_t > m_input_LC_PIN_dose_av
list of PIN LC dose
std::vector< Double_t > m_input_HB_CSI_dose[12]
list of CSI HB dose
std::vector< Double_t > m_input_bunchNb_LER
LER bunch number and error.
std::vector< Double_t > m_input_LB_TPC_angular_rate[12]
list of TPC_angular LB rate
std::vector< Double_t > m_input_HC_PIN_dose[12]
list of PIN HC dose
std::vector< Double_t > m_input_HC_TPC_angular_dose_av
list of TPC_angular HC dose
std::vector< Double_t > m_input_LB_CSI_rate[12]
list of CSI LB rate
std::vector< Double_t > m_input_LT_BGO_dose
list of BGO LT dose
std::string m_outputFileName
output file name
std::vector< Double_t > m_input_HB_BGO_dose_av
list of BGO HB dose
std::vector< Double_t > m_input_LC_BGO_dose[12]
list of BGO LC dose
std::vector< Double_t > m_input_HT_PIN_dose
list of PIN HT dose
std::vector< Double_t > m_input_HT_DIA_dose
list of DIA HT dose
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
bool create(bool replace=false)
Create a default object in the data store.
Type-safe access to single objects in the data store.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
double sqrt(double a)
sqrt for double
Some constants and helpers common to the RootInput and RootOutput modules.
const std::string c_treeNames[]
Names of trees.
std::vector< std::string > expandWordExpansions(const std::vector< std::string > &filenames)
Performs wildcard expansion using wordexp(), returns matches.
Abstract base class for different kinds of events.
std::vector< float > CSI_Ebin
Beast PV.
std::vector< short > * SKB_beamLoss_PINdiodes_mean
BLM mean ion chamber.
std::vector< double > * SKB_HER_lifetime
LER current [mA].
std::vector< double > * SKB_LER_injectionNumberOfBunches
HER injection number of bunches.
std::vector< double > SKB_HER_RLR
LER Zeff at D06 section.
std::vector< double > * SKB_HER_abortFlag_safe
Beast PV.
std::vector< double > * SKB_LER_abortFlag
Beast PV.
std::vector< float > * SKB_HER_collimatorPositions_fromBeam
Beast PV.
std::vector< double > * SKB_HER_beamSize_xray_Y
HER horizontal beam size by X-ray monitor [um].
std::vector< double > * SKB_LER_beamSize_SR_Y
HER vertical beam size by SR monitor [um].
std::vector< float > * HE3_data_rate
Beast PV.
std::vector< double > * SKB_HER_injectionFlag_safe
Beast PV.
std::vector< double > * SKB_HER_beamSize_SR_Y
LER corrected vertical beam size by X-ray monitor [um].
std::vector< double > * SKB_HER_current
subrunID
std::vector< float > * SKB_LER_Zeff_D06
LER Zeff at D02 section.
std::vector< float > * SKB_LER_collimatorPositions_Y
Beast PV.
std::vector< float > * SKB_LER_pressures_local
Beast PV.
std::vector< float > * SKB_HER_pressures_corrected
LER corrected ring average pressure [Pa].
std::vector< float > * SKB_LER_pressures_local_corrected
Beast PV.
std::vector< float > * CSI_data_rate
Beast PV.
std::vector< float > HE3_rate
Beast PV.
std::vector< double > * SKB_LER_injectionEfficiency
HER injection efficiency [%].
std::vector< float > * PIN_data_dose
Beast PV.
std::vector< double > * SKB_HER_pressure_average_corrected
Beast PV.
std::vector< float > CSI_sumE
Beast PV.
std::vector< float > * SKB_HER_collimatorPositions_mm
HER collimator head vertical position [mm].
std::vector< float > CSI_hitRate_av
Beast PV.
std::vector< double > * SKB_Status
TPC gas pressure.
std::vector< float > * SKB_HER_collimatorPositions_inX
Beast PV.
std::vector< float > QCSS_rate
Beast PV.
std::vector< double > SKB_LER_RLR
HER Ring Loss Rate.
std::vector< double > * SKB_LER_beamSize_xray_X
HER corrected vertical beam size by X-ray monitor [um].
std::vector< double > SAD_HER_lifetime_av
Beast PV.
std::vector< float > TPC_dose_av
TPC dose.
std::vector< float > CLAWS_rate_av
Beast PV.
std::vector< double > mc_reweight_LERB
Beast PV.
std::vector< float > * SKB_HER_collimatorPositions_inY
HER collimator head horizontal position [mm].
std::vector< double > * SKB_HER_injectionFlag
Beast PV.
std::vector< double > * SKB_LER_injectionCharge
HER injection charge.
std::vector< float > * SKB_HER_pressures_local_corrected
Beast PV.
std::vector< double > * SKB_HER_integratedCurrent
LER Ring Loss Rate.
std::vector< double > * SKB_HER_injectionRate
Beast PV.
std::vector< double > * SKB_LER_pressure_average
HER ring average pressure [Pa].
std::vector< float > * BGO_data_dose
Beast PV.
std::vector< double > * SKB_LER_injectionRepetitionRate
HER injection repetition rate [Hz].
std::vector< float > PIN_dose_av
Pin-diod dose.
std::vector< double > SAD_LER_lifetime_av
Beast PV.
std::vector< float > CSI_hitRate
Beast PV.
std::vector< double > * SKB_LER_integratedCurrent
Beast PV.
std::vector< double > * SKB_beamLoss_aroundMasks
Collimator BLM.
std::vector< double > SAD_HER_RLR_av
SAD LER Ring Loss Rate.
std::vector< float > DIA_dose
Beast PV.
std::vector< float > BGO_energy_av
Beast PV.
std::vector< float > QCSS_rate_av
Beast PV.
std::vector< float > * SKB_LER_collimatorPositions_X
Beast PV.
std::vector< float > * CSI_data_sumE
Beast PV.
float TPC_rate_av[2][5]
HER Touschek scale coef.
std::vector< float > CSI_sumE_av
Beast PV.
std::vector< double > * SKB_LER_abortFlag_safe
Beast PV.
std::vector< float > DIA_dose_av
Beast PV.
std::vector< float > CLAWS_rate
Beast PV.
std::vector< double > mc_reweight_HERC
HER Bremsstrahlung scale coef.
std::vector< double > SAD_LER_RLR_av
SAD HER average Ring Loss Rate.
std::vector< double > SAD_HER_RLR
Beast PV.
std::vector< short > * SKB_beamLoss_ionChambers_mean
Beast PV.
std::vector< float > BGO_energy
Beast PV.
std::vector< float > * SKB_LER_pressures_corrected
Beast PV.
std::vector< double > SAD_LER_RLR
SAD HER Ring Loss Rate.
std::vector< float > * CSI_data_Ebin
Beast PV.
std::vector< float > HE3_rate_av
Beast PV.
std::vector< float > * SKB_LER_collimatorPositions_mm
HER collimator position [mm].
UInt_t event
unix time [s]
std::vector< double > * SKB_LER_correctedBeamSize_xray_Y
LER vertical beam size by X-ray monitor [um].
std::vector< float > * SKB_LER_pressures
Beast PV.
std::vector< double > * SKB_LER_beamSize_SR_X
HER horizontal beam size by SR monitor [um].
std::vector< float > * SKB_LER_partialPressures_D02
LER partial RGA pressure at D06 section [Pa].
std::vector< double > * SKB_LER_injectionFlag_safe
Beast PV.
std::vector< double > mc_reweight_LERT
LER Coulomb scale coef.
std::vector< float > * SKB_LER_collimatorPositions_fromBeam
Beast PV.
std::vector< float > PIN_dose
Pin-diod temperature.
std::vector< double > * SKB_HER_beamSize_SR_X
LER vertical beam size by SR monitor [um].
std::vector< double > * SKB_HER_injectionRepetitionRate
LER injection charge.
std::vector< double > * SKB_LER_injectionRate
HER injection rate [mA/s].
std::vector< float > * SKB_LER_partialPressures_D06
LER collimator position [mm].
std::vector< float > * DIA_data_dose
Beast PV.
std::vector< float > * SKB_HER_pressures
LER ring average pressure [Pa].
std::vector< float > * SKB_LER_Zeff_D02
HER beam lifetime [min].
float TPC_angular_rate_av[2][9][18]
TPC average dose.
std::vector< double > * SKB_beamLoss_nearCollimators
LER horizontal beam size by SR monitor [um].
std::vector< double > mc_reweight_LERC
LER Bremsstrahlung scale coef.
void clear()
TPC angular dose.
std::vector< float > DOSI_av
Beast PV.
std::vector< double > * SKB_HER_correctedBeamSize_xray_Y
HER vertical beam size by X-ray monitor [um].
std::vector< float > CSI_Ebin_av
Beast PV.
std::vector< double > * SKB_LER_beamSize_xray_Y
LER horizontal beam size by X-ray monitor [um].
std::vector< double > * SKB_HER_injectionNumberOfBunches
LER injection repetition rate [Hz].
float TPC_angular_dose_av[2][9][18]
TPC angular rate.
std::vector< double > * SKB_HER_injectionCharge
LER injection efficiency [%].
std::vector< double > * SKB_HER_beamSize_xray_X
LER injection number of bunches.
std::vector< float > * CLAWS_data_rate
Beast PV.
std::vector< float > * SKB_HER_pressures_local
Beast PV.
std::vector< double > * SKB_LER_current
HER current [mA].
std::vector< double > * SKB_LER_lifetime
HER beam lifetime [min].
std::vector< double > * SKB_HER_abortFlag
Beast PV.
std::vector< double > mc_reweight_HERB
LER Touschek scale coef.
std::vector< double > SAD_HER_lifetime
Beast PV.
std::vector< float > * SKB_HER_collimatorPositions_DMM
BLM mean pin-diod.
std::vector< double > * SKB_HER_pressure_average
Mask BLM.
std::vector< double > * SKB_LER_injectionFlag
Beast PV.
std::vector< double > * SKB_LER_pressure_average_corrected
HER corrected ring average pressure [Pa].
std::vector< double > * SKB_HER_injectionEfficiency
LER injection rate [mA/s].
std::vector< double > mc_reweight_HERT
HER Coulomb scale coef.
std::vector< float > * QCSS_data_rate
Beast PV.
std::vector< float > DOSI
SAD LER average Ring Loss Rate.
std::vector< double > SAD_LER_lifetime
Beast PV.