test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HGCalRecHitWorkerSimple.cc
Go to the documentation of this file.
9 
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 }
26 
28 }
29 
30 
31 bool
33  const HGCUncalibratedRecHit& uncalibRH,
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 }
61 
63 }
64 
65 
T getParameter(std::string const &) const
bool run(const edm::Event &evt, const HGCUncalibratedRecHit &uncalibRH, HGCRecHitCollection &result)
void push_back(T const &t)
#define constexpr
tuple result
Definition: mps_fire.py:84
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
void set(const edm::EventSetup &es)
Definition: DetId.h:18
HGCalRecHitWorkerSimple(const edm::ParameterSet &)
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::unique_ptr< HGCalRecHitSimpleAlgo > rechitMaker_