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.

24  {
25  adcToGeVConstant_ = -1;
26  adcToGeVConstantIsSet_ = false;
27  }

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.

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  }

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, HGCalRecHitAbsAlgo::rhtools_, HGCRecHit::setFlag(), DetId::subdetId(), ntuplemaker::time, weights_, and weightsNose_.

◆ setADCToGeVConstant()

void HGCalRecHitSimpleAlgo::setADCToGeVConstant ( const float  value)
inlineoverridevirtual

Implements HGCalRecHitAbsAlgo.

Definition at line 33 of file HGCalRecHitSimpleAlgo.h.

33  {
36  }

References adcToGeVConstant_, adcToGeVConstantIsSet_, and relativeConstraints::value.

◆ setLayerWeights()

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

make rechits from dataframes

Reimplemented from HGCalRecHitAbsAlgo.

Definition at line 29 of file HGCalRecHitSimpleAlgo.h.

29 { weights_ = weights; }

References HLT_FULL_cff::weights, and weights_.

◆ setNoseLayerWeights()

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

Definition at line 31 of file HGCalRecHitSimpleAlgo.h.

31 { weightsNose_ = weights; }

References HLT_FULL_cff::weights, and weightsNose_.

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().

HGCalRecHitSimpleAlgo::weightsNose_
std::vector< float > weightsNose_
Definition: HGCalRecHitSimpleAlgo.h:71
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
HGCalRecHitAbsAlgo::rhtools_
hgcal::RecHitTools rhtools_
Definition: HGCalRecHitAbsAlgo.h:34
HGCRecHit::setFlag
void setFlag(int flag)
set the flags (from Flags or ESFlags)
Definition: HGCRecHit.h:95
DetId
Definition: DetId.h:17
HGCalRecHitSimpleAlgo::adcToGeVConstantIsSet_
bool adcToGeVConstantIsSet_
Definition: HGCalRecHitSimpleAlgo.h:70
HFNose
Definition: ForwardSubdetector.h:11
HLT_FULL_cff.weights
weights
Definition: HLT_FULL_cff.py:99244
mixOne_premix_on_sim_cfi.hfnose
hfnose
Definition: mixOne_premix_on_sim_cfi.py:296
HGCUncalibratedRecHit::id
DetId id() const
Definition: HGCUncalibratedRecHit.h:33
HGCUncalibratedRecHit::jitter
float jitter() const
Definition: HGCUncalibratedRecHit.h:25
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
HGCRecHit
Definition: HGCRecHit.h:14
HGCalRecHitSimpleAlgo::adcToGeVConstant_
float adcToGeVConstant_
Definition: HGCalRecHitSimpleAlgo.h:69
HGCRecHit::kGood
Definition: HGCRecHit.h:20
hgcal::RecHitTools::getLayerWithOffset
unsigned int getLayerWithOffset(const DetId &) const
Definition: RecHitTools.cc:352
HGCalRecHitSimpleAlgo::weights_
std::vector< float > weights_
Definition: HGCalRecHitSimpleAlgo.h:71
HGCUncalibratedRecHit::amplitude
float amplitude() const
Definition: HGCUncalibratedRecHit.h:23
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Exception
Definition: hltDiff.cc:246
DetId::Forward
Definition: DetId.h:30
ntuplemaker.time
time
Definition: ntuplemaker.py:310