CMS 3D CMS Logo

MultipleScatteringGeometry.cc
Go to the documentation of this file.
4 
12 
13 using namespace GeomDetEnumerators;
14 using namespace std;
15 
16 //------------------------------------------------------------------------------
17 const float MultipleScatteringGeometry::beamPipeR = 2.94;
19 const float MultipleScatteringGeometry::supportR = 19.;
20 
21 //------------------------------------------------------------------------------
25 
26  vector<BarrelDetLayer const *> barrelLayers = track->barrelLayers();
27  vector<BarrelDetLayer const *>::const_iterator ib;
28  vector<ForwardDetLayer const *> forwardPosLayers = track->posForwardLayers();
29  vector<ForwardDetLayer const *> forwardNegLayers = track->negForwardLayers();
30  vector<ForwardDetLayer const *>::const_iterator ie;
31  // barrelLayers = accessor.barrelLayers();
32  for (ib = barrelLayers.begin(); ib != barrelLayers.end(); ib++)
33  theLayers.push_back(*ib);
34 
35  // forwardLayers = accessor.negativeEndcapLayers();
36  for (ie = forwardPosLayers.begin(); ie != forwardPosLayers.end(); ie++)
37  theLayers.push_back(*ie);
38  for (ie = forwardNegLayers.begin(); ie != forwardNegLayers.end(); ie++)
39  theLayers.push_back(*ie);
40 }
41 
42 //------------------------------------------------------------------------------
43 vector<MSLayer> MultipleScatteringGeometry::detLayers(const edm::EventSetup &iSetup) const {
44  vector<MSLayer> result;
45  vector<const DetLayer *>::const_iterator il;
46  for (il = theLayers.begin(); il != theLayers.end(); il++)
47  result.push_back(MSLayer(*il));
48  return result;
49 }
50 
51 //------------------------------------------------------------------------------
52 vector<MSLayer> MultipleScatteringGeometry::detLayers(float eta, float z, const edm::EventSetup &iSetup) const {
53  vector<MSLayer> result;
54  GlobalPoint zero(0, 0, z);
55  float r = 1;
56  float dirZ = r * sinh(eta);
57  GlobalVector dir(r, 0., dirZ);
59  iSetup.get<IdealMagneticFieldRecord>().get(pSetup);
62  vector<const DetLayer *>::const_iterator il;
64  for (il = theLayers.begin(); il != theLayers.end(); il++) {
65  bool contains = false;
66  // if ((*il)->subDetector() != PixelBarrel && (*il)->subDetector()!= PixelEndcap) continue;
67 
68  if ((*il)->location() == barrel) {
69  const BarrelDetLayer *bl = dynamic_cast<const BarrelDetLayer *>(*il);
70  if (!bl)
71  continue;
72  tsos = propagator.propagate(fts, bl->specificSurface());
73  if (!tsos.isValid())
74  continue;
75  float r = bl->specificSurface().radius();
76  float dr = bl->specificSurface().bounds().thickness();
77  float z = bl->position().z();
78  float dz = bl->specificSurface().bounds().length();
79  PixelRecoRange<float> rRange(r - dr / 2., r + dr / 2.);
80  PixelRecoRange<float> zRange(z - dz / 2., z + dz / 2.);
81  contains = rRange.inside(tsos.globalPosition().perp()) && zRange.inside(tsos.globalPosition().z());
82  // contains = bl->contains((*il)->toLocal(tsos.globalPosition()));
83  } else if ((*il)->location() == endcap) {
84  const ForwardDetLayer *fl = dynamic_cast<const ForwardDetLayer *>(*il);
85  if (!fl)
86  continue;
87  if (fl->position().z() * eta < 0)
88  continue;
89  const BoundDisk &disk = fl->specificSurface();
90  tsos = propagator.propagate(fts, disk);
91  if (!tsos.isValid())
92  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());
97  contains = rRange.inside(tsos.globalPosition().perp()) && zRange.inside(tsos.globalPosition().z());
98  // contains = fl->contains(fl->toLocal(tsos.globalPosition()));
99  }
100  if (contains)
101  result.push_back(MSLayer(*il));
102  }
103  return result;
104 }
105 //------------------------------------------------------------------------------
106 vector<MSLayer> MultipleScatteringGeometry::otherLayers(float eta, const edm::EventSetup &iSetup) const {
107  vector<MSLayer> result;
108  // zero
109  // MSLayer zero(barrel, 0., MSLayer::Range(-15,15));
110  // result.push_back(zero);
111 
112  // beampipe
113  MSLayer beampipe(barrel, beamPipeR, MSLayer::Range(-100, 100));
114 
115  result.push_back(beampipe);
116 
117  // endflanges
118  PixelRecoPointRZ endfPoint = (eta > 0) ? PixelRecoPointRZ(endflangesZ / sinh(eta), endflangesZ)
119  : PixelRecoPointRZ(-endflangesZ / sinh(eta), -endflangesZ);
120  if (0 < endfPoint.r() && endfPoint.r() < supportR) {
121  MSLayer endflanges(endcap, endfPoint.z(), MSLayer::Range(0.1, supportR - 0.1));
122  result.push_back(endflanges);
123  }
124 
125  // support
126  MSLayer support(barrel, supportR, MSLayer::Range(-280, 280));
127  result.push_back(support);
128 
129  return result;
130 }
Vector3DBase
Definition: Vector3DBase.h:8
PixelRecoPointRZ::r
float r() const
Definition: PixelRecoPointRZ.h:10
MultipleScatteringGeometry::detLayers
std::vector< MSLayer > detLayers(float eta, float z, const edm::EventSetup &iSetup) const
Definition: MultipleScatteringGeometry.cc:52
FreeTrajectoryState.h
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
photonAnalyzer_cfi.zMax
zMax
Definition: photonAnalyzer_cfi.py:95
ESHandle.h
MultipleScatteringGeometry::MultipleScatteringGeometry
MultipleScatteringGeometry(const edm::EventSetup &iSetup)
Definition: MultipleScatteringGeometry.cc:22
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
TrackerRecoGeometryRecord.h
TrackerRecoGeometryRecord
Definition: TrackerRecoGeometryRecord.h:14
SiPixelPI::zero
Definition: SiPixelPayloadInspectorHelper.h:39
GeometricSearchDet::position
virtual const Surface::PositionType & position() const
Returns position of the surface.
Definition: GeometricSearchDet.h:31
BoundDisk
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
GeomDetEnumerators::barrel
Definition: GeomDetEnumerators.h:9
PixelRecoPointRZ::z
float z() const
Definition: PixelRecoPointRZ.h:11
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
GeometricSearchTracker.h
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
MultipleScatteringGeometry.h
beampixel_dqm_sourceclient-live_cfg.zRange
zRange
Definition: beampixel_dqm_sourceclient-live_cfg.py:150
MSLayer::Range
PixelRecoRange< float > Range
Definition: MSLayer.h:15
PVValHelper::eta
Definition: PVValidationHelpers.h:70
IdealMagneticFieldRecord.h
edm::ESHandle< GeometricSearchTracker >
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
Point3DBase< float, GlobalTag >
MSLayer
Definition: MSLayer.h:13
PixelRecoRange< float >
StraightLinePropagator
Definition: StraightLinePropagator.h:16
MultipleScatteringGeometry::supportR
static const float supportR
Definition: MultipleScatteringGeometry.h:20
GeomDetEnumerators::endcap
Definition: GeomDetEnumerators.h:9
photonAnalyzer_cfi.zMin
zMin
Definition: photonAnalyzer_cfi.py:94
BarrelDetLayer.h
cuy.ib
ib
Definition: cuy.py:662
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:58
edm::contains
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
StraightLinePropagator.h
get
#define get
BarrelDetLayer
Definition: BarrelDetLayer.h:22
PixelRecoPointRZ
Definition: PixelRecoPointRZ.h:6
alignCSCRings.r
r
Definition: alignCSCRings.py:93
MultipleScatteringGeometry::endflangesZ
static const float endflangesZ
Definition: MultipleScatteringGeometry.h:20
GeomDetEnumerators
Definition: GeomDetEnumerators.h:8
std
Definition: JetResolutionObject.h:76
ForwardDetLayer
Definition: ForwardDetLayer.h:22
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
PVValHelper::dz
Definition: PVValidationHelpers.h:51
MultipleScatteringGeometry::beamPipeR
static const float beamPipeR
Definition: MultipleScatteringGeometry.h:20
ForwardDetLayer.h
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
MultipleScatteringGeometry::otherLayers
std::vector< MSLayer > otherLayers(float eta, const edm::EventSetup &iSetup) const
Definition: MultipleScatteringGeometry.cc:106
mps_fire.result
result
Definition: mps_fire.py:311
PixelRecoRange::inside
bool inside(const T &value) const
Definition: PixelRecoRange.h:36
BarrelDetLayer::specificSurface
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
Definition: BarrelDetLayer.h:39
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
alongMomentum
Definition: PropagationDirection.h:4
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
ForwardDetLayer::specificSurface
virtual const BoundDisk & specificSurface() const final
Definition: ForwardDetLayer.h:39
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23