CMS 3D CMS Logo

List of all members | Public Member Functions
TotemT2RecHitProducerAlgorithm Class Reference

#include <TotemT2RecHitProducerAlgorithm.h>

Inheritance diagram for TotemT2RecHitProducerAlgorithm:
TimingRecHitProducerAlgorithm< TotemGeometry, edmNew::DetSetVector< TotemT2Digi >, edmNew::DetSetVector< TotemT2RecHit > >

Public Member Functions

void build (const TotemGeometry &, const edmNew::DetSetVector< TotemT2Digi > &, edmNew::DetSetVector< TotemT2RecHit > &) override
 
 TimingRecHitProducerAlgorithm (const edm::ParameterSet &iConfig)
 
- Public Member Functions inherited from TimingRecHitProducerAlgorithm< TotemGeometry, edmNew::DetSetVector< TotemT2Digi >, edmNew::DetSetVector< TotemT2RecHit > >
void setCalibration (const PPSTimingCalibration &calib, const PPSTimingCalibrationLUT &calibLUT)
 
 TimingRecHitProducerAlgorithm (const edm::ParameterSet &iConfig)
 
virtual ~TimingRecHitProducerAlgorithm ()=default
 

Additional Inherited Members

- Protected Attributes inherited from TimingRecHitProducerAlgorithm< TotemGeometry, edmNew::DetSetVector< TotemT2Digi >, edmNew::DetSetVector< TotemT2RecHit > >
bool apply_calib_
 Switch on/off the timing calibration. More...
 
const PPSTimingCalibrationcalib_
 DB-loaded calibration object. More...
 
std::unique_ptr< reco::FormulaEvaluatorcalib_fct_
 Timing correction formula. More...
 
const PPSTimingCalibrationLUTcalibLUT_
 
double ts_to_ns_
 Conversion constant between time slice and absolute time (in ns) More...
 

Detailed Description

Definition at line 20 of file TotemT2RecHitProducerAlgorithm.h.

Member Function Documentation

◆ build()

void TotemT2RecHitProducerAlgorithm::build ( const TotemGeometry geom,
const edmNew::DetSetVector< TotemT2Digi > &  input,
edmNew::DetSetVector< TotemT2RecHit > &  output 
)
overridevirtual

Implements TimingRecHitProducerAlgorithm< TotemGeometry, edmNew::DetSetVector< TotemT2Digi >, edmNew::DetSetVector< TotemT2RecHit > >.

Definition at line 14 of file TotemT2RecHitProducerAlgorithm.cc.

References trigObjTnPSource_cfi::filler, relativeConstraints::geom, input, compareTotals::tot, and TimingRecHitProducerAlgorithm< TotemGeometry, edmNew::DetSetVector< TotemT2Digi >, edmNew::DetSetVector< TotemT2RecHit > >::ts_to_ns_.

Referenced by TotemT2RecHitProducer::produce().

16  {
17  for (const auto& vec : input) {
18  const TotemT2DetId detid(vec.detId());
19 
20  // prepare the output collection filler
22 
23  for (const auto& digi : vec) {
24  const int t_lead = digi.leadingEdge(), t_trail = digi.trailingEdge();
25  // don't skip no-edge digis
26  double tot = 0.;
27  if (digi.hasLE() && digi.hasTE()) {
28  tot = (t_trail - t_lead) * ts_to_ns_; // in ns
29  }
30  double ch_t_precis = ts_to_ns_ / 2.0; //without a calibration, assume LE/TE precision is +-0.5
31 
32  // retrieve the geometry element associated to this DetID
33  const auto& tile = geom.tile(detid);
34 
35  // store to the output collection
36  filler.emplace_back(tile.centre(), t_lead * ts_to_ns_, ch_t_precis, tot);
37  }
38  }
39 }
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
static std::string const input
Definition: EdmProvDump.cc:50
Definition: output.py:1

◆ TimingRecHitProducerAlgorithm()

Definition at line 24 of file TimingRecHitProducerAlgorithm.h.

25  : ts_to_ns_(iConfig.getParameter<double>("timeSliceNs")),
26  apply_calib_(iConfig.getParameter<bool>("applyCalibration")) {}