ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
IRtRelation.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCALIB_IRTRELATION_H
6 #define MUONCALIB_IRTRELATION_H
7 
11 
12 #include <optional>
13 
14 namespace MuonCalib {
15 
16  class IRtRelation;
19  class IRtRelation : public CalibFunc {
20  public:
22  virtual ~IRtRelation() = default;
23  virtual std::string typeName() const override final { return "IRtRelation"; }
24 
26  virtual double radius(double t) const = 0;
28  virtual double driftVelocity(double t) const = 0;
30  virtual double driftAcceleration(double t) const = 0;
32  virtual double tLower() const = 0;
34  virtual double tUpper() const = 0;
36  virtual double tBinWidth() const =0;
38  virtual unsigned nDoF() const = 0;
40  double GetTmaxDiff() const { return m_tmax_diff.value_or(0.); }
41 
42  bool hasTmaxDiff() const { return m_tmax_diff.has_value(); }
43 
45  void SetTmaxDiff(const double d) { m_tmax_diff = d; }
46 
49  double getReducedTime(const double t) const {
50  return mapToUnitInterval(t, tLower(), tUpper());
51  }
52  /* @brief Returns the derivative term of the reduced time w.r.t. the time*/
53  double dReducedTimeDt() const {
54  return unitIntervalPrime(tLower(), tUpper());
55  }
56 
57  private:
58  std::optional<double> m_tmax_diff{std::nullopt};
59  protected:
60  static constexpr double s_tBinWidth = 1.e-3;
61  };
62 
63 } // namespace MuonCalib
64 
65 #endif
GeoModel::TransientConstSharedPtr< IRtRelation >
hist_file_dump.d
d
Definition: hist_file_dump.py:143
MuonCalib::IRtRelation::hasTmaxDiff
bool hasTmaxDiff() const
Definition: IRtRelation.h:42
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonCalib::IRtRelation::SetTmaxDiff
void SetTmaxDiff(const double d)
set the difference in total drift time betwene the two multilayers (ML1 - ML2)
Definition: IRtRelation.h:45
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
MuonCalib::IRtRelation::typeName
virtual std::string typeName() const override final
Definition: IRtRelation.h:23
MuonCalib::IRtRelation::driftAcceleration
virtual double driftAcceleration(double t) const =0
Returns the acceleration of the r-t relation.
UtilFunc.h
MuonCalib::unitIntervalPrime
double unitIntervalPrime(const double lowerEdge, const double upperEdge)
Definition: UtilFunc.h:15
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::IRtRelation::~IRtRelation
virtual ~IRtRelation()=default
MuonCalib::IRtRelation::tUpper
virtual double tUpper() const =0
Returns the upper time covered by the r-t.
MuonCalib::IRtRelation::s_tBinWidth
static constexpr double s_tBinWidth
Definition: IRtRelation.h:60
MuonCalib::IRtRelation::radius
virtual double radius(double t) const =0
returns drift radius for a given time
MuonCalib::IRtRelation::driftVelocity
virtual double driftVelocity(double t) const =0
Returns the drift velocity for a given time.
MuonCalib::IRtRelation::m_tmax_diff
std::optional< double > m_tmax_diff
Definition: IRtRelation.h:58
MuonCalib::IRtRelation::tLower
virtual double tLower() const =0
Returns the lower time covered by the r-t.
TransientConstSharedPtr.h
MuonCalib::IRtRelation::dReducedTimeDt
double dReducedTimeDt() const
Definition: IRtRelation.h:53
MuonCalib::IRtRelation::GetTmaxDiff
double GetTmaxDiff() const
return the difference in total dirft time between the two multilayers (ML1 - ML2)
Definition: IRtRelation.h:40
MuonCalib::mapToUnitInterval
double mapToUnitInterval(const double x, const double lowerEdge, const double upperEdge)
Maps the number x which is in [lowEdge;upperEdge] to the interval [-1;1].
Definition: UtilFunc.h:12
MuonCalib::IRtRelation::tBinWidth
virtual double tBinWidth() const =0
Returns the step-size for the sampling.
MuonCalib::IRtRelation::nDoF
virtual unsigned nDoF() const =0
Returns the number of degrees of freedom of the relation function
MuonCalib::IRtRelation::getReducedTime
double getReducedTime(const double t) const
map the in the interval [tLower;tUpper] onto the interval [-1.
Definition: IRtRelation.h:49
MuonCalib::IRtRelation
generic interface for a rt-relation
Definition: IRtRelation.h:19
MuonCalib::CalibFunc
generic interface for a calibration function.
Definition: CalibFunc.h:33
CalibFunc.h
MuonCalib::CalibFunc::CalibFunc
CalibFunc(const ParVec &vec)
Definition: CalibFunc.h:36