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
 
virtual void setLayerWeights (const std::vector< float > &weights) override
 make rechits from dataframes More...
 
virtual ~HGCalRecHitSimpleAlgo ()
 
- Public Member Functions inherited from HGCalRecHitAbsAlgo
virtual ~HGCalRecHitAbsAlgo ()
 Constructor. More...
 

Private Attributes

float adcToGeVConstant_
 
bool adcToGeVConstantIsSet_
 
std::vector< float > weights_
 

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 17 of file HGCalRecHitSimpleAlgo.h.

Constructor & Destructor Documentation

HGCalRecHitSimpleAlgo::HGCalRecHitSimpleAlgo ( )
inline

Definition at line 20 of file HGCalRecHitSimpleAlgo.h.

References adcToGeVConstant_, and adcToGeVConstantIsSet_.

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

Definition at line 36 of file HGCalRecHitSimpleAlgo.h.

36 { };

Member Function Documentation

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

Compute parameters.

Implements HGCalRecHitAbsAlgo.

Definition at line 39 of file HGCalRecHitSimpleAlgo.h.

References adcToGeVConstantIsSet_, HGCUncalibratedRecHit::amplitude(), HcalDetId::depth(), DetId::det(), relval_parameters_module::energy, Exception, DetId::Forward, DetId::Hcal, HcalEndcap, HGCEE, HGCHEF, HGCUncalibratedRecHit::id(), HGCUncalibratedRecHit::jitter(), HGCRecHit::kGood, HGCalDetId::layer(), DetId::rawId(), HGCRecHit::setFlag(), DetId::subdetId(), and weights_.

40  {
41 
43  throw cms::Exception("HGCalRecHitSimpleAlgoBadConfig")
44  << "makeRecHit: adcToGeVConstant_ not set before calling this method!";
45  }
46 
47  DetId baseid = uncalibRH.id();
48  unsigned layer = 0;
49  if( DetId::Hcal == baseid.det() && HcalEndcap == baseid.subdetId() ) {
50  layer = HcalDetId(baseid).depth() + 40;
51  } else if ( DetId::Forward == baseid.det() && HGCEE == baseid.subdetId() ) {
52  layer = HGCalDetId(baseid).layer();
53  }else if ( DetId::Forward == baseid.det() && HGCHEF == baseid.subdetId() ) {
54  layer = HGCalDetId(baseid).layer() + 28;
55  } else {
56  throw cms::Exception("InvalidRecHit")
57  << "HGCalRecHitSimpleAlgo encountered a non-HGCal det id: " << baseid.det() << ' ' << baseid.subdetId() << ' ' << baseid.rawId();
58  }
59 
60  HGCalDetId hid(uncalibRH.id());
61 
62 
63  // float clockToNsConstant = 25;
64  float energy = uncalibRH.amplitude() * weights_[layer] * 0.001f;
65  float time = uncalibRH.jitter();
66 
67  //if(time<0) time = 0; // fast-track digi conversion
68 
69  HGCRecHit rh( uncalibRH.id(), energy, time );
70 
71  // Now fill flags
72  // all rechits from the digitizer are "good" at present
74 
75  return rh;
76  }
void setFlag(int flag)
set the flags (from Flags or ESFlags)
Definition: HGCRecHit.h:91
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18
std::vector< float > weights_
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
int layer() const
get the layer #
Definition: HGCalDetId.h:48
virtual void HGCalRecHitSimpleAlgo::setADCToGeVConstant ( const float  value)
inlineoverridevirtual
virtual void HGCalRecHitSimpleAlgo::setLayerWeights ( const std::vector< float > &  weights)
inlineoverridevirtual

make rechits from dataframes

Reimplemented from HGCalRecHitAbsAlgo.

Definition at line 25 of file HGCalRecHitSimpleAlgo.h.

References create_public_pileup_plots::weights, and weights_.

Member Data Documentation

float HGCalRecHitSimpleAlgo::adcToGeVConstant_
private

Definition at line 79 of file HGCalRecHitSimpleAlgo.h.

Referenced by HGCalRecHitSimpleAlgo(), and setADCToGeVConstant().

bool HGCalRecHitSimpleAlgo::adcToGeVConstantIsSet_
private

Definition at line 80 of file HGCalRecHitSimpleAlgo.h.

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

std::vector<float> HGCalRecHitSimpleAlgo::weights_
private

Definition at line 81 of file HGCalRecHitSimpleAlgo.h.

Referenced by makeRecHit(), and setLayerWeights().