ATLAS Offline Software
Loading...
Searching...
No Matches
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
27void
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
43void
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
69void
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
85void
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
107void
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
123void
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
138void
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
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
double deta() const
return size in phi (unsigned)
double phi() const
return coordinateof the Det Descr Region: phi
void set_cartesian_size(double dx, double dy, double dz)
set size of the Det Descr region – cartesian system; all signed
void set_cartesian(double x, double y, double z)
set coordinates of the Det Descr region – cartesian system; all signed
double x() const
return coordinateof the Det Descr Region: x (signed)
const descriptor_type * m_descriptor
double eta() const
return coordinateof the Det Descr Region: eta (signed)
virtual Identifier identify() const
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)
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
double dx() const
return size in x (unsigned)
double dy() const
return size in y (unsigned)
double y() const
return coordinateof the Det Descr Region: y (signed)
double dz() const
return size in z (unsigned)
double dphi() const
return size in eta (unsigned)
double z() const
return coordinateof the Det Descr Region: z (signed)
double drho() const
return size in rho (unsigned)
double rho() const
return coordinateof the Det Descr Region: rho (unsigned)
void set_cylindric(double eta, double phi, double z)
set coordinates of the Det Descr region – pseudo cylindrical system; eta is signed,...