13 for(
auto corr : thickCorr_){
15 edm::LogWarning(
"DivisionByZero") <<
"WARNING: the cell-thickness correction factor is zero or negative. It won't be applied to correct trigger cell energies.";
29 int hwPt = trgCell.
hwPt();
35 if( subdet ==
HGCEE ){
36 amplitude = amplitude /
fCperMIP_ee_.at(cellThickness-1);
37 }
else if( subdet ==
HGCHEF ){
38 amplitude = amplitude /
fCperMIP_fh_.at(cellThickness-1);
39 }
else if( subdet ==
HGCHEB ){
40 edm::LogWarning(
"DataNotFound") <<
"WARNING: the BH trgCells are not yet implemented";
46 trgCellMipP = trgCellMipP /
thickCorr_.at( cellThickness-1 );
49 double trgCellMipPt = trgCellMipP/cosh( trgCell.
eta() );
58 const double MevToGeV(0.001);
61 int trgCellLayer = trgdetid.
layer();
62 int subdet = trgdetid.subdetId();
65 double mipP = trgCell.
mipPt() * cosh( trgCell.
eta() );
68 trgCellLayer = trgCellLayer + 28;
72 double trgCellE = mipP *
dEdX_weights_.at(trgCellLayer) * MevToGeV;
81 trgCell.
setP4( calibP4 );
T getParameter(std::string const &) const
std::vector< double > dEdX_weights_
virtual double eta() const final
momentum pseudorapidity
void calibrateInMipT(l1t::HGCalTriggerCell &, int cellThickness)
void calibrateInGeV(l1t::HGCalTriggerCell &, int cellThickness)
std::vector< double > fCperMIP_ee_
virtual double phi() const final
momentum azimuthal angle
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
void setMipPt(double value)
void calibrateMipTinGeV(l1t::HGCalTriggerCell &)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
std::vector< double > fCperMIP_fh_
std::vector< double > thickCorr_
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector
int layer() const
get the layer #
HGCalTriggerCellCalibration(const edm::ParameterSet &conf)