|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include "GaudiKernel/MsgStream.h"
24 unsigned int nb_points(100);
26 double step_size(input_rt.
radius(input_rt.
tUpper()) /
static_cast<double>(nb_points - 1));
27 m_r = std::vector<double>(nb_points);
28 m_t = std::vector<double>(nb_points);
33 for (
unsigned int k = 0;
k < nb_points;
k++) {
34 m_r[
k] =
k * step_size;
61 out_of_bound_flag =
true;
65 out_of_bound_flag =
true;
66 return m_t[
m_r.size() - 1];
72 for (
unsigned int k = 0;
k <
m_r.size() - 1;
k++) {
75 out_of_bound_flag =
false;
78 out_of_bound_flag =
false;
83 log << MSG::ERROR <<
"Class TrRelation, method tFromR: ERROR!" <<
endmsg;
97 out_of_bound_flag =
true;
101 out_of_bound_flag =
true;
102 return m_r[
m_r.size() - 1];
108 for (
unsigned int k = 0;
k <
m_r.size() - 1;
k++) {
111 out_of_bound_flag =
false;
114 out_of_bound_flag =
false;
119 log << MSG::ERROR <<
"Class TrRelation, method rFromT: ERROR!" <<
endmsg;
132 double precision(0.001);
133 double t_max(input_rt.
tUpper());
134 double t_min(input_rt.
tLower());
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);
143 t_min = 0.5 * (t_min + t_max);
147 return 0.5 * (t_min + t_max);
singleton-like access to IMessageSvc via open function and helper
double tFromR(const double r, bool &out_of_bound_flag) const
< Get t(r). out_of_bound_flag is set to true if r is out of bounds.
IMessageSvc * getMessageSvc(bool quiet=false)
TrRelation(const IRtRelation &input_rt)
< Constructor.
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
virtual double tUpper() const =0
Returns the upper time covered by the r-t.
static double getTFromR(const double r, const IRtRelation &input_rt)
std::vector< double > m_t
virtual double radius(double t) const =0
returns drift radius for a given time
std::vector< double > m_r
virtual double tLower() const =0
Returns the lower time covered by the r-t.
double rFromT(const double t, bool &out_of_bound_flag) const
generic interface for a rt-relation