6 : lsb_(conf.getParameter<double>(
"lsb")),
7 fCperMIP_(conf.getParameter<std::
vector<double>>(
"fCperMIP")),
8 chargeCollectionEfficiency_(conf.getParameter<edm::
ParameterSet>(
"chargeCollectionEfficiency")
9 .getParameter<std::
vector<double>>(
"values")),
10 thicknessCorrection_(conf.getParameter<std::
vector<double>>(
"thicknessCorrection")),
11 dEdX_weights_(conf.getParameter<std::
vector<double>>(
"dEdXweights")) {
14 edm::LogWarning(
"DivisionByZero") <<
"WARNING: zero or negative MIP->fC correction factor. It won't be "
15 "applied to correct trigger cell energies.";
20 edm::LogWarning(
"DivisionByZero") <<
"WARNING: zero or negative cell-thickness correction factor. It won't be "
21 "applied to correct trigger cell energies.";
26 edm::LogWarning(
"DivisionByZero") <<
"WARNING: zero or negative cell-thickness correction factor. It won't be "
27 "applied to correct trigger cell energies.";
35 constexpr
int kScintillatorIndex = 0;
38 throw cms::Exception(
"OutOfBound") <<
"Trying to access thickness index " << thickness
39 <<
" in fCperMIP, which is of size " <<
fCperMIP_.size();
42 throw cms::Exception(
"OutOfBound") <<
"Trying to access thickness index " << thickness
43 <<
" in chargeCollectionEfficiency, which is of size "
48 int hwPt = trgCell.
hwPt();
51 double amplitude = hwPt *
lsb_;
58 double trgCellMipP = amplitude;
65 double trgCellMipPt = trgCellMipP / std::cosh(trgCell.
eta());
72 constexpr
double MevToGeV(0.001);
78 constexpr
int kScintillatorIndex = 0;
81 throw cms::Exception(
"OutOfBound") <<
"Trying to access thickness index " << thickness
87 trgCellEt = trgCell.
mipPt() * MevToGeV;
96 trgCell.
setP4(calibP4);
HGCalTriggerTools triggerTools_
std::vector< double > dEdX_weights_
std::vector< double > fCperMIP_
std::vector< double > chargeCollectionEfficiency_
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
void calibrateMipTinGeV(l1t::HGCalTriggerCell &) const
void setMipPt(double value)
void calibrateInGeV(l1t::HGCalTriggerCell &) const
std::vector< double > thicknessCorrection_
Log< level::Warning, false > LogWarning
void calibrateInMipT(l1t::HGCalTriggerCell &) const
double phi() const final
momentum azimuthal angle
void setP4(const LorentzVector &p4) final
set 4-momentum
HGCalTriggerCellCalibration(const edm::ParameterSet &conf)
double eta() const final
momentum pseudorapidity