Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:01

0001 /****************************************************************************
0002  *
0003  * This is a part of CTPPS offline software.
0004  * Authors:
0005  *   Laurent Forthomme (laurent.forthomme@cern.ch)
0006  *   Nicola Minafra (nicola.minafra@cern.ch)
0007  *
0008  ****************************************************************************/
0009 
0010 #ifndef DataFormats_CTPPSReco_TotemTimingRecHit
0011 #define DataFormats_CTPPSReco_TotemTimingRecHit
0012 
0013 #include "DataFormats/CTPPSReco/interface/CTPPSTimingRecHit.h"
0014 
0015 /// Reconstructed hit in Totem UFSDetectors.
0016 /// \note t: time computed using algorithm timingAlgorithm()
0017 class TotemTimingRecHit : public CTPPSTimingRecHit {
0018 public:
0019   enum TimingAlgorithm { NOT_SET, CFD, SMART, SIMPLE };
0020   static constexpr int NO_T_AVAILABLE = -100;
0021 
0022   TotemTimingRecHit()
0023       : CTPPSTimingRecHit(), sampicThresholdTime_(0), tPrecision_(0), amplitude_(0), baselineRMS_(0), mode_(NOT_SET) {}
0024 
0025   TotemTimingRecHit(float x,
0026                     float xWidth,
0027                     float y,
0028                     float yWidth,
0029                     float z,
0030                     float zWidth,
0031                     float t,
0032                     float sampicThresholdTime,
0033                     float tPrecision,
0034                     float amplitude,
0035                     float baselineRMS,
0036                     TimingAlgorithm mode)
0037       : CTPPSTimingRecHit(x, xWidth, y, yWidth, z, zWidth, t),
0038         sampicThresholdTime_(sampicThresholdTime),
0039         tPrecision_(tPrecision),
0040         amplitude_(amplitude),
0041         baselineRMS_(baselineRMS),
0042         mode_(mode) {}
0043 
0044   inline void setSampicThresholdTime(float stt) { sampicThresholdTime_ = stt; }
0045   inline float sampicThresholdTime() const { return sampicThresholdTime_; }
0046 
0047   inline void setTPrecision(float tPrecision) { tPrecision_ = tPrecision; }
0048   inline float tPrecision() const { return tPrecision_; }
0049 
0050   inline void setAmplitude(float amplitude) { amplitude_ = amplitude; }
0051   inline float amplitude() const { return amplitude_; }
0052 
0053   inline void setBaselineRMS(float brms) { baselineRMS_ = brms; }
0054   inline float baselineRMS() const { return baselineRMS_; }
0055 
0056   inline TimingAlgorithm timingAlgorithm() const { return mode_; }
0057 
0058 private:
0059   float sampicThresholdTime_, tPrecision_;
0060   float amplitude_;
0061   float baselineRMS_;
0062   TimingAlgorithm mode_;
0063 };
0064 
0065 #endif