CMS 3D CMS Logo

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

#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
*, TrajectoryStateOnSurface
DetWithState
 
typedef BoundSurface::PositionType PositionType
 
typedef BoundSurface::RotationType RotationType
 
typedef TrajectoryStateOnSurface TrajectoryState
 

Public Member Functions

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

Member Typedef Documentation

Definition at line 14 of file PixelRod.h.

Constructor & Destructor Documentation

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

Definition at line 13 of file PixelRod.cc.

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

13  :
14  DetRodOneR(theInputDets.begin(),theInputDets.end())
15 {
16  theBinFinder = BinFinderType(theDets.begin(),theDets.end());
17 
18  //--------- DEBUG INFO --------------
19  LogDebug("TkDetLayers") << "==== DEBUG PixelRod =====";
20  for (vector<const GeomDet*>::const_iterator i=theDets.begin();
21  i != theDets.end(); i++){
22  LogDebug("TkDetLayers") << "PixelRod's Det pos z,perp,eta,phi: "
23  << (**i).position().z() << " , "
24  << (**i).position().perp() << " , "
25  << (**i).position().eta() << " , "
26  << (**i).position().phi() ;
27  }
28  LogDebug("TkDetLayers") << "==== end DEBUG PixelRod =====";
29  //--------------------------------------
30 
31 
32 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
DetRodOneR(std::vector< const GeomDet * >::const_iterator first, std::vector< const GeomDet * >::const_iterator last)
Construct from iterators on GeomDet*.
Definition: DetRodOneR.cc:15
std::vector< const GeomDet * > theDets
Definition: DetRodOneR.h:40
BinFinderType theBinFinder
Definition: PixelRod.h:41
PeriodicBinFinderInZ< float > BinFinderType
Definition: PixelRod.h:14
PixelRod::~PixelRod ( )

Definition at line 34 of file PixelRod.cc.

34  {
35 
36 }

Member Function Documentation

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

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 45 of file PixelRod.cc.

46  {
47  edm::LogError("TkDetLayers") << "temporary dummy implementation of PixelRod::compatible()!!" ;
48  return pair<bool,TrajectoryStateOnSurface>();
49 }
void PixelRod::compatibleDetsV ( const TrajectoryStateOnSurface startingState,
const Propagator prop,
const MeasurementEstimator est,
std::vector< DetWithState > &  result 
) const
virtual

Reimplemented from GeometricSearchDet.

Definition at line 52 of file PixelRod.cc.

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

56 {
58  TrajectoryStateOnSurface ts = prop.propagate( startingState, specificSurface());
59  if (!ts.isValid()) return;
60 
61  GlobalPoint startPos = ts.globalPosition();
62 
63  int closest = theBinFinder.binIndex(startPos.z());
64  pair<bool,TrajectoryStateOnSurface> closestCompat =
65  theCompatibilityChecker.isCompatible(theDets[closest],startingState, prop, est);
66 
67  if ( closestCompat.first) {
68  result.push_back( DetWithState( theDets[closest], closestCompat.second));
69  }else{
70  if(!closestCompat.second.isValid()) return; // to investigate why this happens
71  }
72 
73  const Plane& closestPlane( theDets[closest]->specificSurface() );
74 
75  Local2DVector maxDistance =
76  est.maximalLocalDisplacement( closestCompat.second, closestPlane);
77 
78  float detHalfLen = theDets[closest]->surface().bounds().length()/2.;
79 
80  // explore neighbours
81  for (size_t idet=closest+1; idet < theDets.size(); idet++) {
82  LocalPoint nextPos( theDets[idet]->surface().toLocal( closestCompat.second.globalPosition()));
83  if (fabs(nextPos.y()) < detHalfLen + maxDistance.y()) {
84  if ( !add(idet, result, startingState, prop, est)) break;
85  } else {
86  break;
87  }
88  }
89 
90  for (int idet=closest-1; idet >= 0; idet--) {
91  LocalPoint nextPos( theDets[idet]->surface().toLocal( closestCompat.second.globalPosition()));
92  if (fabs(nextPos.y()) < detHalfLen + maxDistance.y()) {
93  if ( !add(idet, result, startingState, prop, est)) break;
94  } else {
95  break;
96  }
97  }
98 }
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
Definition: Propagator.h:119
T y() const
Definition: PV2DBase.h:46
std::vector< const GeomDet * > theDets
Definition: DetRodOneR.h:40
GlobalPoint globalPosition() const
Vector2DBase< float, LocalTag > Local2DVector
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:42
BinFinderType theBinFinder
Definition: PixelRod.h:41
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
GeomDetCompatibilityChecker theCompatibilityChecker
virtual const Plane & specificSurface() const
Return the rod surface as a Plane.
Definition: DetRod.h:27
Definition: Plane.h:17
virtual int binIndex(T z) const
returns an index in the valid range for the bin that contains Z
static std::pair< bool, TrajectoryStateOnSurface > isCompatible(const GeomDet *theDet, const TrajectoryStateOnSurface &ts, const Propagator &prop, const MeasurementEstimator &est)
T z() const
Definition: PV3DBase.h:64
tuple result
Definition: query.py:137
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const
virtual const BoundSurface & surface() const
The surface of the GeometricSearchDet.
Definition: DetRod.h:21
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
const vector< const GeometricSearchDet * > & PixelRod::components ( ) const
virtual

Returns basic components, if any.

Returns direct components, if any

Implements GeometricSearchDet.

Definition at line 39 of file PixelRod.cc.

39  {
40  throw DetLayerException("PixelRod doesn't have GeometricSearchDet components");
41 }
Common base class.
void PixelRod::groupedCompatibleDetsV ( const TrajectoryStateOnSurface ,
const Propagator ,
const MeasurementEstimator ,
std::vector< DetGroup > &   
) const
virtual

Reimplemented from GeometricSearchDet.

Definition at line 102 of file PixelRod.cc.

References LogDebug.

106 {
107  LogDebug("TkDetLayers") << "dummy implementation of PixelRod::groupedCompatibleDets()" ;
108 }
#define LogDebug(id)

Member Data Documentation

BinFinderType PixelRod::theBinFinder
private

Definition at line 41 of file PixelRod.h.

Referenced by compatibleDetsV(), and PixelRod().