CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HGCalRecHitSimpleAlgo.h
Go to the documentation of this file.
1 #ifndef RecoLocalCalo_HGCalRecAlgos_HGCalRecHitSimpleAlgo_HH
2 #define RecoLocalCalo_HGCalRecAlgos_HGCalRecHitSimpleAlgo_HH
3 
13 #include <iostream>
14 
16  public:
17  // default ctor
19  adcToGeVConstant_ = -1;
20  adcToGeVConstantIsSet_ = false;
21  }
22 
23  virtual void setADCToGeVConstant(const float value) override {
26  }
27 
28 
29  // destructor
30  virtual ~HGCalRecHitSimpleAlgo() { };
31 
33  virtual HGCRecHit makeRecHit(const HGCUncalibratedRecHit& uncalibRH,
34  const uint32_t& flags = 0) const override {
35 
37  throw cms::Exception("HGCalRecHitSimpleAlgoBadConfig")
38  << "makeRecHit: adcToGeVConstant_ not set before calling this method!";
39  }
40 
41  // float clockToNsConstant = 25;
42  float energy = uncalibRH.amplitude() * adcToGeVConstant_;
43  float time = uncalibRH.jitter();
44  if(time<0) time = 0; // fast-track digi conversion
45 
46  HGCRecHit rh( uncalibRH.id(), energy, time );
47 
48  // Now fill flags
49  // all rechits from the digitizer are "good" at present
51 
52  return rh;
53  }
54 
55 private:
58 
59 };
60 #endif
virtual void setADCToGeVConstant(const float value) override
make rechits from dataframes
void setFlag(int flag)
set the flags (from Flags or ESFlags)
Definition: HGCRecHit.h:91
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
virtual HGCRecHit makeRecHit(const HGCUncalibratedRecHit &uncalibRH, const uint32_t &flags=0) const override
Compute parameters.