CMS 3D CMS Logo

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

A base class to handle the particular shape of HGCal volumes. More...

#include <FlatTrd.h>

Inheritance diagram for FlatTrd:
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
 
virtual float etaPos () const
 
 FlatTrd (void)
 
 FlatTrd (const FlatTrd &tr)
 
 FlatTrd (CornersMgr *cMgr, const GlobalPoint &fCtr, const GlobalPoint &bCtr, const GlobalPoint &cor1, const CCGFloat *parV)
 
 FlatTrd (const CornersVec &corn, const CCGFloat *par)
 
 FlatTrd (const FlatTrd &tr, const Pt3D &local)
 
Pt3D getLocal (const GlobalPoint &global) const
 
CCGFloat getPhiAxis () const
 
GlobalPoint const & getPosition () const override
 Returns the position of reference for this cell. More...
 
GlobalPoint getPosition (const Pt3D &local) const override
 
CCGFloat getThetaAxis () const
 
void getTransform (Tr3D &tr, Pt3DVec *lptr) const override
 --------— only needed by specific utility; overloaded when needed -— More...
 
FlatTrdoperator= (const FlatTrd &tr)
 
virtual float phiPos () const
 
void setPosition (const GlobalPoint &p)
 
void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
 
 ~FlatTrd () 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 GlobalPoint getPosition (CCGFloat) 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 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)
 

Static Public Attributes

static constexpr uint32_t k_Alp1 = 6
 
static constexpr uint32_t k_Alp2 =10
 
static constexpr uint32_t k_Cell =11
 
static constexpr uint32_t k_dX1 = 4
 
static constexpr uint32_t k_dX2 = 5
 
static constexpr uint32_t k_dX3 = 8
 
static constexpr uint32_t k_dX4 = 9
 
static constexpr uint32_t k_dY1 = 3
 
static constexpr uint32_t k_dY2 = 7
 
static constexpr uint32_t k_dZ = 0
 
static constexpr uint32_t k_Phi = 2
 
static constexpr uint32_t k_Theta = 1
 
static constexpr unsigned int ncorner_ = 8
 
static constexpr unsigned int ncornerBy2_ = 4
 
- Static Public Attributes inherited from CaloCellGeometry
static constexpr unsigned int k_cornerSize = 8
 
static const CCGFloat k_ScaleFromDDDtoGeant
 

Private Member Functions

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

Private Attributes

GlobalVector m_axis
 
Pt3D m_corOne
 
GlobalPoint m_global
 
Pt3D m_local
 
Tr3D m_tr
 

Additional Inherited Members

- 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 HGCal volumes.

Definition at line 19 of file FlatTrd.h.

Member Typedef Documentation

Definition at line 22 of file FlatTrd.h.

Definition at line 23 of file FlatTrd.h.

Definition at line 24 of file FlatTrd.h.

Definition at line 25 of file FlatTrd.h.

Constructor & Destructor Documentation

FlatTrd::FlatTrd ( void  )

Definition at line 23 of file FlatTrd.cc.

23  : CaloCellGeometry(), m_axis ( 0., 0., 0. ),
24  m_corOne ( 0., 0., 0. ), m_local (0., 0., 0.),
25  m_global ( 0., 0., 0. ) {
26 }
Pt3D m_local
Definition: FlatTrd.h:109
Pt3D m_corOne
Definition: FlatTrd.h:109
GlobalPoint m_global
Definition: FlatTrd.h:110
GlobalVector m_axis
Definition: FlatTrd.h:108
FlatTrd::FlatTrd ( const FlatTrd tr)

Definition at line 28 of file FlatTrd.cc.

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

Definition at line 51 of file FlatTrd.cc.

References etaPos(), getTransform(), glb, m_global, m_local, m_tr, and phiPos().

55  :
56  CaloCellGeometry ( fCtr, cMgr, parV ) ,
57  m_axis ( ( bCtr - fCtr ).unit() ) ,
58  m_corOne ( cor1.x(), cor1.y(), cor1.z() ),
59  m_local (0., 0., 0.) {
60  getTransform(m_tr,nullptr);
61  Pt3D glb = m_tr*m_local;
62  m_global = GlobalPoint(glb.x(),glb.y(),glb.z());
63 #ifdef EDM_ML_DEBUG
64  edm::LogVerbatim("CaloGeometry") << "FlatTrd: Local " << m_local
65  << " Global " << glb << " eta "
66  << etaPos() << " phi " << phiPos()
67  << " Translation " << m_tr.getTranslation()
68  << " and rotation " << m_tr.getRotation();
69 #endif
70 }
double glb
Definition: hdecay.h:105
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
T y() const
Definition: PV3DBase.h:63
Tr3D m_tr
Definition: FlatTrd.h:111
Pt3D m_local
Definition: FlatTrd.h:109
T z() const
Definition: PV3DBase.h:64
Pt3D m_corOne
Definition: FlatTrd.h:109
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
Definition: FlatTrd.cc:207
CaloCellGeometry::Pt3D Pt3D
GlobalPoint m_global
Definition: FlatTrd.h:110
virtual float phiPos() const
Definition: FlatTrd.h:71
virtual float etaPos() const
Definition: FlatTrd.h:70
T x() const
Definition: PV3DBase.h:62
GlobalVector m_axis
Definition: FlatTrd.h:108
FlatTrd::FlatTrd ( const CornersVec corn,
const CCGFloat par 
)

Definition at line 72 of file FlatTrd.cc.

References etaPos(), getTransform(), glb, m_axis, m_global, m_local, m_tr, makeAxis(), and phiPos().

73  :
74  CaloCellGeometry ( corn, par ) ,
75  m_corOne ( corn[0].x(), corn[0].y(), corn[0].z() ),
76  m_local (0., 0., 0.) {
77  getTransform(m_tr,nullptr);
78  m_axis = makeAxis();
79  Pt3D glb = m_tr*m_local;
80  m_global = GlobalPoint(glb.x(),glb.y(),glb.z());
81 #ifdef EDM_ML_DEBUG
82  edm::LogVerbatim("CaloGeometry") << "FlatTrd: Local " << m_local
83  << " Global " << glb << " eta "
84  << etaPos() << " phi " << phiPos()
85  << " Translation " << m_tr.getTranslation()
86  << " and rotation " << m_tr.getRotation();
87 #endif
88 }
double glb
Definition: hdecay.h:105
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Tr3D m_tr
Definition: FlatTrd.h:111
Pt3D m_local
Definition: FlatTrd.h:109
Pt3D m_corOne
Definition: FlatTrd.h:109
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
Definition: FlatTrd.cc:207
CaloCellGeometry::Pt3D Pt3D
GlobalVector makeAxis(void)
Definition: FlatTrd.cc:267
GlobalPoint m_global
Definition: FlatTrd.h:110
virtual float phiPos() const
Definition: FlatTrd.h:71
virtual float etaPos() const
Definition: FlatTrd.h:70
GlobalVector m_axis
Definition: FlatTrd.h:108
FlatTrd::FlatTrd ( const FlatTrd tr,
const Pt3D local 
)

Definition at line 90 of file FlatTrd.cc.

References etaPos(), glb, m_global, m_local, m_tr, and phiPos().

90  :
92  *this = tr;
93  Pt3D glb = m_tr*m_local;
94  m_global = GlobalPoint(glb.x(),glb.y(),glb.z());
95 #ifdef EDM_ML_DEBUG
96  edm::LogVerbatim("CaloGeometry") << "FlatTrd: Local " << m_local
97  << " Global " << glb << " eta "
98  << etaPos() << " phi " << phiPos()
99  << " Translation " << m_tr.getTranslation()
100  << " and rotation " << m_tr.getRotation();
101 #endif
102 }
double glb
Definition: hdecay.h:105
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Tr3D m_tr
Definition: FlatTrd.h:111
Pt3D m_local
Definition: FlatTrd.h:109
CaloCellGeometry::Pt3D Pt3D
GlobalPoint m_global
Definition: FlatTrd.h:110
virtual float phiPos() const
Definition: FlatTrd.h:71
virtual float etaPos() const
Definition: FlatTrd.h:70
FlatTrd::~FlatTrd ( )
override

Definition at line 104 of file FlatTrd.cc.

104 {}

Member Function Documentation

const GlobalVector & FlatTrd::axis ( ) const

Definition at line 142 of file FlatTrd.cc.

References m_axis.

Referenced by getTransform(), and phiPos().

142  {
143  return m_axis ;
144 }
GlobalVector m_axis
Definition: FlatTrd.h:108
GlobalPoint FlatTrd::backCtr ( void  ) const
private

Definition at line 271 of file FlatTrd.cc.

References PVValHelper::dz, CaloCellGeometry::getCorners(), k_dZ, m_local, m_tr, ncornerBy2_, and CaloCellGeometry::param().

Referenced by makeAxis().

271  {
272  float dz = (getCorners()[ncornerBy2_].z() > getCorners()[0].z()) ?
274  Pt3D local_b(m_local.x(),m_local.y(),m_local.z()+dz);
275  Pt3D global_b = m_tr*local_b;
276  GlobalPoint global(global_b.x(),global_b.y(),global_b.z());
277  return global;
278 }
static constexpr unsigned int ncornerBy2_
Definition: FlatTrd.h:99
Tr3D m_tr
Definition: FlatTrd.h:111
const CCGFloat * param() const
Pt3D m_local
Definition: FlatTrd.h:109
CaloCellGeometry::Pt3D Pt3D
CornersVec const & getCorners() const
Returns the corner points of this cell&#39;s volume.
static constexpr uint32_t k_dZ
Definition: FlatTrd.h:27
void FlatTrd::createCorners ( const std::vector< CCGFloat > &  pv,
const Tr3D tr,
std::vector< GlobalPoint > &  co 
)
static

Definition at line 152 of file FlatTrd.cc.

References mps_fire::i, localCorners(), ncorner_, AlCaHLTBitMon_ParallelJobs::p, and tmp.

Referenced by FastTimeGeometryLoader::buildGeom(), HGCalGeometryLoader::buildGeom(), and phiPos().

154  {
155 
156  assert( 11 <= pv.size() ) ;
157  assert( ncorner_ == co.size() ) ;
158 
159  Pt3DVec ko ( ncorner_, Pt3D(0,0,0) ) ;
160 
161  Pt3D tmp ;
162  Pt3DVec to ( ncorner_, Pt3D(0,0,0) ) ;
163  localCorners( to, &pv.front(), tmp ) ;
164 
165  for( unsigned int i ( 0 ) ; i != ncorner_ ; ++i ) {
166  ko[i] = tr * to[i] ; // apply transformation
167  const Pt3D & p ( ko[i] ) ;
168  co[ i ] = GlobalPoint( p.x(), p.y(), p.z() ) ;
169 #ifdef EDM_ML_DEBUG
170  edm::LogVerbatim("CaloGeometry") << "Corner[" << i << "] = " << co[i];
171 #endif
172  }
173 }
CaloCellGeometry::Pt3D Pt3D
Definition: FlatTrd.h:23
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static constexpr unsigned int ncorner_
Definition: FlatTrd.h:98
def pv(vc)
Definition: MetAnalyzer.py:7
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatTrd.cc:175
CaloCellGeometry::Pt3D Pt3D
CaloCellGeometry::Pt3DVec Pt3DVec
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
virtual float FlatTrd::etaPos ( ) const
inlinevirtual

Definition at line 70 of file FlatTrd.h.

References PV3DBase< T, PVType, FrameType >::eta(), and m_global.

Referenced by FlatTrd(), operator<<(), and operator=().

70 { return m_global.eta(); }
T eta() const
Definition: PV3DBase.h:76
GlobalPoint m_global
Definition: FlatTrd.h:110
Pt3D FlatTrd::getLocal ( const GlobalPoint global) const

Definition at line 123 of file FlatTrd.cc.

References DTRecHitClients_cfi::local, m_tr, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by phiPos().

123  {
124  Pt3D local = m_tr.inverse()*Pt3D(global.x(),global.y(),global.z());
125 #ifdef EDM_ML_DEBUG
126  edm::LogVerbatim("CaloGeometry") << "FlatTrd::Global " << global.x() << ":"
127  << global.y() << ":" << global.z()
128  << " Local " << local.x() << ":"
129  << local.y() << ":" << local.z();
130 #endif
131  return local;
132 }
CaloCellGeometry::Pt3D Pt3D
Definition: FlatTrd.h:23
T y() const
Definition: PV3DBase.h:63
Tr3D m_tr
Definition: FlatTrd.h:111
T z() const
Definition: PV3DBase.h:64
CaloCellGeometry::Pt3D Pt3D
T x() const
Definition: PV3DBase.h:62
CCGFloat FlatTrd::getPhiAxis ( ) const

Definition at line 138 of file FlatTrd.cc.

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

Referenced by operator<<(), and phiPos().

138  {
139  return m_axis.phi() ;
140 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
GlobalVector m_axis
Definition: FlatTrd.h:108
GlobalPoint const& FlatTrd::getPosition ( ) const
inlineoverridevirtual

Returns the position of reference for this cell.

Reimplemented from CaloCellGeometry.

Definition at line 68 of file FlatTrd.h.

References DTRecHitClients_cfi::local, and m_global.

Referenced by makeAxis(), and operator<<().

68 { return m_global; }
GlobalPoint m_global
Definition: FlatTrd.h:110
GlobalPoint FlatTrd::getPosition ( const Pt3D local) const
overridevirtual

Reimplemented from CaloCellGeometry.

Definition at line 106 of file FlatTrd.cc.

References glb, DTRecHitClients_cfi::local, and m_tr.

106  {
107  Pt3D glb = m_tr*local;
108 #ifdef EDM_ML_DEBUG
109  edm::LogVerbatim("CaloGeometry") << "FlatTrd::Local " << local.x() << ":"
110  << local.y() << ":" << local.z()
111  << " Global " << glb.x() << ":" << glb.y()
112  << ":" << glb.z() << " TR " << m_tr.xx()
113  << ":" << m_tr.xy() << ":" << m_tr.xz()
114  << ":" << m_tr.yx() << ":" << m_tr.yy()
115  << ":" << m_tr.yz() << ":" << m_tr.zx()
116  << ":" << m_tr.zy() << ":" << m_tr.zz()
117  << ":" << m_tr.dx() << ":" << m_tr.dy()
118  << ":" << m_tr.dz();
119 #endif
120  return GlobalPoint(glb.x(),glb.y(),glb.z());
121 }
double glb
Definition: hdecay.h:105
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Tr3D m_tr
Definition: FlatTrd.h:111
CaloCellGeometry::Pt3D Pt3D
CCGFloat FlatTrd::getThetaAxis ( ) const

Definition at line 134 of file FlatTrd.cc.

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

Referenced by operator<<(), and phiPos().

134  {
135  return m_axis.theta() ;
136 }
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
GlobalVector m_axis
Definition: FlatTrd.h:108
void FlatTrd::getTransform ( Tr3D tr,
Pt3DVec lptr 
) const
overridevirtual

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

Reimplemented from CaloCellGeometry.

Definition at line 207 of file FlatTrd.cc.

References angle(), axis(), MillePedeFileConverter_cfg::e, CaloCellGeometry::getPosition(), localCorners(), m_corOne, mag(), ncorner_, 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 FlatTrd(), initCorners(), and phiPos().

207  {
209  const Pt3D gFront ( p.x(), p.y(), p.z() ) ;
210  const DPt3D dgFront ( p.x(), p.y(), p.z() ) ;
211 
212  Pt3D lFront ;
213  assert( nullptr != param() ) ;
214  std::vector<Pt3D > lc( ncorner_, Pt3D(0,0,0) ) ;
215  localCorners( lc, param(), lFront ) ;
216 
217  // figure out if reflction volume or not
218 
219  Pt3D lBack ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7]) ) ;
220 
221  const DPt3D dlFront ( lFront.x(), lFront.y(), lFront.z() ) ;
222  const DPt3D dlBack ( lBack.x() , lBack.y() , lBack.z() ) ;
223  const DPt3D dlOne ( lc[0].x() , lc[0].y() , lc[0].z() ) ;
224 
225  const FVec3D dgAxis ( axis().x(), axis().y(), axis().z() ) ;
226 
227  const DPt3D dmOne ( m_corOne.x(), m_corOne.y(), m_corOne.z() ) ;
228 
229  const DPt3D dgBack ( dgFront + ( dlBack - dlFront ).mag()*dgAxis ) ;
230  DPt3D dgOne ( dgFront + ( dlOne - dlFront ).mag()*( dmOne - dgFront ).unit() ) ;
231 
232  const double dlangle ( ( dlBack - dlFront).angle( dlOne - dlFront ) ) ;
233  const double dgangle ( ( dgBack - dgFront).angle( dgOne - dgFront ) ) ;
234  const double dangle ( dlangle - dgangle ) ;
235 
236  if( 1.e-6 < fabs(dangle) ) {//guard against precision problems
237  const DPlane3D dgPl ( dgFront, dgOne, dgBack ) ;
238  const DPt3D dp2 ( dgFront + dgPl.normal().unit() ) ;
239 
240  DPt3D dgOld ( dgOne ) ;
241 
242  dgOne = ( dgFront + HepGeom::Rotate3D( -dangle, dgFront, dp2 )*
243  DVec3D( dgOld - dgFront ) ) ;
244  }
245 
246  tr = Tr3D( dlFront , dlBack , dlOne ,
247  dgFront , dgBack , dgOne ) ;
248 
249  if( nullptr != lptr ) (*lptr) = lc ;
250 }
const GlobalVector & axis() const
Definition: FlatTrd.cc:142
CaloCellGeometry::Pt3D Pt3D
Definition: FlatTrd.h:23
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.
static constexpr unsigned int ncorner_
Definition: FlatTrd.h:98
const CCGFloat * param() const
HepGeom::Vector3D< double > DVec3D
Definition: FlatTrd.cc:17
Pt3D m_corOne
Definition: FlatTrd.h:109
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatTrd.cc:175
CaloCellGeometry::Pt3D Pt3D
HepGeom::Plane3D< double > DPlane3D
CaloCellGeometry::Tr3D Tr3D
Definition: FlatTrd.h:25
HepGeom::Vector3D< CCGFloat > FVec3D
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
void FlatTrd::initCorners ( CaloCellGeometry::CornersVec co)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 252 of file FlatTrd.cc.

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

252  {
253 
254  if( co.uninitialized() ) {
255  CornersVec& corners ( co ) ;
256  Pt3DVec lc ;
257  Tr3D tr ;
258  getTransform( tr, &lc ) ;
259 
260  for (unsigned int i ( 0 ) ; i != ncorner_ ; ++i ) {
261  const Pt3D corn ( tr*lc[i] ) ;
262  corners[i] = GlobalPoint( corn.x(), corn.y(), corn.z() ) ;
263  }
264  }
265 }
EZArrayFL< GlobalPoint > CornersVec
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static constexpr unsigned int ncorner_
Definition: FlatTrd.h:98
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
Definition: FlatTrd.cc:207
CaloCellGeometry::Pt3D Pt3D
CaloCellGeometry::Pt3DVec Pt3DVec
CaloCellGeometry::Tr3D Tr3D
bool uninitialized() const
Definition: EZArrayFL.h:77
void FlatTrd::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 175 of file FlatTrd.cc.

References PVValHelper::dz, h, k_Alp1, k_dX1, k_dX2, k_dY1, k_dZ, ncorner_, and funct::tan().

Referenced by createCorners(), getTransform(), FastTimeGeometry::localCorners(), HGCalGeometry::localCorners(), phiPos(), and vocalCorners().

177  {
178  assert( nullptr != pv ) ;
179  assert( ncorner_ == lc.size() ) ;
180 
181  const CCGFloat dz ( pv[FlatTrd::k_dZ] ) ;
182  const CCGFloat h ( pv[FlatTrd::k_dY1] ) ;
183  const CCGFloat bl ( pv[FlatTrd::k_dX1] ) ;
184  const CCGFloat tl ( pv[FlatTrd::k_dX2] ) ;
185  const CCGFloat a1 ( pv[FlatTrd::k_Alp1] ) ;
186 
187  const CCGFloat ta1 ( tan( a1 ) ) ;
188 
189  lc[0] = Pt3D ( - h*ta1 - bl, - h , -dz ); // (-,-,-)
190  lc[1] = Pt3D ( + h*ta1 - tl, + h , -dz ); // (-,+,-)
191  lc[2] = Pt3D ( + h*ta1 + tl, + h , -dz ); // (+,+,-)
192  lc[3] = Pt3D ( - h*ta1 + bl, - h , -dz ); // (+,-,-)
193  lc[4] = Pt3D ( - h*ta1 - bl, - h , dz ); // (-,-,+)
194  lc[5] = Pt3D ( + h*ta1 - tl, + h , dz ); // (-,+,+)
195  lc[6] = Pt3D ( + h*ta1 + tl, + h , dz ); // (+,+,+)
196  lc[7] = Pt3D ( - h*ta1 + bl, - h , dz ); // (+,-,+)
197 
198  ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
199 #ifdef EDM_ML_DEBUG
200  edm::LogVerbatim("CaloGeometry") << "Ref " << ref << " Local Corners "
201  << lc[0] << "|" << lc[1] << "|" << lc[2]
202  << "|" << lc[3] << "|" << lc[4] << "|"
203  << lc[5] << "|" << lc[6] << "|" << lc[7];
204 #endif
205 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
CaloCellGeometry::Pt3D Pt3D
Definition: FlatTrd.h:23
static constexpr uint32_t k_dY1
Definition: FlatTrd.h:32
static constexpr unsigned int ncorner_
Definition: FlatTrd.h:98
static constexpr uint32_t k_dX1
Definition: FlatTrd.h:33
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
def pv(vc)
Definition: MetAnalyzer.py:7
CaloCellGeometry::CCGFloat CCGFloat
static constexpr uint32_t k_dZ
Definition: FlatTrd.h:27
static constexpr uint32_t k_Alp1
Definition: FlatTrd.h:37
static constexpr uint32_t k_dX2
Definition: FlatTrd.h:35
GlobalVector FlatTrd::makeAxis ( void  )
private

Definition at line 267 of file FlatTrd.cc.

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

Referenced by FlatTrd().

267  {
268  return GlobalVector( backCtr() - getPosition() ).unit() ;
269 }
GlobalPoint const & getPosition() const override
Returns the position of reference for this cell.
Definition: FlatTrd.h:68
GlobalPoint backCtr(void) const
Definition: FlatTrd.cc:271
Vector3DBase unit() const
Definition: Vector3DBase.h:57
Global3DVector GlobalVector
Definition: GlobalVector.h:10
FlatTrd & FlatTrd::operator= ( const FlatTrd tr)

Definition at line 32 of file FlatTrd.cc.

References etaPos(), m_axis, m_corOne, m_global, m_local, m_tr, and phiPos().

32  {
33  CaloCellGeometry::operator=( tr ) ;
34  if ( this != &tr ) {
35  m_axis = tr.m_axis ;
36  m_corOne = tr.m_corOne ;
37  m_local = tr.m_local;
38  m_global = tr.m_global;
39  m_tr = tr.m_tr;
40  }
41 #ifdef EDM_ML_DEBUG
42  edm::LogVerbatim("CaloGeometry") << "FlatTrd(Copy): Local " << m_local
43  << " Global " << m_global << " eta "
44  << etaPos() << " phi " << phiPos()
45  << " Translation " << m_tr.getTranslation()
46  << " and rotation " << m_tr.getRotation();
47 #endif
48  return *this ;
49 }
Tr3D m_tr
Definition: FlatTrd.h:111
Pt3D m_local
Definition: FlatTrd.h:109
Pt3D m_corOne
Definition: FlatTrd.h:109
GlobalPoint m_global
Definition: FlatTrd.h:110
virtual float phiPos() const
Definition: FlatTrd.h:71
virtual float etaPos() const
Definition: FlatTrd.h:70
GlobalVector m_axis
Definition: FlatTrd.h:108
virtual float FlatTrd::phiPos ( ) const
inlinevirtual

Definition at line 71 of file FlatTrd.h.

References axis(), createCorners(), getLocal(), getPhiAxis(), getThetaAxis(), getTransform(), localCorners(), m_global, PV3DBase< T, PVType, FrameType >::phi(), MetAnalyzer::pv(), and vocalCorners().

Referenced by FlatTrd(), operator<<(), and operator=().

71 { return m_global.phi(); }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
GlobalPoint m_global
Definition: FlatTrd.h:110
void FlatTrd::setPosition ( const GlobalPoint p)
inline

Definition at line 96 of file FlatTrd.h.

References m_global, AlCaHLTBitMon_ParallelJobs::p, and CaloCellGeometry::setRefPoint().

96 { m_global = p; setRefPoint(p); }
void setRefPoint(const GlobalPoint &pos)
GlobalPoint m_global
Definition: FlatTrd.h:110
void FlatTrd::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
overridevirtual

Implements CaloCellGeometry.

Definition at line 146 of file FlatTrd.cc.

References localCorners().

Referenced by phiPos().

148  {
149  localCorners( vec, pv, ref ) ;
150 }
def pv(vc)
Definition: MetAnalyzer.py:7
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatTrd.cc:175

Member Data Documentation

constexpr uint32_t FlatTrd::k_Alp1 = 6
static

Definition at line 37 of file FlatTrd.h.

Referenced by HGCalGeometryLoader::build(), HGCalGeometry::getSummary(), and localCorners().

constexpr uint32_t FlatTrd::k_Alp2 =10
static

Definition at line 44 of file FlatTrd.h.

Referenced by HGCalGeometryLoader::build(), and HGCalGeometry::getSummary().

constexpr uint32_t FlatTrd::k_Cell =11
static
constexpr uint32_t FlatTrd::k_dX1 = 4
static

Definition at line 33 of file FlatTrd.h.

Referenced by HGCalGeometryLoader::build(), HGCalGeometry::getSummary(), and localCorners().

constexpr uint32_t FlatTrd::k_dX2 = 5
static

Definition at line 35 of file FlatTrd.h.

Referenced by HGCalGeometryLoader::build(), HGCalGeometry::getSummary(), and localCorners().

constexpr uint32_t FlatTrd::k_dX3 = 8
static

Definition at line 40 of file FlatTrd.h.

Referenced by HGCalGeometryLoader::build(), and HGCalGeometry::getSummary().

constexpr uint32_t FlatTrd::k_dX4 = 9
static

Definition at line 42 of file FlatTrd.h.

Referenced by HGCalGeometryLoader::build(), and HGCalGeometry::getSummary().

constexpr uint32_t FlatTrd::k_dY1 = 3
static

Definition at line 32 of file FlatTrd.h.

Referenced by HGCalGeometryLoader::build(), HGCalGeometry::getSummary(), and localCorners().

constexpr uint32_t FlatTrd::k_dY2 = 7
static

Definition at line 39 of file FlatTrd.h.

Referenced by HGCalGeometryLoader::build(), and HGCalGeometry::getSummary().

constexpr uint32_t FlatTrd::k_dZ = 0
static
constexpr uint32_t FlatTrd::k_Phi = 2
static

Definition at line 30 of file FlatTrd.h.

Referenced by HGCalGeometryLoader::build(), and HGCalGeometry::getSummary().

constexpr uint32_t FlatTrd::k_Theta = 1
static

Definition at line 28 of file FlatTrd.h.

Referenced by HGCalGeometryLoader::build(), and HGCalGeometry::getSummary().

GlobalVector FlatTrd::m_axis
private

Definition at line 108 of file FlatTrd.h.

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

Pt3D FlatTrd::m_corOne
private

Definition at line 109 of file FlatTrd.h.

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

GlobalPoint FlatTrd::m_global
private

Definition at line 110 of file FlatTrd.h.

Referenced by etaPos(), FlatTrd(), getPosition(), operator=(), phiPos(), and setPosition().

Pt3D FlatTrd::m_local
private

Definition at line 109 of file FlatTrd.h.

Referenced by backCtr(), FlatTrd(), and operator=().

Tr3D FlatTrd::m_tr
private

Definition at line 111 of file FlatTrd.h.

Referenced by backCtr(), FlatTrd(), getLocal(), getPosition(), and operator=().

constexpr unsigned int FlatTrd::ncorner_ = 8
static
constexpr unsigned int FlatTrd::ncornerBy2_ = 4
static

Definition at line 99 of file FlatTrd.h.

Referenced by backCtr(), and HGCalGeometryLoader::buildGeom().