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  *
8  ****************************************************************************/
9 
10 #ifndef RecoPPS_Local_TotemTimingRecHitProducerAlgorithm
11 #define RecoPPS_Local_TotemTimingRecHitProducerAlgorithm
12 
14 
16 
20 
23 
25 
26 #include <memory>
27 
29 public:
31 
34 
35 private:
36  struct RegressionResults {
37  float m, q, rms;
38  RegressionResults() : m(0.), q(0.), rms(0.) {}
39  };
40 
41  RegressionResults simplifiedLinearRegression(const std::vector<float>& time,
42  const std::vector<float>& data,
43  const unsigned int start_at,
44  const unsigned int points) const;
45 
46  int fastDiscriminator(const std::vector<float>& data, float threshold) const;
47 
48  float constantFractionDiscriminator(const std::vector<float>& time, const std::vector<float>& data);
49 
50  static constexpr float SINC_COEFFICIENT = M_PI * 2 / 7.8;
51 
52  std::unique_ptr<TotemTimingConversions> sampicConversions_;
53 
54  bool mergeTimePeaks_;
55  int baselinePoints_;
57  double cfdFraction_;
59  double lowPassFrequency_;
60  double hysteresis_;
62 };
63 
64 #endif
TotemTimingRecHitProducerAlgorithm::constantFractionDiscriminator
float constantFractionDiscriminator(const std::vector< float > &time, const std::vector< float > &data)
Definition: TotemTimingRecHitProducerAlgorithm.cc:174
edm::DetSetVector
Definition: DetSetVector.h:61
TotemTimingRecHitProducerAlgorithm::RegressionResults::rms
float rms
Definition: TotemTimingRecHitProducerAlgorithm.h:43
TotemTimingRecHitProducerAlgorithm::RegressionResults::q
float q
Definition: TotemTimingRecHitProducerAlgorithm.h:43
CTPPSGeometry
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:29
TotemTimingRecHitProducerAlgorithm
Definition: TotemTimingRecHitProducerAlgorithm.h:28
TotemTimingRecHitProducerAlgorithm::build
void build(const CTPPSGeometry &, const edm::DetSetVector< TotemTimingDigi > &, edm::DetSetVector< TotemTimingRecHit > &)
Definition: TotemTimingRecHitProducerAlgorithm.cc:36
HLT_FULL_cff.points
points
Definition: HLT_FULL_cff.py:21469
TotemTimingRecHitProducerAlgorithm::mergeTimePeaks_
bool mergeTimePeaks_
Definition: TotemTimingRecHitProducerAlgorithm.h:60
TotemTimingRecHitProducerAlgorithm::TotemTimingRecHitProducerAlgorithm
TotemTimingRecHitProducerAlgorithm(const edm::ParameterSet &conf)
Definition: TotemTimingRecHitProducerAlgorithm.cc:19
TotemTimingDigi.h
TotemTimingRecHitProducerAlgorithm::RegressionResults::m
float m
Definition: TotemTimingRecHitProducerAlgorithm.h:43
protons_cff.time
time
Definition: protons_cff.py:35
TotemTimingRecHit.h
TotemTimingRecHitProducerAlgorithm::smoothingPoints_
int smoothingPoints_
Definition: TotemTimingRecHitProducerAlgorithm.h:64
TotemTimingRecHitProducerAlgorithm::sampicConversions_
std::unique_ptr< TotemTimingConversions > sampicConversions_
Definition: TotemTimingRecHitProducerAlgorithm.h:58
TotemTimingRecHitProducerAlgorithm::baselinePoints_
int baselinePoints_
Definition: TotemTimingRecHitProducerAlgorithm.h:61
CTPPSGeometry.h
TotemTimingRecHitProducerAlgorithm::setCalibration
void setCalibration(const PPSTimingCalibration &)
Definition: TotemTimingRecHitProducerAlgorithm.cc:30
TotemTimingDetId.h
TotemTimingRecHitProducerAlgorithm::mode_
TotemTimingRecHit::TimingAlgorithm mode_
Definition: TotemTimingRecHitProducerAlgorithm.h:67
TotemTimingRecHitProducerAlgorithm::fastDiscriminator
int fastDiscriminator(const std::vector< float > &data, float threshold) const
Definition: TotemTimingRecHitProducerAlgorithm.cc:144
TotemTimingRecHitProducerAlgorithm::RegressionResults::RegressionResults
RegressionResults()
Definition: TotemTimingRecHitProducerAlgorithm.h:44
edm::ParameterSet
Definition: ParameterSet.h:47
TotemTimingRecHitProducerAlgorithm::RegressionResults
Definition: TotemTimingRecHitProducerAlgorithm.h:42
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
TotemTimingRecHitProducerAlgorithm::lowPassFrequency_
double lowPassFrequency_
Definition: TotemTimingRecHitProducerAlgorithm.h:65
TotemTimingRecHit::TimingAlgorithm
TimingAlgorithm
Definition: TotemTimingRecHit.h:24
DetSetVector.h
TotemTimingRecHitProducerAlgorithm::saturationLimit_
double saturationLimit_
Definition: TotemTimingRecHitProducerAlgorithm.h:62
PPSTimingCalibration.h
TotemTimingConversions.h
TotemTimingRecHitProducerAlgorithm::cfdFraction_
double cfdFraction_
Definition: TotemTimingRecHitProducerAlgorithm.h:63
TotemTimingRecHitProducerAlgorithm::hysteresis_
double hysteresis_
Definition: TotemTimingRecHitProducerAlgorithm.h:66
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
PPSTimingCalibration
Definition: PPSTimingCalibration.h:17
ParameterSet.h
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:430
TotemTimingRecHitProducerAlgorithm::SINC_COEFFICIENT
static constexpr float SINC_COEFFICIENT
Definition: TotemTimingRecHitProducerAlgorithm.h:56
TotemTimingRecHitProducerAlgorithm::simplifiedLinearRegression
RegressionResults simplifiedLinearRegression(const std::vector< float > &time, const std::vector< float > &data, const unsigned int start_at, const unsigned int points) const
Definition: TotemTimingRecHitProducerAlgorithm.cc:105