15 ts_to_ns_( iConfig.getParameter<double>(
"timeSliceNs" ) )
30 for (
const auto& vec : input ) {
44 const float x_width = 2.0 * det->
params().at( 0 ),
45 y_width = 2.0 * det->
params().at( 1 ),
46 z_width = 2.0 * det->
params().at( 2 );
49 const int sector = detid.arm(),
station = detid.station(), plane = detid.plane(), channel = detid.channel();
57 for (
const auto& digi : vec ) {
58 const int t_lead = digi.getLeadingEdge(), t_trail = digi.getTrailingEdge();
60 if ( t_lead == 0 && t_trail == 0 )
63 double tot = -1., ch_t_twc = 0.;
64 if ( t_lead != 0 && t_trail != 0 ) {
68 ch_t_twc =
calib_fct_->evaluate( std::vector<double>{ tot }, ch_params );
74 const int time_slice = ( t_lead != 0 )
79 const double t0 = ( t_lead % 1024 )*
ts_to_ns_-ch_t_twc;
83 x_pos, x_width, y_pos, y_width, z_pos, z_width,
85 t0, tot, ch_t_precis, time_slice,
87 digi.getHPTDCErrorFlags(),
Translation translation() const
void build(const CTPPSGeometry &, const edm::DetSetVector< CTPPSDiamondDigi > &, edm::DetSetVector< CTPPSDiamondRecHit > &)
constexpr bool isNotFinite(T x)
PPSTimingCalibration calib_
const std::string & formula() const
static unsigned short MAX_CHANNEL
double timeOffset(int key1, int key2, int key3, int key4=-1) const
static std::string const input
reference find_or_insert(det_id_type id)
std::vector< double > parameters(int key1, int key2, int key3, int key4) const
const DetGeomDesc * getSensor(unsigned int id) const
returns geometry of a detector performs necessary checks, returns NULL if fails
MVATrainerComputer * calib
decltype(auto) emplace_back(Args &&...args)
double ts_to_ns_
Conversion constant between HPTDC time slice and absolute time (in ns)
Geometrical description of a sensor.
The manager class for TOTEM RP geometry.
std::unique_ptr< reco::FormulaEvaluator > calib_fct_
void setCalibration(const PPSTimingCalibration &)
float parentZPosition() const
static constexpr int TIMESLICE_WITHOUT_LEADING
std::vector< double > params() const
CTPPSDiamondRecHitProducerAlgorithm(const edm::ParameterSet &conf)
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
double timePrecision(int key1, int key2, int key3, int key4=-1) const