CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
TIBLayer Class Reference

#include <TIBLayer.h>

Inheritance diagram for TIBLayer:
BarrelDetLayer GeometricSearchDetWithGroups DetLayer GeometricSearchDet GeometricSearchDet

Public Member Functions

virtual const std::vector
< const GeomDet * > & 
basicComponents () const
 
virtual const std::vector
< const GeometricSearchDet * > & 
components () const
 Returns basic components, if any. More...
 
void groupedCompatibleDetsV (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const
 
virtual SubDetector subDetector () const
 The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap) More...
 
 TIBLayer (std::vector< const TIBRing * > &innerRings, std::vector< const TIBRing * > &outerRings)
 
 ~TIBLayer ()
 
- Public Member Functions inherited from BarrelDetLayer
 BarrelDetLayer ()
 
virtual std::pair< bool,
TrajectoryStateOnSurface
compatible (const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const
 
bool contains (const Local3DPoint &p) const
 
virtual Location location () const
 DetLayer interface. More...
 
virtual const BoundCylinderspecificSurface () const
 Extension of the interface. More...
 
virtual const BoundSurfacesurface () const
 GeometricSearchDet interface. More...
 
virtual ~BarrelDetLayer ()
 
- Public Member Functions inherited from DetLayer
std::vector< const DetLayer * > compatibleLayers (NavigationDirection direction) const
 
std::vector< const DetLayer * > compatibleLayers (const FreeTrajectoryState &fts, PropagationDirection timeDirection) const
 
std::vector< const DetLayer * > compatibleLayers (const FreeTrajectoryState &fts, PropagationDirection timeDirection, int &counter) const
 
 DetLayer ()
 
NavigableLayernavigableLayer () const
 Return the NavigableLayer associated with this DetLayer. More...
 
virtual std::vector< const
DetLayer * > 
nextLayers (NavigationDirection direction) const
 
virtual std::vector< const
DetLayer * > 
nextLayers (const FreeTrajectoryState &fts, PropagationDirection timeDirection) const
 
virtual void setNavigableLayer (NavigableLayer *nlp)
 Set the NavigableLayer associated with this DetLayer. More...
 
virtual ~DetLayer ()
 
- Public Member Functions inherited from GeometricSearchDet
virtual std::vector< DetWithStatecompatibleDets (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
 
 GeometricSearchDet ()
 
virtual std::vector< DetGroupgroupedCompatibleDets (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
 
virtual const
Surface::PositionType
position () const
 Returns position of the surface. More...
 
virtual ~GeometricSearchDet ()
 
- Public Member Functions inherited from GeometricSearchDetWithGroups
void compatibleDetsV (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const
 
bool hasGroups () const
 

Private Member Functions

bool addClosest (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const
 
SubLayerCrossings computeCrossings (const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const
 
float computeWindowSize (const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const
 
BoundCylindercylinder (const std::vector< const GeometricSearchDet * > &rings)
 
bool overlap (const GlobalPoint &gpos, const GeometricSearchDet &ring, float window) const
 
void searchNeighbors (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, float window, std::vector< DetGroup > &result, bool checkClosest) const
 
const std::vector< const
GeometricSearchDet * > & 
subLayer (int ind) const
 

Private Attributes

std::vector< const GeomDet * > theBasicComps
 
std::vector< const
GeometricSearchDet * > 
theComps
 
GeneralBinFinderInZforGeometricSearchDet
< float > 
theInnerBinFinder
 
std::vector< const
GeometricSearchDet * > 
theInnerComps
 
ReferenceCountingPointer
< BoundCylinder
theInnerCylinder
 
GeneralBinFinderInZforGeometricSearchDet
< float > 
theOuterBinFinder
 
std::vector< const
GeometricSearchDet * > 
theOuterComps
 
ReferenceCountingPointer
< BoundCylinder
theOuterCylinder
 

Additional Inherited Members

- Public Types inherited from DetLayer
typedef
GeomDetEnumerators::Location 
Location
 
typedef
GeomDetEnumerators::SubDetector 
SubDetector
 
- Public Types inherited from GeometricSearchDet
typedef std::pair< const
GeomDet
*, TrajectoryStateOnSurface
DetWithState
 
typedef BoundSurface::PositionType PositionType
 
typedef BoundSurface::RotationType RotationType
 
typedef TrajectoryStateOnSurface TrajectoryState
 
- Public Types inherited from GeometricSearchDetWithGroups
typedef
GeometricSearchDet::DetWithState 
DetWithState
 
- Protected Member Functions inherited from BarrelDetLayer
virtual BoundCylindercomputeSurface ()
 
virtual void initialize ()
 
void setSurface (BoundCylinder *cp)
 
- Protected Attributes inherited from GeometricSearchDet
GeomDetCompatibilityChecker theCompatibilityChecker
 

Detailed Description

A concrete implementation for TIB layer built out of TIBRings

Definition at line 14 of file TIBLayer.h.

Constructor & Destructor Documentation

TIBLayer::TIBLayer ( std::vector< const TIBRing * > &  innerRings,
std::vector< const TIBRing * > &  outerRings 
)

Definition at line 20 of file TIBLayer.cc.

References BoundSurface::bounds(), cylinder(), i, BarrelDetLayer::initialize(), Bounds::length(), LogDebug, Cylinder::radius(), python.multivaluedict::sort(), BarrelDetLayer::specificSurface(), theBasicComps, theComps, theInnerBinFinder, theInnerComps, theInnerCylinder, theOuterBinFinder, theOuterComps, theOuterCylinder, and Bounds::thickness().

21  :
22  theInnerComps(innerRings.begin(),innerRings.end()),
23  theOuterComps(outerRings.begin(),outerRings.end())
24 {
25  theComps.assign(theInnerComps.begin(),theInnerComps.end());
26  theComps.insert(theComps.end(),theOuterComps.begin(),theOuterComps.end());
27 
28  sort(theComps.begin(),theComps.end(),DetLessZ());
29  sort(theInnerComps.begin(),theInnerComps.end(),DetLessZ());
30  sort(theOuterComps.begin(),theOuterComps.end(),DetLessZ());
31 
32  for(vector<const GeometricSearchDet*>::const_iterator it=theComps.begin();
33  it!=theComps.end();it++){
34  theBasicComps.insert(theBasicComps.end(),
35  (**it).basicComponents().begin(),
36  (**it).basicComponents().end());
37  }
38 
39  // initialize the surface
42  initialize();
43 
44  LogDebug("TkDetLayers") << "==== DEBUG TIBLayer =====" ;
45  LogDebug("TkDetLayers") << "innerCyl radius, thickness, lenght: "
46  << theInnerCylinder->radius() << " , "
47  << theInnerCylinder->bounds().thickness() << " , "
48  << theInnerCylinder->bounds().length() ;
49 
50  LogDebug("TkDetLayers") << "outerCyl radius, thickness, lenght: "
51  << theOuterCylinder->radius() << " , "
52  << theOuterCylinder->bounds().thickness() << " , "
53  << theOuterCylinder->bounds().length() ;
54 
55  LogDebug("TkDetLayers") << "Cyl radius, thickness, lenght: "
56  << specificSurface().radius() << " , "
57  << specificSurface().bounds().thickness() << " , "
58  << specificSurface().bounds().length() ;
59 
60  for (vector<const GeometricSearchDet*>::const_iterator i=theInnerComps.begin();
61  i != theInnerComps.end(); i++){
62  LogDebug("TkDetLayers") << "inner TIBRing pos z,radius,eta,phi: "
63  << (**i).position().z() << " , "
64  << (**i).position().perp() << " , "
65  << (**i).position().eta() << " , "
66  << (**i).position().phi() ;
67  }
68 
69  for (vector<const GeometricSearchDet*>::const_iterator i=theOuterComps.begin();
70  i != theOuterComps.end(); i++){
71  LogDebug("TkDetLayers") << "outer TIBRing pos z,radius,eta,phi: "
72  << (**i).position().z() << " , "
73  << (**i).position().perp() << " , "
74  << (**i).position().eta() << " , "
75  << (**i).position().phi() ;
76  }
77 
78 
79 
80  // initialise the bin finders
81  // vector<const GeometricSearchDet*> tmpIn;
82  //for (vector<const TIBRing*>::const_iterator i=theInnerRings.begin();
83  // i != theInnerRings.end(); i++) tmpIn.push_back(*i);
85  theInnerComps.end());
86 
88  theOuterComps.end());
89 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
BoundCylinder * cylinder(const std::vector< const GeometricSearchDet * > &rings)
Definition: TIBLayer.cc:102
virtual float length() const =0
virtual void initialize()
std::vector< const GeometricSearchDet * > theOuterComps
Definition: TIBLayer.h:71
GeneralBinFinderInZforGeometricSearchDet< float > theOuterBinFinder
Definition: TIBLayer.h:78
std::vector< const GeometricSearchDet * > theComps
Definition: TIBLayer.h:69
virtual float thickness() const =0
ReferenceCountingPointer< BoundCylinder > theInnerCylinder
Definition: TIBLayer.h:74
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:55
const Bounds & bounds() const
Definition: BoundSurface.h:89
std::vector< const GeomDet * > theBasicComps
Definition: TIBLayer.h:72
std::vector< const GeometricSearchDet * > theInnerComps
Definition: TIBLayer.h:70
GeneralBinFinderInZforGeometricSearchDet< float > theInnerBinFinder
Definition: TIBLayer.h:77
virtual const BoundCylinder & specificSurface() const
Extension of the interface.
ReferenceCountingPointer< BoundCylinder > theOuterCylinder
Definition: TIBLayer.h:75
TIBLayer::~TIBLayer ( )

Definition at line 91 of file TIBLayer.cc.

References i, and theComps.

91  {
92  vector<const GeometricSearchDet*>::const_iterator i;
93  for (i=theComps.begin(); i!=theComps.end(); i++) {
94  delete *i;
95  }
96 }
int i
Definition: DBlmapReader.cc:9
std::vector< const GeometricSearchDet * > theComps
Definition: TIBLayer.h:69

Member Function Documentation

bool TIBLayer::addClosest ( const TrajectoryStateOnSurface tsos,
const Propagator prop,
const MeasurementEstimator est,
const SubLayerCrossing crossing,
std::vector< DetGroup > &  result 
) const
private

Definition at line 197 of file TIBLayer.cc.

References CompatibleDetToGroupAdder::add(), SubLayerCrossing::closestDetIndex(), subLayer(), and SubLayerCrossing::subLayerIndex().

Referenced by groupedCompatibleDetsV().

202 {
203 // edm::LogInfo(TkDetLayers) << "Entering TIBLayer::addClosest" ;
204 
205  const vector<const GeometricSearchDet*>& sub( subLayer( crossing.subLayerIndex()));
206  const Det* det(sub[crossing.closestDetIndex()]);
207  return CompatibleDetToGroupAdder().add( *det, tsos, prop, est, result);
208 }
int closestDetIndex() const
int subLayerIndex() const
tuple result
Definition: query.py:137
const std::vector< const GeometricSearchDet * > & subLayer(int ind) const
Definition: TIBLayer.h:63
static bool add(const GeometricSearchDet &det, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result)
virtual const std::vector<const GeomDet*>& TIBLayer::basicComponents ( ) const
inlinevirtual

Implements GeometricSearchDet.

Definition at line 24 of file TIBLayer.h.

References theBasicComps.

Referenced by MatchedHitRZCorrectionFromBending::MatchedHitRZCorrectionFromBending().

24 {return theBasicComps;}
std::vector< const GeomDet * > theBasicComps
Definition: TIBLayer.h:72
virtual const std::vector<const GeometricSearchDet*>& TIBLayer::components ( ) const
inlinevirtual

Returns basic components, if any.

Returns direct components, if any

Implements GeometricSearchDet.

Definition at line 26 of file TIBLayer.h.

References theComps.

26 {return theComps;}
std::vector< const GeometricSearchDet * > theComps
Definition: TIBLayer.h:69
SubLayerCrossings TIBLayer::computeCrossings ( const TrajectoryStateOnSurface startingState,
PropagationDirection  propDir 
) const
private

Definition at line 162 of file TIBLayer.cc.

References GeneralBinFinderInZforGeometricSearchDet< T >::binIndex(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), HelixBarrelCylinderCrossing::hasSolution(), GloballyPositioned< T >::position(), HelixBarrelCylinderCrossing::position(), rho, GeometricSearchDet::surface(), theInnerBinFinder, theInnerComps, theInnerCylinder, theOuterBinFinder, theOuterComps, theOuterCylinder, TrajectoryStateOnSurface::transverseCurvature(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by groupedCompatibleDetsV().

164 {
165  GlobalPoint startPos( startingState.globalPosition());
166  GlobalVector startDir( startingState.globalMomentum());
167  double rho( startingState.transverseCurvature());
168 
169  HelixBarrelCylinderCrossing innerCrossing( startPos, startDir, rho,
170  propDir,*theInnerCylinder);
171  if (!innerCrossing.hasSolution()) return SubLayerCrossings();
172 
173  GlobalPoint gInnerPoint( innerCrossing.position());
174  int innerIndex = theInnerBinFinder.binIndex(gInnerPoint.z());
175  const GeometricSearchDet* innerRing( theInnerComps[innerIndex]);
176  float innerDist = fabs( innerRing->surface().position().z() - gInnerPoint.z());
177  SubLayerCrossing innerSLC( 0, innerIndex, gInnerPoint);
178 
179  HelixBarrelCylinderCrossing outerCrossing( startPos, startDir, rho,
180  propDir,*theOuterCylinder);
181  if (!outerCrossing.hasSolution()) return SubLayerCrossings();
182 
183  GlobalPoint gOuterPoint( outerCrossing.position());
184  int outerIndex = theOuterBinFinder.binIndex(gOuterPoint.z());
185  const GeometricSearchDet* outerRing( theOuterComps[outerIndex]);
186  float outerDist = fabs( outerRing->surface().position().z() - gOuterPoint.z());
187  SubLayerCrossing outerSLC( 1, outerIndex, gOuterPoint);
188 
189  if (innerDist < outerDist) {
190  return SubLayerCrossings( innerSLC, outerSLC, 0);
191  }
192  else {
193  return SubLayerCrossings( outerSLC, innerSLC, 1);
194  }
195 }
Definition: DDAxes.h:10
GlobalPoint globalPosition() const
std::vector< const GeometricSearchDet * > theOuterComps
Definition: TIBLayer.h:71
GeneralBinFinderInZforGeometricSearchDet< float > theOuterBinFinder
Definition: TIBLayer.h:78
ReferenceCountingPointer< BoundCylinder > theInnerCylinder
Definition: TIBLayer.h:74
std::vector< const GeometricSearchDet * > theInnerComps
Definition: TIBLayer.h:70
GeneralBinFinderInZforGeometricSearchDet< float > theInnerBinFinder
Definition: TIBLayer.h:77
GlobalVector globalMomentum() const
ReferenceCountingPointer< BoundCylinder > theOuterCylinder
Definition: TIBLayer.h:75
virtual int binIndex(T z) const
returns an index in the valid range for the bin closest to Z
float TIBLayer::computeWindowSize ( const GeomDet det,
const TrajectoryStateOnSurface tsos,
const MeasurementEstimator est 
) const
private

Definition at line 265 of file TIBLayer.cc.

References BoundSurface::bounds(), TrajectoryStateOnSurface::globalMomentum(), MeasurementEstimator::maximalLocalDisplacement(), GeomDet::surface(), funct::tan(), PV3DBase< T, PVType, FrameType >::theta(), Bounds::thickness(), and PV2DBase< T, PVType, FrameType >::y().

Referenced by groupedCompatibleDetsV().

268 {
269  // we assume the outer and inner rings have about same thickness...
270 
271 // edm::LogInfo(TkDetLayers) << "TIBLayer::computeWindowSize: Y axis of tangent plane is"
272 // << plane.toGlobal( LocalVector(0,1,0)) ;
273 
275  float yError = localError.y();
276 
277  float tanTheta = tan( tsos.globalMomentum().theta());
278  float thickCorrection = det->surface().bounds().thickness() / (2.*fabs( tanTheta));
279 
280  // FIXME: correct this in case of wide phi window !
281 
282  return yError + thickCorrection;
283 }
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const
Geom::Theta< T > theta() const
Definition: PV3DBase.h:69
virtual float thickness() const =0
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
const Bounds & bounds() const
Definition: BoundSurface.h:89
GlobalVector globalMomentum() const
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
BoundCylinder * TIBLayer::cylinder ( const std::vector< const GeometricSearchDet * > &  rings)
private

Definition at line 102 of file TIBLayer.cc.

References BoundSurface::bounds(), Bounds::length(), GloballyPositioned< T >::position(), csvReporter::r, Cylinder::radius(), Bounds::thickness(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by TIBLayer().

103 {
104  float leftPos = rings.front()->surface().position().z();
105  float rightPos = rings.back()->surface().position().z();
106 
107  const BoundCylinder & frontRing = static_cast<const BoundCylinder &>(rings.front()->surface());
108  const BoundCylinder & backRing = static_cast<const BoundCylinder &>(rings.back()->surface());
109  float r = frontRing.radius();
110  const Bounds& leftBounds = frontRing.bounds();
111  const Bounds& rightBounds = backRing.bounds();
112 
113  //float r = rings.front()->specificSurface().radius();
114  //const Bounds& leftBounds = rings.front()->specificSurface().bounds();
115  //const Bounds& rightBounds = rings.back()->specificSurface().bounds();
116 
117  float thick = leftBounds.thickness() / 2;
118  float zmin = leftPos - leftBounds.length() / 2;
119  float zmax = rightPos + rightBounds.length() / 2;
120  float rmin = r-thick;
121  float rmax = r+thick;
122  float zpos = 0.5*(leftPos+rightPos);
123 
124  return new BoundCylinder( Surface::PositionType( 0, 0, zpos),
125  rings.front()->surface().rotation(),
126  SimpleCylinderBounds( rmin, rmax,
127  zmin-zpos, zmax-zpos));
128 }
virtual float length() const =0
virtual float thickness() const =0
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:55
const Bounds & bounds() const
Definition: BoundSurface.h:89
Definition: Bounds.h:18
void TIBLayer::groupedCompatibleDetsV ( const TrajectoryStateOnSurface tsos,
const Propagator prop,
const MeasurementEstimator est,
std::vector< DetGroup > &  result 
) const
virtual

Reimplemented from GeometricSearchDet.

Definition at line 133 of file TIBLayer.cc.

References addClosest(), LayerCrossingSide::barrelSide(), SubLayerCrossings::closest(), SubLayerCrossings::closestIndex(), computeCrossings(), computeWindowSize(), SubLayerCrossings::isValid(), DetGroupMerger::orderAndMergeTwoLevels(), SubLayerCrossings::other(), Propagator::propagationDirection(), searchNeighbors(), and svgfig::window().

136  {
137  SubLayerCrossings crossings;
138  crossings = computeCrossings( tsos, prop.propagationDirection());
139  if(! crossings.isValid()) return;
140 
141  vector<DetGroup> closestResult;
142  addClosest( tsos, prop, est, crossings.closest(), closestResult);
143  // this differs from compatibleDets logic, which checks next in such cases!!!
144  if (closestResult.empty()) return;
145 
146 
147  DetGroupElement closestGel( closestResult.front().front());
148  float window = computeWindowSize( closestGel.det(), closestGel.trajectoryState(), est);
149 
150  searchNeighbors( tsos, prop, est, crossings.closest(), window,
151  closestResult, false);
152 
153  vector<DetGroup> nextResult;
154  searchNeighbors( tsos, prop, est, crossings.other(), window,
155  nextResult, true);
156 
157  int crossingSide = LayerCrossingSide().barrelSide( closestGel.trajectoryState(), prop);
158  DetGroupMerger::orderAndMergeTwoLevels( closestResult, nextResult, result,
159  crossings.closestIndex(), crossingSide);
160 }
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const
Definition: TIBLayer.cc:197
static void orderAndMergeTwoLevels(const std::vector< DetGroup > &one, const std::vector< DetGroup > &two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
def window
Definition: svgfig.py:642
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:143
int closestIndex() const
void searchNeighbors(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, float window, std::vector< DetGroup > &result, bool checkClosest) const
Definition: TIBLayer.cc:210
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const
Definition: TIBLayer.cc:162
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const
Definition: TIBLayer.cc:265
tuple result
Definition: query.py:137
const SubLayerCrossing & other() const
int barrelSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop) const
returns 0 if barrel layer crossed from inside, 1 if from outside
const SubLayerCrossing & closest() const
bool TIBLayer::overlap ( const GlobalPoint gpos,
const GeometricSearchDet ring,
float  window 
) const
private

Definition at line 248 of file TIBLayer.cc.

References BoundSurface::bounds(), Bounds::length(), GeometricSearchDet::position(), GeometricSearchDet::surface(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by searchNeighbors().

251 {
252  float halfLength = det.surface().bounds().length()/2.;
253 
254 // edm::LogInfo(TkDetLayers) << " TIBLayer: checking ring with z " << det.position().z();
255 
256  if ( fabs( crossPoint.z()-det.position().z()) < (halfLength + window)) {
257 // edm::LogInfo(TkDetLayers) << " PASSED" ;
258  return true;
259  } else {
260 // edm::LogInfo(TkDetLayers) << " FAILED " ;
261  return false;
262  }
263 }
def window
Definition: svgfig.py:642
void TIBLayer::searchNeighbors ( const TrajectoryStateOnSurface tsos,
const Propagator prop,
const MeasurementEstimator est,
const SubLayerCrossing crossing,
float  window,
std::vector< DetGroup > &  result,
bool  checkClosest 
) const
private

Definition at line 210 of file TIBLayer.cc.

References Clusterizer1DCommons::add(), SubLayerCrossing::closestDetIndex(), overlap(), SubLayerCrossing::position(), subLayer(), SubLayerCrossing::subLayerIndex(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by groupedCompatibleDetsV().

217 {
218  GlobalPoint gCrossingPos = crossing.position();
219 
220  const vector<const GeometricSearchDet*>& sLayer( subLayer( crossing.subLayerIndex()));
221 
222  int closestIndex = crossing.closestDetIndex();
223  int negStartIndex = closestIndex-1;
224  int posStartIndex = closestIndex+1;
225 
226  if (checkClosest) { // must decide if the closest is on the neg or pos side
227  if (gCrossingPos.z() < sLayer[closestIndex]->surface().position().z()) {
228  posStartIndex = closestIndex;
229  }
230  else {
231  negStartIndex = closestIndex;
232  }
233  }
234 
235  typedef CompatibleDetToGroupAdder Adder;
236  for (int idet=negStartIndex; idet >= 0; idet--) {
237  const GeometricSearchDet* neighborRing = sLayer[idet];
238  if (!overlap( gCrossingPos, *neighborRing, window)) break;
239  if (!Adder::add( *neighborRing, tsos, prop, est, result)) break;
240  }
241  for (int idet=posStartIndex; idet < static_cast<int>(sLayer.size()); idet++) {
242  const GeometricSearchDet* neighborRing = sLayer[idet];
243  if (!overlap( gCrossingPos, *neighborRing, window)) break;
244  if (!Adder::add( *neighborRing, tsos, prop, est, result)) break;
245  }
246 }
def window
Definition: svgfig.py:642
int closestDetIndex() const
bool overlap(const GlobalPoint &gpos, const GeometricSearchDet &ring, float window) const
Definition: TIBLayer.cc:248
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
const GlobalPoint & position() const
int subLayerIndex() const
T z() const
Definition: PV3DBase.h:58
tuple result
Definition: query.py:137
const std::vector< const GeometricSearchDet * > & subLayer(int ind) const
Definition: TIBLayer.h:63
virtual SubDetector TIBLayer::subDetector ( ) const
inlinevirtual

The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)

Implements DetLayer.

Definition at line 34 of file TIBLayer.h.

References GeomDetEnumerators::TIB.

const std::vector<const GeometricSearchDet*>& TIBLayer::subLayer ( int  ind) const
inlineprivate

Definition at line 63 of file TIBLayer.h.

References theInnerComps, and theOuterComps.

Referenced by addClosest(), and searchNeighbors().

63  {
64  return (ind==0 ? theInnerComps : theOuterComps);
65  }
std::vector< const GeometricSearchDet * > theOuterComps
Definition: TIBLayer.h:71
std::vector< const GeometricSearchDet * > theInnerComps
Definition: TIBLayer.h:70

Member Data Documentation

std::vector<const GeomDet*> TIBLayer::theBasicComps
private

Definition at line 72 of file TIBLayer.h.

Referenced by basicComponents(), and TIBLayer().

std::vector<const GeometricSearchDet*> TIBLayer::theComps
private

Definition at line 69 of file TIBLayer.h.

Referenced by components(), TIBLayer(), and ~TIBLayer().

GeneralBinFinderInZforGeometricSearchDet<float> TIBLayer::theInnerBinFinder
private

Definition at line 77 of file TIBLayer.h.

Referenced by computeCrossings(), and TIBLayer().

std::vector<const GeometricSearchDet*> TIBLayer::theInnerComps
private

Definition at line 70 of file TIBLayer.h.

Referenced by computeCrossings(), subLayer(), and TIBLayer().

ReferenceCountingPointer<BoundCylinder> TIBLayer::theInnerCylinder
private

Definition at line 74 of file TIBLayer.h.

Referenced by computeCrossings(), and TIBLayer().

GeneralBinFinderInZforGeometricSearchDet<float> TIBLayer::theOuterBinFinder
private

Definition at line 78 of file TIBLayer.h.

Referenced by computeCrossings(), and TIBLayer().

std::vector<const GeometricSearchDet*> TIBLayer::theOuterComps
private

Definition at line 71 of file TIBLayer.h.

Referenced by computeCrossings(), subLayer(), and TIBLayer().

ReferenceCountingPointer<BoundCylinder> TIBLayer::theOuterCylinder
private

Definition at line 75 of file TIBLayer.h.

Referenced by computeCrossings(), and TIBLayer().