CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
HGCalRecHitWorkerSimple Class Reference

#include <HGCalRecHitWorkerSimple.h>

Inheritance diagram for HGCalRecHitWorkerSimple:
HGCalRecHitWorkerBaseClass

Public Member Functions

 HGCalRecHitWorkerSimple (const edm::ParameterSet &)
 
bool run (const edm::Event &evt, const HGCUncalibratedRecHit &uncalibRH, HGCRecHitCollection &result)
 
void set (const edm::EventSetup &es)
 
virtual ~HGCalRecHitWorkerSimple ()
 
- Public Member Functions inherited from HGCalRecHitWorkerBaseClass
 HGCalRecHitWorkerBaseClass (const edm::ParameterSet &)
 
virtual ~HGCalRecHitWorkerBaseClass ()
 

Protected Attributes

double HGCEE_keV2DIGI_
 
double hgceeUncalib2GeV_
 
double HGCHEB_keV2DIGI_
 
double hgchebUncalib2GeV_
 
double HGCHEF_keV2DIGI_
 
double hgchefUncalib2GeV_
 
bool killDeadChannels_
 
std::unique_ptr
< HGCalRecHitSimpleAlgo
rechitMaker_
 
std::vector< int > v_chstatus_
 
std::vector< int > v_DB_reco_flags_
 

Detailed Description

Definition at line 16 of file HGCalRecHitWorkerSimple.h.

Constructor & Destructor Documentation

HGCalRecHitWorkerSimple::HGCalRecHitWorkerSimple ( const edm::ParameterSet ps)

Definition at line 10 of file HGCalRecHitWorkerSimple.cc.

References constexpr, alignCSCRings::e, edm::ParameterSet::getParameter(), HGCEE_keV2DIGI_, hgceeUncalib2GeV_, HGCHEB_keV2DIGI_, hgchebUncalib2GeV_, HGCHEF_keV2DIGI_, hgchefUncalib2GeV_, and rechitMaker_.

10  :
12  rechitMaker_.reset( new HGCalRecHitSimpleAlgo() );
13  constexpr float keV2GeV = 1e-6;
14  // HGCee constants
15  HGCEE_keV2DIGI_ = ps.getParameter<double>("HGCEE_keV2DIGI");
17 
18  // HGChef constants
19  HGCHEF_keV2DIGI_ = ps.getParameter<double>("HGCHEF_keV2DIGI");
21 
22  // HGCheb constants
23  HGCHEB_keV2DIGI_ = ps.getParameter<double>("HGCHEB_keV2DIGI");
25 }
T getParameter(std::string const &) const
#define constexpr
HGCalRecHitWorkerBaseClass(const edm::ParameterSet &)
std::unique_ptr< HGCalRecHitSimpleAlgo > rechitMaker_
HGCalRecHitWorkerSimple::~HGCalRecHitWorkerSimple ( )
virtual

Definition at line 62 of file HGCalRecHitWorkerSimple.cc.

62  {
63 }

Member Function Documentation

bool HGCalRecHitWorkerSimple::run ( const edm::Event evt,
const HGCUncalibratedRecHit uncalibRH,
HGCRecHitCollection result 
)
virtual

Implements HGCalRecHitWorkerBaseClass.

Definition at line 32 of file HGCalRecHitWorkerSimple.cc.

References Exception, HGCEE, hgceeUncalib2GeV_, HGCHEB, hgchebUncalib2GeV_, HGCHEF, hgchefUncalib2GeV_, HGCUncalibratedRecHit::id(), edm::SortedCollection< T, SORT >::push_back(), DetId::rawId(), rechitMaker_, and DetId::subdetId().

34  {
35  DetId detid=uncalibRH.id();
36  uint32_t recoFlag = 0;
37 
38  switch( detid.subdetId() ) {
39  case HGCEE:
40  rechitMaker_->setADCToGeVConstant(float(hgceeUncalib2GeV_) );
41  break;
42  case HGCHEF:
43  rechitMaker_->setADCToGeVConstant(float(hgchefUncalib2GeV_) );
44  break;
45  case HGCHEB:
46  rechitMaker_->setADCToGeVConstant(float(hgchebUncalib2GeV_) );
47  break;
48  default:
49  throw cms::Exception("NonHGCRecHit")
50  << "Rechit with detid = " << detid.rawId() << " is not HGC!";
51  }
52 
53  // make the rechit and put in the output collection
54  if (recoFlag == 0) {
55  HGCRecHit myrechit( rechitMaker_->makeRecHit(uncalibRH, 0) );
56  result.push_back(myrechit);
57  }
58 
59  return true;
60 }
void push_back(T const &t)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
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::unique_ptr< HGCalRecHitSimpleAlgo > rechitMaker_
void HGCalRecHitWorkerSimple::set ( const edm::EventSetup es)
virtual

Implements HGCalRecHitWorkerBaseClass.

Definition at line 27 of file HGCalRecHitWorkerSimple.cc.

27  {
28 }

Member Data Documentation

double HGCalRecHitWorkerSimple::HGCEE_keV2DIGI_
protected

Definition at line 26 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple().

double HGCalRecHitWorkerSimple::hgceeUncalib2GeV_
protected

Definition at line 26 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple(), and run().

double HGCalRecHitWorkerSimple::HGCHEB_keV2DIGI_
protected

Definition at line 28 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple().

double HGCalRecHitWorkerSimple::hgchebUncalib2GeV_
protected

Definition at line 28 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple(), and run().

double HGCalRecHitWorkerSimple::HGCHEF_keV2DIGI_
protected

Definition at line 27 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple().

double HGCalRecHitWorkerSimple::hgchefUncalib2GeV_
protected

Definition at line 27 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple(), and run().

bool HGCalRecHitWorkerSimple::killDeadChannels_
protected

Definition at line 34 of file HGCalRecHitWorkerSimple.h.

std::unique_ptr<HGCalRecHitSimpleAlgo> HGCalRecHitWorkerSimple::rechitMaker_
protected

Definition at line 36 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple(), and run().

std::vector<int> HGCalRecHitWorkerSimple::v_chstatus_
protected

Definition at line 30 of file HGCalRecHitWorkerSimple.h.

std::vector<int> HGCalRecHitWorkerSimple::v_DB_reco_flags_
protected

Definition at line 32 of file HGCalRecHitWorkerSimple.h.