CMS 3D CMS Logo

FTLSimpleUncalibRecHitAlgo.cc
Go to the documentation of this file.
3 
5 public:
8  : FTLUncalibratedRecHitAlgoBase(conf, sumes) {
9  uint32_t nBits = conf.getParameter<uint32_t>("adcNbits");
10  double saturation = conf.getParameter<double>("adcSaturation");
11  adcLSB_ = saturation / (1 << nBits);
12 
13  toaLSBToNS_ = conf.getParameter<double>("toaLSB_ns");
14 
15  timeError_ = conf.getParameter<double>("timeResolutionInNs");
16  }
17 
20 
22  void getEvent(const edm::Event&) final {}
23  void getEventSetup(const edm::EventSetup&) final {}
24 
26  FTLUncalibratedRecHit makeRecHit(const FTLDataFrame& dataFrame) const final;
27 
28 private:
30 };
31 
33  constexpr int iSample = 2; //only in-time sample
34  const auto& sample = dataFrame.sample(iSample);
35 
36  double amplitude = double(sample.data()) * adcLSB_;
37  double time = double(sample.toa()) * toaLSBToNS_;
38  unsigned char flag = 0;
39 
40  LogDebug("FTLSimpleUncalibRecHit") << "ADC+: set the charge to: " << amplitude << ' ' << sample.data() << ' '
41  << adcLSB_ << ' ' << std::endl;
42  LogDebug("FTLSimpleUncalibRecHit") << "ADC+: set the time to: " << time << ' ' << sample.toa() << ' ' << toaLSBToNS_
43  << ' ' << std::endl;
44  LogDebug("FTLSimpleUncalibRecHit") << "Final uncalibrated amplitude : " << amplitude << std::endl;
45 
46  return FTLUncalibratedRecHit(
47  dataFrame.id(), std::make_pair(amplitude, 0.), std::make_pair(time, 0.), timeError_, flag);
48 }
49 
#define LogDebug(id)
T getParameter(std::string const &) const
void getEvent(const edm::Event &) final
get event and eventsetup information
const S & sample(int i) const
Definition: FTLDataFrameT.h:57
FTLUncalibratedRecHit makeRecHit(const FTLDataFrame &dataFrame) const final
make the rec hit
~FTLSimpleUncalibRecHitAlgo() override
Destructor.
FTLSimpleUncalibRecHitAlgo(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
Constructor.
Readout digi for HGC.
Definition: FTLDataFrameT.h:14
#define DEFINE_EDM_PLUGIN(factory, type, name)
void getEventSetup(const edm::EventSetup &) final
#define constexpr
const D & id() const
det id
Definition: FTLDataFrameT.h:31