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 Types | Protected Member Functions | Protected Attributes | Private Member Functions
TECLayer Class Reference

#include <TECLayer.h>

Inheritance diagram for TECLayer:
ForwardDetLayer 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...
 
 TECLayer (std::vector< const TECPetal * > &innerPetals, std::vector< const TECPetal * > &outerPetals)
 
 ~TECLayer ()
 
- Public Member Functions inherited from ForwardDetLayer
virtual std::pair< bool,
TrajectoryStateOnSurface
compatible (const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &) const
 
bool contains (const Local3DPoint &p) const
 
 ForwardDetLayer ()
 
virtual Location location () const GCC11_FINAL
 Which part of the detector (barrel, endcap) More...
 
virtual const BoundDiskspecificSurface () const GCC11_FINAL
 
virtual const BoundSurfacesurface () const GCC11_FINAL
 The surface of the GeometricSearchDet. More...
 
virtual ~ForwardDetLayer ()
 
- Public Member Functions inherited from DetLayer
template<typename... Args>
std::vector< const DetLayer * > compatibleLayers (Args &&...args) const
 Returns all layers compatible. More...
 
 DetLayer (bool ibar)
 
bool isBarrel () const
 
bool isForward () const
 
NavigableLayernavigableLayer () const
 Return the NavigableLayer associated with this DetLayer. More...
 
template<typename... Args>
std::vector< const DetLayer * > nextLayers (Args &&...args) const
 
int seqNum () const
 
void setNavigableLayer (NavigableLayer *nlp)
 Set the NavigableLayer associated with this DetLayer. More...
 
void setSeqNum (int sq)
 
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
 

Protected Types

typedef PeriodicBinFinderInPhi
< double > 
BinFinderPhi
 

Protected Member Functions

virtual BoundDiskcomputeDisk (std::vector< const GeometricSearchDet * > &petals) const
 
- Protected Member Functions inherited from ForwardDetLayer
virtual BoundDiskcomputeSurface ()
 
virtual void initialize ()
 
float rmax () const
 
float rmin () const
 
void setSurface (BoundDisk *cp)
 
float zmax () const
 
float zmin () const
 

Protected Attributes

BinFinderPhi theBackBinFinder
 
std::vector< const
GeometricSearchDet * > 
theBackComps
 
ReferenceCountingPointer
< BoundDisk
theBackDisk
 
std::vector< const GeomDet * > theBasicComps
 
std::vector< const
GeometricSearchDet * > 
theComps
 
BinFinderPhi theFrontBinFinder
 
std::vector< const
GeometricSearchDet * > 
theFrontComps
 
ReferenceCountingPointer
< BoundDisk
theFrontDisk
 
- Protected Attributes inherited from GeometricSearchDet
GeomDetCompatibilityChecker theCompatibilityChecker
 

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
 
bool overlap (const GlobalPoint &gpos, const GeometricSearchDet &petal, 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
 

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
 

Detailed Description

A concrete implementation for TEC layer built out of TECPetals

Definition at line 16 of file TECLayer.h.

Member Typedef Documentation

Definition at line 77 of file TECLayer.h.

Constructor & Destructor Documentation

TECLayer::TECLayer ( std::vector< const TECPetal * > &  innerPetals,
std::vector< const TECPetal * > &  outerPetals 
)

Definition at line 21 of file TECLayer.cc.

References computeDisk(), LogDebug, PV3DBase< T, PVType, FrameType >::perp(), GeometricSearchDet::position(), ForwardDetLayer::setSurface(), ForwardDetLayer::specificSurface(), theBackBinFinder, theBackComps, theBackDisk, theBasicComps, theComps, theFrontBinFinder, theFrontComps, theFrontDisk, and PV3DBase< T, PVType, FrameType >::z().

22  :
23  theFrontComps(innerPetals.begin(),innerPetals.end()),
24  theBackComps(outerPetals.begin(),outerPetals.end())
25 {
26  theComps.assign(theFrontComps.begin(),theFrontComps.end());
27  theComps.insert(theComps.end(),theBackComps.begin(),theBackComps.end());
28 
29  for(vector<const GeometricSearchDet*>::const_iterator it=theComps.begin();
30  it!=theComps.end();it++){
31  theBasicComps.insert(theBasicComps.end(),
32  (**it).basicComponents().begin(),
33  (**it).basicComponents().end());
34  }
35 
36 
37  //This should be no necessary. TO BE CHECKED
38  //sort(theFrontPetals.begin(), theFrontPetals.end(), PetalLessPhi());
39  //sort(theBackPetals.begin(), theBackPetals.end(), PetalLessPhi());
40 
41  // building disk for front and back petals
45 
46  // set up the bin finders
47  theFrontBinFinder = BinFinderPhi(theFrontComps.front()->position().phi(),
48  theFrontComps.size());
49  theBackBinFinder = BinFinderPhi(theBackComps.front()->position().phi(),
50  theBackComps.size());
51 
52  //--------- DEBUG INFO --------------
53  LogDebug("TkDetLayers") << "DEBUG INFO for TECLayer" << "\n"
54  << "TECLayer z,perp, innerRadius, outerR: "
55  << this->position().z() << " , "
56  << this->position().perp() << " , "
57  << this->specificSurface().innerRadius() << " , "
58  << this->specificSurface().outerRadius() ;
59 
60 
61  for(vector<const GeometricSearchDet*>::const_iterator it=theFrontComps.begin();
62  it!=theFrontComps.end(); it++){
63  LogDebug("TkDetLayers") << "frontPetal phi,z,r: "
64  << (*it)->surface().position().phi() << " , "
65  << (*it)->surface().position().z() << " , "
66  << (*it)->surface().position().perp() ;
67  }
68 
69  for(vector<const GeometricSearchDet*>::const_iterator it=theBackComps.begin();
70  it!=theBackComps.end(); it++){
71  LogDebug("TkDetLayers") << "backPetal phi,z,r: "
72  << (*it)->surface().position().phi() << " , "
73  << (*it)->surface().position().z() << " , "
74  << (*it)->surface().position().perp() ;
75  }
76  //-----------------------------------
77 
78 
79 }
#define LogDebug(id)
T perp() const
Definition: PV3DBase.h:72
std::vector< const GeomDet * > theBasicComps
Definition: TECLayer.h:71
void setSurface(BoundDisk *cp)
ReferenceCountingPointer< BoundDisk > theFrontDisk
Definition: TECLayer.h:74
std::vector< const GeometricSearchDet * > theComps
Definition: TECLayer.h:68
ReferenceCountingPointer< BoundDisk > theBackDisk
Definition: TECLayer.h:75
std::vector< const GeometricSearchDet * > theFrontComps
Definition: TECLayer.h:69
T z() const
Definition: PV3DBase.h:64
std::vector< const GeometricSearchDet * > theBackComps
Definition: TECLayer.h:70
BinFinderPhi theBackBinFinder
Definition: TECLayer.h:80
PeriodicBinFinderInPhi< double > BinFinderPhi
Definition: TECLayer.h:77
virtual const Surface::PositionType & position() const
Returns position of the surface.
BinFinderPhi theFrontBinFinder
Definition: TECLayer.h:79
virtual BoundDisk * computeDisk(std::vector< const GeometricSearchDet * > &petals) const
Definition: TECLayer.cc:265
virtual const BoundDisk & specificSurface() const GCC11_FINAL
TECLayer::~TECLayer ( )

Definition at line 83 of file TECLayer.cc.

References i, and theComps.

83  {
84  vector<const GeometricSearchDet*>::const_iterator i;
85  for (i=theComps.begin(); i!=theComps.end(); i++) {
86  delete *i;
87  }
88 }
int i
Definition: DBlmapReader.cc:9
std::vector< const GeometricSearchDet * > theComps
Definition: TECLayer.h:68

Member Function Documentation

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

Definition at line 189 of file TECLayer.cc.

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

Referenced by groupedCompatibleDetsV().

194 {
195  const vector<const GeometricSearchDet*>& sub( subLayer( crossing.subLayerIndex()));
196  const GeometricSearchDet* det(sub[crossing.closestDetIndex()]);
197 
198  LogDebug("TkDetLayers")
199  << "in TECLayer, adding petal at r,z,phi: ("
200  << det->position().perp() << ","
201  << det->position().z() << ","
202  << det->position().phi() << ")" << endl;
203 
204  return CompatibleDetToGroupAdder().add( *det, tsos, prop, est, result);
205 }
#define LogDebug(id)
int closestDetIndex() const
int subLayerIndex() const
tuple result
Definition: query.py:137
const std::vector< const GeometricSearchDet * > & subLayer(int ind) const
Definition: TECLayer.h:60
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*>& TECLayer::basicComponents ( ) const
inlinevirtual

Implements GeometricSearchDet.

Definition at line 24 of file TECLayer.h.

References theBasicComps.

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

Returns basic components, if any.

Returns direct components, if any

Implements GeometricSearchDet.

Definition at line 26 of file TECLayer.h.

References theComps.

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

Definition at line 132 of file TECLayer.cc.

References funct::abs(), PeriodicBinFinderInPhi< T >::binIndex(), Geom::deltaPhi(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), LogDebug, GloballyPositioned< T >::phi(), rho, ForwardDetLayer::surface(), theBackBinFinder, theBackComps, theBackDisk, theFrontBinFinder, theFrontComps, theFrontDisk, and TrajectoryStateOnSurface::transverseCurvature().

Referenced by groupedCompatibleDetsV().

134 {
135  double rho( startingState.transverseCurvature());
136 
137  HelixPlaneCrossing::PositionType startPos( startingState.globalPosition() );
138  HelixPlaneCrossing::DirectionType startDir( startingState.globalMomentum() );
139  HelixForwardPlaneCrossing crossing(startPos,startDir,rho,propDir);
140 
141  pair<bool,double> frontPath = crossing.pathLength( *theFrontDisk);
142  if (!frontPath.first) SubLayerCrossings();
143 
144 
145  GlobalPoint gFrontPoint(crossing.position(frontPath.second));
146  LogDebug("TkDetLayers")
147  << "in TECLayer,front crossing point: r,z,phi: ("
148  << gFrontPoint.perp() << ","
149  << gFrontPoint.z() << ","
150  << gFrontPoint.phi() << ")" << endl;
151 
152 
153  int frontIndex = theFrontBinFinder.binIndex(gFrontPoint.barePhi());
154  SubLayerCrossing frontSLC( 0, frontIndex, gFrontPoint);
155 
156 
157 
158  pair<bool,double> backPath = crossing.pathLength( *theBackDisk);
159  if (!backPath.first) SubLayerCrossings();
160 
161 
162  GlobalPoint gBackPoint( crossing.position(backPath.second));
163  LogDebug("TkDetLayers")
164  << "in TECLayer,back crossing point: r,z,phi: ("
165  << gBackPoint.perp() << ","
166  << gFrontPoint.z() << ","
167  << gBackPoint.phi() << ")" << endl;
168 
169 
170  int backIndex = theBackBinFinder.binIndex(gBackPoint.barePhi());
171  SubLayerCrossing backSLC( 1, backIndex, gBackPoint);
172 
173 
174  // 0ss: frontDisk has index=0, backDisk has index=1
175  float frontDist = std::abs(Geom::deltaPhi( double(gFrontPoint.barePhi()),
176  double(theFrontComps[frontIndex]->surface().phi())));
177  float backDist = std::abs(Geom::deltaPhi( double(gBackPoint.barePhi()),
178  double(theBackComps[backIndex]->surface().phi())));
179 
180 
181  if (frontDist < backDist) {
182  return SubLayerCrossings( frontSLC, backSLC, 0);
183  }
184  else {
185  return SubLayerCrossings( backSLC, frontSLC, 1);
186  }
187 }
#define LogDebug(id)
double deltaPhi(float phi1, float phi2)
Definition: VectorUtil.h:30
Definition: DDAxes.h:10
GlobalPoint globalPosition() const
ReferenceCountingPointer< BoundDisk > theFrontDisk
Definition: TECLayer.h:74
virtual int binIndex(T phi) const
returns an index in the valid range for the bin that contains phi
ReferenceCountingPointer< BoundDisk > theBackDisk
Definition: TECLayer.h:75
std::vector< const GeometricSearchDet * > theFrontComps
Definition: TECLayer.h:69
virtual const BoundSurface & surface() const GCC11_FINAL
The surface of the GeometricSearchDet.
std::vector< const GeometricSearchDet * > theBackComps
Definition: TECLayer.h:70
BinFinderPhi theBackBinFinder
Definition: TECLayer.h:80
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
BinFinderPhi theFrontBinFinder
Definition: TECLayer.h:79
GlobalVector globalMomentum() const
BoundDisk * TECLayer::computeDisk ( std::vector< const GeometricSearchDet * > &  petals) const
protectedvirtual

Definition at line 265 of file TECLayer.cc.

References i, max(), bookConverter::min, ForwardDetLayer::rmax(), ForwardDetLayer::rmin(), makeMuonMisalignmentScenario::rot, ForwardDetLayer::zmax(), ForwardDetLayer::zmin(), and zPos.

Referenced by TECLayer().

266 {
267  // Attention: it is assumed that the petals do belong to one layer, and are all
268  // of the same rmin/rmax extension !!
269 
270  const BoundDiskSector& diskSector = static_cast<const BoundDiskSector&>(petals.front()->surface());
271 
272  float rmin = diskSector.innerRadius();
273  float rmax = diskSector.outerRadius();
274 
275  float theZmax(petals.front()->position().z());
276  float theZmin(theZmax);
277  for ( vector<const GeometricSearchDet*>::const_iterator i = petals.begin(); i != petals.end(); i++ ) {
278  float zmin = (**i).position().z() - (**i).surface().bounds().thickness()/2.;
279  float zmax = (**i).position().z() + (**i).surface().bounds().thickness()/2.;
280  theZmax = max( theZmax, zmax);
281  theZmin = min( theZmin, zmin);
282  }
283 
284  float zPos = (theZmax+theZmin)/2.;
285  PositionType pos(0.,0.,zPos);
287 
288  return new BoundDisk( pos, rot, new SimpleDiskBounds(rmin, rmax,
289  theZmin-zPos, theZmax-zPos));
290 }
BoundSurface::RotationType RotationType
int i
Definition: DBlmapReader.cc:9
BoundSurface::PositionType PositionType
double zPos
float rmin() const
float zmin() const
const T & max(const T &a, const T &b)
float zmax() const
Disk BoundDisk
Definition: BoundDisk.h:62
float rmax() const
void TECLayer::groupedCompatibleDetsV ( const TrajectoryStateOnSurface tsos,
const Propagator prop,
const MeasurementEstimator est,
std::vector< DetGroup > &  result 
) const
virtual

Reimplemented from GeometricSearchDet.

Definition at line 92 of file TECLayer.cc.

References addClosest(), SubLayerCrossings::closest(), SubLayerCrossings::closestIndex(), computeCrossings(), tkDetUtil::computeWindowSize(), LayerCrossingSide::endcapSide(), SubLayerCrossings::isValid(), LogDebug, DetGroupMerger::orderAndMergeTwoLevels(), SubLayerCrossings::other(), Propagator::propagationDirection(), and searchNeighbors().

95  {
96  SubLayerCrossings crossings;
97  crossings = computeCrossings( tsos, prop.propagationDirection());
98  if(! crossings.isValid()) return;
99 
100  vector<DetGroup> closestResult;
101  addClosest( tsos, prop, est, crossings.closest(), closestResult);
102  LogDebug("TkDetLayers") << "in TECLayer, closestResult.size(): " << closestResult.size();
103 
104  // this differs from other groupedCompatibleDets logic, which DON'T check next in such cases!!!
105  if(closestResult.empty()){
106  vector<DetGroup> nextResult;
107  addClosest( tsos, prop, est, crossings.other(), nextResult);
108  LogDebug("TkDetLayers") << "in TECLayer, nextResult.size(): " << nextResult.size();
109  if(nextResult.empty()) return;
110 
111 
112  DetGroupElement nextGel( nextResult.front().front());
113  int crossingSide = LayerCrossingSide().endcapSide( nextGel.trajectoryState(), prop);
114  DetGroupMerger::orderAndMergeTwoLevels( std::move(closestResult), std::move(nextResult), result,
115  crossings.closestIndex(), crossingSide);
116  }
117  else {
118  DetGroupElement closestGel( closestResult.front().front());
119  float phiWindow = tkDetUtil::computeWindowSize( closestGel.det(), closestGel.trajectoryState(), est);
120  searchNeighbors( tsos, prop, est, crossings.closest(), phiWindow,
121  closestResult, false);
122  vector<DetGroup> nextResult;
123  searchNeighbors( tsos, prop, est, crossings.other(), phiWindow,
124  nextResult, true);
125 
126  int crossingSide = LayerCrossingSide().endcapSide( closestGel.trajectoryState(), prop);
127  DetGroupMerger::orderAndMergeTwoLevels( std::move(closestResult), std::move(nextResult), result,
128  crossings.closestIndex(), crossingSide);
129  }
130 }
#define LogDebug(id)
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: TECLayer.cc:207
virtual PropagationDirection propagationDirection() const GCC11_FINAL
Definition: Propagator.h:145
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
Definition: TkDetUtil.cc:31
int endcapSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop) const
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const
Definition: TECLayer.cc:189
tuple result
Definition: query.py:137
const SubLayerCrossing & other() const
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const
Definition: TECLayer.cc:132
const SubLayerCrossing & closest() const
static void orderAndMergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
bool TECLayer::overlap ( const GlobalPoint gpos,
const GeometricSearchDet petal,
float  window 
) const
private

Definition at line 250 of file TECLayer.cc.

References PV3DBase< T, PVType, FrameType >::barePhi(), phi, rangesIntersect(), and GeometricSearchDet::surface().

Referenced by searchNeighbors().

251 {
252  float phi = gpos.barePhi();
253  const BoundDiskSector& diskSector = static_cast<const BoundDiskSector&>(gsdet.surface());
254  pair<float,float> phiRange(phi-phiWin,phi+phiWin);
255  pair<float,float> petalPhiRange(diskSector.phi() - 0.5*diskSector.phiExtension(),
256  diskSector.phi() + 0.5*diskSector.phiExtension());
257 
258 
259  return rangesIntersect(phiRange, petalPhiRange, PhiLess());
260 }
T barePhi() const
Definition: PV3DBase.h:68
bool rangesIntersect(const Range &a, const Range &b)
Definition: DDAxes.h:10
void TECLayer::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 207 of file TECLayer.cc.

References Clusterizer1DCommons::add(), PeriodicBinFinderInPhi< T >::binIndex(), SubLayerCrossing::closestDetIndex(), overlap(), Geom::Phi< T >::phi(), PV3DBase< T, PVType, FrameType >::phi(), SubLayerCrossing::position(), subLayer(), SubLayerCrossing::subLayerIndex(), theBackBinFinder, and theFrontBinFinder.

Referenced by groupedCompatibleDetsV().

214 {
215  GlobalPoint gCrossingPos = crossing.position();
216 
217  const vector<const GeometricSearchDet*>& sLayer( subLayer( crossing.subLayerIndex()));
218 
219  int closestIndex = crossing.closestDetIndex();
220  int negStartIndex = closestIndex-1;
221  int posStartIndex = closestIndex+1;
222 
223  if (checkClosest) { // must decide if the closest is on the neg or pos side
224  if ( PhiLess()( gCrossingPos.phi(), sLayer[closestIndex]->position().phi())) {
225  posStartIndex = closestIndex;
226  }
227  else {
228  negStartIndex = closestIndex;
229  }
230  }
231 
232  const BinFinderPhi& binFinder = (crossing.subLayerIndex()==0 ? theFrontBinFinder : theBackBinFinder);
233 
234  typedef CompatibleDetToGroupAdder Adder;
235  int half = sLayer.size()/2; // to check if dets are called twice....
236  for (int idet=negStartIndex; idet >= negStartIndex - half; idet--) {
237  const GeometricSearchDet & neighborPetal = *sLayer[binFinder.binIndex(idet)];
238  if (!overlap( gCrossingPos, neighborPetal, window)) break;
239  if (!Adder::add( neighborPetal, tsos, prop, est, result)) break;
240  // maybe also add shallow crossing angle test here???
241  }
242  for (int idet=posStartIndex; idet < posStartIndex + half; idet++) {
243  const GeometricSearchDet & neighborPetal = *sLayer[binFinder.binIndex(idet)];
244  if (!overlap( gCrossingPos, neighborPetal, window)) break;
245  if (!Adder::add( neighborPetal, tsos, prop, est, result)) break;
246  // maybe also add shallow crossing angle test here???
247  }
248 }
def window
Definition: svgfig.py:642
int closestDetIndex() const
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
const GlobalPoint & position() const
int subLayerIndex() const
T phi() const
Definition: Phi.h:41
tuple result
Definition: query.py:137
BinFinderPhi theBackBinFinder
Definition: TECLayer.h:80
PeriodicBinFinderInPhi< double > BinFinderPhi
Definition: TECLayer.h:77
const std::vector< const GeometricSearchDet * > & subLayer(int ind) const
Definition: TECLayer.h:60
BinFinderPhi theFrontBinFinder
Definition: TECLayer.h:79
bool overlap(const GlobalPoint &gpos, const GeometricSearchDet &petal, float window) const
Definition: TECLayer.cc:250
virtual SubDetector TECLayer::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 TECLayer.h.

References GeomDetEnumerators::TEC.

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

Definition at line 60 of file TECLayer.h.

References theBackComps, and theFrontComps.

Referenced by addClosest(), and searchNeighbors().

60  {
61  return (ind==0 ? theFrontComps : theBackComps);
62  }
std::vector< const GeometricSearchDet * > theFrontComps
Definition: TECLayer.h:69
std::vector< const GeometricSearchDet * > theBackComps
Definition: TECLayer.h:70

Member Data Documentation

BinFinderPhi TECLayer::theBackBinFinder
protected

Definition at line 80 of file TECLayer.h.

Referenced by computeCrossings(), searchNeighbors(), and TECLayer().

std::vector<const GeometricSearchDet*> TECLayer::theBackComps
protected

Definition at line 70 of file TECLayer.h.

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

ReferenceCountingPointer<BoundDisk> TECLayer::theBackDisk
protected

Definition at line 75 of file TECLayer.h.

Referenced by computeCrossings(), and TECLayer().

std::vector<const GeomDet*> TECLayer::theBasicComps
protected

Definition at line 71 of file TECLayer.h.

Referenced by basicComponents(), and TECLayer().

std::vector<const GeometricSearchDet*> TECLayer::theComps
protected

Definition at line 68 of file TECLayer.h.

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

BinFinderPhi TECLayer::theFrontBinFinder
protected

Definition at line 79 of file TECLayer.h.

Referenced by computeCrossings(), searchNeighbors(), and TECLayer().

std::vector<const GeometricSearchDet*> TECLayer::theFrontComps
protected

Definition at line 69 of file TECLayer.h.

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

ReferenceCountingPointer<BoundDisk> TECLayer::theFrontDisk
protected

Definition at line 74 of file TECLayer.h.

Referenced by computeCrossings(), and TECLayer().