test
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
HGCalRecHitSimpleAlgo Class Reference

#include <HGCalRecHitSimpleAlgo.h>

Inheritance diagram for HGCalRecHitSimpleAlgo:
HGCalRecHitAbsAlgo

Public Member Functions

 HGCalRecHitSimpleAlgo ()
 
virtual HGCRecHit makeRecHit (const HGCUncalibratedRecHit &uncalibRH, const uint32_t &flags=0) const override
 Compute parameters. More...
 
virtual void setADCToGeVConstant (const float value) override
 make rechits from dataframes More...
 
virtual ~HGCalRecHitSimpleAlgo ()
 
- Public Member Functions inherited from HGCalRecHitAbsAlgo
virtual ~HGCalRecHitAbsAlgo ()
 Constructor. More...
 

Private Attributes

float adcToGeVConstant_
 
bool adcToGeVConstantIsSet_
 

Detailed Description

Simple algoritm to make HGCAL rechits from HGCAL uncalibrated rechits , following Ecal sceleton

Author
Valeri Andreev

Simple algoritm to make HGCAL rechits from HGCAL uncalibrated rechits

Author
Valeri Andreev

Definition at line 15 of file HGCalRecHitSimpleAlgo.h.

Constructor & Destructor Documentation

HGCalRecHitSimpleAlgo::HGCalRecHitSimpleAlgo ( )
inline

Definition at line 18 of file HGCalRecHitSimpleAlgo.h.

References adcToGeVConstant_, and adcToGeVConstantIsSet_.

18  {
19  adcToGeVConstant_ = -1;
20  adcToGeVConstantIsSet_ = false;
21  }
virtual HGCalRecHitSimpleAlgo::~HGCalRecHitSimpleAlgo ( )
inlinevirtual

Definition at line 30 of file HGCalRecHitSimpleAlgo.h.

30 { };

Member Function Documentation

virtual HGCRecHit HGCalRecHitSimpleAlgo::makeRecHit ( const HGCUncalibratedRecHit uncalibRH,
const uint32_t &  flags = 0 
) const
inlineoverridevirtual

Compute parameters.

Implements HGCalRecHitAbsAlgo.

Definition at line 33 of file HGCalRecHitSimpleAlgo.h.

References adcToGeVConstant_, adcToGeVConstantIsSet_, HGCUncalibratedRecHit::amplitude(), relval_parameters_module::energy, Exception, HGCUncalibratedRecHit::id(), HGCUncalibratedRecHit::jitter(), HGCRecHit::kGood, and HGCRecHit::setFlag().

34  {
35 
37  throw cms::Exception("HGCalRecHitSimpleAlgoBadConfig")
38  << "makeRecHit: adcToGeVConstant_ not set before calling this method!";
39  }
40 
41  // float clockToNsConstant = 25;
42  float energy = uncalibRH.amplitude() * adcToGeVConstant_;
43  float time = uncalibRH.jitter();
44 
45  //if(time<0) time = 0; // fast-track digi conversion
46 
47  HGCRecHit rh( uncalibRH.id(), energy, time );
48 
49  // Now fill flags
50  // all rechits from the digitizer are "good" at present
52 
53  return rh;
54  }
void setFlag(int flag)
set the flags (from Flags or ESFlags)
Definition: HGCRecHit.h:91
virtual void HGCalRecHitSimpleAlgo::setADCToGeVConstant ( const float  value)
inlineoverridevirtual

make rechits from dataframes

Implements HGCalRecHitAbsAlgo.

Definition at line 23 of file HGCalRecHitSimpleAlgo.h.

References adcToGeVConstant_, adcToGeVConstantIsSet_, and relativeConstraints::value.

Member Data Documentation

float HGCalRecHitSimpleAlgo::adcToGeVConstant_
private

Definition at line 57 of file HGCalRecHitSimpleAlgo.h.

Referenced by HGCalRecHitSimpleAlgo(), makeRecHit(), and setADCToGeVConstant().

bool HGCalRecHitSimpleAlgo::adcToGeVConstantIsSet_
private

Definition at line 58 of file HGCalRecHitSimpleAlgo.h.

Referenced by HGCalRecHitSimpleAlgo(), makeRecHit(), and setADCToGeVConstant().