CMS 3D CMS Logo

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

#include <CastorSimpleRecAlgo.h>

Public Member Functions

 CastorSimpleRecAlgo (int firstSample, int samplesToAdd)
 
 CastorSimpleRecAlgo (int firstSample, int samplesToAdd, bool correctForTimeslew, bool correctForContainment, float fixedPhaseNs)
 
void checkADCSaturation (CastorRecHit &rechit, const CastorDataFrame &digi, const int &maxADCvalue) const
 
CastorRecHit reconstruct (const CastorDataFrame &digi, const CastorCoder &coder, const CastorCalibrations &calibs) const
 
void recoverADCSaturation (CastorRecHit &rechit, const CastorCoder &coder, const CastorCalibrations &calibs, const CastorDataFrame &digi, const int &maxADCvalue, const double &satCorrConst) const
 
void resetTimeSamples (int f, int t)
 

Private Attributes

bool correctForTimeslew_
 
int firstSample_
 
std::unique_ptr< CastorPulseContainmentCorrectionpulseCorr_
 
int samplesToAdd_
 

Detailed Description

This class reconstructs RecHits from Digis for CASTOR 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
P. Katsas (Univ. of Athens)

Definition at line 22 of file CastorSimpleRecAlgo.h.

Constructor & Destructor Documentation

◆ CastorSimpleRecAlgo() [1/2]

CastorSimpleRecAlgo::CastorSimpleRecAlgo ( int  firstSample,
int  samplesToAdd,
bool  correctForTimeslew,
bool  correctForContainment,
float  fixedPhaseNs 
)

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

Definition at line 10 of file CastorSimpleRecAlgo.cc.

13  if (correctForPulse)
14  pulseCorr_ = std::make_unique<CastorPulseContainmentCorrection>(samplesToAdd_, phaseNS, MaximumFractionalError);
15 }

References MaximumFractionalError, pulseCorr_, and samplesToAdd_.

◆ CastorSimpleRecAlgo() [2/2]

CastorSimpleRecAlgo::CastorSimpleRecAlgo ( int  firstSample,
int  samplesToAdd 
)

Simple constructor for PMT-based detectors

Definition at line 17 of file CastorSimpleRecAlgo.cc.

Member Function Documentation

◆ checkADCSaturation()

void CastorSimpleRecAlgo::checkADCSaturation ( CastorRecHit rechit,
const CastorDataFrame digi,
const int &  maxADCvalue 
) const

◆ reconstruct()

CastorRecHit CastorSimpleRecAlgo::reconstruct ( const CastorDataFrame digi,
const CastorCoder coder,
const CastorCalibrations calibs 
) const

Definition at line 163 of file CastorSimpleRecAlgo.cc.

165  {
166  return CastorSimpleRecAlgoImpl::reco<CastorDataFrame, CastorRecHit>(
167  digi, coder, calibs, firstSample_, samplesToAdd_, false, nullptr, CastorTimeSlew::Fast);
168 }

References CastorTimeSlew::Fast, firstSample_, and samplesToAdd_.

Referenced by CastorSimpleReconstructor::produce().

◆ recoverADCSaturation()

void CastorSimpleRecAlgo::recoverADCSaturation ( CastorRecHit rechit,
const CastorCoder coder,
const CastorCalibrations calibs,
const CastorDataFrame digi,
const int &  maxADCvalue,
const double &  satCorrConst 
) const

Definition at line 178 of file CastorSimpleRecAlgo.cc.

183  {
184  if (CastorSimpleRecAlgoImpl::corrSaturation<CastorDataFrame, CastorRecHit>(
185  rechit, coder, calibs, digi, maxADCvalue, satCorrConst, firstSample_, samplesToAdd_))
186  // use empty flag bit for recording saturation correction
187  // see also CMSSW/DataFormats/METReco/interface/HcalCaloFlagLabels.h
189 }

References firstSample_, castor_dqm_sourceclient-live_cfg::maxADCvalue, samplesToAdd_, CaloRecHit::setFlagField(), and HcalCaloFlagLabels::UserDefinedBit0.

Referenced by CastorSimpleReconstructor::produce().

◆ resetTimeSamples()

void CastorSimpleRecAlgo::resetTimeSamples ( int  f,
int  t 
)
inline

Definition at line 46 of file CastorSimpleRecAlgo.h.

46  {
47  firstSample_ = f;
48  samplesToAdd_ = t;
49  }

References f, firstSample_, samplesToAdd_, and OrderedSet::t.

Referenced by CastorSimpleReconstructor::produce().

Member Data Documentation

◆ correctForTimeslew_

bool CastorSimpleRecAlgo::correctForTimeslew_
private

Definition at line 53 of file CastorSimpleRecAlgo.h.

◆ firstSample_

int CastorSimpleRecAlgo::firstSample_
private

◆ pulseCorr_

std::unique_ptr<CastorPulseContainmentCorrection> CastorSimpleRecAlgo::pulseCorr_
private

Definition at line 54 of file CastorSimpleRecAlgo.h.

Referenced by CastorSimpleRecAlgo().

◆ samplesToAdd_

int CastorSimpleRecAlgo::samplesToAdd_
private
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
CastorSimpleRecAlgo::firstSample_
int firstSample_
Definition: CastorSimpleRecAlgo.h:52
HcalCaloFlagLabels::UserDefinedBit0
Definition: HcalCaloFlagLabels.h:59
castor_dqm_sourceclient-live_cfg.samplesToAdd
samplesToAdd
Definition: castor_dqm_sourceclient-live_cfg.py:56
MaximumFractionalError
constexpr double MaximumFractionalError
Definition: CastorSimpleRecAlgo.cc:8
CastorSimpleRecAlgo::pulseCorr_
std::unique_ptr< CastorPulseContainmentCorrection > pulseCorr_
Definition: CastorSimpleRecAlgo.h:54
HcalCaloFlagLabels::ADCSaturationBit
Definition: HcalCaloFlagLabels.h:53
OrderedSet.t
t
Definition: OrderedSet.py:90
castor_dqm_sourceclient-live_cfg.firstSample
firstSample
Definition: castor_dqm_sourceclient-live_cfg.py:58
CastorSimpleRecAlgo::samplesToAdd_
int samplesToAdd_
Definition: CastorSimpleRecAlgo.h:52
castor_dqm_sourceclient-live_cfg.correctForTimeslew
correctForTimeslew
Definition: castor_dqm_sourceclient-live_cfg.py:60
CastorSimpleRecAlgo::correctForTimeslew_
bool correctForTimeslew_
Definition: CastorSimpleRecAlgo.h:53
CaloRecHit::setFlagField
constexpr void setFlagField(uint32_t value, int base, int width=1)
Definition: CaloRecHit.h:36
CastorTimeSlew::Fast
Definition: CastorTimeSlew.h:19
castor_dqm_sourceclient-live_cfg.maxADCvalue
maxADCvalue
Definition: castor_dqm_sourceclient-live_cfg.py:63