CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Static Protected Attributes
MultipleScatteringGeometry Class Reference

#include <MultipleScatteringGeometry.h>

Public Member Functions

std::vector< MSLayerdetLayers (float eta, float z, const MagneticField &bfield) const
 
std::vector< MSLayerdetLayers () const
 
 MultipleScatteringGeometry (const GeometricSearchTracker &tracker)
 
std::vector< MSLayerotherLayers (float eta) const
 

Protected Attributes

std::vector< const DetLayer * > theLayers
 

Static Protected Attributes

static const float beamPipeR = 2.94
 
static const float endflangesZ = 30
 
static const float supportR = 19.
 

Detailed Description

Definition at line 12 of file MultipleScatteringGeometry.h.

Constructor & Destructor Documentation

MultipleScatteringGeometry::MultipleScatteringGeometry ( const GeometricSearchTracker tracker)

Definition at line 17 of file MultipleScatteringGeometry.cc.

References GeometricSearchTracker::barrelLayers(), cuy::ib, GeometricSearchTracker::negForwardLayers(), and GeometricSearchTracker::posForwardLayers().

17  {
18  vector<BarrelDetLayer const *> barrelLayers = tracker.barrelLayers();
19  vector<BarrelDetLayer const *>::const_iterator ib;
20  vector<ForwardDetLayer const *> forwardPosLayers = tracker.posForwardLayers();
21  vector<ForwardDetLayer const *> forwardNegLayers = tracker.negForwardLayers();
22  vector<ForwardDetLayer const *>::const_iterator ie;
23  // barrelLayers = accessor.barrelLayers();
24  for (ib = barrelLayers.begin(); ib != barrelLayers.end(); ib++)
25  theLayers.push_back(*ib);
26 
27  // forwardLayers = accessor.negativeEndcapLayers();
28  for (ie = forwardPosLayers.begin(); ie != forwardPosLayers.end(); ie++)
29  theLayers.push_back(*ie);
30  for (ie = forwardNegLayers.begin(); ie != forwardNegLayers.end(); ie++)
31  theLayers.push_back(*ie);
32 }
int ib
Definition: cuy.py:661
std::vector< ForwardDetLayer const * > const & posForwardLayers() const
std::vector< ForwardDetLayer const * > const & negForwardLayers() const
std::vector< const DetLayer * > theLayers
std::vector< BarrelDetLayer const * > const & barrelLayers() const

Member Function Documentation

vector< MSLayer > MultipleScatteringGeometry::detLayers ( float  eta,
float  z,
const MagneticField bfield 
) const

Definition at line 44 of file MultipleScatteringGeometry.cc.

References alongMomentum, GeomDetEnumerators::barrel, edm::contains(), DeadROC_duringRun::dir, runTauDisplay::dr, PVValHelper::dz, GeomDetEnumerators::endcap, TrajectoryStateOnSurface::globalPosition(), PixelRecoRange< T >::inside(), TrajectoryStateOnSurface::isValid(), PV3DBase< T, PVType, FrameType >::perp(), GeometricSearchDet::position(), Propagator::propagate(), HLT_FULL_cff::propagator, alignCSCRings::r, mps_fire::result, BarrelDetLayer::specificSurface(), ForwardDetLayer::specificSurface(), PV3DBase< T, PVType, FrameType >::z(), SiPixelPI::zero, and beampixel_dqm_sourceclient-live_cfg::zRange.

Referenced by MSLayersKeeperX0Averaged::MSLayersKeeperX0Averaged().

44  {
45  vector<MSLayer> result;
46  GlobalPoint zero(0, 0, z);
47  float r = 1;
48  float dirZ = r * sinh(eta);
49  GlobalVector dir(r, 0., dirZ);
52  vector<const DetLayer *>::const_iterator il;
54  for (il = theLayers.begin(); il != theLayers.end(); il++) {
55  bool contains = false;
56  // if ((*il)->subDetector() != PixelBarrel && (*il)->subDetector()!= PixelEndcap) continue;
57 
58  if ((*il)->location() == barrel) {
59  const BarrelDetLayer *bl = dynamic_cast<const BarrelDetLayer *>(*il);
60  if (!bl)
61  continue;
62  tsos = propagator.propagate(fts, bl->specificSurface());
63  if (!tsos.isValid())
64  continue;
65  float r = bl->specificSurface().radius();
66  float dr = bl->specificSurface().bounds().thickness();
67  float z = bl->position().z();
68  float dz = bl->specificSurface().bounds().length();
69  PixelRecoRange<float> rRange(r - dr / 2., r + dr / 2.);
70  PixelRecoRange<float> zRange(z - dz / 2., z + dz / 2.);
71  contains = rRange.inside(tsos.globalPosition().perp()) && zRange.inside(tsos.globalPosition().z());
72  // contains = bl->contains((*il)->toLocal(tsos.globalPosition()));
73  } else if ((*il)->location() == endcap) {
74  const ForwardDetLayer *fl = dynamic_cast<const ForwardDetLayer *>(*il);
75  if (!fl)
76  continue;
77  if (fl->position().z() * eta < 0)
78  continue;
79  const BoundDisk &disk = fl->specificSurface();
80  tsos = propagator.propagate(fts, disk);
81  if (!tsos.isValid())
82  continue;
83  float zMin = disk.position().z() - disk.bounds().thickness() / 2;
84  float zMax = disk.position().z() + disk.bounds().thickness() / 2;
85  PixelRecoRange<float> rRange(disk.innerRadius(), disk.outerRadius());
86  PixelRecoRange<float> zRange(zMin, zMax);
87  contains = rRange.inside(tsos.globalPosition().perp()) && zRange.inside(tsos.globalPosition().z());
88  // contains = fl->contains(fl->toLocal(tsos.globalPosition()));
89  }
90  if (contains)
91  result.push_back(MSLayer(*il));
92  }
93  return result;
94 }
tuple propagator
T perp() const
Definition: PV3DBase.h:69
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
GlobalPoint globalPosition() const
tuple result
Definition: mps_fire.py:311
T z() const
Definition: PV3DBase.h:61
std::vector< const DetLayer * > theLayers
virtual const Surface::PositionType & position() const
Returns position of the surface.
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
virtual const BoundDisk & specificSurface() const final
vector< MSLayer > MultipleScatteringGeometry::detLayers ( ) const

Definition at line 35 of file MultipleScatteringGeometry.cc.

References mps_fire::result.

35  {
36  vector<MSLayer> result;
37  vector<const DetLayer *>::const_iterator il;
38  for (il = theLayers.begin(); il != theLayers.end(); il++)
39  result.push_back(MSLayer(*il));
40  return result;
41 }
tuple result
Definition: mps_fire.py:311
std::vector< const DetLayer * > theLayers
vector< MSLayer > MultipleScatteringGeometry::otherLayers ( float  eta) const

Definition at line 96 of file MultipleScatteringGeometry.cc.

References GeomDetEnumerators::barrel, GeomDetEnumerators::endcap, PixelRecoPointRZ::r(), mps_fire::result, and PixelRecoPointRZ::z().

Referenced by MSLayersKeeperX0Averaged::MSLayersKeeperX0Averaged().

96  {
97  vector<MSLayer> result;
98  // zero
99  // MSLayer zero(barrel, 0., MSLayer::Range(-15,15));
100  // result.push_back(zero);
101 
102  // beampipe
103  MSLayer beampipe(barrel, beamPipeR, MSLayer::Range(-100, 100));
104 
105  result.push_back(beampipe);
106 
107  // endflanges
108  PixelRecoPointRZ endfPoint = (eta > 0) ? PixelRecoPointRZ(endflangesZ / sinh(eta), endflangesZ)
110  if (0 < endfPoint.r() && endfPoint.r() < supportR) {
111  MSLayer endflanges(endcap, endfPoint.z(), MSLayer::Range(0.1, supportR - 0.1));
112  result.push_back(endflanges);
113  }
114 
115  // support
116  MSLayer support(barrel, supportR, MSLayer::Range(-280, 280));
117  result.push_back(support);
118 
119  return result;
120 }
tuple result
Definition: mps_fire.py:311
float z() const
float r() const
PixelRecoRange< float > Range
Definition: MSLayer.h:15

Member Data Documentation

const float MultipleScatteringGeometry::beamPipeR = 2.94
staticprotected

Definition at line 21 of file MultipleScatteringGeometry.h.

const float MultipleScatteringGeometry::endflangesZ = 30
staticprotected

Definition at line 21 of file MultipleScatteringGeometry.h.

const float MultipleScatteringGeometry::supportR = 19.
staticprotected

Definition at line 21 of file MultipleScatteringGeometry.h.

std::vector<const DetLayer *> MultipleScatteringGeometry::theLayers
protected

Definition at line 20 of file MultipleScatteringGeometry.h.