CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
PixelRod Class Referencefinal

#include <PixelRod.h>

Inheritance diagram for PixelRod:
DetRodOneR DetRod GeometricSearchDet

Public Types

typedef PeriodicBinFinderInZ< float > BinFinderType
 
- Public Types inherited from DetRodOneR
typedef std::vector< GeometricSearchDet * > DetContainer
 
- Public Types inherited from GeometricSearchDet
typedef std::pair< const GeomDet *, TrajectoryStateOnSurfaceDetWithState
 
typedef BoundSurface::PositionType PositionType
 
typedef BoundSurface::RotationType RotationType
 
typedef TrajectoryStateOnSurface TrajectoryState
 

Public Member Functions

std::pair< bool, TrajectoryStateOnSurfacecompatible (const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const override
 
void compatibleDetsV (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const override __attribute__((hot))
 
const std::vector< const GeometricSearchDet * > & components () const override __attribute__((cold))
 Returns basic components, if any. More...
 
void groupedCompatibleDetsV (const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &, std::vector< DetGroup > &) const override
 
 PixelRod (std::vector< const GeomDet * > &theDets)
 
 ~PixelRod () override
 
- Public Member Functions inherited from DetRodOneR
const std::vector< const GeomDet * > & basicComponents () const override
 
 DetRodOneR (const std::vector< const GeomDet * > &dets)
 Construct from a std::vector of GeomDet*. More...
 
 DetRodOneR (std::vector< const GeomDet * >::const_iterator first, std::vector< const GeomDet * >::const_iterator last)
 Construct from iterators on GeomDet*. More...
 
 ~DetRodOneR () override
 
- Public Member Functions inherited from DetRod
 GeometricSearchDet (bool doHaveGroups)
 
virtual const PlanespecificSurface () const final
 Return the rod surface as a Plane. More...
 
const BoundSurfacesurface () const final
 The surface of the GeometricSearchDet. More...
 
 ~DetRod () override
 
- Public Member Functions inherited from GeometricSearchDet
virtual std::vector< DetWithStatecompatibleDets (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) 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 Attributes

BinFinderType theBinFinder
 

Additional Inherited Members

- Protected Member Functions inherited from DetRodOneR
bool add (int idet, std::vector< DetWithState > &result, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
 Query detector idet for compatible and add the output to result. More...
 
void initialize ()
 
- Protected Member Functions inherited from DetRod
void setPlane (Plane *plane)
 Set the rod's plane. More...
 
- Protected Attributes inherited from DetRodOneR
std::vector< const GeomDet * > theDets
 
- Protected Attributes inherited from GeometricSearchDet
bool haveGroups
 
GeomDetCompatibilityChecker theCompatibilityChecker
 

Detailed Description

A concrete implementation for PixelRod

Definition at line 11 of file PixelRod.h.

Member Typedef Documentation

◆ BinFinderType

Definition at line 13 of file PixelRod.h.

Constructor & Destructor Documentation

◆ PixelRod()

PixelRod::PixelRod ( std::vector< const GeomDet * > &  theDets)

Definition at line 12 of file PixelRod.cc.

12  : DetRodOneR(theInputDets.begin(), theInputDets.end()) {
13  theBinFinder = BinFinderType(theDets.begin(), theDets.end());
14 
15  //--------- DEBUG INFO --------------
16  LogDebug("TkDetLayers") << "==== DEBUG PixelRod =====";
17  for (vector<const GeomDet*>::const_iterator i = theDets.begin(); i != theDets.end(); i++) {
18  LogDebug("TkDetLayers") << "PixelRod's Det pos z,perp,eta,phi: " << (**i).position().z() << " , "
19  << (**i).position().perp() << " , " << (**i).position().eta() << " , "
20  << (**i).position().phi();
21  }
22  LogDebug("TkDetLayers") << "==== end DEBUG PixelRod =====";
23  //--------------------------------------
24 }

References mps_fire::i, LogDebug, theBinFinder, and DetRodOneR::theDets.

◆ ~PixelRod()

PixelRod::~PixelRod ( )
override

Definition at line 26 of file PixelRod.cc.

26 {}

Member Function Documentation

◆ compatible()

pair< bool, TrajectoryStateOnSurface > PixelRod::compatible ( const TrajectoryStateOnSurface ts,
const Propagator ,
const MeasurementEstimator  
) const
overridevirtual

tests the geometrical compatibility of the Det with the predicted state. The FreeTrajectoryState argument is propagated to the Det surface using the Propagator argument. The resulting TrajectoryStateOnSurface is tested for compatibility with the surface bounds. If compatible, a std::pair< true, propagatedState> is returned. If the propagation fails, or if the state is not compatible, a std::pair< false, propagatedState> is returned.

Implements GeometricSearchDet.

Definition at line 32 of file PixelRod.cc.

34  {
35  edm::LogError("TkDetLayers") << "temporary dummy implementation of PixelRod::compatible()!!";
36  return pair<bool, TrajectoryStateOnSurface>();
37 }

◆ compatibleDetsV()

void PixelRod::compatibleDetsV ( const TrajectoryStateOnSurface startingState,
const Propagator prop,
const MeasurementEstimator est,
std::vector< DetWithState > &  result 
) const
overridevirtual

Reimplemented from GeometricSearchDet.

Definition at line 39 of file PixelRod.cc.

42  {
44  TrajectoryStateOnSurface ts = prop.propagate(startingState, specificSurface());
45  if (!ts.isValid())
46  return;
47 
48  GlobalPoint startPos = ts.globalPosition();
49 
50  int closest = theBinFinder.binIndex(startPos.z());
51  pair<bool, TrajectoryStateOnSurface> closestCompat =
52  theCompatibilityChecker.isCompatible(theDets[closest], startingState, prop, est);
53 
54  if (closestCompat.first) {
55  result.push_back(DetWithState(theDets[closest], closestCompat.second));
56  } else {
57  if (!closestCompat.second.isValid())
58  return; // to investigate why this happens
59  }
60 
61  const Plane& closestPlane(theDets[closest]->specificSurface());
62 
63  Local2DVector maxDistance = est.maximalLocalDisplacement(closestCompat.second, closestPlane);
64 
65  float detHalfLen = theDets[closest]->surface().bounds().length() / 2.;
66 
67  // explore neighbours
68  for (size_t idet = closest + 1; idet < theDets.size(); idet++) {
69  LocalPoint nextPos(theDets[idet]->surface().toLocal(closestCompat.second.globalPosition()));
70  if (std::abs(nextPos.y()) < detHalfLen + maxDistance.y()) {
71  if (!add(idet, result, startingState, prop, est))
72  break;
73  } else {
74  break;
75  }
76  }
77 
78  for (int idet = closest - 1; idet >= 0; idet--) {
79  LocalPoint nextPos(theDets[idet]->surface().toLocal(closestCompat.second.globalPosition()));
80  if (std::abs(nextPos.y()) < detHalfLen + maxDistance.y()) {
81  if (!add(idet, result, startingState, prop, est))
82  break;
83  } else {
84  break;
85  }
86  }
87 }

References funct::abs(), DetRodOneR::add(), PeriodicBinFinderInZ< T >::binIndex(), TrajectoryStateOnSurface::globalPosition(), GeomDetCompatibilityChecker::isCompatible(), TrajectoryStateOnSurface::isValid(), particleFlowClusterHGC_cfi::maxDistance, MeasurementEstimator::maximalLocalDisplacement(), Propagator::propagate(), mps_fire::result, DetRod::specificSurface(), DetRod::surface(), theBinFinder, GeometricSearchDet::theCompatibilityChecker, DetRodOneR::theDets, toLocal(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

◆ components()

const vector< const GeometricSearchDet * > & PixelRod::components ( ) const
overridevirtual

Returns basic components, if any.

Returns direct components, if any

Implements GeometricSearchDet.

Definition at line 28 of file PixelRod.cc.

28  {
29  throw DetLayerException("PixelRod doesn't have GeometricSearchDet components");
30 }

◆ groupedCompatibleDetsV()

void PixelRod::groupedCompatibleDetsV ( const TrajectoryStateOnSurface ,
const Propagator ,
const MeasurementEstimator ,
std::vector< DetGroup > &   
) const
overridevirtual

Reimplemented from GeometricSearchDet.

Definition at line 89 of file PixelRod.cc.

92  {
93  LogDebug("TkDetLayers") << "dummy implementation of PixelRod::groupedCompatibleDets()";
94 }

References LogDebug.

Member Data Documentation

◆ theBinFinder

BinFinderType PixelRod::theBinFinder
private

Definition at line 37 of file PixelRod.h.

Referenced by compatibleDetsV(), and PixelRod().

mps_fire.i
i
Definition: mps_fire.py:428
GeometricSearchDet::theCompatibilityChecker
GeomDetCompatibilityChecker theCompatibilityChecker
Definition: GeometricSearchDet.h:102
PeriodicBinFinderInZ::binIndex
int binIndex(T z) const override
returns an index in the valid range for the bin that contains Z
Definition: PeriodicBinFinderInZ.h:26
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
particleFlowClusterHGC_cfi.maxDistance
maxDistance
Definition: particleFlowClusterHGC_cfi.py:23
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
PixelRod::BinFinderType
PeriodicBinFinderInZ< float > BinFinderType
Definition: PixelRod.h:13
PixelRod::theBinFinder
BinFinderType theBinFinder
Definition: PixelRod.h:37
Vector2DBase
Definition: Vector2DBase.h:8
Point3DBase< float, GlobalTag >
GeomDetCompatibilityChecker::isCompatible
static std::pair< bool, TrajectoryStateOnSurface > isCompatible(const GeomDet *theDet, const TrajectoryStateOnSurface &ts, const Propagator &prop, const MeasurementEstimator &est)
Definition: GeomDetCompatibilityChecker.cc:58
DetRod::specificSurface
virtual const Plane & specificSurface() const final
Return the rod surface as a Plane.
Definition: DetRod.h:24
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
DetRod::surface
const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
Definition: DetRod.h:19
DetRodOneR::theDets
std::vector< const GeomDet * > theDets
Definition: DetRodOneR.h:37
DetRodOneR::add
bool add(int idet, std::vector< DetWithState > &result, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
Query detector idet for compatible and add the output to result.
Definition: DetRodOneR.cc:32
Local2DVector
Vector2DBase< float, LocalTag > Local2DVector
Definition: FourPointPlaneBounds.h:8
DetRodOneR::DetRodOneR
DetRodOneR(std::vector< const GeomDet * >::const_iterator first, std::vector< const GeomDet * >::const_iterator last)
Construct from iterators on GeomDet*.
Definition: DetRodOneR.cc:15
Propagator::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
GeometricSearchDet::DetWithState
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
Definition: GeometricSearchDet.h:19
DetLayerException
Common base class.
Definition: DetLayerException.h:15
Plane
Definition: Plane.h:16
toLocal
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
Definition: ConversionProducer.h:199
mps_fire.result
result
Definition: mps_fire.py:311
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
MeasurementEstimator::maximalLocalDisplacement
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0