CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 ()
 
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 ( )
inline

Definition at line 24 of file HGCalRecHitSimpleAlgo.h.

References adcToGeVConstant_, and adcToGeVConstantIsSet_.

24  {
25  adcToGeVConstant_ = -1;
26  adcToGeVConstantIsSet_ = false;
27  }
HGCalRecHitSimpleAlgo::~HGCalRecHitSimpleAlgo ( )
inlineoverride

Definition at line 39 of file HGCalRecHitSimpleAlgo.h.

39 {};

Member Function Documentation

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(), relval_parameters_module::energy, Exception, DetId::Forward, hgcal::RecHitTools::getLayerWithOffset(), HFNose, HGCUncalibratedRecHit::id(), HGCUncalibratedRecHit::jitter(), HGCRecHit::kGood, phase1PixelTopology::layer, HGCalRecHitAbsAlgo::rhtools_, HGCRecHit::setFlag(), DetId::subdetId(), 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 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
unsigned int getLayerWithOffset(const DetId &) const
Definition: RecHitTools.cc:365
std::vector< float > weights_
std::vector< float > weightsNose_
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
void HGCalRecHitSimpleAlgo::setADCToGeVConstant ( const float  value)
inlineoverridevirtual
void HGCalRecHitSimpleAlgo::setLayerWeights ( const std::vector< float > &  weights)
inlineoverridevirtual

make rechits from dataframes

Reimplemented from HGCalRecHitAbsAlgo.

Definition at line 29 of file HGCalRecHitSimpleAlgo.h.

References HLT_FULL_cff::weights, and weights_.

29 { weights_ = weights; }
std::vector< float > weights_
void HGCalRecHitSimpleAlgo::setNoseLayerWeights ( const std::vector< float > &  weights)
inline

Definition at line 31 of file HGCalRecHitSimpleAlgo.h.

References HLT_FULL_cff::weights, and weightsNose_.

31 { weightsNose_ = weights; }
std::vector< float > weightsNose_

Member Data Documentation

float HGCalRecHitSimpleAlgo::adcToGeVConstant_
private

Definition at line 69 of file HGCalRecHitSimpleAlgo.h.

Referenced by HGCalRecHitSimpleAlgo(), and setADCToGeVConstant().

bool HGCalRecHitSimpleAlgo::adcToGeVConstantIsSet_
private

Definition at line 70 of file HGCalRecHitSimpleAlgo.h.

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

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

Definition at line 71 of file HGCalRecHitSimpleAlgo.h.

Referenced by makeRecHit(), and setLayerWeights().

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

Definition at line 71 of file HGCalRecHitSimpleAlgo.h.

Referenced by makeRecHit(), and setNoseLayerWeights().