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 hgceeADCtoGeV_
 
double HGCEElsbInMIP_
 
double HGCEEmip2noise_
 
double HGCEEmipInKeV_
 
double hgchebADCtoGeV_
 
double HGCHEBlsbInMIP_
 
double HGCHEBmip2noise_
 
double HGCHEBmipInKeV_
 
double hgchefADCtoGeV_
 
double HGCHEFlsbInMIP_
 
double HGCHEFmip2noise_
 
double HGCHEFmipInKeV_
 
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(), hgceeADCtoGeV_, HGCEElsbInMIP_, HGCEEmip2noise_, HGCEEmipInKeV_, hgchebADCtoGeV_, HGCHEBlsbInMIP_, HGCHEBmip2noise_, HGCHEBmipInKeV_, hgchefADCtoGeV_, HGCHEFlsbInMIP_, HGCHEFmip2noise_, HGCHEFmipInKeV_, and rechitMaker_.

10  :
12  rechitMaker_.reset( new HGCalRecHitSimpleAlgo() );
13  constexpr float keV2GeV = 1e-6;
14  // HGCee constants
15  HGCEEmipInKeV_ = ps.getParameter<double>("HGCEEmipInKeV");
16  HGCEElsbInMIP_ = ps.getParameter<double>("HGCEElsbInMIP");
17  HGCEEmip2noise_ = ps.getParameter<double>("HGCEEmip2noise");
18  hgceeADCtoGeV_ = HGCEEmipInKeV_ * HGCEElsbInMIP_*keV2GeV;
19  // HGChef constants
20  HGCHEFmipInKeV_ = ps.getParameter<double>("HGCHEFmipInKeV");
21  HGCHEFlsbInMIP_ = ps.getParameter<double>("HGCHEFlsbInMIP");
22  HGCHEFmip2noise_ = ps.getParameter<double>("HGCHEFmip2noise");
23  hgchefADCtoGeV_ = HGCHEFmipInKeV_ * HGCHEFlsbInMIP_*keV2GeV;
24  // HGCheb constants
25  HGCHEBmipInKeV_ = ps.getParameter<double>("HGCHEBmipInKeV");
26  HGCHEBlsbInMIP_ = ps.getParameter<double>("HGCHEBlsbInMIP");
27  HGCHEBmip2noise_ = ps.getParameter<double>("HGCHEBmip2noise");
28  hgchebADCtoGeV_ = HGCHEBmipInKeV_ * HGCHEBlsbInMIP_*keV2GeV;
29 }
T getParameter(std::string const &) const
#define constexpr
HGCalRecHitWorkerBaseClass(const edm::ParameterSet &)
std::unique_ptr< HGCalRecHitSimpleAlgo > rechitMaker_
HGCalRecHitWorkerSimple::~HGCalRecHitWorkerSimple ( )
virtual

Definition at line 67 of file HGCalRecHitWorkerSimple.cc.

67  {
68 }

Member Function Documentation

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

Implements HGCalRecHitWorkerBaseClass.

Definition at line 36 of file HGCalRecHitWorkerSimple.cc.

References cond::rpcobgas::detid, Exception, HGCEE, hgceeADCtoGeV_, HGCHEB, hgchebADCtoGeV_, HGCHEF, hgchefADCtoGeV_, HGCUncalibratedRecHit::id(), edm::SortedCollection< T, SORT >::push_back(), DetId::rawId(), rechitMaker_, and DetId::subdetId().

39 {
40  DetId detid=uncalibRH.id();
41  uint32_t recoFlag = 0;
42 
43  switch( detid.subdetId() ) {
44  case HGCEE:
45  rechitMaker_->setADCToGeVConstant(float(hgceeADCtoGeV_) );
46  break;
47  case HGCHEF:
48  rechitMaker_->setADCToGeVConstant(float(hgchefADCtoGeV_) );
49  break;
50  case HGCHEB:
51  rechitMaker_->setADCToGeVConstant(float(hgchebADCtoGeV_) );
52  break;
53  default:
54  throw cms::Exception("NonHGCRecHit")
55  << "Rechit with detid = " << detid.rawId() << " is not HGC!";
56  }
57 
58  // make the rechit and put in the output collection
59  if (recoFlag == 0) {
60  HGCRecHit myrechit( rechitMaker_->makeRecHit(uncalibRH, 0) );
61  result.push_back(myrechit);
62  }
63 
64  return true;
65 }
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 31 of file HGCalRecHitWorkerSimple.cc.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

31  {
32 }

Member Data Documentation

double HGCalRecHitWorkerSimple::hgceeADCtoGeV_
protected

Definition at line 29 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple(), and run().

double HGCalRecHitWorkerSimple::HGCEElsbInMIP_
protected

Definition at line 26 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple().

double HGCalRecHitWorkerSimple::HGCEEmip2noise_
protected

Definition at line 26 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple().

double HGCalRecHitWorkerSimple::HGCEEmipInKeV_
protected

Definition at line 26 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple().

double HGCalRecHitWorkerSimple::hgchebADCtoGeV_
protected

Definition at line 29 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple(), and run().

double HGCalRecHitWorkerSimple::HGCHEBlsbInMIP_
protected

Definition at line 28 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple().

double HGCalRecHitWorkerSimple::HGCHEBmip2noise_
protected

Definition at line 28 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple().

double HGCalRecHitWorkerSimple::HGCHEBmipInKeV_
protected

Definition at line 28 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple().

double HGCalRecHitWorkerSimple::hgchefADCtoGeV_
protected

Definition at line 29 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple(), and run().

double HGCalRecHitWorkerSimple::HGCHEFlsbInMIP_
protected

Definition at line 27 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple().

double HGCalRecHitWorkerSimple::HGCHEFmip2noise_
protected

Definition at line 27 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple().

double HGCalRecHitWorkerSimple::HGCHEFmipInKeV_
protected

Definition at line 27 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple().

bool HGCalRecHitWorkerSimple::killDeadChannels_
protected

Definition at line 35 of file HGCalRecHitWorkerSimple.h.

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

Definition at line 37 of file HGCalRecHitWorkerSimple.h.

Referenced by HGCalRecHitWorkerSimple(), and run().

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

Definition at line 31 of file HGCalRecHitWorkerSimple.h.

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

Definition at line 33 of file HGCalRecHitWorkerSimple.h.