CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
PixelForwardLayerPhase1 Class Referencefinal

#include <PixelForwardLayerPhase1.h>

Inheritance diagram for PixelForwardLayerPhase1:
ForwardDetLayer DetLayer GeometricSearchDet

Classes

struct  SubTurbineCrossings
 

Public Member Functions

const std::vector< const GeomDet * > & basicComponents () const override
 
const std::vector< const GeometricSearchDet * > & components () const override __attribute__((cold))
 Returns basic components, if any. More...
 
void groupedCompatibleDetsV (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const override __attribute__((hot))
 
 PixelForwardLayerPhase1 (std::vector< const Phase1PixelBlade * > &blades)
 
SubDetector subDetector () const override
 The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap) More...
 
 ~PixelForwardLayerPhase1 () override
 
- Public Member Functions inherited from ForwardDetLayer
std::pair< bool, TrajectoryStateOnSurfacecompatible (const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &) const override
 
bool contains (const Local3DPoint &p) const
 
 ForwardDetLayer (bool doHaveGroups)
 
Location location () const final
 Which part of the detector (barrel, endcap) More...
 
virtual const BoundDiskspecificSurface () const final
 
const BoundSurfacesurface () const final
 The surface of the GeometricSearchDet. More...
 
 ~ForwardDetLayer () override
 
- Public Member Functions inherited from DetLayer
 DetLayer (bool doHaveGroup, bool ibar)
 
bool isBarrel () const
 
bool isForward () const
 
int seqNum () const
 
void setSeqNum (int sq)
 
 ~DetLayer () override
 
- Public Member Functions inherited from GeometricSearchDet
virtual std::vector< DetWithStatecompatibleDets (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
 
virtual void compatibleDetsV (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const
 
 GeometricSearchDet (bool doHaveGroups)
 
virtual std::vector< DetGroupgroupedCompatibleDets (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
 
bool hasGroups () const
 
virtual const Surface::PositionTypeposition () const
 Returns position of the surface. More...
 
virtual ~GeometricSearchDet ()
 

Private Types

typedef PeriodicBinFinderInPhi< float > BinFinderType
 

Private Member Functions

SubTurbineCrossings computeCrossings (const TrajectoryStateOnSurface &startingState, PropagationDirection propDir, bool innerDisk) const __attribute__((hot))
 
void searchNeighbors (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubTurbineCrossings &crossings, float window, std::vector< DetGroup > &result, bool innerDisk) const __attribute__((hot))
 

Static Private Member Functions

static int computeHelicity (const GeometricSearchDet *firstBlade, const GeometricSearchDet *secondBlade)
 
static float computeWindowSize (const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
 

Private Attributes

unsigned int _num_innerpanels
 
unsigned int _num_outerpanels
 
std::vector< const GeomDet * > theBasicComps
 
std::vector< float > theBinFinder_byR
 
std::vector< unsigned int > theBinFinder_byR_index
 
std::vector< unsigned int > theBinFinder_byR_nextindex
 
BinFinderType theBinFinder_inner
 
BinFinderType theBinFinder_outer
 
std::vector< const GeometricSearchDet * > theComps
 

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 *, TrajectoryStateOnSurfaceDetWithState
 
typedef BoundSurface::PositionType PositionType
 
typedef BoundSurface::RotationType RotationType
 
typedef TrajectoryStateOnSurface TrajectoryState
 
- Protected Member Functions inherited from ForwardDetLayer
SimpleDiskBounds const & bounds () const
 
virtual BoundDiskcomputeSurface ()
 
virtual void initialize ()
 
float rmax () const
 
float rmin () const
 
void setSurface (BoundDisk *cp)
 
float zmax () const
 
float zmin () const
 
- Protected Attributes inherited from GeometricSearchDet
bool haveGroups
 
GeomDetCompatibilityChecker theCompatibilityChecker
 

Detailed Description

A concrete implementation for PixelForward layer built out of ForwardPhase1PixelBlade

Definition at line 14 of file PixelForwardLayerPhase1.h.

Member Typedef Documentation

◆ BinFinderType

Definition at line 64 of file PixelForwardLayerPhase1.h.

Constructor & Destructor Documentation

◆ PixelForwardLayerPhase1()

PixelForwardLayerPhase1::PixelForwardLayerPhase1 ( std::vector< const Phase1PixelBlade * > &  blades)

Definition at line 26 of file PixelForwardLayerPhase1.cc.

27  : ForwardDetLayer(true), theComps(blades.begin(), blades.end()) {
28  // Assumes blades are ordered inner first then outer; and within each by phi
29  // where we go 0 -> pi, and then -pi -> 0
30  // we also need the number of inner blades for the offset in theComps vector
31  //
32  // this->specificSurface() not yet available so need to calculate average R
33  // we need some way to flag if FPIX is made of an inner and outer disk
34  // or probably need to change the way this is done, e.g. a smarter binFinder
35  float theRmin = (*(theComps.begin()))->surface().position().perp();
36  float theRmax = theRmin;
37  for (vector<const GeometricSearchDet*>::const_iterator it = theComps.begin(); it != theComps.end(); it++) {
38  theRmin = std::min(theRmin, (*it)->surface().position().perp());
39  theRmax = std::max(theRmax, (*it)->surface().position().perp());
40  }
41  //float split_inner_outer_radius = 0.5 * (theRmin + theRmax);
42  // force the splitting rdius to be 10 cm to cope also with the FPIX disks with only the outer ring
43  float split_inner_outer_radius = 10.;
44  _num_innerpanels = 0;
45  for (vector<const GeometricSearchDet*>::const_iterator it = theComps.begin(); it != theComps.end(); it++) {
46  if ((**it).surface().position().perp() <= split_inner_outer_radius)
48  }
50  edm::LogInfo("TkDetLayers") << " Rmin, Rmax, R_average = " << theRmin << ", " << theRmax << ", "
51  << split_inner_outer_radius << std::endl
52  << " num inner, outer disks = " << _num_innerpanels << ", " << _num_outerpanels
53  << std::endl;
54 
55  for (vector<const GeometricSearchDet*>::const_iterator it = theComps.begin(); it != theComps.end(); it++) {
56  theBasicComps.insert(theBasicComps.end(), (**it).basicComponents().begin(), (**it).basicComponents().end());
57  }
58 
59  //They should be already phi-ordered. TO BE CHECKED!!
60  //sort( theBlades.begin(), theBlades.end(), PhiLess());
62 
63  theBinFinder_inner = BinFinderType(theComps.front()->surface().position().phi(), _num_innerpanels);
65 
66  //--------- DEBUG INFO --------------
67  LogDebug("TkDetLayers") << "DEBUG INFO for PixelForwardLayerPhase1"
68  << "\n"
69  << "Num of inner and outer panels = " << _num_innerpanels << ", " << _num_outerpanels << "\n"
70  << "Based on phi separation for inner: " << theComps.front()->surface().position().phi()
71  << " and on phi separation for outer: "
72  << theComps[_num_innerpanels]->surface().position().phi()
73  << "PixelForwardLayerPhase1.surfcace.phi(): " << std::endl
74  << this->surface().position().phi() << "\n"
75  << "PixelForwardLayerPhase1.surfcace.z(): " << this->surface().position().z() << "\n"
76  << "PixelForwardLayerPhase1.surfcace.innerR(): " << this->specificSurface().innerRadius()
77  << "\n"
78  << "PixelForwardLayerPhase1.surfcace.outerR(): " << this->specificSurface().outerRadius();
79 
80  for (vector<const GeometricSearchDet*>::const_iterator it = theComps.begin(); it != theComps.end(); it++) {
81  LogDebug("TkDetLayers") << "blades phi,z,r: " << (*it)->surface().position().phi() << " , "
82  << (*it)->surface().position().z() << " , " << (*it)->surface().position().perp();
83  //for(vector<const GeomDet*>::const_iterator iu=(**it).basicComponents().begin();
84  // iu!=(**it).basicComponents().end();iu++){
85  // std::cout << " basic component rawId = " << hex << (**iu).geographicalId().rawId() << dec <<std::endl;
86  //}
87  }
88  //-----------------------------------
89 }

References _num_innerpanels, _num_outerpanels, ForwardDetLayer::computeSurface(), LogDebug, SiStripPI::max, min(), PV3DBase< T, PVType, FrameType >::perp(), phi, PV3DBase< T, PVType, FrameType >::phi(), GeometricSearchDet::position(), GloballyPositioned< T >::position(), ForwardDetLayer::setSurface(), ForwardDetLayer::specificSurface(), ForwardDetLayer::surface(), theBasicComps, theBinFinder_inner, theBinFinder_outer, theComps, and PV3DBase< T, PVType, FrameType >::z().

◆ ~PixelForwardLayerPhase1()

PixelForwardLayerPhase1::~PixelForwardLayerPhase1 ( )
override

Definition at line 91 of file PixelForwardLayerPhase1.cc.

91  {
92  vector<const GeometricSearchDet*>::const_iterator i;
93  for (i = theComps.begin(); i != theComps.end(); i++) {
94  delete *i;
95  }
96 }

References mps_fire::i, and theComps.

Member Function Documentation

◆ basicComponents()

const std::vector<const GeomDet*>& PixelForwardLayerPhase1::basicComponents ( ) const
inlineoverridevirtual

Implements GeometricSearchDet.

Definition at line 21 of file PixelForwardLayerPhase1.h.

21 { return theBasicComps; }

References theBasicComps.

◆ components()

const std::vector<const GeometricSearchDet*>& PixelForwardLayerPhase1::components ( ) const
inlineoverridevirtual

Returns basic components, if any.

Returns direct components, if any

Implements GeometricSearchDet.

Definition at line 23 of file PixelForwardLayerPhase1.h.

23 { return theComps; }

References theComps.

◆ computeCrossings()

PixelForwardLayerPhase1::SubTurbineCrossings PixelForwardLayerPhase1::computeCrossings ( const TrajectoryStateOnSurface startingState,
PropagationDirection  propDir,
bool  innerDisk 
) const
private

Definition at line 299 of file PixelForwardLayerPhase1.cc.

300  {
302 
303  HelixPlaneCrossing::PositionType startPos(startingState.globalPosition());
304  HelixPlaneCrossing::DirectionType startDir(startingState.globalMomentum());
305  auto rho = startingState.transverseCurvature();
306 
307  HelixArbitraryPlaneCrossing turbineCrossing(startPos, startDir, rho, propDir);
308 
309  pair<bool, double> thePath = turbineCrossing.pathLength(specificSurface());
310 
311  if (!thePath.first) {
312  return SubTurbineCrossings();
313  }
314 
315  HelixPlaneCrossing::PositionType turbinePoint(turbineCrossing.position(thePath.second));
316  HelixPlaneCrossing::DirectionType turbineDir(turbineCrossing.direction(thePath.second));
317  int closestIndex = 0;
318  int nextIndex = 0;
319  if (innerDisk)
320  closestIndex = theBinFinder_inner.binIndex(turbinePoint.barePhi());
321  else
322  closestIndex = theBinFinder_outer.binIndex(turbinePoint.barePhi());
323 
324  HelixArbitraryPlaneCrossing2Order theBladeCrossing(turbinePoint, turbineDir, rho);
325 
326  float closestDist = 0;
327  if (innerDisk) {
328  const BoundPlane& closestPlane(static_cast<const BoundPlane&>(theComps[closestIndex]->surface()));
329 
330  pair<bool, double> theClosestBladePath = theBladeCrossing.pathLength(closestPlane);
331  LocalPoint closestPos = closestPlane.toLocal(GlobalPoint(theBladeCrossing.position(theClosestBladePath.second)));
332  closestDist = closestPos.x();
333  // use fact that local X perp to global Y
334  nextIndex = Geom::phiLess(closestPlane.phi(), turbinePoint.barePhi()) ? closestIndex + 1 : closestIndex - 1;
335  } else {
336  const BoundPlane& closestPlane(
337  static_cast<const BoundPlane&>(theComps[closestIndex + _num_innerpanels]->surface()));
338 
339  pair<bool, double> theClosestBladePath = theBladeCrossing.pathLength(closestPlane);
340  LocalPoint closestPos = closestPlane.toLocal(GlobalPoint(theBladeCrossing.position(theClosestBladePath.second)));
341  closestDist = closestPos.x();
342  // use fact that local X perp to global Y
343  nextIndex = Geom::phiLess(closestPlane.phi(), turbinePoint.barePhi()) ? closestIndex + 1 : closestIndex - 1;
344  }
345 
346  float nextDist = 0;
347  if (innerDisk) {
348  const BoundPlane& nextPlane(
349  static_cast<const BoundPlane&>(theComps[theBinFinder_inner.binIndex(nextIndex)]->surface()));
350  pair<bool, double> theNextBladePath = theBladeCrossing.pathLength(nextPlane);
351  LocalPoint nextPos = nextPlane.toLocal(GlobalPoint(theBladeCrossing.position(theNextBladePath.second)));
352  nextDist = nextPos.x();
353  } else {
354  const BoundPlane& nextPlane(
355  static_cast<const BoundPlane&>(theComps[theBinFinder_outer.binIndex(nextIndex) + _num_innerpanels]->surface()));
356  pair<bool, double> theNextBladePath = theBladeCrossing.pathLength(nextPlane);
357  LocalPoint nextPos = nextPlane.toLocal(GlobalPoint(theBladeCrossing.position(theNextBladePath.second)));
358  nextDist = nextPos.x();
359  }
360  if (std::abs(closestDist) < std::abs(nextDist)) {
361  return SubTurbineCrossings(closestIndex, nextIndex, nextDist);
362  } else {
363  return SubTurbineCrossings(nextIndex, closestIndex, closestDist);
364  }
365 }

References _num_innerpanels, funct::abs(), PeriodicBinFinderInPhi< T >::binIndex(), HelixArbitraryPlaneCrossing::direction(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), HelixArbitraryPlaneCrossing::pathLength(), HelixArbitraryPlaneCrossing2Order::pathLength(), Geom::phiLess(), HelixArbitraryPlaneCrossing::position(), HelixArbitraryPlaneCrossing2Order::position(), rho, ForwardDetLayer::specificSurface(), ForwardDetLayer::surface(), theBinFinder_inner, theBinFinder_outer, theComps, TrajectoryStateOnSurface::transverseCurvature(), and PV3DBase< T, PVType, FrameType >::x().

Referenced by groupedCompatibleDetsV().

◆ computeHelicity()

int PixelForwardLayerPhase1::computeHelicity ( const GeometricSearchDet firstBlade,
const GeometricSearchDet secondBlade 
)
staticprivate

Definition at line 294 of file PixelForwardLayerPhase1.cc.

295  {
296  return std::abs(firstBlade->position().z()) < std::abs(secondBlade->position().z()) ? 0 : 1;
297 }

References funct::abs(), GeometricSearchDet::position(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by groupedCompatibleDetsV(), and searchNeighbors().

◆ computeWindowSize()

float PixelForwardLayerPhase1::computeWindowSize ( const GeomDet det,
const TrajectoryStateOnSurface tsos,
const MeasurementEstimator est 
)
staticprivate

Definition at line 367 of file PixelForwardLayerPhase1.cc.

369  {
370  return est.maximalLocalDisplacement(tsos, det->surface()).x();
371 }

References MeasurementEstimator::maximalLocalDisplacement(), GeomDet::surface(), and x.

Referenced by groupedCompatibleDetsV().

◆ groupedCompatibleDetsV()

void PixelForwardLayerPhase1::groupedCompatibleDetsV ( const TrajectoryStateOnSurface tsos,
const Propagator prop,
const MeasurementEstimator est,
std::vector< DetGroup > &  result 
) const
overridevirtual

Reimplemented from GeometricSearchDet.

Definition at line 98 of file PixelForwardLayerPhase1.cc.

101  {
102  std::vector<DetGroup> closestResult_inner;
103  std::vector<DetGroup> closestResult_outer;
104  std::vector<DetGroup> nextResult_inner;
105  std::vector<DetGroup> nextResult_outer;
106  std::vector<DetGroup> result_inner;
107  std::vector<DetGroup> result_outer;
108  int frontindex_inner = 0;
109  int frontindex_outer = 0;
110  SubTurbineCrossings crossings_inner;
111  SubTurbineCrossings crossings_outer;
112 
113  if (_num_innerpanels > 0)
114  crossings_inner = computeCrossings(tsos, prop.propagationDirection(), true);
115  crossings_outer = computeCrossings(tsos, prop.propagationDirection(), false);
116  // if (!crossings_inner.isValid){
117  // edm::LogInfo("TkDetLayers") << "inner computeCrossings returns invalid in PixelForwardLayerPhase1::groupedCompatibleDets:";
118  // return;
119  // }
120  if (!crossings_outer.isValid) {
121  edm::LogInfo("TkDetLayers")
122  << "outer computeCrossings returns invalid in PixelForwardLayerPhase1::groupedCompatibleDets:";
123  return;
124  }
125 
126  typedef CompatibleDetToGroupAdder Adder;
127  if (crossings_inner.isValid) {
128  Adder::add(
129  *theComps[theBinFinder_inner.binIndex(crossings_inner.closestIndex)], tsos, prop, est, closestResult_inner);
130 
131  if (closestResult_inner.empty()) {
132  Adder::add(*theComps[theBinFinder_inner.binIndex(crossings_inner.nextIndex)], tsos, prop, est, result_inner);
133  frontindex_inner = crossings_inner.nextIndex;
134  } else {
135  if (Adder::add(
136  *theComps[theBinFinder_inner.binIndex(crossings_inner.nextIndex)], tsos, prop, est, nextResult_inner)) {
137  int crossingSide = LayerCrossingSide().endcapSide(tsos, prop);
138  int theHelicity = computeHelicity(theComps[theBinFinder_inner.binIndex(crossings_inner.closestIndex)],
139  theComps[theBinFinder_inner.binIndex(crossings_inner.nextIndex)]);
140  std::vector<DetGroup> tmp99 = closestResult_inner;
142  std::move(tmp99), std::move(nextResult_inner), result_inner, theHelicity, crossingSide);
143  if (theHelicity == crossingSide)
144  frontindex_inner = crossings_inner.closestIndex;
145  else
146  frontindex_inner = crossings_inner.nextIndex;
147  } else {
148  result_inner.swap(closestResult_inner);
149  frontindex_inner = crossings_inner.closestIndex;
150  }
151  }
152  }
153  if (!closestResult_inner.empty()) {
154  DetGroupElement closestGel(closestResult_inner.front().front());
155  float window = computeWindowSize(closestGel.det(), closestGel.trajectoryState(), est);
156  searchNeighbors(tsos, prop, est, crossings_inner, window, result_inner, true);
157  }
158 
159  //DetGroupElement closestGel( closestResult.front().front());
160  //float window = computeWindowSize( closestGel.det(), closestGel.trajectoryState(), est);
161  //float detWidth = closestGel.det()->surface().bounds().width();
162  //if (crossings.nextDistance < detWidth + window) {
163 
164  Adder::add(*theComps[(theBinFinder_outer.binIndex(crossings_outer.closestIndex)) + _num_innerpanels],
165  tsos,
166  prop,
167  est,
168  closestResult_outer);
169 
170  if (closestResult_outer.empty()) {
171  Adder::add(*theComps[theBinFinder_outer.binIndex(crossings_outer.nextIndex) + _num_innerpanels],
172  tsos,
173  prop,
174  est,
175  result_outer);
176  frontindex_outer = crossings_outer.nextIndex;
177  } else {
178  if (Adder::add(*theComps[theBinFinder_outer.binIndex(crossings_outer.nextIndex) + _num_innerpanels],
179  tsos,
180  prop,
181  est,
182  nextResult_outer)) {
183  int crossingSide = LayerCrossingSide().endcapSide(tsos, prop);
184  int theHelicity =
185  computeHelicity(theComps[theBinFinder_outer.binIndex(crossings_outer.closestIndex) + _num_innerpanels],
186  theComps[theBinFinder_outer.binIndex(crossings_outer.nextIndex) + _num_innerpanels]);
187  std::vector<DetGroup> tmp99 = closestResult_outer;
189  std::move(tmp99), std::move(nextResult_outer), result_outer, theHelicity, crossingSide);
190  if (theHelicity == crossingSide)
191  frontindex_outer = crossings_outer.closestIndex;
192  else
193  frontindex_outer = crossings_outer.nextIndex;
194  } else {
195  result_outer.swap(closestResult_outer);
196  frontindex_outer = crossings_outer.closestIndex;
197  }
198  }
199  if (!closestResult_outer.empty()) {
200  DetGroupElement closestGel(closestResult_outer.front().front());
201  float window = computeWindowSize(closestGel.det(), closestGel.trajectoryState(), est);
202  searchNeighbors(tsos, prop, est, crossings_outer, window, result_outer, false);
203  }
204 
205  if (result_inner.empty() && result_outer.empty())
206  return;
207  if (result_inner.empty())
208  result.swap(result_outer);
209  else if (result_outer.empty())
210  result.swap(result_inner);
211  else {
212  int crossingSide = LayerCrossingSide().endcapSide(tsos, prop);
213  int theHelicity = computeHelicity(theComps[theBinFinder_inner.binIndex(frontindex_inner)],
216  std::move(result_inner), std::move(result_outer), result, theHelicity, crossingSide);
217  }
218 }

References _num_innerpanels, PVValHelper::add(), PeriodicBinFinderInPhi< T >::binIndex(), PixelForwardLayerPhase1::SubTurbineCrossings::closestIndex, computeCrossings(), computeHelicity(), computeWindowSize(), LayerCrossingSide::endcapSide(), PixelForwardLayerPhase1::SubTurbineCrossings::isValid, eostools::move(), PixelForwardLayerPhase1::SubTurbineCrossings::nextIndex, DetGroupMerger::orderAndMergeTwoLevels(), Propagator::propagationDirection(), mps_fire::result, searchNeighbors(), theBinFinder_inner, theBinFinder_outer, theComps, and svgfig::window().

◆ searchNeighbors()

void PixelForwardLayerPhase1::searchNeighbors ( const TrajectoryStateOnSurface tsos,
const Propagator prop,
const MeasurementEstimator est,
const SubTurbineCrossings crossings,
float  window,
std::vector< DetGroup > &  result,
bool  innerDisk 
) const
private

Definition at line 220 of file PixelForwardLayerPhase1.cc.

226  {
227  typedef CompatibleDetToGroupAdder Adder;
228  int crossingSide = LayerCrossingSide().endcapSide(tsos, prop);
229  typedef DetGroupMerger Merger;
230 
231  int negStart = min(crossings.closestIndex, crossings.nextIndex) - 1;
232  int posStart = max(crossings.closestIndex, crossings.nextIndex) + 1;
233 
234  int quarter = (innerDisk ? _num_innerpanels / 4 : _num_outerpanels / 4);
235 
236  for (int idet = negStart; idet >= negStart - quarter + 1; idet--) {
237  std::vector<DetGroup> tmp1;
238  std::vector<DetGroup> newResult;
239  if (innerDisk) {
240  const GeometricSearchDet* neighbor = theComps[theBinFinder_inner.binIndex(idet)];
241  // if (!overlap( gCrossingPos, *neighbor, window)) break; // mybe not needed?
242  // maybe also add shallow crossing angle test here???
243  if (!Adder::add(*neighbor, tsos, prop, est, tmp1))
244  break;
245  int theHelicity =
247  std::vector<DetGroup> tmp2;
248  tmp2.swap(result);
249  Merger::orderAndMergeTwoLevels(std::move(tmp1), std::move(tmp2), newResult, theHelicity, crossingSide);
250  } else {
252  // if (!overlap( gCrossingPos, *neighbor, window)) break; // mybe not needed?
253  // maybe also add shallow crossing angle test here???
254  if (!Adder::add(*neighbor, tsos, prop, est, tmp1))
255  break;
258  std::vector<DetGroup> tmp2;
259  tmp2.swap(result);
260  Merger::orderAndMergeTwoLevels(std::move(tmp1), std::move(tmp2), newResult, theHelicity, crossingSide);
261  }
262  result.swap(newResult);
263  }
264  for (int idet = posStart; idet < posStart + quarter - 1; idet++) {
265  std::vector<DetGroup> tmp1;
266  std::vector<DetGroup> newResult;
267  if (innerDisk) {
268  const GeometricSearchDet* neighbor = theComps[theBinFinder_inner.binIndex(idet)];
269  // if (!overlap( gCrossingPos, *neighbor, window)) break; // mybe not needed?
270  // maybe also add shallow crossing angle test here???
271  if (!Adder::add(*neighbor, tsos, prop, est, tmp1))
272  break;
273  int theHelicity =
275  std::vector<DetGroup> tmp2;
276  tmp2.swap(result);
277  Merger::orderAndMergeTwoLevels(std::move(tmp2), std::move(tmp1), newResult, theHelicity, crossingSide);
278  } else {
280  // if (!overlap( gCrossingPos, *neighbor, window)) break; // mybe not needed?
281  // maybe also add shallow crossing angle test here???
282  if (!Adder::add(*neighbor, tsos, prop, est, tmp1))
283  break;
284  int theHelicity = computeHelicity(theComps[(theBinFinder_outer.binIndex(idet - 1)) + _num_innerpanels],
286  std::vector<DetGroup> tmp2;
287  tmp2.swap(result);
288  Merger::orderAndMergeTwoLevels(std::move(tmp2), std::move(tmp1), newResult, theHelicity, crossingSide);
289  }
290  result.swap(newResult);
291  }
292 }

References _num_innerpanels, _num_outerpanels, PVValHelper::add(), PeriodicBinFinderInPhi< T >::binIndex(), PixelForwardLayerPhase1::SubTurbineCrossings::closestIndex, computeHelicity(), LayerCrossingSide::endcapSide(), SiStripPI::max, HLT_2018_cff::Merger, min(), eostools::move(), PixelForwardLayerPhase1::SubTurbineCrossings::nextIndex, mps_fire::result, theBinFinder_inner, theBinFinder_outer, and theComps.

Referenced by groupedCompatibleDetsV().

◆ subDetector()

SubDetector PixelForwardLayerPhase1::subDetector ( ) const
inlineoverridevirtual

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

Implements DetLayer.

Definition at line 31 of file PixelForwardLayerPhase1.h.

References GeomDetEnumerators::P1PXEC, and GeomDetEnumerators::subDetGeom.

Member Data Documentation

◆ _num_innerpanels

unsigned int PixelForwardLayerPhase1::_num_innerpanels
private

◆ _num_outerpanels

unsigned int PixelForwardLayerPhase1::_num_outerpanels
private

Definition at line 70 of file PixelForwardLayerPhase1.h.

Referenced by PixelForwardLayerPhase1(), and searchNeighbors().

◆ theBasicComps

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

Definition at line 77 of file PixelForwardLayerPhase1.h.

Referenced by basicComponents(), and PixelForwardLayerPhase1().

◆ theBinFinder_byR

std::vector<float> PixelForwardLayerPhase1::theBinFinder_byR
private

Definition at line 72 of file PixelForwardLayerPhase1.h.

◆ theBinFinder_byR_index

std::vector<unsigned int> PixelForwardLayerPhase1::theBinFinder_byR_index
private

Definition at line 73 of file PixelForwardLayerPhase1.h.

◆ theBinFinder_byR_nextindex

std::vector<unsigned int> PixelForwardLayerPhase1::theBinFinder_byR_nextindex
private

Definition at line 74 of file PixelForwardLayerPhase1.h.

◆ theBinFinder_inner

BinFinderType PixelForwardLayerPhase1::theBinFinder_inner
private

◆ theBinFinder_outer

BinFinderType PixelForwardLayerPhase1::theBinFinder_outer
private

◆ theComps

std::vector<const GeometricSearchDet*> PixelForwardLayerPhase1::theComps
private
mps_fire.i
i
Definition: mps_fire.py:355
PixelForwardLayerPhase1::BinFinderType
PeriodicBinFinderInPhi< float > BinFinderType
Definition: PixelForwardLayerPhase1.h:64
LayerCrossingSide
Definition: LayerCrossingSide.h:15
PixelForwardLayerPhase1::_num_innerpanels
unsigned int _num_innerpanels
Definition: PixelForwardLayerPhase1.h:69
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
min
T min(T a, T b)
Definition: MathUtil.h:58
ForwardDetLayer::surface
const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
Definition: ForwardDetLayer.h:29
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
edm::LogInfo
Definition: MessageLogger.h:254
svgfig.window
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
ForwardDetLayer::setSurface
void setSurface(BoundDisk *cp)
Definition: ForwardDetLayer.cc:13
TrajectoryStateOnSurface::transverseCurvature
double transverseCurvature() const
Definition: TrajectoryStateOnSurface.h:70
DDAxes::x
HLT_2018_cff.Merger
Merger
Definition: HLT_2018_cff.py:5945
GeometricSearchDet::position
virtual const Surface::PositionType & position() const
Returns position of the surface.
Definition: GeometricSearchDet.h:31
PixelForwardLayerPhase1::theComps
std::vector< const GeometricSearchDet * > theComps
Definition: PixelForwardLayerPhase1.h:76
PixelForwardLayerPhase1::computeHelicity
static int computeHelicity(const GeometricSearchDet *firstBlade, const GeometricSearchDet *secondBlade)
Definition: PixelForwardLayerPhase1.cc:294
PixelForwardLayerPhase1::searchNeighbors
void searchNeighbors(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubTurbineCrossings &crossings, float window, std::vector< DetGroup > &result, bool innerDisk) const __attribute__((hot))
Definition: PixelForwardLayerPhase1.cc:220
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
PixelForwardLayerPhase1::theBasicComps
std::vector< const GeomDet * > theBasicComps
Definition: PixelForwardLayerPhase1.h:77
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
LayerCrossingSide::endcapSide
static int endcapSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
Definition: LayerCrossingSide.h:31
GeomDetEnumerators::P1PXEC
Definition: GeomDetEnumerators.h:26
Propagator::propagationDirection
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
HelixArbitraryPlaneCrossing
Definition: HelixArbitraryPlaneCrossing.h:10
Vector2DBase
Definition: Vector2DBase.h:8
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, LocalTag >
DetGroupMerger::orderAndMergeTwoLevels
static void orderAndMergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
Definition: DetGroupMerger.cc:6
DDAxes::rho
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
Geom::phiLess
bool phiLess(float phi1, float phi2)
Definition: VectorUtil.h:18
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
PVValHelper::add
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
Definition: PVValidationHelpers.cc:12
ForwardDetLayer::ForwardDetLayer
ForwardDetLayer(bool doHaveGroups)
Definition: ForwardDetLayer.h:24
PixelForwardLayerPhase1::_num_outerpanels
unsigned int _num_outerpanels
Definition: PixelForwardLayerPhase1.h:70
PixelForwardLayerPhase1::computeWindowSize
static float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
Definition: PixelForwardLayerPhase1.cc:367
Local2DVector
Vector2DBase< float, LocalTag > Local2DVector
Definition: FourPointPlaneBounds.h:8
DetGroupElement
Definition: DetGroup.h:10
PixelForwardLayerPhase1::theBinFinder_inner
BinFinderType theBinFinder_inner
Definition: PixelForwardLayerPhase1.h:67
DDAxes::phi
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
DetGroupMerger
Definition: DetGroupMerger.h:7
eostools.move
def move(src, dest)
Definition: eostools.py:511
ForwardDetLayer::computeSurface
virtual BoundDisk * computeSurface()
Definition: ForwardDetLayer.cc:19
GeomDetEnumerators::subDetGeom
constexpr SubDetector subDetGeom[21]
Definition: GeomDetEnumerators.h:40
BoundPlane
CompatibleDetToGroupAdder
Definition: CompatibleDetToGroupAdder.h:13
PeriodicBinFinderInPhi::binIndex
int binIndex(T phi) const override
returns an index in the valid range for the bin that contains phi
Definition: PeriodicBinFinderInPhi.h:25
mps_fire.result
result
Definition: mps_fire.py:303
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GeometricSearchDet
Definition: GeometricSearchDet.h:17
PixelForwardLayerPhase1::theBinFinder_outer
BinFinderType theBinFinder_outer
Definition: PixelForwardLayerPhase1.h:68
PixelForwardLayerPhase1::computeCrossings
SubTurbineCrossings computeCrossings(const TrajectoryStateOnSurface &startingState, PropagationDirection propDir, bool innerDisk) const __attribute__((hot))
Definition: PixelForwardLayerPhase1.cc:299
HelixArbitraryPlaneCrossing2Order
Definition: HelixArbitraryPlaneCrossing2Order.h:10
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
Basic3DVector< float >
ForwardDetLayer::specificSurface
virtual const BoundDisk & specificSurface() const final
Definition: ForwardDetLayer.h:39
MeasurementEstimator::maximalLocalDisplacement
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0