CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions
PreshowerStrip Class Reference

A base class to handle the shape of preshower strips. More...

#include <PreshowerStrip.h>

Inheritance diagram for PreshowerStrip:
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

CCGFloat dx () const
 
CCGFloat dy () const
 
CCGFloat dz () const
 
void getTransform (Tr3D &tr, Pt3DVec *) const override
 --------— only needed by specific utility; overloaded when needed -— More...
 
PreshowerStripoperator= (const PreshowerStrip &tr)
 
 PreshowerStrip ()
 
 PreshowerStrip (const PreshowerStrip &tr)
 
 PreshowerStrip (const GlobalPoint &po, CornersMgr *mgr, const CCGFloat *parm)
 
CCGFloat tilt () const
 
void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
 
 ~PreshowerStrip () override
 
- Public Member Functions inherited from CaloCellGeometry
bool emptyCorners () const
 
float etaPos () const
 
float etaSpan () const
 
const GlobalPointgetBackPoint () const
 
CornersVec const & getCorners () const
 Returns the corner points of this cell's volume. More...
 
RepCorners const & getCornersREP () const
 
const GlobalPointgetPosition () const
 Returns the position of reference for this cell. More...
 
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
 
virtual ~CaloCellGeometry ()
 

Static Public Member Functions

static void localCorners (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

void initCorners (CaloCellGeometry::CornersVec &) override
 

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 ()
 

Detailed Description

A base class to handle the shape of preshower strips.

Author
F. Cossutti

Definition at line 23 of file PreshowerStrip.h.

Member Typedef Documentation

Definition at line 27 of file PreshowerStrip.h.

Definition at line 28 of file PreshowerStrip.h.

Definition at line 29 of file PreshowerStrip.h.

Definition at line 30 of file PreshowerStrip.h.

Constructor & Destructor Documentation

PreshowerStrip::PreshowerStrip ( )

Definition at line 10 of file PreshowerStrip.cc.

12 {}
PreshowerStrip::PreshowerStrip ( const PreshowerStrip tr)

Definition at line 14 of file PreshowerStrip.cc.

15  : CaloCellGeometry( tr )
16 {
17  *this = tr ;
18 }
PreshowerStrip::PreshowerStrip ( const GlobalPoint po,
CornersMgr mgr,
const CCGFloat parm 
)
inline

Definition at line 38 of file PreshowerStrip.h.

References CaloCellGeometry::initSpan(), and ~PreshowerStrip().

40  :
41  CaloCellGeometry ( po , mgr, parm ) {initSpan();}
PreshowerStrip::~PreshowerStrip ( )
override

Definition at line 20 of file PreshowerStrip.cc.

Referenced by PreshowerStrip().

21 {}

Member Function Documentation

CCGFloat PreshowerStrip::dx ( ) const
inline

Definition at line 45 of file PreshowerStrip.h.

References CaloCellGeometry::param().

Referenced by initCorners(), localCorners(), and operator<<().

45 { return param()[0] ; }
const CCGFloat * param() const
CCGFloat PreshowerStrip::dy ( ) const
inline

Definition at line 46 of file PreshowerStrip.h.

References CaloCellGeometry::param().

Referenced by initCorners(), localCorners(), and operator<<().

46 { return param()[1] ; }
const CCGFloat * param() const
CCGFloat PreshowerStrip::dz ( ) const
inline

Definition at line 47 of file PreshowerStrip.h.

References CaloCellGeometry::param().

Referenced by Electron.Electron::cutBasedId(), ntupleDataFormat.Track::dzPull(), initCorners(), localCorners(), and operator<<().

47 { return param()[2] ; }
const CCGFloat * param() const
void PreshowerStrip::getTransform ( Tr3D tr,
Pt3DVec lptr 
) const
inlineoverridevirtual

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

Reimplemented from CaloCellGeometry.

Definition at line 59 of file PreshowerStrip.h.

References initCorners(), operator<<(), and alignCSCRings::s.

60  { }
void PreshowerStrip::initCorners ( CaloCellGeometry::CornersVec corners)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 34 of file PreshowerStrip.cc.

References funct::cos(), dx(), dy(), dz(), CaloCellGeometry::getPosition(), mps_fire::i, funct::sin(), fftjetcommon_cfi::sx, fftjetcommon_cfi::sy, tilt(), EZArrayFL< T >::uninitialized(), x, PV3DBase< T, PVType, FrameType >::x(), y, PV3DBase< T, PVType, FrameType >::y(), z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by getTransform().

35 {
36  if( corners.uninitialized() )
37  {
38  const GlobalPoint& ctr ( getPosition() ) ;
39  const CCGFloat x ( ctr.x() ) ;
40  const CCGFloat y ( ctr.y() ) ;
41  const CCGFloat z ( ctr.z() ) ;
42 
43  const double st ( sin(tilt()) ) ;
44  const double ct ( cos(tilt()) ) ;
45 
46  for( unsigned int ix ( 0 ) ; ix !=2 ; ++ix )
47  {
48  const double sx ( 0 == ix ? -1.0 : +1.0 ) ;
49  for( unsigned int iy ( 0 ) ; iy !=2 ; ++iy )
50  {
51  const double sy ( 0 == iy ? -1.0 : +1.0 ) ;
52  for( unsigned int iz ( 0 ) ; iz !=2 ; ++iz )
53  {
54  const double sz ( 0 == iz ? -1.0 : +1.0 ) ;
55  const unsigned int i ( 4*iz + 2*ix +
56  ( 1 == ix ? 1-iy : iy ) ) ;//keeps ordering same as before
57 
58  corners[ i ] = GlobalPoint(
59  dy()>dx() ?
60  x + sx*dx() :
61  x + sx*dx()*ct - sz*dz()*st ,
62  dy()<dx() ?
63  y + sy*dy() :
64  y + sy*dy()*ct - sz*dz()*st ,
65  dy()>dx() ?
66  z + sz*dz()*ct + sy*dy()*st :
67  z + sz*dz()*ct + sx*dx()*st ) ;
68  }
69  }
70  }
71  }
72 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
CCGFloat dx() const
CaloCellGeometry::CCGFloat CCGFloat
CCGFloat tilt() const
CCGFloat dy() const
CCGFloat dz() const
bool uninitialized() const
Definition: EZArrayFL.h:77
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
void PreshowerStrip::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 96 of file PreshowerStrip.cc.

References dx(), dy(), and dz().

Referenced by EcalPreshowerGeometry::localCorners(), and vocalCorners().

99 {
100  assert( 8 == lc.size() ) ;
101  assert( nullptr != pv ) ;
102 
103  const CCGFloat dx ( pv[0] ) ;
104  const CCGFloat dy ( pv[1] ) ;
105  const CCGFloat dz ( pv[2] ) ;
106 
107  lc[0] = Pt3D( -dx, -dy, -dz ) ;
108  lc[1] = Pt3D( -dx, dy, -dz ) ;
109  lc[2] = Pt3D( dx, dy, -dz ) ;
110  lc[3] = Pt3D( dx, -dy, -dz ) ;
111  lc[4] = Pt3D( -dx, -dy, dz ) ;
112  lc[5] = Pt3D( -dx, dy, dz ) ;
113  lc[6] = Pt3D( dx, dy, dz ) ;
114  lc[7] = Pt3D( dx, -dy, dz ) ;
115 
116  ref = Pt3D(0,0,0) ;
117 }
CaloCellGeometry::Pt3D Pt3D
def pv(vc)
Definition: MetAnalyzer.py:6
CCGFloat dx() const
CaloCellGeometry::CCGFloat CCGFloat
CCGFloat dy() const
CCGFloat dz() const
PreshowerStrip & PreshowerStrip::operator= ( const PreshowerStrip tr)

Definition at line 24 of file PreshowerStrip.cc.

25 {
26  if( &tr != this )
27  {
28  CaloCellGeometry::operator=( tr ) ;
29  }
30  return *this ;
31 }
CCGFloat PreshowerStrip::tilt ( ) const
inline

Definition at line 48 of file PreshowerStrip.h.

References CaloCellGeometry::param().

Referenced by initCorners().

48 { return param()[3] ; }
const CCGFloat * param() const
void PreshowerStrip::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
inlineoverridevirtual

Implements CaloCellGeometry.

Definition at line 50 of file PreshowerStrip.h.

References localCorners(), and MetAnalyzer::pv().

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