1 #ifndef RecoLocalCalo_HGCalRecAlgos_HGCalUncalibRecHitRecWeightsAlgo_HH 2 #define RecoLocalCalo_HGCalRecAlgos_HGCalUncalibRecHitRecWeightsAlgo_HH 39 if( std::any_of(fCPerMIP.cbegin(),
41 [](
double conv){
return conv <= 0.0; }) ) {
42 throw cms::Exception(
"BadConversionFactor") <<
"At least one of fCPerMIP is zero!" << std::endl;
54 double amplitude_(-1.), pedestal_(-1.), jitter_(-1.), chi2_(-1.);
58 const auto&
sample = dataFrame.sample(iSample);
64 flag = !
sample.threshold();
73 LogDebug(
"HGCUncalibratedRecHit") <<
"TDC+: set the charge to: " << amplitude_ <<
' ' <<
sample.data()
75 <<
"TDC+: set the ToA to: " << jitter_ <<
' ' 77 <<
" flag=" << flag << std::endl;
80 LogDebug(
"HGCUncalibratedRecHit") <<
"ADC+: set the charge to: " << amplitude_ <<
' ' <<
sample.data()
81 <<
' ' <<
adcLSB_ <<
' ' << std::endl;
85 LogDebug(
"HGCUncalibratedRecHit") <<
"ADC+: set the charge to: " << amplitude_ <<
' ' <<
sample.data()
86 <<
' ' <<
adcLSB_ <<
' ' << std::endl;
90 if(
ddd_ !=
nullptr ) {
94 amplitude_ = amplitude_/
fCPerMIP_[thickness-1];
96 LogDebug(
"HGCUncalibratedRecHit") <<
"Final uncalibrated amplitude : " << amplitude_ << std::endl;
void set_ADCLSB(const double adclsb)
void setGeometry(const HGCalGeometry *geom)
void set_isSiFESim(const bool isSiFE)
static HepMC::IO_HEPEVT conv
std::vector< double > fCPerMIP_
virtual HGCUncalibratedRecHit makeRecHit(const C &dataFrame)
Compute parameters.
const HGCalTopology & topology() const
void set_toaLSBToNS(const double lsb2ns)
int waferTypeL(int wafer) const
const HGCalDDDConstants & dddConstants() const
void set_tdcOnsetfC(const double tdcOnset)
const HGCalDDDConstants * ddd_
void set_fCPerMIP(const std::vector< double > &fCPerMIP)
void set_TDCLSB(const double tdclsb)