CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CastorSimpleRecAlgo Class Reference

#include <CastorSimpleRecAlgo.h>

Public Member Functions

 CastorSimpleRecAlgo (int firstSample, int samplesToAdd, bool correctForTimeslew, bool correctForContainment, float fixedPhaseNs)
 
 CastorSimpleRecAlgo (int firstSample, int samplesToAdd)
 
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::auto_ptr
< CastorPulseContainmentCorrection
pulseCorr_
 
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::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.

References MaximumFractionalError, pulseCorr_, and samplesToAdd_.

10  :
12  samplesToAdd_(samplesToAdd),
13  correctForTimeslew_(correctForTimeslew) {
14  if (correctForPulse)
15  pulseCorr_=std::auto_ptr<CastorPulseContainmentCorrection>(new CastorPulseContainmentCorrection(samplesToAdd_,phaseNS,MaximumFractionalError));
16 }
double MaximumFractionalError
std::auto_ptr< CastorPulseContainmentCorrection > pulseCorr_
CastorSimpleRecAlgo::CastorSimpleRecAlgo ( int  firstSample,
int  samplesToAdd 
)

Simple constructor for PMT-based detectors

Definition at line 18 of file CastorSimpleRecAlgo.cc.

Member Function Documentation

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

Definition at line 156 of file CastorSimpleRecAlgo.cc.

References HcalCaloFlagLabels::ADCSaturationBit, firstSample_, samplesToAdd_, and CaloRecHit::setFlagField().

Referenced by CastorSimpleReconstructor::produce().

156  {
157  if(CastorSimpleRecAlgoImpl::isSaturated<CastorDataFrame>(digi,maxADCvalue,firstSample_,samplesToAdd_))
159 }
void setFlagField(uint32_t value, int base, int width=1)
Definition: CaloRecHit.cc:20
CastorRecHit CastorSimpleRecAlgo::reconstruct ( const CastorDataFrame digi,
const CastorCoder coder,
const CastorCalibrations calibs 
) const

Definition at line 149 of file CastorSimpleRecAlgo.cc.

References CastorTimeSlew::Fast, firstSample_, and samplesToAdd_.

Referenced by CastorSimpleReconstructor::produce().

149  {
150  return CastorSimpleRecAlgoImpl::reco<CastorDataFrame,CastorRecHit>(digi,coder,calibs,
152  0,
154 }
void CastorSimpleRecAlgo::recoverADCSaturation ( CastorRecHit rechit,
const CastorCoder coder,
const CastorCalibrations calibs,
const CastorDataFrame digi,
const int &  maxADCvalue,
const double &  satCorrConst 
) const

Definition at line 162 of file CastorSimpleRecAlgo.cc.

References firstSample_, samplesToAdd_, CaloRecHit::setFlagField(), and HcalCaloFlagLabels::UserDefinedBit0.

Referenced by CastorSimpleReconstructor::produce().

163  {
164  if(CastorSimpleRecAlgoImpl::corrSaturation<CastorDataFrame,CastorRecHit>(rechit,coder,calibs,digi,
165  maxADCvalue,satCorrConst,
167  // use empty flag bit for recording saturation correction
168  // see also CMSSW/RecoLocalCalo/HcalRecAlgos/interface/HcalCaloFlagLabels.h
170 }
void setFlagField(uint32_t value, int base, int width=1)
Definition: CaloRecHit.cc:20
void CastorSimpleRecAlgo::resetTimeSamples ( int  f,
int  t 
)
inline

Member Data Documentation

bool CastorSimpleRecAlgo::correctForTimeslew_
private

Definition at line 48 of file CastorSimpleRecAlgo.h.

int CastorSimpleRecAlgo::firstSample_
private
std::auto_ptr<CastorPulseContainmentCorrection> CastorSimpleRecAlgo::pulseCorr_
private

Definition at line 49 of file CastorSimpleRecAlgo.h.

Referenced by CastorSimpleRecAlgo().

int CastorSimpleRecAlgo::samplesToAdd_
private