ATLAS Offline Software
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
MuonCalibR4::TrSqrt Class Reference

#include <TrSqrt.h>

Inheritance diagram for MuonCalibR4::TrSqrt:
Collaboration diagram for MuonCalibR4::TrSqrt:

Public Member Functions

 TrSqrt (const MuonCalib::IRtRelation &rt)
 
double tFromR (const double r, bool &out_of_bound_flag) const
 
double rFromT (const double t, bool &out_of_bound_flag) const
 

Static Private Member Functions

static double getTFromR (const double r, const IRtRelation &input_rt)
 

Private Attributes

std::vector< double > m_r
 
std::vector< double > m_t
 

Detailed Description

Definition at line 10 of file TrSqrt.h.

Constructor & Destructor Documentation

◆ TrSqrt()

MuonCalibR4::TrSqrt::TrSqrt ( const MuonCalib::IRtRelation rt)
inline

Definition at line 15 of file TrSqrt.h.

15 : TrRelation(rt) {}

Member Function Documentation

◆ getTFromR()

double TrRelation::getTFromR ( const double  r,
const IRtRelation input_rt 
)
staticprivateinherited

Definition at line 128 of file TrRelation.cxx.

128  {
130  // VARIABLES //
132  double precision(0.001); // spatial precision of the inversion
133  double t_max(input_rt.tUpper()); // upper time search limit
134  double t_min(input_rt.tLower()); // lower time search limit
135 
137  // SEARCH FOR THE CORRESPONDING DRIFT TIME //
139  while (t_max - t_min > 0.1 && std::abs(input_rt.radius(0.5 * (t_min + t_max)) - r) > precision) {
140  if (input_rt.radius(0.5 * (t_min + t_max)) > r) {
141  t_max = 0.5 * (t_min + t_max);
142  } else {
143  t_min = 0.5 * (t_min + t_max);
144  }
145  }
146 
147  return 0.5 * (t_min + t_max);
148 } // end TrRelation::getTFromR

◆ rFromT()

double TrSqrt::rFromT ( const double  t,
bool &  out_of_bound_flag 
) const

Definition at line 16 of file TrSqrt.cxx.

16  {
17  return std::sqrt(t);
18 }

◆ tFromR()

double TrSqrt::tFromR ( const double  r,
bool &  out_of_bound_flag 
) const

Definition at line 12 of file TrSqrt.cxx.

12  {
13  return r*r;
14 }

Member Data Documentation

◆ m_r

std::vector<double> MuonCalib::TrRelation::m_r
privateinherited

Definition at line 58 of file TrRelation.h.

◆ m_t

std::vector<double> MuonCalib::TrRelation::m_t
privateinherited

Definition at line 59 of file TrRelation.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:676
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonCalib::TrRelation::TrRelation
TrRelation(const IRtRelation &input_rt)
< Constructor.
Definition: TrRelation.cxx:20
MuonCalib::IRtRelation::tUpper
virtual double tUpper() const =0
Returns the upper time covered by the r-t.
MuonCalib::IRtRelation::radius
virtual double radius(double t) const =0
returns drift radius for a given time
MuonCalib::IRtRelation::tLower
virtual double tLower() const =0
Returns the lower time covered by the r-t.