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 std::vector
< HepGeom::Point3D< double > > 
VertexList

Public Member Functions

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

Private Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 66 of file EcalTrapezoidParameters.h.


Member Typedef Documentation

Definition at line 72 of file EcalTrapezoidParameters.h.


Constructor & Destructor Documentation

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

Definition at line 38 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 double sina1 ( sin( m_a1 ) ) ;
   const double cosa1 ( cos( m_a1 ) ) ;
   const double tana1 ( tan( m_a1 - M_PI_2 ) ) ;

   const double 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 double tanalp1 ( ( m_D*cosa1 + m_tl1 - m_bl1 )/m_H ) ;
   const double tanalp2 ( ( m_d*cosa1 + m_tl2 - m_bl2 )/m_h ) ;
   m_alp1 = atan( tanalp1 ) ;
   m_alp2 = atan( tanalp2 ) ;

   const double 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 double xd5 ( ( m_hAa + m_hDd*cosa1 )/sina1 ) ;
   const double xd6 ( m_D - m_d - xd5 ) ;
   const double z6  ( sqrt( m_hDd*m_hDd + xd6*xd6 ) ) ;
   double 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 double xb6 ( z6*cos( gb6 ) ) ;
   const double xb7 ( m_B - xb6 - m_b ) ;
   const double z7  ( sqrt( m_hBb*m_hBb + xb7*xb7 ) ) ;
   double 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 HepGeom::Point3D<double>  fc ( m_bl2 + m_h2*tanalp2, m_h2, 0 ) ;
   const HepGeom::Point3D<double>  v5 ( m_x15 , m_y15 , -m_L ) ;
   const HepGeom::Point3D<double>  bc ( v5 +
                   HepGeom::Point3D<double> ( m_bl1 + m_h1*tanalp1, m_h1, 0 ) ) ;
   const HepGeom::Point3D<double>  dc ( fc - bc ) ;

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

Member Function Documentation

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

Definition at line 184 of file EcalTrapezoidParameters.cc.

References m_a1.

Referenced by vertexList().

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

Definition at line 185 of file EcalTrapezoidParameters.cc.

References m_a4.

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

Definition at line 172 of file EcalTrapezoidParameters.cc.

References m_alp1.

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

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

Definition at line 176 of file EcalTrapezoidParameters.cc.

References m_alp2.

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

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

Definition at line 193 of file EcalTrapezoidParameters.cc.

References m_B.

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

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

Definition at line 174 of file EcalTrapezoidParameters.cc.

References m_bl2.

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

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

Definition at line 189 of file EcalTrapezoidParameters.cc.

References m_c.

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

Definition at line 194 of file EcalTrapezoidParameters.cc.

References m_C.

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

Definition at line 190 of file EcalTrapezoidParameters.cc.

References m_d.

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

Definition at line 195 of file EcalTrapezoidParameters.cc.

References m_D.

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

Definition at line 196 of file EcalTrapezoidParameters.cc.

References m_H.

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

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

Definition at line 173 of file EcalTrapezoidParameters.cc.

References m_h2.

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

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

Definition at line 180 of file EcalTrapezoidParameters.cc.

References m_hAa.

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

Definition at line 181 of file EcalTrapezoidParameters.cc.

References m_hBb.

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

Definition at line 182 of file EcalTrapezoidParameters.cc.

References m_hCc.

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

Definition at line 183 of file EcalTrapezoidParameters.cc.

References m_hDd.

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

Definition at line 168 of file EcalTrapezoidParameters.cc.

References m_ph.

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

{ return m_ph   ; }
double EcalTrapezoidParameters::theta ( ) const

Definition at line 167 of file EcalTrapezoidParameters.cc.

References m_th.

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

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

Definition at line 171 of file EcalTrapezoidParameters.cc.

References m_tl1.

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

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

Definition at line 175 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 199 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(), and theta().

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

{
   VertexList vtx ;
   vtx.reserve( 8 ) ;

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

   const double ph ( phi() ) ;
   const HepGeom::Point3D<double>  fc ( dztanth*cos(ph), dztanth*sin(ph), dz() ) ;

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

//   const double tl1 ( tl1() ) ;

   const double tanalp1 ( tan(alp1()) ) ;

   const double tanalp2 ( tan(alp2()) ) ;

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

   const HepGeom::Point3D<double>  f1 ( -HepGeom::Point3D<double> ( bl2() + h2()*tanalp2,  h2(), 0 ) ) ;

   const HepGeom::Point3D<double>  f2 ( HepGeom::Point3D<double> ( -h_*tana1, h_, 0 ) + f1 ) ;

   const HepGeom::Point3D<double>  f3 ( f2 + HepGeom::Point3D<double> ( b_,0,0 ) ) ;

   const HepGeom::Point3D<double>  f4 ( HepGeom::Point3D<double> ( a_,0,0 ) + f1 ) ;


   const HepGeom::Point3D<double>  f5 ( -HepGeom::Point3D<double> ( bl1() + h1()*tanalp1,  h1(),      0 ) ) ;

   const HepGeom::Point3D<double>  f6 ( HepGeom::Point3D<double> ( -H_*tana1, H_, 0 ) + f5 ) ;

   const HepGeom::Point3D<double>  f7 ( f6 + HepGeom::Point3D<double> ( B_,0,0 ) ) ;

   const HepGeom::Point3D<double>  f8 ( HepGeom::Point3D<double> ( 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 ;
}
double EcalTrapezoidParameters::x15 ( ) const

Definition at line 178 of file EcalTrapezoidParameters.cc.

References m_x15.

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

Definition at line 179 of file EcalTrapezoidParameters.cc.

References m_y15.

{ return m_y15  ; }

Member Data Documentation

double EcalTrapezoidParameters::m_a [private]

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by a(), and EcalTrapezoidParameters().

double EcalTrapezoidParameters::m_A [private]

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by A(), and EcalTrapezoidParameters().

Definition at line 147 of file EcalTrapezoidParameters.h.

Referenced by a1(), and EcalTrapezoidParameters().

Definition at line 148 of file EcalTrapezoidParameters.h.

Referenced by a4(), and EcalTrapezoidParameters().

Definition at line 145 of file EcalTrapezoidParameters.h.

Referenced by alp1(), and EcalTrapezoidParameters().

Definition at line 145 of file EcalTrapezoidParameters.h.

Referenced by alp2(), and EcalTrapezoidParameters().

double EcalTrapezoidParameters::m_b [private]

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by b(), and EcalTrapezoidParameters().

double EcalTrapezoidParameters::m_B [private]

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by B(), and EcalTrapezoidParameters().

Definition at line 145 of file EcalTrapezoidParameters.h.

Referenced by bl1(), and EcalTrapezoidParameters().

Definition at line 145 of file EcalTrapezoidParameters.h.

Referenced by bl2(), and EcalTrapezoidParameters().

double EcalTrapezoidParameters::m_c [private]

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by c(), and EcalTrapezoidParameters().

double EcalTrapezoidParameters::m_C [private]

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by C(), and EcalTrapezoidParameters().

double EcalTrapezoidParameters::m_d [private]

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by d(), and EcalTrapezoidParameters().

double EcalTrapezoidParameters::m_D [private]

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by D(), and EcalTrapezoidParameters().

Definition at line 145 of file EcalTrapezoidParameters.h.

Referenced by dz(), and EcalTrapezoidParameters().

double EcalTrapezoidParameters::m_h [private]

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and h().

double EcalTrapezoidParameters::m_H [private]

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and H().

Definition at line 145 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and h1().

Definition at line 145 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and h2().

Definition at line 147 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and hAa().

Definition at line 148 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and hBb().

Definition at line 148 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and hCc().

Definition at line 148 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and hDd().

double EcalTrapezoidParameters::m_L [private]

Definition at line 149 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and L().

Definition at line 145 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and phi().

Definition at line 145 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and theta().

Definition at line 145 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and tl1().

Definition at line 145 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and tl2().

Definition at line 147 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and x15().

Definition at line 147 of file EcalTrapezoidParameters.h.

Referenced by EcalTrapezoidParameters(), and y15().