CMS 3D CMS Logo

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

#include <HGCalRecHitSimpleAlgo.h>

Inheritance diagram for HGCalRecHitSimpleAlgo:
HGCalRecHitAbsAlgo

Public Member Functions

 HGCalRecHitSimpleAlgo ()
 
HGCRecHit makeRecHit (const HGCUncalibratedRecHit &uncalibRH, const uint32_t &flags=0) const override
 Compute parameters. More...
 
void setADCToGeVConstant (const float value) override
 
void setLayerWeights (const std::vector< float > &weights) override
 make rechits from dataframes More...
 
void setNoseLayerWeights (const std::vector< float > &weights)
 
 ~HGCalRecHitSimpleAlgo () override
 
- Public Member Functions inherited from HGCalRecHitAbsAlgo
void set (const CaloGeometry &geom)
 
virtual ~HGCalRecHitAbsAlgo ()
 Constructor. More...
 

Private Attributes

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

Additional Inherited Members

- Protected Attributes inherited from HGCalRecHitAbsAlgo
hgcal::RecHitTools rhtools_
 

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

Constructor & Destructor Documentation

◆ HGCalRecHitSimpleAlgo()

HGCalRecHitSimpleAlgo::HGCalRecHitSimpleAlgo ( )
inline

Definition at line 24 of file HGCalRecHitSimpleAlgo.h.

References adcToGeVConstant_, and adcToGeVConstantIsSet_.

◆ ~HGCalRecHitSimpleAlgo()

HGCalRecHitSimpleAlgo::~HGCalRecHitSimpleAlgo ( )
inlineoverride

Definition at line 39 of file HGCalRecHitSimpleAlgo.h.

39 {};

Member Function Documentation

◆ makeRecHit()

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

Compute parameters.

Implements HGCalRecHitAbsAlgo.

Definition at line 42 of file HGCalRecHitSimpleAlgo.h.

References adcToGeVConstantIsSet_, HGCUncalibratedRecHit::amplitude(), DetId::det(), HCALHighEnergyHPDFilter_cfi::energy, Exception, DetId::Forward, hgcal::RecHitTools::getLayerWithOffset(), HFNose, mixOne_premix_on_sim_cfi::hfnose, HGCUncalibratedRecHit::id(), HGCUncalibratedRecHit::jitter(), HGCRecHit::kGood, phase1PixelTopology::layer, HGCalRecHitAbsAlgo::rhtools_, HGCRecHit::setFlag(), DetId::subdetId(), protons_cff::time, weights_, and weightsNose_.

42  {
44  throw cms::Exception("HGCalRecHitSimpleAlgoBadConfig")
45  << "makeRecHit: adcToGeVConstant_ not set before calling this method!";
46  }
47 
48  DetId baseid = uncalibRH.id();
49  unsigned layer = rhtools_.getLayerWithOffset(baseid);
50  bool hfnose = DetId::Forward == baseid.det() && HFNose == baseid.subdetId();
51 
52  // float clockToNsConstant = 25;
53  float energy = (hfnose ? (uncalibRH.amplitude() * weightsNose_[layer] * 0.001f)
54  : (uncalibRH.amplitude() * weights_[layer] * 0.001f));
55  float time = uncalibRH.jitter();
56 
57  //if(time<0) time = 0; // fast-track digi conversion
58 
59  HGCRecHit rh(uncalibRH.id(), energy, time);
60 
61  // Now fill flags
62  // all rechits from the digitizer are "good" at present
64 
65  return rh;
66  }
hgcal::RecHitTools rhtools_
void setFlag(int flag)
set the flags (from Flags or ESFlags)
Definition: HGCRecHit.h:101
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
constexpr std::array< uint8_t, layerIndexSize > layer
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
Definition: DetId.h:17
std::vector< float > weights_
std::vector< float > weightsNose_
unsigned int getLayerWithOffset(const DetId &) const
Definition: RecHitTools.cc:365

◆ setADCToGeVConstant()

void HGCalRecHitSimpleAlgo::setADCToGeVConstant ( const float  value)
inlineoverridevirtual

◆ setLayerWeights()

void HGCalRecHitSimpleAlgo::setLayerWeights ( const std::vector< float > &  weights)
inlineoverridevirtual

◆ setNoseLayerWeights()

void HGCalRecHitSimpleAlgo::setNoseLayerWeights ( const std::vector< float > &  weights)
inline

Member Data Documentation

◆ adcToGeVConstant_

float HGCalRecHitSimpleAlgo::adcToGeVConstant_
private

Definition at line 69 of file HGCalRecHitSimpleAlgo.h.

Referenced by HGCalRecHitSimpleAlgo(), and setADCToGeVConstant().

◆ adcToGeVConstantIsSet_

bool HGCalRecHitSimpleAlgo::adcToGeVConstantIsSet_
private

Definition at line 70 of file HGCalRecHitSimpleAlgo.h.

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

◆ weights_

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

Definition at line 71 of file HGCalRecHitSimpleAlgo.h.

Referenced by makeRecHit(), and setLayerWeights().

◆ weightsNose_

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

Definition at line 71 of file HGCalRecHitSimpleAlgo.h.

Referenced by makeRecHit(), and setNoseLayerWeights().