|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "GaudiKernel/MsgStream.h"
40 log << MSG::ERROR <<
"Wrong number of parameters!" <<
endmsg;
48 unsigned int nb_points(31);
60 fitter.set_number_of_coefficients(8);
65 fitter.set_number_of_coefficients(8);
70 fitter.set_number_of_coefficients(8);
75 std::vector<SamplePoint> sample_points(nb_points);
88 log << MSG::INFO <<
"UNPHYSICAL MAXIMUM DRIFT RADIUS OF " <<
m_r_max <<
", WILL BE SET TO 17.0!" <<
endmsg;
95 double prev_integral = 0;
96 for (
unsigned int k = 0;
k < nb_points;
k++) {
100 double new_integral = 1.0e9 *
integral(prev_r, new_r, rt) + prev_integral;
101 sample_points[
k].set_x2(new_integral);
102 sample_points[
k].set_error(1.0);
104 prev_integral = new_integral;
108 if (
fitter.fit_parameters(sample_points, 1, nb_points, &legendre)) {
110 log << MSG::WARNING <<
"Unable to fit the integral in the correction!" <<
endmsg;
133 double precision(0.010);
141 double t_guess, r_guess;
144 t_guess = t_min + (t_max - t_min) / (r_max - r_min) * (
r - r_min);
145 r_guess = rt->
radius(t_guess);
153 }
while (t_max - t_min > 0.1 && std::abs(r_guess -
r) > precision);
179 if (r_max < r_min) {
return 0.0; }
243 double B_perp(std::hypot(B_wire, B_mu));
246 double precision(0.1);
267 while (t_max - t_min > precision) {
272 if (0.5 * (t_min + t_max) + B_factor * integ >
time) {
273 t_max = 0.5 * (t_min + t_max);
275 t_min = 0.5 * (t_min + t_max);
279 return B_factor * integ;
293 double B_perp(std::hypot(B_wire, B_mu));
314 return B_factor * integ;
const ShapeFitter * fitter
double correction(double t, double B_wire, double B_mu) const
get t(r, !=0)-t(r, =0); t = drift time t [ns] for B=0; B_wire = magnetic field parallel to the anode ...
singleton-like access to IMessageSvc via open function and helper
void init(const std::string &quality, const CalibFunc::ParVec ¶ms, const IRtRelation *rt)
static const Legendre_polynomial * get_Legendre_polynomial(void)
get a pointer to the Legendre polynomial
double correction_to_B(double t, double B_wire, double B_mu, double B_factor=-1.0) const
IMessageSvc * getMessageSvc(bool quiet=false)
double integral(const double &r_min, const double &r_max, const IRtRelation *rt) const
std::string name() const
get the class name
std::vector< double > ParVec
virtual double driftvelocity(double t) const =0
double epsilon() const
< get the parameter of the B-field correction function
double value(const int &order, const double &x) const
get the value of the Legendre polynomial of order m_order at x
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
double t_from_r(const double &r, const IRtRelation *rt) const
virtual double radius(double t) const =0
returns drift radius for a given time
def time(flags, cells_name, *args, **kw)
const Legendre_polynomial * m_Legendre
std::vector< double > m_param
void setRtRelationship(const IRtRelation &rt)
< set the parameter of the B-field correction function = eps
generic interface for a rt-relation