Go to the documentation of this file.
15 : ts_to_ns_(iConfig.getParameter<double>(
"timeSliceNs")),
16 apply_calib_(iConfig.getParameter<
bool>(
"applyCalibration")) {}
26 for (
const auto& vec :
input) {
40 const float x_width = 2.0 * det->
params().at(0);
41 const float y_width = 2.0 * det->
params().at(1);
42 const float z_width = 2.0 * det->
params().at(2);
45 const int sector = detid.arm(),
station = detid.station(), plane = detid.plane(), channel = detid.channel();
53 for (
const auto& digi : vec) {
54 const int t_lead = digi.leadingEdge(), t_trail = digi.trailingEdge();
56 if (t_lead == 0 && t_trail == 0)
59 double tot = -1., ch_t_twc = 0.;
60 if (t_lead != 0 && t_trail != 0) {
64 ch_t_twc =
calib_fct_->evaluate(std::vector<double>{tot}, ch_params);
70 const int time_slice =
74 const double t0 = (t_lead % 1024) *
ts_to_ns_ - ch_t_twc;
90 digi.hptdcErrorFlags(),
PPSTimingCalibration calib_
static const std::string input
The manager class for TOTEM RP geometry.
constexpr bool isNotFinite(T x)
void build(const CTPPSGeometry &, const edm::DetSetVector< CTPPSDiamondDigi > &, edm::DetSetVector< CTPPSDiamondRecHit > &)
float parentZPosition() const
const std::string & formula() const
double ts_to_ns_
Conversion constant between HPTDC time slice and absolute time (in ns)
bool apply_calib_
Switch on/off the timing calibration.
static constexpr unsigned short MAX_CHANNEL
double timeOffset(int key1, int key2, int key3, int key4=-1) const
double timePrecision(int key1, int key2, int key3, int key4=-1) const
std::vector< double > parameters(int key1, int key2, int key3, int key4) const
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
void setCalibration(const PPSTimingCalibration &)
decltype(auto) emplace_back(Args &&... args)
static constexpr int TIMESLICE_WITHOUT_LEADING
Geometrical description of a sensor.
CTPPSDiamondRecHitProducerAlgorithm(const edm::ParameterSet &conf)
std::unique_ptr< reco::FormulaEvaluator > calib_fct_
std::vector< double > params() const
Translation translation() const