CMS 3D CMS Logo

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

#include <GlobalDetRodRangeZPhi.h>

Public Types

typedef std::pair< float, float > Range
 

Public Member Functions

 GlobalDetRodRangeZPhi (const Plane &RodPlane)
 
Range phiRange () const
 
Range zRange () const
 

Private Attributes

Range thePhiRange
 
Range theZRange
 

Detailed Description

Implementation class for PhiZMeasurementEstimator etc.

Definition at line 12 of file GlobalDetRodRangeZPhi.h.

Member Typedef Documentation

◆ Range

typedef std::pair<float, float> GlobalDetRodRangeZPhi::Range

Definition at line 14 of file GlobalDetRodRangeZPhi.h.

Constructor & Destructor Documentation

◆ GlobalDetRodRangeZPhi()

GlobalDetRodRangeZPhi::GlobalDetRodRangeZPhi ( const Plane RodPlane)

Definition at line 8 of file GlobalDetRodRangeZPhi.cc.

8  {
9  float dx = plane.bounds().width() / 2.;
10  float dy = plane.bounds().length() / 2.;
11  float dz = plane.bounds().thickness() / 2.;
12 
13  // rods may be inverted (actually are in every other layer), so have to find out the
14  // orientation of the local frame
15  float deltaZ =
16  (plane.toGlobal(LocalPoint(0, 0, -dz)).perp() < plane.toGlobal(LocalPoint(0, 0, dz)).perp()) ? -dz : dz;
17 
18  const std::array<Surface::GlobalPoint, 4> corners{{plane.toGlobal(LocalPoint(-dx, -dy, deltaZ)),
19  plane.toGlobal(LocalPoint(-dx, dy, deltaZ)),
20  plane.toGlobal(LocalPoint(dx, -dy, deltaZ)),
21  plane.toGlobal(LocalPoint(dx, dy, deltaZ))}};
22 
23  float phimin = corners[0].phi();
24  float phimax = phimin;
25 
26  float zmin = corners[0].z();
27  float zmax = zmin;
28 
29  for (const auto& corner : corners) {
30  float phi = corner.phi();
31  if (Geom::phiLess(phi, phimin))
32  phimin = phi;
33  if (Geom::phiLess(phimax, phi))
34  phimax = phi;
35 
36  float z = corner.z();
37  zmin = std::min(zmin, z);
38  zmax = std::max(zmax, z);
39  }
40 
41  theZRange.first = zmin;
42  theZRange.second = zmax;
43  thePhiRange.first = phimin;
44  thePhiRange.second = phimax;
45 }

References Surface::bounds(), TCMET_cfi::corner, L1TkHTMissProducer_cfi::deltaZ, PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, Bounds::length(), SiStripPI::max, min(), PV3DBase< T, PVType, FrameType >::perp(), phi, Geom::phiLess(), phimax, phimin, thePhiRange, theZRange, Bounds::thickness(), Surface::toGlobal(), Bounds::width(), z, SiStripMonitorCluster_cfi::zmax, and SiStripMonitorCluster_cfi::zmin.

Member Function Documentation

◆ phiRange()

Range GlobalDetRodRangeZPhi::phiRange ( ) const
inline

Definition at line 19 of file GlobalDetRodRangeZPhi.h.

19 { return thePhiRange; }

References thePhiRange.

◆ zRange()

Range GlobalDetRodRangeZPhi::zRange ( ) const
inline

Definition at line 18 of file GlobalDetRodRangeZPhi.h.

18 { return theZRange; }

References theZRange.

Member Data Documentation

◆ thePhiRange

Range GlobalDetRodRangeZPhi::thePhiRange
private

Definition at line 23 of file GlobalDetRodRangeZPhi.h.

Referenced by GlobalDetRodRangeZPhi(), and phiRange().

◆ theZRange

Range GlobalDetRodRangeZPhi::theZRange
private

Definition at line 22 of file GlobalDetRodRangeZPhi.h.

Referenced by GlobalDetRodRangeZPhi(), and zRange().

min
T min(T a, T b)
Definition: MathUtil.h:58
phimin
float phimin
Definition: ReggeGribovPartonMCHadronizer.h:107
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
SiStripMonitorCluster_cfi.zmin
zmin
Definition: SiStripMonitorCluster_cfi.py:200
GlobalDetRodRangeZPhi::thePhiRange
Range thePhiRange
Definition: GlobalDetRodRangeZPhi.h:23
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
DDAxes::z
Geom::phiLess
bool phiLess(float phi1, float phi2)
Definition: VectorUtil.h:18
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
GlobalDetRodRangeZPhi::theZRange
Range theZRange
Definition: GlobalDetRodRangeZPhi.h:22
PVValHelper::dy
Definition: PVValidationHelpers.h:50
phimax
float phimax
Definition: ReggeGribovPartonMCHadronizer.h:106
DDAxes::phi
L1TkHTMissProducer_cfi.deltaZ
deltaZ
Definition: L1TkHTMissProducer_cfi.py:13
PVValHelper::dz
Definition: PVValidationHelpers.h:51
TCMET_cfi.corner
corner
Definition: TCMET_cfi.py:34
PVValHelper::dx
Definition: PVValidationHelpers.h:49