CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HcalSimpleRecAlgo Class Reference

#include <HcalSimpleRecAlgo.h>

Public Member Functions

void beginRun (edm::EventSetup const &es)
 
void endRun ()
 
 HcalSimpleRecAlgo (bool correctForTimeslew, bool correctForContainment, float fixedPhaseNs)
 
void initPulseCorr (int toadd)
 
HcalCalibRecHit reconstruct (const HcalCalibDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
 
HFRecHit reconstruct (const HFDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
 
HORecHit reconstruct (const HODataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
 
HFRecHit reconstructQIE10 (const QIE10DataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
 
void setBXInfo (const BunchXParameter *info, unsigned lenInfo)
 
void setHFPileupCorrection (std::shared_ptr< AbsOOTPileupCorrection > corr)
 
void setHOPileupCorrection (std::shared_ptr< AbsOOTPileupCorrection > corr)
 
void setLeakCorrection ()
 
void setRecoParams (bool correctForTimeslew, bool correctForPulse, bool setLeakCorrection, int pileupCleaningID, float phaseNS)
 

Private Attributes

const BunchXParameter * bunchCrossingInfo_
 
bool correctForPulse_
 
bool correctForTimeslew_
 
std::shared_ptr< AbsOOTPileupCorrectionhbhePileupCorr_
 
const HcalTimeSlewhcalTimeSlew_delay_
 
std::shared_ptr< AbsOOTPileupCorrectionhfPileupCorr_
 
std::shared_ptr< AbsOOTPileupCorrectionhoPileupCorr_
 
unsigned lenBunchCrossingInfo_
 
float phaseNS_
 
int pileupCleaningID_
 
int puCorrMethod_
 
std::unique_ptr< HcalPulseContainmentManagerpulseCorr_
 
int runnum_
 
bool setLeakCorrection_
 
HcalPulseShapes theHcalPulseShapes_
 

Detailed Description

This class reconstructs RecHits from Digis for HBHE, HF, and HO by addition of selected time samples, pedestal subtraction, and gain application. The time of the hit is reconstructed using a weighted peak bin calculation supplemented by precise time lookup table. A consumer of this class also has the option of correcting the reconstructed time for energy-dependent time slew associated with the QIE.

Author
J. Mans - Minnesota

Definition at line 34 of file HcalSimpleRecAlgo.h.

Constructor & Destructor Documentation

◆ HcalSimpleRecAlgo()

HcalSimpleRecAlgo::HcalSimpleRecAlgo ( bool  correctForTimeslew,
bool  correctForContainment,
float  fixedPhaseNs 
)

Full featured constructor for HB/HE and HO (HPD-based detectors)

Definition at line 20 of file HcalSimpleRecAlgo.cc.

22  correctForPulse_(correctForPulse),
23  phaseNS_(phaseNS),
24  runnum_(0),
25  setLeakCorrection_(false),
26  puCorrMethod_(0) {
27  hcalTimeSlew_delay_ = nullptr;
28  pulseCorr_ = std::make_unique<HcalPulseContainmentManager>(MaximumFractionalError);
29 }

References hcalTimeSlew_delay_, MaximumFractionalError, and pulseCorr_.

Member Function Documentation

◆ beginRun()

void HcalSimpleRecAlgo::beginRun ( edm::EventSetup const &  es)

◆ endRun()

void HcalSimpleRecAlgo::endRun ( )

Definition at line 39 of file HcalSimpleRecAlgo.cc.

39 {}

Referenced by HcalSimpleReconstructor::endRun(), and HcalHitReconstructor::endRun().

◆ initPulseCorr()

void HcalSimpleRecAlgo::initPulseCorr ( int  toadd)

Definition at line 41 of file HcalSimpleRecAlgo.cc.

41 {}

◆ reconstruct() [1/3]

HcalCalibRecHit HcalSimpleRecAlgo::reconstruct ( const HcalCalibDataFrame digi,
int  first,
int  toadd,
const HcalCoder coder,
const HcalCalibrations calibs 
) const

Definition at line 355 of file HcalSimpleRecAlgo.cc.

359  {
360  return HcalSimpleRecAlgoImpl::reco<HcalCalibDataFrame, HcalCalibRecHit>(digi,
361  coder,
362  calibs,
363  first,
364  toadd,
367  pulseCorr_->get(digi.id(), toadd, phaseNS_),
369  runnum_,
370  false,
371  nullptr,
376 }

References bunchCrossingInfo_, correctForPulse_, correctForTimeslew_, HcalTimeSlew::Fast, dqmdumpme::first, hcalTimeSlew_delay_, HcalCalibDataFrame::id(), lenBunchCrossingInfo_, phaseNS_, puCorrMethod_, pulseCorr_, and runnum_.

◆ reconstruct() [2/3]

HFRecHit HcalSimpleRecAlgo::reconstruct ( const HFDataFrame digi,
int  first,
int  toadd,
const HcalCoder coder,
const HcalCalibrations calibs 
) const

Definition at line 378 of file HcalSimpleRecAlgo.cc.

382  {
383  const HcalPulseContainmentCorrection* corr = pulseCorr_->get(digi.id(), toadd, phaseNS_);
384 
385  double amp_fC, ampl, uncorr_ampl, maxA;
386  int nRead, maxI;
387  bool leakCorrApplied;
388  float t0, t2;
389 
391  coder,
392  calibs,
393  first,
394  toadd,
396  corr,
397  hfPileupCorr_.get(),
400  &maxA,
401  &ampl,
402  &uncorr_ampl,
403  &amp_fC,
404  &nRead,
405  &maxI,
406  &leakCorrApplied,
407  &t0,
408  &t2);
409 
410  float time = -9999.f;
411  if (maxI > 0 && maxI < (nRead - 1))
412  time = HcalSimpleRecAlgoImpl::recoHFTime(digi, maxI, amp_fC, correctForTimeslew_, maxA, t0, t2) - calibs.timecorr();
413 
414  HFRecHit rh(digi.id(), ampl, time);
415  setRawEnergy(rh, static_cast<float>(uncorr_ampl));
416  return rh;
417 }

References bunchCrossingInfo_, alignCSCRings::corr, correctForPulse_, correctForTimeslew_, dqmdumpme::first, hfPileupCorr_, HFDataFrame::id(), lenBunchCrossingInfo_, findQualityFiles::maxI, phaseNS_, pulseCorr_, HcalSimpleRecAlgoImpl::recoHFTime(), HcalSimpleRecAlgoImpl::removePileup(), setRawEnergy(), FrontierCondition_GT_autoExpress_cfi::t0, RandomServiceHelper::t2, ntuplemaker::time, and HcalCalibrations::timecorr().

Referenced by HcalSimpleReconstructor::process(), and HcalHitReconstructor::produce().

◆ reconstruct() [3/3]

HORecHit HcalSimpleRecAlgo::reconstruct ( const HODataFrame digi,
int  first,
int  toadd,
const HcalCoder coder,
const HcalCalibrations calibs 
) const

Definition at line 335 of file HcalSimpleRecAlgo.cc.

336  {
337  return HcalSimpleRecAlgoImpl::reco<HODataFrame, HORecHit>(digi,
338  coder,
339  calibs,
340  first,
341  toadd,
344  pulseCorr_->get(digi.id(), toadd, phaseNS_),
346  runnum_,
347  false,
348  hoPileupCorr_.get(),
353 }

References bunchCrossingInfo_, correctForPulse_, correctForTimeslew_, dqmdumpme::first, hcalTimeSlew_delay_, hoPileupCorr_, HODataFrame::id(), lenBunchCrossingInfo_, phaseNS_, puCorrMethod_, pulseCorr_, runnum_, and HcalTimeSlew::Slow.

◆ reconstructQIE10()

HFRecHit HcalSimpleRecAlgo::reconstructQIE10 ( const QIE10DataFrame digi,
int  first,
int  toadd,
const HcalCoder coder,
const HcalCalibrations calibs 
) const

Definition at line 419 of file HcalSimpleRecAlgo.cc.

423  {
424  const HcalPulseContainmentCorrection* corr = pulseCorr_->get(digi.id(), toadd, phaseNS_);
425 
426  double amp_fC, ampl, uncorr_ampl, maxA;
427  int nRead, maxI;
428  bool leakCorrApplied;
429  float t0, t2;
430 
432  coder,
433  calibs,
434  first,
435  toadd,
437  corr,
438  hfPileupCorr_.get(),
441  &maxA,
442  &ampl,
443  &uncorr_ampl,
444  &amp_fC,
445  &nRead,
446  &maxI,
447  &leakCorrApplied,
448  &t0,
449  &t2);
450 
451  float time = -9999.f;
452  if (maxI > 0 && maxI < (nRead - 1))
453  time = HcalSimpleRecAlgoImpl::recoHFTime(digi, maxI, amp_fC, correctForTimeslew_, maxA, t0, t2) - calibs.timecorr();
454 
455  HFRecHit rh(digi.id(), ampl, time);
456  setRawEnergy(rh, static_cast<float>(uncorr_ampl));
457  return rh;
458 }

References bunchCrossingInfo_, alignCSCRings::corr, correctForPulse_, correctForTimeslew_, dqmdumpme::first, hfPileupCorr_, QIE10DataFrame::id(), lenBunchCrossingInfo_, findQualityFiles::maxI, phaseNS_, pulseCorr_, HcalSimpleRecAlgoImpl::recoHFTime(), HcalSimpleRecAlgoImpl::removePileup(), setRawEnergy(), FrontierCondition_GT_autoExpress_cfi::t0, RandomServiceHelper::t2, ntuplemaker::time, and HcalCalibrations::timecorr().

◆ setBXInfo()

void HcalSimpleRecAlgo::setBXInfo ( const BunchXParameter *  info,
unsigned  lenInfo 
)

Definition at line 58 of file HcalSimpleRecAlgo.cc.

58  {
60  lenBunchCrossingInfo_ = lenInfo;
61 }

References bunchCrossingInfo_, info(), and lenBunchCrossingInfo_.

◆ setHFPileupCorrection()

void HcalSimpleRecAlgo::setHFPileupCorrection ( std::shared_ptr< AbsOOTPileupCorrection corr)

Definition at line 54 of file HcalSimpleRecAlgo.cc.

54 { hfPileupCorr_ = corr; }

References alignCSCRings::corr, and hfPileupCorr_.

◆ setHOPileupCorrection()

void HcalSimpleRecAlgo::setHOPileupCorrection ( std::shared_ptr< AbsOOTPileupCorrection corr)

Definition at line 56 of file HcalSimpleRecAlgo.cc.

56 { hoPileupCorr_ = corr; }

References alignCSCRings::corr, and hoPileupCorr_.

◆ setLeakCorrection()

void HcalSimpleRecAlgo::setLeakCorrection ( )

Definition at line 52 of file HcalSimpleRecAlgo.cc.

52 { setLeakCorrection_ = true; }

References setLeakCorrection_.

Referenced by HcalHitReconstructor::produce(), and setRecoParams().

◆ setRecoParams()

void HcalSimpleRecAlgo::setRecoParams ( bool  correctForTimeslew,
bool  correctForPulse,
bool  setLeakCorrection,
int  pileupCleaningID,
float  phaseNS 
)

Member Data Documentation

◆ bunchCrossingInfo_

const BunchXParameter* HcalSimpleRecAlgo::bunchCrossingInfo_
private

Definition at line 80 of file HcalSimpleRecAlgo.h.

Referenced by reconstruct(), reconstructQIE10(), and setBXInfo().

◆ correctForPulse_

bool HcalSimpleRecAlgo::correctForPulse_
private

Definition at line 74 of file HcalSimpleRecAlgo.h.

Referenced by reconstruct(), reconstructQIE10(), and setRecoParams().

◆ correctForTimeslew_

bool HcalSimpleRecAlgo::correctForTimeslew_
private

Definition at line 73 of file HcalSimpleRecAlgo.h.

Referenced by reconstruct(), reconstructQIE10(), and setRecoParams().

◆ hbhePileupCorr_

std::shared_ptr<AbsOOTPileupCorrection> HcalSimpleRecAlgo::hbhePileupCorr_
private

Definition at line 82 of file HcalSimpleRecAlgo.h.

◆ hcalTimeSlew_delay_

const HcalTimeSlew* HcalSimpleRecAlgo::hcalTimeSlew_delay_
private

Definition at line 90 of file HcalSimpleRecAlgo.h.

Referenced by beginRun(), HcalSimpleRecAlgo(), and reconstruct().

◆ hfPileupCorr_

std::shared_ptr<AbsOOTPileupCorrection> HcalSimpleRecAlgo::hfPileupCorr_
private

Definition at line 83 of file HcalSimpleRecAlgo.h.

Referenced by reconstruct(), reconstructQIE10(), and setHFPileupCorrection().

◆ hoPileupCorr_

std::shared_ptr<AbsOOTPileupCorrection> HcalSimpleRecAlgo::hoPileupCorr_
private

Definition at line 84 of file HcalSimpleRecAlgo.h.

Referenced by reconstruct(), and setHOPileupCorrection().

◆ lenBunchCrossingInfo_

unsigned HcalSimpleRecAlgo::lenBunchCrossingInfo_
private

Definition at line 81 of file HcalSimpleRecAlgo.h.

Referenced by reconstruct(), reconstructQIE10(), and setBXInfo().

◆ phaseNS_

float HcalSimpleRecAlgo::phaseNS_
private

Definition at line 75 of file HcalSimpleRecAlgo.h.

Referenced by reconstruct(), reconstructQIE10(), and setRecoParams().

◆ pileupCleaningID_

int HcalSimpleRecAlgo::pileupCleaningID_
private

Definition at line 79 of file HcalSimpleRecAlgo.h.

Referenced by setRecoParams().

◆ puCorrMethod_

int HcalSimpleRecAlgo::puCorrMethod_
private

Definition at line 88 of file HcalSimpleRecAlgo.h.

Referenced by reconstruct().

◆ pulseCorr_

std::unique_ptr<HcalPulseContainmentManager> HcalSimpleRecAlgo::pulseCorr_
private

Definition at line 76 of file HcalSimpleRecAlgo.h.

Referenced by beginRun(), HcalSimpleRecAlgo(), reconstruct(), and reconstructQIE10().

◆ runnum_

int HcalSimpleRecAlgo::runnum_
private

Definition at line 77 of file HcalSimpleRecAlgo.h.

Referenced by reconstruct().

◆ setLeakCorrection_

bool HcalSimpleRecAlgo::setLeakCorrection_
private

Definition at line 78 of file HcalSimpleRecAlgo.h.

Referenced by setLeakCorrection(), and setRecoParams().

◆ theHcalPulseShapes_

HcalPulseShapes HcalSimpleRecAlgo::theHcalPulseShapes_
private

Definition at line 86 of file HcalSimpleRecAlgo.h.

RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
HcalSimpleRecAlgo::runnum_
int runnum_
Definition: HcalSimpleRecAlgo.h:77
HFDataFrame::id
constexpr HcalDetId const & id() const
Definition: HFDataFrame.h:23
HcalSimpleRecAlgoImpl::removePileup
void removePileup(const Digi &digi, const HcalCoder &coder, const HcalCalibrations &calibs, const int ifirst, const int n, const bool pulseCorrect, const HcalPulseContainmentCorrection *corr, const AbsOOTPileupCorrection *pileupCorrection, const BunchXParameter *bxInfo, const unsigned lenInfo, double *p_maxA, double *p_ampl, double *p_uncorr_ampl, double *p_fc_ampl, int *p_nRead, int *p_maxI, bool *leakCorrApplied, float *p_t0, float *p_t2)
Definition: HcalSimpleRecAlgo.cc:105
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
findQualityFiles.maxI
int maxI
Definition: findQualityFiles.py:182
HcalSimpleRecAlgoImpl::recoHFTime
float recoHFTime(const Digi &digi, const int maxI, const double amp_fC, const bool slewCorrect, double maxA, float t0, float t2)
Definition: HcalSimpleRecAlgo.cc:71
HcalPulseContainmentCorrection
Definition: HcalPulseContainmentCorrection.h:15
dqmdumpme.first
first
Definition: dqmdumpme.py:55
MaximumFractionalError
constexpr double MaximumFractionalError
Definition: HcalSimpleRecAlgo.cc:18
HcalSimpleRecAlgo::phaseNS_
float phaseNS_
Definition: HcalSimpleRecAlgo.h:75
HFRecHit
Definition: HFRecHit.h:11
HcalSimpleRecAlgo::pulseCorr_
std::unique_ptr< HcalPulseContainmentManager > pulseCorr_
Definition: HcalSimpleRecAlgo.h:76
HcalSimpleRecAlgo::puCorrMethod_
int puCorrMethod_
Definition: HcalSimpleRecAlgo.h:88
HcalSimpleRecAlgo::setLeakCorrection_
bool setLeakCorrection_
Definition: HcalSimpleRecAlgo.h:78
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:148
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
HcalSimpleRecAlgo::lenBunchCrossingInfo_
unsigned lenBunchCrossingInfo_
Definition: HcalSimpleRecAlgo.h:81
edm::ESHandle
Definition: DTSurvey.h:22
HcalTimeSlewRecord
Definition: HcalTimeSlewRecord.h:4
HcalSimpleRecAlgo::bunchCrossingInfo_
const BunchXParameter * bunchCrossingInfo_
Definition: HcalSimpleRecAlgo.h:80
HcalTimeSlew::Slow
Definition: HcalTimeSlew.h:71
HcalSimpleRecAlgo::correctForTimeslew_
bool correctForTimeslew_
Definition: HcalSimpleRecAlgo.h:73
HcalCalibrations::timecorr
constexpr double timecorr() const
get time correction factor
Definition: HcalCalibrations.h:52
get
#define get
HcalSimpleRecAlgo::setLeakCorrection
void setLeakCorrection()
Definition: HcalSimpleRecAlgo.cc:52
castor_dqm_sourceclient-live_cfg.correctForTimeslew
correctForTimeslew
Definition: castor_dqm_sourceclient-live_cfg.py:60
setRawEnergy
void setRawEnergy(HcalRecHit &h, float e)
Definition: rawEnergy.h:217
HcalSimpleRecAlgo::hoPileupCorr_
std::shared_ptr< AbsOOTPileupCorrection > hoPileupCorr_
Definition: HcalSimpleRecAlgo.h:84
HcalSimpleRecAlgo::pileupCleaningID_
int pileupCleaningID_
Definition: HcalSimpleRecAlgo.h:79
phase2TrackerDigitizer_cfi.delay
delay
Definition: phase2TrackerDigitizer_cfi.py:67
HcalSimpleRecAlgo::hcalTimeSlew_delay_
const HcalTimeSlew * hcalTimeSlew_delay_
Definition: HcalSimpleRecAlgo.h:90
HcalSimpleRecAlgo::correctForPulse_
bool correctForPulse_
Definition: HcalSimpleRecAlgo.h:74
HcalSimpleRecAlgo::hfPileupCorr_
std::shared_ptr< AbsOOTPileupCorrection > hfPileupCorr_
Definition: HcalSimpleRecAlgo.h:83
ntuplemaker.time
time
Definition: ntuplemaker.py:310
HODataFrame::id
constexpr HcalDetId const & id() const
Definition: HODataFrame.h:23
QIE10DataFrame::id
constexpr edm::DataFrame::id_type id() const
Definition: QIE10DataFrame.h:77
HcalCalibDataFrame::id
const HcalCalibDetId & id() const
Definition: HcalCalibDataFrame.h:22
HcalTimeSlew::Fast
Definition: HcalTimeSlew.h:71