CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
EcalTrapezoidParameters Class Reference

#include <EcalTrapezoidParameters.h>

Public Types

using TPFloat = CaloCellGeometry::CCGFloat
 
using VertexList = CaloCellGeometry::Pt3DVec
 

Public Member Functions

TPFloat a () const
 
TPFloat A () const
 
TPFloat a1 () const
 
TPFloat a4 () const
 
TPFloat alp1 () const
 
TPFloat alp2 () const
 
TPFloat b () const
 
TPFloat B () const
 
TPFloat bl1 () const
 
TPFloat bl2 () const
 
TPFloat c () const
 
TPFloat C () const
 
TPFloat d () const
 
TPFloat D () const
 
TPFloat dz () const
 
 EcalTrapezoidParameters (TPFloat aHalfLengthXNegZLoY, TPFloat aHalfLengthXPosZLoY, TPFloat aHalfLengthXPosZHiY, TPFloat aHalfLengthYNegZ, TPFloat aHalfLengthYPosZ, TPFloat aHalfLengthZ, TPFloat aAngleAD, TPFloat aCoord15X, TPFloat aCoord15Y)
 
 EcalTrapezoidParameters ()=delete
 
 EcalTrapezoidParameters (const EcalTrapezoidParameters &)=delete
 
TPFloat h () const
 
TPFloat H () const
 
TPFloat h1 () const
 
TPFloat h2 () const
 
TPFloat hAa () const
 
TPFloat hBb () const
 
TPFloat hCc () const
 
TPFloat hDd () const
 
TPFloat L () const
 
const EcalTrapezoidParametersoperator= (const EcalTrapezoidParameters &)=delete
 
TPFloat phi () const
 
TPFloat theta () const
 
TPFloat tl1 () const
 
TPFloat tl2 () const
 
VertexList vertexList () const
 
TPFloat x15 () const
 
TPFloat y15 () const
 

Private Attributes

TPFloat m_a
 
TPFloat m_A
 
TPFloat m_a1
 
TPFloat m_a4
 
TPFloat m_alp1
 
TPFloat m_alp2
 
TPFloat m_b
 
TPFloat m_B
 
TPFloat m_bl1
 
TPFloat m_bl2
 
TPFloat m_c
 
TPFloat m_C
 
TPFloat m_d
 
TPFloat m_D
 
TPFloat m_dz
 
TPFloat m_h
 
TPFloat m_H
 
TPFloat m_h1
 
TPFloat m_h2
 
TPFloat m_hAa
 
TPFloat m_hBb
 
TPFloat m_hCc
 
TPFloat m_hDd
 
TPFloat m_L
 
TPFloat m_ph
 
TPFloat m_th
 
TPFloat m_tl1
 
TPFloat m_tl2
 
TPFloat m_x15
 
TPFloat m_y15
 

Detailed Description

Definition at line 62 of file EcalTrapezoidParameters.h.

Member Typedef Documentation

Definition at line 67 of file EcalTrapezoidParameters.h.

Definition at line 66 of file EcalTrapezoidParameters.h.

Constructor & Destructor Documentation

EcalTrapezoidParameters::EcalTrapezoidParameters ( TPFloat  aHalfLengthXNegZLoY,
TPFloat  aHalfLengthXPosZLoY,
TPFloat  aHalfLengthXPosZHiY,
TPFloat  aHalfLengthYNegZ,
TPFloat  aHalfLengthYPosZ,
TPFloat  aHalfLengthZ,
TPFloat  aAngleAD,
TPFloat  aCoord15X,
TPFloat  aCoord15Y 
)

Definition at line 24 of file EcalTrapezoidParameters.cc.

References funct::cos(), benchmark_cfg::fc, m_a, m_A, m_a1, m_a4, m_alp1, m_alp2, m_b, m_B, m_bl1, m_bl2, m_c, m_C, m_d, m_D, m_dz, m_h, m_H, m_h1, m_h2, m_hAa, m_hBb, m_hCc, m_hDd, m_L, m_ph, M_PI, M_PI_2, m_th, m_tl1, m_tl2, m_x15, m_y15, funct::sin(), mathSSE::sqrt(), and funct::tan().

35 {
36  m_dz = aHalfLengthZ ;
37  m_h1 = aHalfLengthYNegZ ;
38  m_bl1 = aHalfLengthXNegZLoY ;
39  m_h2 = aHalfLengthYPosZ ;
40  m_bl2 = aHalfLengthXPosZLoY ;
41  m_tl2 = aHalfLengthXPosZHiY ;
42 
43  m_a1 = aAngleAD ;
44  m_y15 = aCoord15Y ;
45  m_x15 = aCoord15X ;
46 
47  m_hAa = fabs( m_y15 ) ;
48 
49  m_L = 2*m_dz ;
50  m_h = 2*m_h2 ;
51  m_a = 2*m_bl2 ;
52  m_b = 2*m_tl2 ;
53  m_H = 2*m_h1 ;
54  m_A = 2*m_bl1 ;
55 
56  // derive everything else
57  const TPFloat sina1 ( sin( m_a1 ) ) ;
58  const TPFloat cosa1 ( cos( m_a1 ) ) ;
59  const TPFloat tana1 ( tan( m_a1 - M_PI_2 ) ) ;
60 
61  const TPFloat tana4 ( ( m_tl2 - m_bl2 - m_h2*tana1 )/m_h2 ) ;
62 
63  m_a4 = M_PI_2 + atan( tana4 ) ;
64 
65  m_tl1 = m_bl1 + m_h1*( tana1 + tana4 ) ;
66 
67  m_d = m_h/sina1 ;
68  m_D = m_H/sina1 ;
69 
70  const TPFloat tanalp1 ( ( m_D*cosa1 + m_tl1 - m_bl1 )/m_H ) ;
71  const TPFloat tanalp2 ( ( m_d*cosa1 + m_tl2 - m_bl2 )/m_h ) ;
72  m_alp1 = atan( tanalp1 ) ;
73  m_alp2 = atan( tanalp2 ) ;
74 
75  const TPFloat sina4 ( sin( m_a4 ) ) ;
76  m_c = m_h/sina4 ;
77  m_C = m_H/sina4 ;
78  m_B = 2*m_tl1 ; // same as m_A - m_D*cosa1 - m_C*cos( m_a4 ) ;
79 
80  m_hDd = fabs( m_x15 )*sina1 - m_hAa*cosa1 ;
81 
82  const TPFloat xd5 ( ( m_hAa + m_hDd*cosa1 )/sina1 ) ;
83  const TPFloat xd6 ( m_D - m_d - xd5 ) ;
84  const TPFloat z6 ( sqrt( m_hDd*m_hDd + xd6*xd6 ) ) ;
85  TPFloat gb6 ;
86  if( 0. == z6 || 1. < fabs( m_hDd/z6 ) )
87  {
88  gb6 = 0 ;
89  }
90  else
91  {
92  gb6 = M_PI - m_a1 - asin( m_hDd/z6 ) ;
93  }
94  m_hBb = z6*sin( gb6 ) ;
95 
96  const TPFloat xb6 ( z6*cos( gb6 ) ) ;
97  const TPFloat xb7 ( m_B - xb6 - m_b ) ;
98  const TPFloat z7 ( sqrt( m_hBb*m_hBb + xb7*xb7 ) ) ;
99  TPFloat gc7 ;
100  if( 0 == z7 || 1. < fabs( m_hBb/z7 ) )
101  {
102  gc7 = 0 ;
103  }
104  else
105  {
106  gc7 = M_PI - m_a4 - asin( m_hBb/z7 ) ;
107  }
108  m_hCc = z7*sin( gc7 ) ;
109 
110  const Pt3D fc ( m_bl2 + m_h2*tanalp2, m_h2, 0 ) ;
111  const Pt3D v5 ( m_x15 , m_y15 , -m_L ) ;
112  const Pt3D bc ( v5 + Pt3D ( m_bl1 + m_h1*tanalp1, m_h1, 0 ) ) ;
113  const Pt3D dc ( fc - bc ) ;
114 
115  m_th = dc.theta() ;
116  m_ph = dc.phi() ;
117 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
#define M_PI_2
T sqrt(T t)
Definition: SSEVec.h:18
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
EcalTrapezoidParameters::TPFloat TPFloat
#define M_PI
CaloCellGeometry::Pt3D Pt3D
EcalTrapezoidParameters::EcalTrapezoidParameters ( )
delete
EcalTrapezoidParameters::EcalTrapezoidParameters ( const EcalTrapezoidParameters )
delete

Member Function Documentation

TPFloat EcalTrapezoidParameters::a ( ) const
TPFloat EcalTrapezoidParameters::A ( ) const
TPFloat EcalTrapezoidParameters::a1 ( ) const

Definition at line 169 of file EcalTrapezoidParameters.cc.

References m_a1.

Referenced by vertexList().

169 { return m_a1 ; }
TPFloat EcalTrapezoidParameters::a4 ( ) const

Definition at line 170 of file EcalTrapezoidParameters.cc.

References m_a4.

170 { return m_a4 ; }
TPFloat EcalTrapezoidParameters::alp1 ( ) const

Definition at line 157 of file EcalTrapezoidParameters.cc.

References m_alp1.

Referenced by DDEcalBarrelAlgo::mytrap(), DDEcalBarrelNewAlgo::mytrap(), and vertexList().

157 { return m_alp1 ; }
TPFloat EcalTrapezoidParameters::alp2 ( ) const

Definition at line 161 of file EcalTrapezoidParameters.cc.

References m_alp2.

Referenced by DDEcalBarrelAlgo::mytrap(), DDEcalBarrelNewAlgo::mytrap(), and vertexList().

161 { return m_alp2 ; }
TPFloat EcalTrapezoidParameters::b ( ) const
TPFloat EcalTrapezoidParameters::B ( ) const

Definition at line 178 of file EcalTrapezoidParameters.cc.

References m_B.

Referenced by vertexList(), DDEcalBarrelAlgo::web(), and DDEcalBarrelNewAlgo::web().

178 { return m_B ; }
TPFloat EcalTrapezoidParameters::bl1 ( ) const
TPFloat EcalTrapezoidParameters::bl2 ( ) const

Definition at line 159 of file EcalTrapezoidParameters.cc.

References m_bl2.

Referenced by DDEcalBarrelAlgo::mytrap(), DDEcalBarrelNewAlgo::mytrap(), and vertexList().

159 { return m_bl2 ; }
TPFloat EcalTrapezoidParameters::c ( ) const

Definition at line 174 of file EcalTrapezoidParameters.cc.

References m_c.

174 { return m_c ; }
TPFloat EcalTrapezoidParameters::C ( ) const

Definition at line 179 of file EcalTrapezoidParameters.cc.

References m_C.

179 { return m_C ; }
TPFloat EcalTrapezoidParameters::d ( ) const

Definition at line 175 of file EcalTrapezoidParameters.cc.

References m_d.

175 { return m_d ; }
TPFloat EcalTrapezoidParameters::D ( ) const

Definition at line 180 of file EcalTrapezoidParameters.cc.

References m_D.

180 { return m_D ; }
TPFloat EcalTrapezoidParameters::dz ( ) const
TPFloat EcalTrapezoidParameters::h ( ) const
TPFloat EcalTrapezoidParameters::H ( ) const

Definition at line 181 of file EcalTrapezoidParameters.cc.

References m_H.

Referenced by DDEcalBarrelAlgo::execute(), DDEcalBarrelNewAlgo::execute(), and vertexList().

181 { return m_H ; }
TPFloat EcalTrapezoidParameters::h1 ( ) const
TPFloat EcalTrapezoidParameters::h2 ( ) const

Definition at line 158 of file EcalTrapezoidParameters.cc.

References m_h2.

Referenced by DDEcalBarrelAlgo::mytrap(), DDEcalBarrelNewAlgo::mytrap(), and vertexList().

158 { return m_h2 ; }
TPFloat EcalTrapezoidParameters::hAa ( ) const

Definition at line 165 of file EcalTrapezoidParameters.cc.

References m_hAa.

165 { return m_hAa ; }
TPFloat EcalTrapezoidParameters::hBb ( ) const

Definition at line 166 of file EcalTrapezoidParameters.cc.

References m_hBb.

166 { return m_hBb ; }
TPFloat EcalTrapezoidParameters::hCc ( ) const

Definition at line 167 of file EcalTrapezoidParameters.cc.

References m_hCc.

167 { return m_hCc ; }
TPFloat EcalTrapezoidParameters::hDd ( ) const

Definition at line 168 of file EcalTrapezoidParameters.cc.

References m_hDd.

168 { return m_hDd ; }
TPFloat EcalTrapezoidParameters::L ( ) const
const EcalTrapezoidParameters& EcalTrapezoidParameters::operator= ( const EcalTrapezoidParameters )
delete
TPFloat EcalTrapezoidParameters::phi ( void  ) const
TPFloat EcalTrapezoidParameters::theta ( void  ) const
TPFloat EcalTrapezoidParameters::tl1 ( ) const

Definition at line 156 of file EcalTrapezoidParameters.cc.

References m_tl1.

Referenced by DDEcalBarrelAlgo::mytrap(), and DDEcalBarrelNewAlgo::mytrap().

156 { return m_tl1 ; }
TPFloat EcalTrapezoidParameters::tl2 ( ) const

Definition at line 160 of file EcalTrapezoidParameters.cc.

References m_tl2.

Referenced by DDEcalBarrelAlgo::mytrap(), and DDEcalBarrelNewAlgo::mytrap().

160 { return m_tl2 ; }
EcalTrapezoidParameters::VertexList EcalTrapezoidParameters::vertexList ( ) const

Definition at line 184 of file EcalTrapezoidParameters.cc.

References a(), A(), a1(), alp1(), alp2(), b(), B(), bl1(), bl2(), funct::cos(), dz(), connectstrParser::f1, connectstrParser::f2, connectstrParser::f3, connectstrParser::f4, connectstrParser::f5, connectstrParser::f6, benchmark_cfg::fc, h(), H(), h1(), h2(), M_PI_2, phi(), funct::sin(), funct::tan(), theta(), and badGlobalMuonTaggersAOD_cff::vtx.

Referenced by DDEcalBarrelAlgo::execute(), DDEcalBarrelNewAlgo::execute(), DDEcalBarrelAlgo::web(), and DDEcalBarrelNewAlgo::web().

185 {
186  VertexList vtx ;
187  vtx.reserve( 8 ) ;
188 
189  const TPFloat dztanth ( dz()*tan( theta() ) ) ;
190 
191  const TPFloat ph ( phi() ) ;
192  const Pt3D fc ( dztanth*cos(ph), dztanth*sin(ph), dz() ) ;
193 
194  const TPFloat h_ ( h() ) ;
195  const TPFloat H_ ( H() ) ;
196  const TPFloat b_ ( b() ) ;
197  const TPFloat B_ ( B() ) ;
198  const TPFloat a_ ( a() ) ;
199  const TPFloat A_ ( A() ) ;
200 
201 // const TPFloat tl1 ( tl1() ) ;
202 
203  const TPFloat tanalp1 ( tan(alp1()) ) ;
204 
205  const TPFloat tanalp2 ( tan(alp2()) ) ;
206 
207  const TPFloat tana1 ( tan( a1() - M_PI_2 ) ) ;
208 
209  const Pt3D f1 ( -Pt3D( bl2() + h2()*tanalp2, h2(), 0 ) ) ;
210 
211  const Pt3D f2 ( Pt3D( -h_*tana1, h_, 0 ) + f1 ) ;
212 
213  const Pt3D f3 ( f2 + Pt3D( b_,0,0 ) ) ;
214 
215  const Pt3D f4 ( Pt3D( a_,0,0 ) + f1 ) ;
216 
217 
218  const Pt3D f5 ( -Pt3D( bl1() + h1()*tanalp1, h1(), 0 ) ) ;
219 
220  const Pt3D f6 ( Pt3D( -H_*tana1, H_, 0 ) + f5 ) ;
221 
222  const Pt3D f7 ( f6 + Pt3D( B_,0,0 ) ) ;
223 
224  const Pt3D f8 ( Pt3D( A_,0,0 ) + f5 ) ;
225 
226  vtx.emplace_back( fc + f1 ) ;
227  vtx.emplace_back( fc + f2 ) ;
228  vtx.emplace_back( fc + f3 ) ;
229  vtx.emplace_back( fc + f4 ) ;
230  vtx.emplace_back( -fc + f5 ) ;
231  vtx.emplace_back( -fc + f6 ) ;
232  vtx.emplace_back( -fc + f7 ) ;
233  vtx.emplace_back( -fc + f8 ) ;
234 
235  return vtx ;
236 }
EcalTrapezoidParameters::VertexList VertexList
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
#define M_PI_2
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
EcalTrapezoidParameters::TPFloat TPFloat
CaloCellGeometry::Pt3D Pt3D
CaloCellGeometry::Pt3D Pt3D
TPFloat EcalTrapezoidParameters::x15 ( ) const

Definition at line 163 of file EcalTrapezoidParameters.cc.

References m_x15.

163 { return m_x15 ; }
TPFloat EcalTrapezoidParameters::y15 ( ) const

Definition at line 164 of file EcalTrapezoidParameters.cc.

References m_y15.

164 { return m_y15 ; }

Member Data Documentation

TPFloat EcalTrapezoidParameters::m_a
private

Definition at line 126 of file EcalTrapezoidParameters.h.

Referenced by a(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_A
private

Definition at line 126 of file EcalTrapezoidParameters.h.

Referenced by A(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_a1
private

Definition at line 124 of file EcalTrapezoidParameters.h.

Referenced by a1(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_a4
private

Definition at line 125 of file EcalTrapezoidParameters.h.

Referenced by a4(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_alp1
private

Definition at line 123 of file EcalTrapezoidParameters.h.

Referenced by alp1(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_alp2
private

Definition at line 123 of file EcalTrapezoidParameters.h.

Referenced by alp2(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_b
private

Definition at line 126 of file EcalTrapezoidParameters.h.

Referenced by b(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_B
private

Definition at line 126 of file EcalTrapezoidParameters.h.

Referenced by B(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_bl1
private

Definition at line 123 of file EcalTrapezoidParameters.h.

Referenced by bl1(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_bl2
private

Definition at line 123 of file EcalTrapezoidParameters.h.

Referenced by bl2(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_c
private

Definition at line 126 of file EcalTrapezoidParameters.h.

Referenced by c(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_C
private

Definition at line 126 of file EcalTrapezoidParameters.h.

Referenced by C(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_d
private

Definition at line 126 of file EcalTrapezoidParameters.h.

Referenced by d(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_D
private

Definition at line 126 of file EcalTrapezoidParameters.h.

Referenced by D(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_dz
private

Definition at line 123 of file EcalTrapezoidParameters.h.

Referenced by dz(), and EcalTrapezoidParameters().

TPFloat EcalTrapezoidParameters::m_h
private

Definition at line 126 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and h().

TPFloat EcalTrapezoidParameters::m_H
private

Definition at line 126 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and H().

TPFloat EcalTrapezoidParameters::m_h1
private

Definition at line 123 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and h1().

TPFloat EcalTrapezoidParameters::m_h2
private

Definition at line 123 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and h2().

TPFloat EcalTrapezoidParameters::m_hAa
private

Definition at line 124 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and hAa().

TPFloat EcalTrapezoidParameters::m_hBb
private

Definition at line 125 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and hBb().

TPFloat EcalTrapezoidParameters::m_hCc
private

Definition at line 125 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and hCc().

TPFloat EcalTrapezoidParameters::m_hDd
private

Definition at line 125 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and hDd().

TPFloat EcalTrapezoidParameters::m_L
private

Definition at line 126 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and L().

TPFloat EcalTrapezoidParameters::m_ph
private

Definition at line 123 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and phi().

TPFloat EcalTrapezoidParameters::m_th
private

Definition at line 123 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and theta().

TPFloat EcalTrapezoidParameters::m_tl1
private

Definition at line 123 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and tl1().

TPFloat EcalTrapezoidParameters::m_tl2
private

Definition at line 123 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and tl2().

TPFloat EcalTrapezoidParameters::m_x15
private

Definition at line 124 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and x15().

TPFloat EcalTrapezoidParameters::m_y15
private

Definition at line 124 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and y15().