ATLAS Offline Software
CaloTTDescrRegion.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  Calorimeter LVL1 TT description package
7  -----------------------------------------
8  ***************************************************************************/
9 
10 //<doc><file> $Id: CaloTTDescrRegion.cxx,v 1.6 2006-07-21 12:39:15 fledroit Exp $
11 //<version> $Name: not supported by cvs2svn $
12 
13 //<<<<<< INCLUDES >>>>>>
14 
16 #include <iostream>
17 
18 //<<<<<< MEMBER FUNCTION DEFINITIONS >>>>>>
19 
20 
23 {
24  return m_id;
25 }
26 
27 void
29  double phi,
30  double rho)
31 {
32  m_eta = eta ;
33  m_phi= phi;
34  m_rho = rho;
35 
36  // from this recompute cartesian coordinates
37  m_x = m_rho*cos(m_phi);
38  m_y = m_rho*sin(m_phi);
39  m_z = m_rho*sinh(m_eta);
40 
41  }
42 
43 void
45  double dphi,
46  double drho )
47 {
48  m_deta = deta;
49  m_dphi = dphi;
50  m_drho = drho;
51 
52  // from this recompute size in cartesian... to be completed !!!
53 
54  double dx = 0.;
55  double dy = 0.;
56  double dz = 0.;
57  if(m_rho < 1600) {
58  dz = m_drho * fabs(sinh(m_eta)) + m_deta * m_rho * cosh(m_eta);
59  } else {
60  dz = m_drho * fabs(sinh(m_eta));
61  }
62 
63  m_dx = fabs(dx);
64  m_dy = fabs(dy);
65  m_dz = fabs(dz);
66 
67  }
68 
69 void
71  double phi,
72  double z)
73 {
74  m_eta = eta ;
75  m_phi = phi;
76  m_z = z;
77 
78  // from this recompute complementary set of coordinates
79  m_rho = m_z/sinh(m_eta);
80  m_x = m_rho*cos(m_phi);
81  m_y = m_rho*sin(m_phi);
82 
83  }
84 
85 void
87  double dphi,
88  double dz )
89 {
90  m_deta = deta;
91  m_dphi = dphi;
92  m_dz = dz;
93 
94  // from this recompute size in complementary set of coord. ... to be completed !!!
95 
96  double dx = 0.;
97  double dy = 0.;
98  double drho = (-m_z*cosh(m_eta)/sinh(m_eta)*m_deta
99  +m_dz) / sinh(m_eta);
100 
101  m_dx = fabs(dx);
102  m_dy = fabs(dy);
103  m_drho = fabs(drho);
104 
105  }
106 
107 void
109  double y,
110  double z )
111 {
112  m_x = x;
113  m_y = y;
114  m_z = z;
115 
116  // from this recompute (semi)spherical coordinates
117  m_rho = sqrt ( m_x*m_x+m_y*m_y) ;
118  double big_r = sqrt(m_x*m_x+m_y*m_y+m_z*m_z);
119  m_eta = 0.5*log((big_r+m_z)/(big_r-m_z));
120  m_phi = atan2(m_y,m_x);
121 }
122 
123 void
125  double dy,
126  double dz )
127 {
128  m_dx = dx;
129  m_dy = dy;
130  m_dz = dz;
131 
132  // from this recompute size in (semi)spherical... TBD !!!
133  m_deta = 0.;
134  m_dphi = 0.;
135  m_drho = 0.;
136 }
137 
138 void
140 {
141 
142  std::cout << std::endl << " CaloTTDescrRegion print: "
143  << std::endl << std::endl;
144 
145  m_id.show();
146  m_descriptor->print();
147 }
148 
CaloTTDescrRegion::set_cartesian_size
void set_cartesian_size(double dx, double dy, double dz)
set size of the Det Descr region – cartesian system; all signed
Definition: CaloTTDescrRegion.cxx:124
CaloTTDescrRegion::m_id
Identifier m_id
Definition: CaloTTDescrRegion.h:128
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
CaloTTDescrRegion::m_dy
double m_dy
Definition: CaloTTDescrRegion.h:145
CaloTTDescriptor::print
void print() const
Print.
Definition: CaloTTDescriptor.cxx:42
CaloTTDescrRegion::m_deta
double m_deta
Definition: CaloTTDescrRegion.h:136
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
CaloTTDescrRegion::dx
double dx() const
return size in x (unsigned)
Definition: CaloTTDescrRegion.h:214
CaloTTDescrRegion::m_x
double m_x
Definition: CaloTTDescrRegion.h:141
CaloTTDescrRegion.h
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
x
#define x
CaloTTDescrRegion::set_spherical
void set_spherical(double eta, double phi, double rho)
set coordinates of the Det Descr region – pseudo spherical system; eta is signed, rho is unsigned
Definition: CaloTTDescrRegion.cxx:28
CaloTTDescrRegion::phi
double phi() const
return coordinateof the Det Descr Region: phi
Definition: CaloTTDescrRegion.h:197
CaloTTDescrRegion::x
double x() const
return coordinateof the Det Descr Region: x (signed)
Definition: CaloTTDescrRegion.h:208
CaloTTDescrRegion::m_eta
double m_eta
Definition: CaloTTDescrRegion.h:133
CaloTTDescrRegion::rho
double rho() const
return coordinateof the Det Descr Region: rho (unsigned)
Definition: CaloTTDescrRegion.h:199
CaloTTDescrRegion::print
void print() const
Definition: CaloTTDescrRegion.cxx:139
CaloTTDescrRegion::m_dphi
double m_dphi
Definition: CaloTTDescrRegion.h:137
CaloTTDescrRegion::m_dz
double m_dz
Definition: CaloTTDescrRegion.h:146
CaloTTDescrRegion::m_phi
double m_phi
Definition: CaloTTDescrRegion.h:134
CaloTTDescrRegion::dy
double dy() const
return size in y (unsigned)
Definition: CaloTTDescrRegion.h:216
CaloTTDescrRegion::dphi
double dphi() const
return size in eta (unsigned)
Definition: CaloTTDescrRegion.h:203
z
#define z
CaloTTDescrRegion::set_cartesian
void set_cartesian(double x, double y, double z)
set coordinates of the Det Descr region – cartesian system; all signed
Definition: CaloTTDescrRegion.cxx:108
CaloTTDescrRegion::y
double y() const
return coordinateof the Det Descr Region: y (signed)
Definition: CaloTTDescrRegion.h:210
CaloTTDescrRegion::set_cylindric_size
void set_cylindric_size(double deta, double dphi, double dz)
set size of the Det Descr region – pseudo cylindrical system; eta is signed, z as well (same sign)
Definition: CaloTTDescrRegion.cxx:86
CaloTTDescrRegion::identify
virtual Identifier identify() const
Definition: CaloTTDescrRegion.cxx:22
Identifier::show
void show() const
Print out in hex form.
Definition: Identifier.cxx:30
CaloTTDescrRegion::set_cylindric
void set_cylindric(double eta, double phi, double z)
set coordinates of the Det Descr region – pseudo cylindrical system; eta is signed,...
Definition: CaloTTDescrRegion.cxx:70
CaloTTDescrRegion::m_y
double m_y
Definition: CaloTTDescrRegion.h:142
CaloTTDescrRegion::set_spherical_size
void set_spherical_size(double deta, double dphi, double drho)
set size of the Det Descr region – pseudo spherical system; eta is signed, rho is unsigned
Definition: CaloTTDescrRegion.cxx:44
CaloTTDescrRegion::m_descriptor
const descriptor_type * m_descriptor
Definition: CaloTTDescrRegion.h:130
CaloTTDescrRegion::m_z
double m_z
Definition: CaloTTDescrRegion.h:143
CaloTTDescrRegion::dz
double dz() const
return size in z (unsigned)
Definition: CaloTTDescrRegion.h:218
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
y
#define y
CaloTTDescrRegion::drho
double drho() const
return size in rho (unsigned)
Definition: CaloTTDescrRegion.h:205
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CaloTTDescrRegion::eta
double eta() const
return coordinateof the Det Descr Region: eta (signed)
Definition: CaloTTDescrRegion.h:195
CaloTTDescrRegion::m_rho
double m_rho
Definition: CaloTTDescrRegion.h:135
CaloTTDescrRegion::z
double z() const
return coordinateof the Det Descr Region: z (signed)
Definition: CaloTTDescrRegion.h:212
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
CaloTTDescrRegion::deta
double deta() const
return size in phi (unsigned)
Definition: CaloTTDescrRegion.h:201
CaloTTDescrRegion::m_dx
double m_dx
Definition: CaloTTDescrRegion.h:144
fitman.rho
rho
Definition: fitman.py:532
CaloTTDescrRegion::m_drho
double m_drho
Definition: CaloTTDescrRegion.h:138
Identifier
Definition: IdentifierFieldParser.cxx:14