CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

EcalTrapezoidParameters Class Reference

#include <EcalTrapezoidParameters.h>

List of all members.

Public Types

typedef CaloCellGeometry::CCGFloat TPFloat
typedef CaloCellGeometry::Pt3DVec VertexList

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)
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
TPFloat phi () const
TPFloat theta () const
TPFloat tl1 () const
TPFloat tl2 () const
VertexList vertexList () const
TPFloat x15 () const
TPFloat y15 () const

Private Member Functions

 EcalTrapezoidParameters ()
 EcalTrapezoidParameters (const EcalTrapezoidParameters &)
const EcalTrapezoidParametersoperator= (const EcalTrapezoidParameters &)

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 68 of file EcalTrapezoidParameters.h.


Member Typedef Documentation

Definition at line 76 of file EcalTrapezoidParameters.h.

Definition at line 74 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 41 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().

{
   m_dz  = aHalfLengthZ        ;
   m_h1  = aHalfLengthYNegZ    ;
   m_bl1 = aHalfLengthXNegZLoY ;
   m_h2  = aHalfLengthYPosZ    ;
   m_bl2 = aHalfLengthXPosZLoY ;
   m_tl2 = aHalfLengthXPosZHiY ;

   m_a1  = aAngleAD            ;
   m_y15 = aCoord15Y           ;
   m_x15 = aCoord15X           ;

   m_hAa = fabs( m_y15 ) ;

   m_L   = 2*m_dz  ;
   m_h   = 2*m_h2  ;
   m_a   = 2*m_bl2 ;
   m_b   = 2*m_tl2 ;
   m_H   = 2*m_h1  ;
   m_A   = 2*m_bl1 ;

   // derive everything else
   const TPFloat sina1 ( sin( m_a1 ) ) ;
   const TPFloat cosa1 ( cos( m_a1 ) ) ;
   const TPFloat tana1 ( tan( m_a1 - M_PI_2 ) ) ;

   const TPFloat tana4 ( ( m_tl2 - m_bl2 - m_h2*tana1 )/m_h2 ) ;

   m_a4  = M_PI_2 + atan( tana4 ) ;

   m_tl1 = m_bl1 + m_h1*( tana1 + tana4 ) ;

   m_d   = m_h/sina1 ;
   m_D   = m_H/sina1 ;

   const TPFloat tanalp1 ( ( m_D*cosa1 + m_tl1 - m_bl1 )/m_H ) ;
   const TPFloat tanalp2 ( ( m_d*cosa1 + m_tl2 - m_bl2 )/m_h ) ;
   m_alp1 = atan( tanalp1 ) ;
   m_alp2 = atan( tanalp2 ) ;

   const TPFloat sina4 ( sin( m_a4 ) ) ;
   m_c   = m_h/sina4 ;
   m_C   = m_H/sina4 ;
   m_B   = 2*m_tl1 ; // same as m_A - m_D*cosa1 - m_C*cos( m_a4 ) ;

   m_hDd = fabs( m_x15 )*sina1 - m_hAa*cosa1 ;

   const TPFloat xd5 ( ( m_hAa + m_hDd*cosa1 )/sina1 ) ;
   const TPFloat xd6 ( m_D - m_d - xd5 ) ;
   const TPFloat z6  ( sqrt( m_hDd*m_hDd + xd6*xd6 ) ) ;
   TPFloat gb6 ;
   if( 0. == z6 || 1. < fabs( m_hDd/z6 ) )
   {
      gb6 = 0 ;
   }
   else
   {
      gb6 = M_PI - m_a1 - asin( m_hDd/z6 ) ;
   }
   m_hBb = z6*sin( gb6 ) ;

   const TPFloat xb6 ( z6*cos( gb6 ) ) ;
   const TPFloat xb7 ( m_B - xb6 - m_b ) ;
   const TPFloat z7  ( sqrt( m_hBb*m_hBb + xb7*xb7 ) ) ;
   TPFloat gc7 ;
   if( 0 == z7 || 1. < fabs( m_hBb/z7 ) )
   {
      gc7 = 0 ;
   }
   else
   {
      gc7 = M_PI - m_a4 - asin( m_hBb/z7 ) ;   
   }
   m_hCc = z7*sin( gc7 ) ;

   const Pt3D fc ( m_bl2 + m_h2*tanalp2, m_h2, 0 ) ;
   const Pt3D v5 ( m_x15 , m_y15 , -m_L ) ;
   const Pt3D bc ( v5 + Pt3D ( m_bl1 + m_h1*tanalp1, m_h1, 0 ) ) ;
   const Pt3D dc ( fc - bc ) ;

   m_th  = dc.theta() ;
   m_ph  = dc.phi()   ;
}
EcalTrapezoidParameters::EcalTrapezoidParameters ( ) [private]
EcalTrapezoidParameters::EcalTrapezoidParameters ( const EcalTrapezoidParameters ) [private]

Member Function Documentation

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

Definition at line 186 of file EcalTrapezoidParameters.cc.

References m_a1.

Referenced by vertexList().

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

Definition at line 187 of file EcalTrapezoidParameters.cc.

References m_a4.

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

Definition at line 174 of file EcalTrapezoidParameters.cc.

References m_alp1.

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

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

Definition at line 178 of file EcalTrapezoidParameters.cc.

References m_alp2.

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

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

Definition at line 195 of file EcalTrapezoidParameters.cc.

References m_B.

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

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

Definition at line 176 of file EcalTrapezoidParameters.cc.

References m_bl2.

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

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

Definition at line 191 of file EcalTrapezoidParameters.cc.

References m_c.

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

Definition at line 196 of file EcalTrapezoidParameters.cc.

References m_C.

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

Definition at line 192 of file EcalTrapezoidParameters.cc.

References m_d.

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

Definition at line 197 of file EcalTrapezoidParameters.cc.

References m_D.

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

Definition at line 198 of file EcalTrapezoidParameters.cc.

References m_H.

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

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

Definition at line 175 of file EcalTrapezoidParameters.cc.

References m_h2.

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

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

Definition at line 182 of file EcalTrapezoidParameters.cc.

References m_hAa.

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

Definition at line 183 of file EcalTrapezoidParameters.cc.

References m_hBb.

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

Definition at line 184 of file EcalTrapezoidParameters.cc.

References m_hCc.

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

Definition at line 185 of file EcalTrapezoidParameters.cc.

References m_hDd.

{ return m_hDd  ; }
TPFloat EcalTrapezoidParameters::L ( ) const
const EcalTrapezoidParameters& EcalTrapezoidParameters::operator= ( const EcalTrapezoidParameters ) [private]
TPFloat EcalTrapezoidParameters::phi ( void  ) const

Definition at line 170 of file EcalTrapezoidParameters.cc.

References m_ph.

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

{ return m_ph   ; }
TPFloat EcalTrapezoidParameters::theta ( void  ) const

Definition at line 169 of file EcalTrapezoidParameters.cc.

References m_th.

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

{ return m_th   ; }
TPFloat EcalTrapezoidParameters::tl1 ( ) const

Definition at line 173 of file EcalTrapezoidParameters.cc.

References m_tl1.

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

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

Definition at line 177 of file EcalTrapezoidParameters.cc.

References m_tl2.

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

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

Definition at line 201 of file EcalTrapezoidParameters.cc.

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

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

{
   VertexList vtx ;
   vtx.reserve( 8 ) ;

   const TPFloat dztanth ( dz()*tan( theta() ) ) ;

   const TPFloat ph ( phi() ) ;
   const Pt3D  fc ( dztanth*cos(ph), dztanth*sin(ph), dz() ) ;

   const TPFloat h_ ( h() ) ;
   const TPFloat H_ ( H() ) ;
   const TPFloat b_ ( b() ) ;
   const TPFloat B_ ( B() ) ;
   const TPFloat a_ ( a() ) ;
   const TPFloat A_ ( A() ) ;

//   const TPFloat tl1 ( tl1() ) ;

   const TPFloat tanalp1 ( tan(alp1()) ) ;

   const TPFloat tanalp2 ( tan(alp2()) ) ;

   const TPFloat tana1   ( tan( a1() - M_PI_2 )  ) ;

   const Pt3D f1 ( -Pt3D( bl2() + h2()*tanalp2,  h2(), 0 ) ) ;

   const Pt3D f2 ( Pt3D( -h_*tana1, h_, 0 ) + f1 ) ;

   const Pt3D f3 ( f2 + Pt3D( b_,0,0 ) ) ;

   const Pt3D f4 ( Pt3D( a_,0,0 ) + f1 ) ;


   const Pt3D f5 ( -Pt3D( bl1() + h1()*tanalp1,  h1(),      0 ) ) ;

   const Pt3D f6 ( Pt3D( -H_*tana1, H_, 0 ) + f5 ) ;

   const Pt3D f7 ( f6 + Pt3D( B_,0,0 ) ) ;

   const Pt3D f8 ( Pt3D( A_,0,0 ) + f5 ) ;

   vtx.push_back(  fc + f1 ) ;
   vtx.push_back(  fc + f2 ) ;
   vtx.push_back(  fc + f3 ) ;
   vtx.push_back(  fc + f4 ) ;
   vtx.push_back( -fc + f5 ) ;
   vtx.push_back( -fc + f6 ) ;
   vtx.push_back( -fc + f7 ) ;
   vtx.push_back( -fc + f8 ) ;

   return vtx ;
}
TPFloat EcalTrapezoidParameters::x15 ( ) const

Definition at line 180 of file EcalTrapezoidParameters.cc.

References m_x15.

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

Definition at line 181 of file EcalTrapezoidParameters.cc.

References m_y15.

{ return m_y15  ; }

Member Data Documentation

Definition at line 152 of file EcalTrapezoidParameters.h.

Referenced by a(), and EcalTrapezoidParameters().

Definition at line 152 of file EcalTrapezoidParameters.h.

Referenced by A(), and EcalTrapezoidParameters().

Definition at line 150 of file EcalTrapezoidParameters.h.

Referenced by a1(), and EcalTrapezoidParameters().

Definition at line 151 of file EcalTrapezoidParameters.h.

Referenced by a4(), and EcalTrapezoidParameters().

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by alp1(), and EcalTrapezoidParameters().

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by alp2(), and EcalTrapezoidParameters().

Definition at line 152 of file EcalTrapezoidParameters.h.

Referenced by b(), and EcalTrapezoidParameters().

Definition at line 152 of file EcalTrapezoidParameters.h.

Referenced by B(), and EcalTrapezoidParameters().

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by bl1(), and EcalTrapezoidParameters().

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by bl2(), and EcalTrapezoidParameters().

Definition at line 152 of file EcalTrapezoidParameters.h.

Referenced by c(), and EcalTrapezoidParameters().

Definition at line 152 of file EcalTrapezoidParameters.h.

Referenced by C(), and EcalTrapezoidParameters().

Definition at line 152 of file EcalTrapezoidParameters.h.

Referenced by d(), and EcalTrapezoidParameters().

Definition at line 152 of file EcalTrapezoidParameters.h.

Referenced by D(), and EcalTrapezoidParameters().

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by dz(), and EcalTrapezoidParameters().

Definition at line 152 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and h().

Definition at line 152 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and H().

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and h1().

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and h2().

Definition at line 150 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and hAa().

Definition at line 151 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and hBb().

Definition at line 151 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and hCc().

Definition at line 151 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and hDd().

Definition at line 152 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and L().

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and phi().

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and theta().

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and tl1().

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and tl2().

Definition at line 150 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and x15().

Definition at line 150 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and y15().