ATLAS Offline Software
RtRelationLookUp.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_RTRELATIONLOOKUP_H
6 #define MUONCALIB_RTRELATIONLOOKUP_H
7 
8 #include <climits>
9 #include <iostream>
10 
11 
13 
14 namespace MuonCalib {
15 
23  class RtRelationLookUp : public IRtRelation {
24  public:
25  explicit RtRelationLookUp(const ParVec &vec);
26 
27  virtual std::string name() const override final { return "RtRelationLookUp"; }
28 
30  virtual double radius(double t) const override final;
31 
33  virtual double driftVelocity(double t) const override final;
35  virtual double driftAcceleration(double t) const override final;
36 
38  virtual double tLower() const override final;
39  virtual double tUpper() const override final;
40  virtual double tBinWidth() const override final;
41  private:
42  int getBin(double t) const;
43 
44  // take offset due to m_t_min and binsize into account
45  int rtBins() const { return nPar() - 2; }
46  double getRadius(int bin) const { return par(bin + 2); }
47  // returns best matching bin within rtRange
48  int binInRtRange(double t) const;
49 
50  double m_t_min{0.};
51  double m_bin_size{0.};
52  };
53 
54 
55 
56 } // namespace MuonCalib
57 #endif
MuonCalib::RtRelationLookUp::binInRtRange
int binInRtRange(double t) const
Definition: RtRelationLookUp.cxx:72
MuonCalib::RtRelationLookUp::getBin
int getBin(double t) const
Definition: RtRelationLookUp.cxx:26
MuonCalib::RtRelationLookUp::RtRelationLookUp
RtRelationLookUp(const ParVec &vec)
Definition: RtRelationLookUp.cxx:10
bin
Definition: BinsDiffFromStripMedian.h:43
MuonCalib::RtRelationLookUp::tUpper
virtual double tUpper() const override final
Returns the upper time covered by the r-t.
Definition: RtRelationLookUp.cxx:86
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
MuonCalib::RtRelationLookUp::getRadius
double getRadius(int bin) const
Definition: RtRelationLookUp.h:46
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
MuonCalib::RtRelationLookUp
Equidistant look up table for rt-relations with the time as key.
Definition: RtRelationLookUp.h:23
MuonCalib::RtRelationLookUp::radius
virtual double radius(double t) const override final
returns drift radius for a given time
Definition: RtRelationLookUp.cxx:34
MuonCalib::RtRelationLookUp::m_bin_size
double m_bin_size
Definition: RtRelationLookUp.h:51
MuonCalib::CalibFunc::par
double par(unsigned int index) const
Definition: CalibFunc.h:41
MuonCalib::RtRelationLookUp::tLower
virtual double tLower() const override final
return rt range
Definition: RtRelationLookUp.cxx:85
MuonCalib::RtRelationLookUp::driftVelocity
virtual double driftVelocity(double t) const override final
returns drift velocity for a given time
Definition: RtRelationLookUp.cxx:53
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::CalibFunc::ParVec
std::vector< double > ParVec
Definition: CalibFunc.h:35
MuonCalib::RtRelationLookUp::m_t_min
double m_t_min
Definition: RtRelationLookUp.h:50
MuonCalib::RtRelationLookUp::driftAcceleration
virtual double driftAcceleration(double t) const override final
returns the acceleration for a given time
Definition: RtRelationLookUp.cxx:68
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
MuonCalib::RtRelationLookUp::tBinWidth
virtual double tBinWidth() const override final
Returns the step-size for the sampling.
Definition: RtRelationLookUp.cxx:87
IRtRelation.h
MuonCalib::CalibFunc::nPar
unsigned int nPar() const
Definition: CalibFunc.h:39
MuonCalib::RtRelationLookUp::name
virtual std::string name() const override final
Definition: RtRelationLookUp.h:27
MuonCalib::RtRelationLookUp::rtBins
int rtBins() const
Definition: RtRelationLookUp.h:45
MuonCalib::IRtRelation
generic interface for a rt-relation
Definition: IRtRelation.h:15