CMS 3D CMS Logo

TotemTimingRecHitProducerAlgorithm.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * This is a part of CTPPS offline software.
4  * Authors:
5  * Laurent Forthomme (laurent.forthomme@cern.ch)
6  * Nicola Minafra
7  * Christopher Misan (krzysztof.misan@cern.ch)
8  *
9  ****************************************************************************/
10 
11 #ifndef RecoPPS_Local_TotemTimingRecHitProducerAlgorithm
12 #define RecoPPS_Local_TotemTimingRecHitProducerAlgorithm
13 
15 
19 
21 
22 #include <memory>
23 
26  edm::DetSetVector<TotemTimingDigi>,
27  edm::DetSetVector<TotemTimingRecHit> > {
28 public:
30 
32  void build(const CTPPSGeometry&,
35 
36 private:
38  float m, q, rms;
39  RegressionResults() : m(0.), q(0.), rms(0.) {}
40  };
41 
42  RegressionResults simplifiedLinearRegression(const std::vector<float>& time,
43  const std::vector<float>& data,
44  const unsigned int start_at,
45  const unsigned int points) const;
46 
47  int fastDiscriminator(const std::vector<float>& data, float threshold) const;
48 
49  float constantFractionDiscriminator(const std::vector<float>& time, const std::vector<float>& data);
50 
51  static constexpr float SINC_COEFFICIENT = M_PI * 2 / 7.8;
52 
53  std::unique_ptr<TotemTimingConversions> sampicConversions_;
54 
58  double cfdFraction_;
61  double hysteresis_;
62  double sampicOffset_;
65 };
66 
67 #endif
RegressionResults simplifiedLinearRegression(const std::vector< float > &time, const std::vector< float > &data, const unsigned int start_at, const unsigned int points) const
float constantFractionDiscriminator(const std::vector< float > &time, const std::vector< float > &data)
#define M_PI
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:30
void build(const CTPPSGeometry &, const edm::DetSetVector< TotemTimingDigi > &, edm::DetSetVector< TotemTimingRecHit > &) override
std::unique_ptr< TotemTimingConversions > sampicConversions_
void setCalibration(const PPSTimingCalibration &)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
int fastDiscriminator(const std::vector< float > &data, float threshold) const