Belle II Software development
ECLDatabaseImporter.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10//framework
11#include <framework/logging/Logger.h>
12
13//Root
14#include <TFile.h>
15
16namespace Belle2 {
23
27
28 public:
29
33 ECLDatabaseImporter(std::vector<std::string> inputFileNames, const std::string& m_name);
34
39
44
49
54
59
69
74
79
80 private:
81
82 std::vector<std::string> m_inputFileNames;
83 std::string m_name;
88 template <class rootClass> rootClass getRootObjectFromFile(TFile* file, const std::string& rootObjName) const
89 {
90 rootClass rootObj = (rootClass)file->Get(rootObjName.data());
91 if (!rootObj) {
92 std::string filename = file->GetName();
93 delete file;
94 B2FATAL("Could not find " << rootObjName << " in " << filename);
95 }
96 return rootObj;
97 }
98
99
103 //"ParameterNtuple" tree branch names
104 std::string m_bgFractionBinNumBranchName = "bgFractionBinNum";
105 std::string m_regNumBranchName = "regNum";
106 std::string m_phiBinNumBranchName = "phiBinNum";
107 std::string m_thetaBinNumBranchName = "thetaBinNum";
108 std::string m_energyBinNumBranchName = "energyBinNum";
109 std::string m_correctionFactorBranchName = "correctionFactor";
111 //"ConstantNtuple" tree branch names
112 const int m_numAvgRecEnEntries = 15;
113 std::string m_avgRecEnBranchName = "avgRecEn";
114 std::string m_lReg1ThetaBranchName = "lReg1Theta";
115 std::string m_hReg1ThetaBranchName = "hReg1Theta";
116 std::string m_lReg2ThetaBranchName = "lReg2Theta";
117 std::string m_hReg2ThetaBranchName = "hReg2Theta";
118 std::string m_lReg3ThetaBranchName = "lReg3Theta";
119 std::string m_hReg3ThetaBranchName = "hReg3Theta";
120 std::string m_numOfBfBinsBranchName = "numOfBfBins";
121 std::string m_numOfEnergyBinsBranchName = "numOfEnergyBins";
122 std::string m_numOfPhiBinsBranchName = "numOfPhiBins";
123 std::string m_numOfReg1ThetaBinsBranchName = "numOfReg1ThetaBins";
124 std::string m_numOfReg2ThetaBinsBranchName = "numOfReg2ThetaBins";
125 std::string m_numOfReg3ThetaBinsBranchName = "numOfReg3ThetaBins";
126 std::string m_phiPeriodicityBranchName = "phiPeriodicity";
128 };
129
131} // Belle2 namespace
ECL database importer.
std::string m_phiBinNumBranchName
phiBinNum branch name
std::string m_numOfPhiBinsBranchName
numOfPhiBins branch name
std::string m_avgRecEnBranchName
avgRecEn branch name
std::string m_numOfReg3ThetaBinsBranchName
numOfReg3ThetaBins branch name
std::string m_numOfReg2ThetaBinsBranchName
numOfReg2ThetaBins branch name
void importShowerShapesSecondMomentCorrections()
Import ECL shower shape corrections to second moment to the database.
const int m_numAvgRecEnEntries
Number of entries in avgRecEn array.
rootClass getRootObjectFromFile(TFile *file, const std::string &rootObjName) const
Extract a root object rootObjName from a root file file.
std::string m_hReg2ThetaBranchName
hReg2Theta branch name
std::string m_hReg3ThetaBranchName
hReg3Theta branch name
void importDigitEnergyCalibration()
Import ECL energy calibration constants to the database.
void importShowerCorrectorLeakageCorrections()
Import ECL leakage corrections to showers.
std::string m_thetaBinNumBranchName
thetaBinNum branch name
std::string m_lReg2ThetaBranchName
lReg2Theta branch name
void importTrackClusterMatchingThresholds()
Import threshold values for track ECL cluster matching to the database.
void importShowerEnergyCorrectionTemporary()
Import ECL corrections to showers energies.
std::vector< std::string > m_inputFileNames
Input file name.
std::string m_bgFractionBinNumBranchName
Branch names for shower corrector leakage correction root file.
std::string m_numOfEnergyBinsBranchName
numOfEnergyBins branch name
void importDigitTimeCalibration()
Import ECL time calibration constants to the database.
std::string m_lReg3ThetaBranchName
lReg3Theta branch name
std::string m_correctionFactorBranchName
correctionFactor branch name
std::string m_numOfBfBinsBranchName
numOfBfBins branch name
virtual ~ECLDatabaseImporter()
Destructor.
std::string m_regNumBranchName
regNum branch name
std::string m_hReg1ThetaBranchName
hReg1Theta branch name
std::string m_energyBinNumBranchName
energyBinNum branch name
void importTrackClusterMatchingParameterizations()
Import parameterizations for the RMS between tracks and ECL clusters to the database.
std::string m_name
Database object (output) file name.
std::string m_phiPeriodicityBranchName
phiPeriodicity branch name
std::string m_lReg1ThetaBranchName
lReg1Theta branch name
std::string m_numOfReg1ThetaBinsBranchName
numOfReg1ThetaBins branch name
Abstract base class for different kinds of events.