CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 edm::EventSetup &iSetup) const
 
std::vector< MSLayerdetLayers (const edm::EventSetup &iSetup) const
 
 MultipleScatteringGeometry (const edm::EventSetup &iSetup)
 
std::vector< MSLayerotherLayers (float eta, const edm::EventSetup &iSetup) 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 9 of file MultipleScatteringGeometry.h.

Constructor & Destructor Documentation

MultipleScatteringGeometry::MultipleScatteringGeometry ( const edm::EventSetup iSetup)

Definition at line 22 of file MultipleScatteringGeometry.cc.

References edm::EventSetup::get().

23 {
24 
26  iSetup.get<TrackerRecoGeometryRecord>().get( track );
27 
28  vector<BarrelDetLayer*> barrelLayers=track->barrelLayers();
29  vector<BarrelDetLayer*>::const_iterator ib;
30  vector<ForwardDetLayer*> forwardPosLayers=track->posForwardLayers();
31  vector<ForwardDetLayer*> forwardNegLayers=track->negForwardLayers();
32  vector<ForwardDetLayer*>::const_iterator ie;
33  // barrelLayers = accessor.barrelLayers();
34  for (ib = barrelLayers.begin(); ib != barrelLayers.end(); ib++)
35  theLayers.push_back(*ib);
36 
37 // forwardLayers = accessor.negativeEndcapLayers();
38  for (ie = forwardPosLayers.begin(); ie != forwardPosLayers.end(); ie++)
39  theLayers.push_back(*ie);
40  for (ie = forwardNegLayers.begin(); ie != forwardNegLayers.end(); ie++)
41  theLayers.push_back(*ie);
42 
43 }
const T & get() const
Definition: EventSetup.h:55
std::vector< const DetLayer * > theLayers

Member Function Documentation

vector< MSLayer > MultipleScatteringGeometry::detLayers ( float  eta,
float  z,
const edm::EventSetup iSetup 
) const

Definition at line 55 of file MultipleScatteringGeometry.cc.

References alongMomentum, GeomDetEnumerators::barrel, BoundSurface::bounds(), edm::contains(), dir, GeomDetEnumerators::endcap, edm::EventSetup::get(), TrajectoryStateOnSurface::globalPosition(), BoundDisk::innerRadius(), PixelRecoRange< T >::inside(), TrajectoryStateOnSurface::isValid(), Bounds::length(), BoundDisk::outerRadius(), PV3DBase< T, PVType, FrameType >::perp(), GeometricSearchDet::position(), GloballyPositioned< T >::position(), StraightLinePropagator::propagate(), LargeD0_PixelPairStep_cff::propagator, alignCSCRings::r, Cylinder::radius(), query::result, ForwardDetLayer::specificSurface(), BarrelDetLayer::specificSurface(), Bounds::thickness(), PV3DBase< T, PVType, FrameType >::z(), and zero.

Referenced by MSLayersKeeperX0Averaged::init().

56 {
57  vector<MSLayer> result;
58  GlobalPoint zero(0,0,z);
59  float r=1; float dirZ = r*sinh(eta);
60  GlobalVector dir(r,0.,dirZ);
62  iSetup.get<IdealMagneticFieldRecord>().get(pSetup);
65  vector<const DetLayer*>::const_iterator il;
67  for (il = theLayers.begin(); il != theLayers.end(); il++) {
68  bool contains=false;
69 // if ((*il)->subDetector() != PixelBarrel && (*il)->subDetector()!= PixelEndcap) continue;
70 
71  if ( (*il)->location() == barrel ) {
72  const BarrelDetLayer * bl = dynamic_cast<const BarrelDetLayer*>(*il);
73  if (!bl) continue;
74  tsos = propagator.propagate(fts, bl->specificSurface());
75  if (!tsos.isValid()) continue;
76  float r=bl->specificSurface().radius();
77  float dr = bl->specificSurface().bounds().thickness();
78  float z=bl->position().z();
79  float dz = bl->specificSurface().bounds().length();
80  PixelRecoRange<float> rRange(r-dr/2., r+dr/2.);
81  PixelRecoRange<float> zRange(z-dz/2., z+dz/2.);
82  contains = rRange.inside(tsos.globalPosition().perp())
83  && zRange.inside(tsos.globalPosition().z());
84  // contains = bl->contains((*il)->toLocal(tsos.globalPosition()));
85  }
86  else if ((*il)->location() == endcap) {
87  const ForwardDetLayer * fl = dynamic_cast<const ForwardDetLayer*>(*il);
88  if (!fl) continue;
89  if (fl->position().z() * eta < 0) continue;
90  const BoundDisk & disk = fl->specificSurface();
91  tsos = propagator.propagate(fts, disk);
92  if (!tsos.isValid()) continue;
93  float zMin = disk.position().z()-disk.bounds().thickness()/2;
94  float zMax = disk.position().z()+disk.bounds().thickness()/2;
95  PixelRecoRange<float> rRange(disk.innerRadius(), disk.outerRadius());
96  PixelRecoRange<float> zRange(zMin, zMax);
97  contains = rRange.inside(tsos.globalPosition().perp())
98  && zRange.inside(tsos.globalPosition().z());
99  // contains = fl->contains(fl->toLocal(tsos.globalPosition()));
100  }
101  if (contains) result.push_back(MSLayer(*il));
102  }
103  return result;
104 }
virtual float length() const =0
T perp() const
Definition: PV3DBase.h:71
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:38
GlobalPoint globalPosition() const
T eta() const
double double double z
virtual float thickness() const =0
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:55
T z() const
Definition: PV3DBase.h:63
tuple result
Definition: query.py:137
virtual const BoundDisk & specificSurface() const
const Bounds & bounds() const
Definition: BoundSurface.h:89
virtual const Surface::PositionType & position() const
Returns position of the surface.
const T & get() const
Definition: EventSetup.h:55
virtual const BoundCylinder & specificSurface() const
Extension of the interface.
float outerRadius() const
The outer radius of the disk.
Definition: BoundDisk.h:75
float innerRadius() const
The inner radius of the disk.
Definition: BoundDisk.h:72
std::vector< const DetLayer * > theLayers
dbl *** dir
Definition: mlp_gen.cc:35
const PositionType & position() const
vector< MSLayer > MultipleScatteringGeometry::detLayers ( const edm::EventSetup iSetup) const

Definition at line 46 of file MultipleScatteringGeometry.cc.

References query::result.

47 {
48  vector<MSLayer> result;
49  vector<const DetLayer*>::const_iterator il;
50  for (il=theLayers.begin();il!=theLayers.end();il++) result.push_back(MSLayer(*il));
51  return result;
52 }
tuple result
Definition: query.py:137
std::vector< const DetLayer * > theLayers
vector< MSLayer > MultipleScatteringGeometry::otherLayers ( float  eta,
const edm::EventSetup iSetup 
) const

Definition at line 106 of file MultipleScatteringGeometry.cc.

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

Referenced by MSLayersKeeperX0Averaged::init().

107 {
108  vector<MSLayer> result;
109  // zero
110  // MSLayer zero(barrel, 0., MSLayer::Range(-15,15));
111  // result.push_back(zero);
112 
113  // beampipe
114  MSLayer beampipe(barrel, beamPipeR, MSLayer::Range(-100,100));
115 
116  result.push_back(beampipe);
117 
118  // endflanges
119  PixelRecoPointRZ endfPoint = (eta > 0) ?
122  if (0 < endfPoint.r() && endfPoint.r() < supportR) {
123  MSLayer endflanges(endcap,endfPoint.z(),MSLayer::Range(0.1,supportR-0.1));
124  result.push_back(endflanges);
125  }
126 
127  // support
128  MSLayer support( barrel,supportR, MSLayer::Range(-280,280));
129  result.push_back(support);
130 
131  return result;
132 }
T eta() const
tuple result
Definition: query.py:137
float z() const
float r() const
PixelRecoRange< float > Range
Definition: MSLayer.h:14

Member Data Documentation

const float MultipleScatteringGeometry::beamPipeR = 2.94
staticprotected

Definition at line 20 of file MultipleScatteringGeometry.h.

const float MultipleScatteringGeometry::endflangesZ = 30
staticprotected

Definition at line 20 of file MultipleScatteringGeometry.h.

const float MultipleScatteringGeometry::supportR = 19.
staticprotected

Definition at line 20 of file MultipleScatteringGeometry.h.

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

Definition at line 19 of file MultipleScatteringGeometry.h.