CMS 3D CMS Logo

FTLSimpleUncalibRecHitAlgo.cc
Go to the documentation of this file.
3 
5  public:
8  edm::ConsumesCollector& sumes ) :
9  FTLUncalibratedRecHitAlgoBase( conf, sumes ) {
10  uint32_t nBits = conf.getParameter<uint32_t>("adcNbits");
11  double saturation = conf.getParameter<double>("adcSaturation");
12  adcLSB_ = saturation/(1<<nBits);
13 
14  toaLSBToNS_ = conf.getParameter<double>("toaLSB_ns");
15 
16  timeError_ = conf.getParameter<double>("timeResolutionInNs");
17  }
18 
21 
23  void getEvent(const edm::Event&) final {}
24  void getEventSetup(const edm::EventSetup&) final {}
25 
27  FTLUncalibratedRecHit makeRecHit(const FTLDataFrame& dataFrame ) const final;
28 
29  private:
31 };
32 
35  constexpr int iSample=2; //only in-time sample
36  const auto& sample = dataFrame.sample(iSample);
37 
38  double amplitude = double(sample.data()) * adcLSB_;
39  double time = double(sample.toa()) * toaLSBToNS_;
40  unsigned char flag = 0;
41 
42  LogDebug("FTLSimpleUncalibRecHit") << "ADC+: set the charge to: " << amplitude << ' ' << sample.data()
43  << ' ' << adcLSB_ << ' ' << std::endl;
44  LogDebug("FTLSimpleUncalibRecHit") << "ADC+: set the time to: " << time << ' ' << sample.toa()
45  << ' ' << toaLSBToNS_ << ' ' << std::endl;
46  LogDebug("FTLSimpleUncalibRecHit") << "Final uncalibrated amplitude : " << amplitude << std::endl;
47 
48  return FTLUncalibratedRecHit( dataFrame.id(), std::make_pair(amplitude,0.),
49  std::make_pair(time,0.), timeError_, flag);
50 }
51 
#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:58
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:32