CMS 3D CMS Logo

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::MultipleScatteringGeometry ( const GeometricSearchTracker tracker)

Definition at line 17 of file MultipleScatteringGeometry.cc.

References cuy::ib, and PbPb_ZMuSkimMuonDPG_cff::tracker.

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 }
std::vector< const DetLayer * > theLayers
ib
Definition: cuy.py:661

Member Function Documentation

◆ detLayers() [1/2]

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, PVValHelper::dz, GeomDetEnumerators::endcap, PVValHelper::eta, TrajectoryStateOnSurface::globalPosition(), PixelRecoRange< T >::inside(), TrajectoryStateOnSurface::isValid(), PV3DBase< T, PVType, FrameType >::perp(), GeometricSearchDet::position(), TrackCandidateProducer_cfi::propagator, mps_fire::result, BarrelDetLayer::specificSurface(), ForwardDetLayer::specificSurface(), PV3DBase< T, PVType, FrameType >::z(), SiPixelPI::zero, photonAnalyzer_cfi::zMax, photonAnalyzer_cfi::zMin, and beampixel_dqm_sourceclient-live_cfg::zRange.

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());
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 }
virtual const Surface::PositionType & position() const
Returns position of the surface.
T perp() const
Definition: PV3DBase.h:69
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
T z() const
Definition: PV3DBase.h:61
GlobalPoint globalPosition() const
std::vector< const DetLayer * > theLayers
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
virtual const BoundDisk & specificSurface() const final

◆ detLayers() [2/2]

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 }
std::vector< const DetLayer * > theLayers

◆ otherLayers()

vector< MSLayer > MultipleScatteringGeometry::otherLayers ( float  eta) const

Definition at line 96 of file MultipleScatteringGeometry.cc.

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

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 }
float r() const
float z() const
PixelRecoRange< float > Range
Definition: MSLayer.h:15

Member Data Documentation

◆ beamPipeR

const float MultipleScatteringGeometry::beamPipeR = 2.94
staticprotected

Definition at line 21 of file MultipleScatteringGeometry.h.

◆ endflangesZ

const float MultipleScatteringGeometry::endflangesZ = 30
staticprotected

Definition at line 21 of file MultipleScatteringGeometry.h.

◆ supportR

const float MultipleScatteringGeometry::supportR = 19.
staticprotected

Definition at line 21 of file MultipleScatteringGeometry.h.

◆ theLayers

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

Definition at line 20 of file MultipleScatteringGeometry.h.