ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetConditions
TRT_ConditionsData
src
DinesRtRelation.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TRT_ConditionsData/DinesRtRelation.h
"
6
//comment
7
namespace
TRTCond
8
{
9
10
DinesRtRelation
&
DinesRtRelation::operator=
(
const
DinesRtRelation
& rhs)
11
{
12
if
(
this
!= &rhs){
13
m_status
= rhs.
m_status
;
14
set
(rhs.
m_cal
) ;
15
}
16
return
*this ;
17
}
18
19
20
float
DinesRtRelation::radius
(
float
time )
const
21
{
22
double
rmin0 =
m_cal
[0];
23
double
rho =
m_cal
[1];
24
double
v =
m_cal
[2];
25
double
t_const =
m_cal
[3];
// tw-t0
26
double
r_squared = (4*rho*rho*std::sin(v*(time-t_const)/(2*rho))-rmin0*rmin0)/(1-0.25*rmin0*rmin0);
27
double
r
= 0;
28
if
(r_squared>0)
r
= std::sqrt(r_squared);
29
30
return
r
;
31
}
32
33
float
DinesRtRelation::drdt
(
float
time )
const
34
{
35
double
rmin0 =
m_cal
[0];
36
double
rho =
m_cal
[1];
37
double
v =
m_cal
[2];
38
double
t_const =
m_cal
[3];
// tw-t0
39
40
41
double
drdt
=
42
0.5/std::sqrt((4*rho*rho*std::sin(v*(time-t_const)/(2*rho))*std::sin(v*(time-t_const)/(2*rho))-rmin0*rmin0)/(1-0.25*rmin0*rmin0))*
43
4*rho*rho/(1-0.25*rmin0*rmin0)*
44
2*std::sin(v*(time-t_const)/(2*rho))*
45
std::cos(v*(time-t_const)/(2*rho))*
46
v/(2*rho);
47
48
return
drdt
;
49
50
}
51
52
float
DinesRtRelation::drifttime
(
float
r
)
const
53
{
54
double
rmin0 =
m_cal
[0];
55
double
rho =
m_cal
[1];
56
double
v =
m_cal
[2];
57
double
t_const =
m_cal
[3];
// tw-t0
58
double
t = t_const + 2*rho/v*std::asin(std::sqrt(rmin0*rmin0*(1-0.25*
r
*
r
)+
r
*
r
)/(2*rho));
59
60
return
t;
61
}
62
63
64
bool
DinesRtRelation::isequal
(
const
RtRelation
& rhs)
const
65
{
66
const
DinesRtRelation
* rhsp =
dynamic_cast<
const
DinesRtRelation
*
>
(&rhs) ;
67
return
rhsp && (*rhsp)==*this ;
68
}
69
70
71
std::ostream&
DinesRtRelation::write
( std::ostream& os )
const
72
{
73
return
os <<
m_cal
[0] <<
" "
<<
m_cal
[1] <<
" "
74
<<
m_cal
[2] <<
" "
<<
m_cal
[3] <<
" "
;
75
}
76
77
std::istream&
DinesRtRelation::read
( std::istream& is )
78
{
79
return
is >>
m_cal
[0] >>
m_cal
[1] >>
m_cal
[2] >>
m_cal
[3] ;
80
}
81
}
DinesRtRelation.h
TRTCond::DinesRtRelation::radius
virtual float radius(float driftime) const
radius for given drifttime
Definition
DinesRtRelation.cxx:20
TRTCond::DinesRtRelation::isequal
virtual bool isequal(const RtRelation &rhs) const
equality operator
Definition
DinesRtRelation.cxx:64
TRTCond::DinesRtRelation::m_cal
float m_cal[4]
calibration constants
Definition
DinesRtRelation.h:87
TRTCond::DinesRtRelation::DinesRtRelation
DinesRtRelation()
constructor
Definition
DinesRtRelation.h:29
TRTCond::DinesRtRelation::operator=
DinesRtRelation & operator=(const DinesRtRelation &rhs)
assignment operator
Definition
DinesRtRelation.cxx:10
TRTCond::DinesRtRelation::write
virtual std::ostream & write(std::ostream &) const
write to ascii ostream
Definition
DinesRtRelation.cxx:71
TRTCond::DinesRtRelation::m_status
unsigned char m_status
status byte
Definition
DinesRtRelation.h:86
TRTCond::DinesRtRelation::set
void set(const float *cal)
set the calibration constants
Definition
DinesRtRelation.h:83
TRTCond::DinesRtRelation::drdt
virtual float drdt(float driftime) const
driftvelocity for given drifttime
Definition
DinesRtRelation.cxx:33
TRTCond::DinesRtRelation::read
virtual std::istream & read(std::istream &)
read from to ascii ostream
Definition
DinesRtRelation.cxx:77
TRTCond::DinesRtRelation::drifttime
virtual float drifttime(float radius) const
drifttime for given radius
Definition
DinesRtRelation.cxx:52
TRTCond::RtRelation::RtRelation
RtRelation()=default
constructors, desctructors, cloners
r
int r
Definition
globals.cxx:22
TRTCond
Definition
BasicRtRelation.cxx:8
Generated on
for ATLAS Offline Software by
1.17.0