CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TruncatedPyramid Class Referencefinal

A base class to handle the particular shape of Ecal Xtals. Taken from ORCA Calorimetry Code. More...

#include <TruncatedPyramid.h>

Inheritance diagram for TruncatedPyramid:
CaloCellGeometry

Public Types

typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
typedef CaloCellGeometry::Tr3D Tr3D
 
- Public Types inherited from CaloCellGeometry
typedef float CCGFloat
 
typedef EZMgrFL< GlobalPointCornersMgr
 
typedef EZArrayFL< GlobalPointCornersVec
 
typedef EZMgrFL< CCGFloatParMgr
 
typedef EZArrayFL< CCGFloatParVec
 
typedef std::vector< ParVecParVecVec
 
typedef HepGeom::Point3D< CCGFloatPt3D
 
typedef std::vector< Pt3DPt3DVec
 
using RepCorners = std::array< RhoEtaPhi, k_cornerSize >
 
typedef HepGeom::Transform3D Tr3D
 

Public Member Functions

const GlobalVectoraxis () const
 
CCGFloat getPhiAxis () const
 
GlobalPoint getPosition (CCGFloat depth) const override
 
CCGFloat getThetaAxis () const
 
void getTransform (Tr3D &tr, Pt3DVec *lptr) const override
 --------— only needed by specific utility; overloaded when needed -— More...
 
TruncatedPyramidoperator= (const TruncatedPyramid &tr)
 
 TruncatedPyramid (void)
 
 TruncatedPyramid (const TruncatedPyramid &tr)
 
 TruncatedPyramid (CornersMgr *cMgr, const GlobalPoint &fCtr, const GlobalPoint &bCtr, const GlobalPoint &cor1, const CCGFloat *parV)
 
 TruncatedPyramid (const CornersVec &corn, const CCGFloat *par)
 
void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
 
 ~TruncatedPyramid () override
 
- Public Member Functions inherited from CaloCellGeometry
bool emptyCorners () const
 
float etaPos () const
 
float etaSpan () const
 
GlobalPoint const & getBackPoint () const
 
CornersVec const & getCorners () const
 Returns the corner points of this cell's volume. More...
 
RepCorners const & getCornersREP () const
 
virtual const GlobalPointgetPosition () const
 Returns the position of reference for this cell. More...
 
virtual GlobalPoint getPosition (const Pt3D &) const
 
bool inside (const GlobalPoint &point) const
 Returns true if the specified point is inside this cell. More...
 
const CCGFloatparam () const
 
float phiPos () const
 
float phiSpan () const
 
RhoEtaPhi const & repPos () const
 
float rhoPos () const
 
void setBackPoint (const GlobalPoint &pos)
 
virtual ~CaloCellGeometry ()
 

Static Public Member Functions

static void createCorners (const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
 
static void localCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
 
static void localCornersReflection (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
 
static void localCornersSwap (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
 
- Static Public Member Functions inherited from CaloCellGeometry
static const CCGFloatcheckParmPtr (const std::vector< CCGFloat > &vd, ParVecVec &pvv)
 
static const CCGFloatgetParmPtr (const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
 

Private Member Functions

const GlobalPoint backCtr (void) const
 
void initCorners (CornersVec &) override
 
GlobalVector makeAxis (void)
 

Private Attributes

GlobalVector m_axis
 
Pt3D m_corOne
 

Additional Inherited Members

- Static Public Attributes inherited from CaloCellGeometry
static constexpr unsigned int k_cornerSize = 8
 
static const CCGFloat k_ScaleFromDDDtoGeant
 
- Protected Member Functions inherited from CaloCellGeometry
 CaloCellGeometry (CornersVec::const_reference gp, CornersMgr *mgr, const CCGFloat *par)
 
 CaloCellGeometry (const CornersVec &cv, const CCGFloat *par)
 
 CaloCellGeometry (void)
 
void initSpan ()
 
void setCornerVec (const std::vector< GlobalPoint > &cor)
 
void setRefPoint (const GlobalPoint &pos)
 

Detailed Description

A base class to handle the particular shape of Ecal Xtals. Taken from ORCA Calorimetry Code.

Definition at line 19 of file TruncatedPyramid.h.

Member Typedef Documentation

Definition at line 22 of file TruncatedPyramid.h.

Definition at line 23 of file TruncatedPyramid.h.

Definition at line 24 of file TruncatedPyramid.h.

Definition at line 25 of file TruncatedPyramid.h.

Constructor & Destructor Documentation

TruncatedPyramid::TruncatedPyramid ( void  )

Definition at line 20 of file TruncatedPyramid.cc.

20  :
22  m_axis ( 0., 0., 0. ),
23  m_corOne ( 0., 0., 0. )
24 {}
GlobalVector m_axis
TruncatedPyramid::TruncatedPyramid ( const TruncatedPyramid tr)

Definition at line 26 of file TruncatedPyramid.cc.

27  : CaloCellGeometry( tr )
28 {
29  *this = tr ;
30 }
TruncatedPyramid::TruncatedPyramid ( CornersMgr cMgr,
const GlobalPoint fCtr,
const GlobalPoint bCtr,
const GlobalPoint cor1,
const CCGFloat parV 
)

Definition at line 44 of file TruncatedPyramid.cc.

References CaloCellGeometry::initSpan().

48  :
49  CaloCellGeometry ( fCtr, cMgr, parV ) ,
50  m_axis ( ( bCtr - fCtr ).unit() ) ,
51  m_corOne ( cor1.x(), cor1.y(), cor1.z() )
52 {initSpan();}
T y() const
Definition: PV3DBase.h:63
T z() const
Definition: PV3DBase.h:64
GlobalVector m_axis
T x() const
Definition: PV3DBase.h:62
TruncatedPyramid::TruncatedPyramid ( const CornersVec corn,
const CCGFloat par 
)

Definition at line 54 of file TruncatedPyramid.cc.

References CaloCellGeometry::initSpan().

55  :
56  CaloCellGeometry ( corn, par ) ,
57  m_axis ( makeAxis() ) ,
58  m_corOne ( corn[0].x(), corn[0].y(), corn[0].z() )
59 {initSpan();}
GlobalVector makeAxis(void)
GlobalVector m_axis
TruncatedPyramid::~TruncatedPyramid ( )
override

Definition at line 61 of file TruncatedPyramid.cc.

62 {}

Member Function Documentation

const GlobalVector & TruncatedPyramid::axis ( ) const

Definition at line 82 of file TruncatedPyramid.cc.

References m_axis.

Referenced by getTransform().

83 {
84  return m_axis ;
85 }
GlobalVector m_axis
const GlobalPoint TruncatedPyramid::backCtr ( void  ) const
private

Definition at line 103 of file TruncatedPyramid.cc.

References CaloCellGeometry::getCorners(), x, y, and z.

Referenced by makeAxis().

104 {
105  return GlobalPoint( 0.25*( getCorners()[4].x() + getCorners()[5].x() +
106  getCorners()[6].x() + getCorners()[7].x() ),
107  0.25*( getCorners()[4].y() + getCorners()[5].y() +
108  getCorners()[6].y() + getCorners()[7].y() ),
109  0.25*( getCorners()[4].z() + getCorners()[5].z() +
110  getCorners()[6].z() + getCorners()[7].z() ) ) ;
111 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
CornersVec const & getCorners() const
Returns the corner points of this cell&#39;s volume.
void TruncatedPyramid::createCorners ( const std::vector< CCGFloat > &  pv,
const Tr3D tr,
std::vector< GlobalPoint > &  co 
)
static

Definition at line 314 of file TruncatedPyramid.cc.

References popcon2dropbox::copy(), cross(), dot(), PVValHelper::dz, mps_fire::i, localCorners(), AlCaHLTBitMon_ParallelJobs::p, truncPyr::refl(), tmp, x, y, and z.

317 {
318  assert( 11 == pv.size() ) ;
319  assert( 8 == co.size() ) ;
320  // to get the ordering right for fast sim, we have to use their convention
321  // which were based on the old static geometry. Some gymnastics required here.
322 
323  const CCGFloat dz ( pv[0] ) ;
324  const CCGFloat h1 ( pv[3] ) ;
325  const CCGFloat h2 ( pv[7] ) ;
326  Pt3DVec ko ( 8, Pt3D(0,0,0) ) ;
327 
328  // if reflection, different things for barrel and endcap
329  static const FVec3D x ( 1, 0, 0 ) ;
330  static const FVec3D y ( 0, 1, 0 ) ;
331  static const FVec3D z ( 0, 0, 1 ) ;
332  const bool refl ( ( ( tr*x ).cross( tr*y ) ).dot( tr*z ) < 0 ) ; // has reflection!
333 
334  Pt3D tmp ;
335  Pt3DVec to ( 8, Pt3D(0,0,0) ) ;
336  localCorners( to, &pv.front(), tmp ) ;
337 
338  for( unsigned int i ( 0 ) ; i != 8 ; ++i )
339  {
340  ko[i] = tr * to[i] ; // apply transformation
341  }
342 
343  if( refl ||
344  h1>h2 )
345  {
346  if( 11.2 < dz ) //barrel
347  {
348  if( !refl )
349  {
350  to[0] = ko[3] ;
351  to[1] = ko[2] ;
352  to[2] = ko[1] ;
353  to[3] = ko[0] ;
354  to[4] = ko[7] ;
355  to[5] = ko[6] ;
356  to[6] = ko[5] ;
357  to[7] = ko[4] ;
358  }
359  else
360  {
361  to[0] = ko[0] ;
362  to[1] = ko[1] ;
363  to[2] = ko[2] ;
364  to[3] = ko[3] ;
365  to[4] = ko[4] ;
366  to[5] = ko[5] ;
367  to[6] = ko[6] ;
368  to[7] = ko[7] ;
369  }
370  }
371  else //endcap
372  {
373  to[0] = ko[0] ;
374  to[1] = ko[3] ;
375  to[2] = ko[2] ;
376  to[3] = ko[1] ;
377  to[4] = ko[4] ;
378  to[5] = ko[7] ;
379  to[6] = ko[6] ;
380  to[7] = ko[5] ;
381  }
382  copy( to.begin(), to.end(), ko.begin() ) ; // faster than ko = to ? maybe.
383  }
384  for( unsigned int i ( 0 ) ; i != 8 ; ++i )
385  {
386  const Pt3D & p ( ko[i] ) ;
387  co[ i ] = GlobalPoint( p.x(), p.y(), p.z() ) ;
388  }
389 }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
def copy(args, dbName)
CaloCellGeometry::Pt3D Pt3D
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
def pv(vc)
Definition: MetAnalyzer.py:6
CaloCellGeometry::CCGFloat CCGFloat
CaloCellGeometry::Pt3D Pt3D
CaloCellGeometry::Pt3DVec Pt3DVec
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
T dot(const Basic3DVector &v) const
Scalar product, or "dot" product, with a vector of same type.
Pt3D refl(const Pt3D &p)
HepGeom::Vector3D< CCGFloat > FVec3D
Basic3DVector cross(const Basic3DVector &v) const
Vector product, or "cross" product, with a vector of same type.
CCGFloat TruncatedPyramid::getPhiAxis ( ) const

Definition at line 76 of file TruncatedPyramid.cc.

References m_axis, and PV3DBase< T, PVType, FrameType >::phi().

Referenced by EcalClusterLocal::localCoordsEB(), EcalClusterLocal::localCoordsEE(), and operator<<().

77 {
78  return m_axis.phi() ;
79 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
GlobalVector m_axis
GlobalPoint TruncatedPyramid::getPosition ( CCGFloat  depth) const
overridevirtual

Reimplemented from CaloCellGeometry.

Definition at line 64 of file TruncatedPyramid.cc.

References CaloCellGeometry::getPosition(), and m_axis.

Referenced by EcalClusterLocal::localCoordsEB(), EcalClusterLocal::localCoordsEE(), and PFPhotonClusters::SetSeed().

65 {
67 }
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
GlobalVector m_axis
CCGFloat TruncatedPyramid::getThetaAxis ( ) const

Definition at line 70 of file TruncatedPyramid.cc.

References m_axis, and PV3DBase< T, PVType, FrameType >::theta().

Referenced by EcalClusterLocal::localCoordsEB(), EcalClusterLocal::localCoordsEE(), and operator<<().

71 {
72  return m_axis.theta() ;
73 }
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
GlobalVector m_axis
void TruncatedPyramid::getTransform ( Tr3D tr,
Pt3DVec lptr 
) const
overridevirtual

--------— only needed by specific utility; overloaded when needed -—

Reimplemented from CaloCellGeometry.

Definition at line 114 of file TruncatedPyramid.cc.

References angle(), axis(), PVValHelper::dz, MillePedeFileConverter_cfg::e, CaloCellGeometry::getPosition(), localCorners(), localCornersReflection(), localCornersSwap(), m_corOne, mag(), AlCaHLTBitMon_ParallelJobs::p, CaloCellGeometry::param(), csvLumiCalc::unit, x, PV3DBase< T, PVType, FrameType >::x(), y, PV3DBase< T, PVType, FrameType >::y(), z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by initCorners().

115 {
117  const Pt3D gFront ( p.x(), p.y(), p.z() ) ;
118  const DPt3D dgFront ( p.x(), p.y(), p.z() ) ;
119 
120  const double dz ( param()[0] ) ;
121 
122  Pt3D lFront ;
123  assert( nullptr != param() ) ;
124  std::vector<Pt3D > lc( 8, Pt3D(0,0,0) ) ;
125  if( 11.2 > dz )
126  {
127  localCorners( lc, param(), lFront ) ;
128  }
129  else
130  {
131  localCornersSwap( lc, param(), lFront ) ;
132  }
133 
134  // figure out if reflction volume or not
135 
136  Pt3D lBack ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7]) ) ;
137 
138  const double disl ( ( lFront - lc[0] ).mag() ) ;
139  const double disr ( ( lFront - lc[3] ).mag() ) ;
140  const double disg ( ( gFront - m_corOne ).mag() ) ;
141 
142  const double dell ( fabs( disg - disl ) ) ;
143  const double delr ( fabs( disg - disr ) ) ;
144 
145  if( 11.2<dz &&
146  delr < dell ) // reflection volume if true
147  {
148  localCornersReflection( lc, param(), lFront ) ;
149  lBack = 0.25*( lc[4] + lc[5] + lc[6] + lc[7] ) ;
150  }
151 
152  const DPt3D dlFront ( lFront.x(), lFront.y(), lFront.z() ) ;
153  const DPt3D dlBack ( lBack.x() , lBack.y() , lBack.z() ) ;
154  const DPt3D dlOne ( lc[0].x() , lc[0].y() , lc[0].z() ) ;
155 
156  const FVec3D dgAxis ( axis().x(), axis().y(), axis().z() ) ;
157 
158  const DPt3D dmOne ( m_corOne.x(), m_corOne.y(), m_corOne.z() ) ;
159 
160  const DPt3D dgBack ( dgFront + ( dlBack - dlFront ).mag()*dgAxis ) ;
161  DPt3D dgOne ( dgFront + ( dlOne - dlFront ).mag()*( dmOne - dgFront ).unit() ) ;
162 
163  const double dlangle ( ( dlBack - dlFront).angle( dlOne - dlFront ) ) ;
164  const double dgangle ( ( dgBack - dgFront).angle( dgOne - dgFront ) ) ;
165  const double dangle ( dlangle - dgangle ) ;
166 
167  if( 1.e-6 < fabs(dangle) )//guard against precision problems
168  {
169  const DPlane3D dgPl ( dgFront, dgOne, dgBack ) ;
170  const DPt3D dp2 ( dgFront + dgPl.normal().unit() ) ;
171 
172  DPt3D dgOld ( dgOne ) ;
173 
174  dgOne = ( dgFront + HepGeom::Rotate3D( -dangle, dgFront, dp2 )*
175  DVec3D( dgOld - dgFront ) ) ;
176  }
177 
178  tr = Tr3D( dlFront , dlBack , dlOne ,
179  dgFront , dgBack , dgOne ) ;
180 
181  if( nullptr != lptr ) (*lptr) = lc ;
182 }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
CaloCellGeometry::Tr3D Tr3D
HepGeom::Point3D< double > DPt3D
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
CaloCellGeometry::Pt3D Pt3D
static void localCornersSwap(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
const CCGFloat * param() const
HepGeom::Vector3D< double > DVec3D
CaloCellGeometry::Pt3D Pt3D
HepGeom::Plane3D< double > DPlane3D
const GlobalVector & axis() const
static void localCornersReflection(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
HepGeom::Vector3D< CCGFloat > FVec3D
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
void TruncatedPyramid::initCorners ( CaloCellGeometry::CornersVec corners)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 185 of file TruncatedPyramid.cc.

References getTransform(), mps_fire::i, and EZArrayFL< T >::uninitialized().

186 {
187  if( corners.uninitialized() )
188  {
189  Pt3DVec lc ;
190 
191  Tr3D tr ;
192  getTransform( tr, &lc ) ;
193 
194  for( unsigned int i ( 0 ) ; i != 8 ; ++i )
195  {
196  const Pt3D corn ( tr*lc[i] ) ;
197  corners[i] = GlobalPoint( corn.x(), corn.y(), corn.z() ) ;
198  }
199  }
200 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
CaloCellGeometry::Pt3D Pt3D
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
CaloCellGeometry::Pt3DVec Pt3DVec
CaloCellGeometry::Tr3D Tr3D
bool uninitialized() const
Definition: EZArrayFL.h:77
void TruncatedPyramid::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 245 of file TruncatedPyramid.cc.

References funct::cos(), PVValHelper::dz, funct::sin(), and funct::tan().

Referenced by createCorners(), getTransform(), EcalEndcapGeometry::localCorners(), localCornersReflection(), localCornersSwap(), makeEcalShape(), and vocalCorners().

248 {
249  assert( nullptr != pv ) ;
250  assert( 8 == lc.size() ) ;
251 
252  const CCGFloat dz ( pv[0] ) ;
253  const CCGFloat th ( pv[1] ) ;
254  const CCGFloat ph ( pv[2] ) ;
255  const CCGFloat h1 ( pv[3] ) ;
256  const CCGFloat b1 ( pv[4] ) ;
257  const CCGFloat t1 ( pv[5] ) ;
258  const CCGFloat a1 ( pv[6] ) ;
259  const CCGFloat h2 ( pv[7] ) ;
260  const CCGFloat b2 ( pv[8] ) ;
261  const CCGFloat t2 ( pv[9] ) ;
262  const CCGFloat a2 ( pv[10]) ;
263 
264  const CCGFloat ta1 ( tan( a1 ) ) ; // lower plane
265  const CCGFloat ta2 ( tan( a2 ) ) ; // upper plane
266 
267  const CCGFloat tth ( tan( th ) ) ;
268  const CCGFloat tthcp ( tth * cos( ph ) ) ;
269  const CCGFloat tthsp ( tth * sin( ph ) ) ;
270 
271  const unsigned int off ( h1<h2 ? 0 : 4 ) ;
272 
273  lc[0+off] = Pt3D ( -dz*tthcp - h1*ta1 - b1, -dz*tthsp - h1 , -dz ); // (-,-,-)
274  lc[1+off] = Pt3D ( -dz*tthcp + h1*ta1 - t1, -dz*tthsp + h1 , -dz ); // (-,+,-)
275  lc[2+off] = Pt3D ( -dz*tthcp + h1*ta1 + t1, -dz*tthsp + h1 , -dz ); // (+,+,-)
276  lc[3+off] = Pt3D ( -dz*tthcp - h1*ta1 + b1, -dz*tthsp - h1 , -dz ); // (+,-,-)
277  lc[4-off] = Pt3D ( dz*tthcp - h2*ta2 - b2, dz*tthsp - h2 , dz ); // (-,-,+)
278  lc[5-off] = Pt3D ( dz*tthcp + h2*ta2 - t2, dz*tthsp + h2 , dz ); // (-,+,+)
279  lc[6-off] = Pt3D ( dz*tthcp + h2*ta2 + t2, dz*tthsp + h2 , dz ); // (+,+,+)
280  lc[7-off] = Pt3D ( dz*tthcp - h2*ta2 + b2, dz*tthsp - h2 , dz ); // (+,-,+)
281 
282  ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
283 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
CaloCellGeometry::Pt3D Pt3D
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
def pv(vc)
Definition: MetAnalyzer.py:6
CaloCellGeometry::CCGFloat CCGFloat
void TruncatedPyramid::localCornersReflection ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 211 of file TruncatedPyramid.cc.

References localCorners(), truncPyr::refl(), and tmp.

Referenced by getTransform(), and EcalBarrelGeometry::localCorners().

214 {
215 // using namespace truncPyr ;
216  localCorners( lc, pv, ref ) ;
217  Pt3D tmp ;
218 /*
219  tmp = lc[0] ;
220  lc[0] = refl( lc[2] ) ;
221  lc[2] = refl( tmp ) ;
222  tmp = lc[1] ;
223  lc[1] = refl( lc[3] ) ;
224  lc[3] = refl( tmp ) ;
225  tmp = lc[4] ;
226  lc[4] = refl( lc[6] ) ;
227  lc[6] = refl( tmp ) ;
228  tmp = lc[5] ;
229  lc[5] = refl( lc[7] ) ;
230  lc[7] = refl( tmp ) ;
231 */
232  lc[0] = truncPyr::refl( lc[0] ) ;
233  lc[1] = truncPyr::refl( lc[1] ) ;
234  lc[2] = truncPyr::refl( lc[2] ) ;
235  lc[3] = truncPyr::refl( lc[3] ) ;
236  lc[4] = truncPyr::refl( lc[4] ) ;
237  lc[5] = truncPyr::refl( lc[5] ) ;
238  lc[6] = truncPyr::refl( lc[6] ) ;
239  lc[7] = truncPyr::refl( lc[7] ) ;
240 
241  ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
242 }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
def pv(vc)
Definition: MetAnalyzer.py:6
CaloCellGeometry::Pt3D Pt3D
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
Pt3D refl(const Pt3D &p)
void TruncatedPyramid::localCornersSwap ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 286 of file TruncatedPyramid.cc.

References localCorners(), and tmp.

Referenced by getTransform(), and EcalBarrelGeometry::localCorners().

289 {
290  localCorners( lc, pv, ref ) ;
291 
292  Pt3D tmp ;
293  tmp = lc[0] ;
294  lc[0] = lc[3] ;
295  lc[3] = tmp ;
296  tmp = lc[1] ;
297  lc[1] = lc[2] ;
298  lc[2] = tmp ;
299  tmp = lc[4] ;
300  lc[4] = lc[7] ;
301  lc[7] = tmp ;
302  tmp = lc[5] ;
303  lc[5] = lc[6] ;
304  lc[6] = tmp ;
305 
306  ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
307 }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
def pv(vc)
Definition: MetAnalyzer.py:6
CaloCellGeometry::Pt3D Pt3D
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
GlobalVector TruncatedPyramid::makeAxis ( void  )
private

Definition at line 96 of file TruncatedPyramid.cc.

References backCtr(), CaloCellGeometry::getPosition(), and Vector3DBase< T, FrameTag >::unit().

97 {
98  return GlobalVector( backCtr() -
100 }
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
Vector3DBase unit() const
Definition: Vector3DBase.h:57
const GlobalPoint backCtr(void) const
Global3DVector GlobalVector
Definition: GlobalVector.h:10
TruncatedPyramid & TruncatedPyramid::operator= ( const TruncatedPyramid tr)

Definition at line 33 of file TruncatedPyramid.cc.

References m_axis, and m_corOne.

34 {
35  CaloCellGeometry::operator=( tr ) ;
36  if( this != &tr )
37  {
38  m_axis = tr.m_axis ;
39  m_corOne = tr.m_corOne ;
40  }
41  return *this ;
42 }
GlobalVector m_axis
void TruncatedPyramid::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
overridevirtual

Implements CaloCellGeometry.

Definition at line 88 of file TruncatedPyramid.cc.

References localCorners().

91 {
92  localCorners( vec, pv, ref ) ;
93 }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
def pv(vc)
Definition: MetAnalyzer.py:6

Member Data Documentation

GlobalVector TruncatedPyramid::m_axis
private

Definition at line 83 of file TruncatedPyramid.h.

Referenced by axis(), getPhiAxis(), getPosition(), getThetaAxis(), and operator=().

Pt3D TruncatedPyramid::m_corOne
private

Definition at line 84 of file TruncatedPyramid.h.

Referenced by getTransform(), and operator=().