CMS 3D CMS Logo

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

#include <VectorHit.h>

Inheritance diagram for VectorHit:
BaseTrackerRecHit TrackingRecHit

Public Types

typedef
OmniClusterRef::Phase2Cluster1DRef 
ClusterRef
 
- Public Types inherited from TrackingRecHit
typedef std::vector
< ConstRecHitPointer
ConstRecHitContainer
 
using ConstRecHitPointer = std::shared_ptr< TrackingRecHit const >
 
typedef unsigned int id_type
 
typedef std::vector
< ConstRecHitPointer
RecHitContainer
 
using RecHitPointer = std::shared_ptr< TrackingRecHit const >
 
enum  SharedInputType { all, some }
 definition of equality via shared input More...
 
enum  Type {
  valid = 0, missing = 1, inactive = 2, bad = 3,
  missing_inner = 4, missing_outer = 5, inactive_inner = 6, inactive_outer = 7
}
 

Public Member Functions

float chi2 () const
 
VectorHitclone () const override
 
RecHitPointer cloneSH () const override
 
ClusterRef cluster () const
 
const AlgebraicSymMatrix44covMatrix () const
 
float curvature () const
 
float curvatureError () const
 
int dimension () const override
 
OmniClusterRef const & firstClusterRef () const override
 
void getKfComponents (KfComponentsHolder &holder) const override
 
void getKfComponents4D (KfComponentsHolder &holder) const
 
Global3DVector globalDirection () const
 
Global3DVector globalDirectionVH () const
 
bool hasPositionAndError () const override
 to be redefined by daughter class More...
 
bool isPhase2 () const override
 
virtual LocalVector localDirection () const
 
LocalError localDirectionError () const
 
LocalPoint localPosition () const override
 
LocalError localPositionError () const override
 
ClusterRef lowerCluster () const
 "lower" is logical, not geometrically lower; in pixel-strip modules the "lower" is always a pixel More...
 
OmniClusterRef const lowerClusterRef () const
 
Global3DPoint lowerGlobalPos () const
 
GlobalError lowerGlobalPosErr () const
 
float momentum (float magField) const
 
float phi () const
 
std::vector< const
TrackingRecHit * > 
recHits () const override
 Access to component RecHits (if any) More...
 
std::vector< TrackingRecHit * > recHits () override
 Non-const access to component RecHits (if any) More...
 
bool sharesClusters (VectorHit const &other, SharedInputType what) const
 
bool sharesInput (const TrackingRecHit *other, SharedInputType what) const override
 
float theta () const
 
float transverseMomentum (float magField) const
 
ClusterRef upperCluster () const
 
OmniClusterRef const upperClusterRef () const
 
Global3DPoint upperGlobalPos () const
 
GlobalError upperGlobalPosErr () const
 
 VectorHit ()
 
 VectorHit (const GeomDet &idet, const LocalPoint &posInner, const LocalVector &dir, const AlgebraicSymMatrix44 &covMatrix, const float chi2, OmniClusterRef const &lower, OmniClusterRef const &upper, const float curvature, const float curvatureError, const float phi)
 
 VectorHit (const GeomDet &idet, const VectorHit2D &vh2Dzx, const VectorHit2D &vh2Dzy, OmniClusterRef const &lower, OmniClusterRef const &upper, const float curvature, const float curvatureError, const float phi)
 
 ~VectorHit () override=default
 
- Public Member Functions inherited from BaseTrackerRecHit
 BaseTrackerRecHit ()
 
 BaseTrackerRecHit (DetId id, trackerHitRTTI::RTTI rt)
 
 BaseTrackerRecHit (const GeomDet &idet, trackerHitRTTI::RTTI rt)
 
 BaseTrackerRecHit (const LocalPoint &p, const LocalError &e, GeomDet const &idet, trackerHitRTTI::RTTI rt)
 
virtual float clusterProbability () const
 cluster probability, overloaded by pixel rechits. More...
 
float errorGlobalR () const final
 
float errorGlobalRPhi () const final
 
float errorGlobalZ () const final
 
void getKfComponents1D (KfComponentsHolder &holder) const
 
void getKfComponents2D (KfComponentsHolder &holder) const
 
GlobalPoint globalPosition () const final
 
GlobalError globalPositionError () const final
 
TrackingRecHitGlobalState globalState () const
 
BaseTrackerRecHit const * hit () const final
 
bool isMatched () const
 
bool isMulti () const
 
virtual bool isPixel () const
 
bool isProjected () const
 
bool isProjMono () const
 
bool isProjStereo () const
 
bool isSingle () const
 
const LocalErrorlocalPositionErrorFast () const
 
const LocalPointlocalPositionFast () const
 
AlgebraicVector parameters () const override
 
AlgebraicSymMatrix parametersError () const override
 
AlgebraicMatrix projectionMatrix () const override
 
trackerHitRTTI::RTTI rtti () const
 
bool sameDetModule (TrackingRecHit const &hit) const
 
const Surfacesurface () const final
 
 ~BaseTrackerRecHit () override
 
- Public Member Functions inherited from TrackingRecHit
virtual bool canImproveWithTrack () const
 
RecHitPointer cloneForFit (const GeomDet &idet) const
 
virtual TrackingRecHitcloneHit () const
 
const GeomDetdet () const
 
virtual const GeomDetUnitdetUnit () const
 
DetId geographicalId () const
 
unsigned int getRTTI () const
 
Type getType () const
 
bool isValid () const
 
id_type rawId () const
 
virtual void recHitsV (std::vector< const TrackingRecHit * > &) const
 
virtual void recHitsV (std::vector< TrackingRecHit * > &)
 
virtual void setDet (const GeomDet &idet)
 
 TrackingRecHit (DetId id, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
 TrackingRecHit (DetId id, unsigned int rt, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, unsigned int rt, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, TrackingRecHit const &rh)
 
virtual ConstRecHitContainer transientHits () const
 
Type type () const
 
virtual float weight () const
 
virtual ~TrackingRecHit ()
 

Static Public Member Functions

static Global3DPoint phase2clusterGlobalPos (const PixelGeomDetUnit *geomDet, ClusterRef cluster)
 
static GlobalError phase2clusterGlobalPosErr (const PixelGeomDetUnit *geomDet)
 

Private Member Functions

VectorHitclone_ (TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
 
RecHitPointer cloneSH_ (TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
 

Private Attributes

float theChi2
 
AlgebraicSymMatrix44 theCovMatrix
 
float theCurvature
 
float theCurvatureError
 
LocalVector theDirection
 
OmniClusterRef theLowerCluster
 
float thePhi
 
LocalPoint thePosition
 
OmniClusterRef theUpperCluster
 

Static Private Attributes

static constexpr int theDimension = 4
 

Additional Inherited Members

- Static Public Attributes inherited from TrackingRecHit
static const int rttiShift = 24
 
static const int typeMask = 0xf
 
- Protected Member Functions inherited from TrackingRecHit
void setId (id_type iid)
 
void setRTTI (unsigned int rt)
 
void setType (Type ttype)
 
- Protected Attributes inherited from BaseTrackerRecHit
LocalError err_
 
LocalPoint pos_
 
unsigned int qualWord_
 

Detailed Description

4-parameter RecHits for Phase2 Tracker (x,y, dx/dz, dy/dz)

Date:
2015/03/30
Author
Erica Brondolin

Definition at line 28 of file VectorHit.h.

Member Typedef Documentation

Definition at line 30 of file VectorHit.h.

Constructor & Destructor Documentation

VectorHit::VectorHit ( )
inline

Definition at line 32 of file VectorHit.h.

References TrackingRecHit::bad, and TrackingRecHit::setType().

Referenced by clone().

LocalPoint thePosition
Definition: VectorHit.h:127
AlgebraicSymMatrix44 theCovMatrix
Definition: VectorHit.h:137
void setType(Type ttype)
LocalVector theDirection
Definition: VectorHit.h:128
VectorHit::VectorHit ( const GeomDet idet,
const LocalPoint posInner,
const LocalVector dir,
const AlgebraicSymMatrix44 covMatrix,
const float  chi2,
OmniClusterRef const &  lower,
OmniClusterRef const &  upper,
const float  curvature,
const float  curvatureError,
const float  phi 
)

Definition at line 5 of file VectorHit.cc.

16  thePosition(posLower),
17  theDirection(dir),
19  theChi2(chi2),
20  theLowerCluster(lower),
21  theUpperCluster(upper),
24  thePhi(phi) {}
float theCurvatureError
Definition: VectorHit.h:143
LocalPoint thePosition
Definition: VectorHit.h:127
float thePhi
Definition: VectorHit.h:144
float chi2() const
Definition: VectorHit.h:81
float curvature() const
Definition: VectorHit.h:83
AlgebraicSymMatrix44 theCovMatrix
Definition: VectorHit.h:137
float curvatureError() const
Definition: VectorHit.h:84
OmniClusterRef theUpperCluster
Definition: VectorHit.h:141
float phi() const
Definition: VectorHit.h:85
const AlgebraicSymMatrix44 & covMatrix() const
Definition: VectorHit.cc:171
OmniClusterRef theLowerCluster
Definition: VectorHit.h:140
float theCurvature
Definition: VectorHit.h:142
LocalVector theDirection
Definition: VectorHit.h:128
float theChi2
Definition: VectorHit.h:138
VectorHit::VectorHit ( const GeomDet idet,
const VectorHit2D vh2Dzx,
const VectorHit2D vh2Dzy,
OmniClusterRef const &  lower,
OmniClusterRef const &  upper,
const float  curvature,
const float  curvatureError,
const float  phi 
)

Definition at line 26 of file VectorHit.cc.

References VectorHit2D::chi2(), VectorHit2D::covMatrix(), theChi2, and theCovMatrix.

35  thePosition(LocalPoint(vh2Dzx.localPosition().x(), vh2Dzy.localPosition().x(), 0.)),
36  theDirection(LocalVector(vh2Dzx.localDirection().x(), vh2Dzy.localDirection().x(), 1.)),
37  theLowerCluster(lower),
38  theUpperCluster(upper),
41  thePhi(phi) {
42  //building the cov matrix 4x4 starting from the 2x2
43  const AlgebraicSymMatrix22& covMatZX = vh2Dzx.covMatrix();
44  const AlgebraicSymMatrix22& covMatZY = vh2Dzy.covMatrix();
45 
47 
48  theCovMatrix[0][0] = covMatZX[0][0]; // var(dx/dz)
49  theCovMatrix[1][1] = covMatZY[0][0]; // var(dy/dz)
50  theCovMatrix[2][2] = covMatZX[1][1]; // var(x)
51  theCovMatrix[3][3] = covMatZY[1][1]; // var(y)
52  theCovMatrix[0][2] = covMatZX[0][1]; // cov(dx/dz,x)
53  theCovMatrix[1][3] = covMatZY[0][1]; // cov(dy/dz,y)
54 
55  theChi2 = vh2Dzx.chi2() + vh2Dzy.chi2();
56 }
float theCurvatureError
Definition: VectorHit.h:143
Local3DVector LocalVector
Definition: LocalVector.h:12
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
LocalPoint thePosition
Definition: VectorHit.h:127
float thePhi
Definition: VectorHit.h:144
const LocalVector & localDirection() const
Definition: VectorHit2D.h:22
float curvature() const
Definition: VectorHit.h:83
AlgebraicSymMatrix44 theCovMatrix
Definition: VectorHit.h:137
const LocalPoint & localPosition() const
Definition: VectorHit2D.h:21
float curvatureError() const
Definition: VectorHit.h:84
OmniClusterRef theUpperCluster
Definition: VectorHit.h:141
float phi() const
Definition: VectorHit.h:85
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > AlgebraicSymMatrix44
OmniClusterRef theLowerCluster
Definition: VectorHit.h:140
float theCurvature
Definition: VectorHit.h:142
const AlgebraicSymMatrix22 & covMatrix() const
Definition: VectorHit2D.h:24
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > AlgebraicSymMatrix22
LocalVector theDirection
Definition: VectorHit.h:128
float chi2() const
Definition: VectorHit2D.h:25
float theChi2
Definition: VectorHit.h:138
T x() const
Definition: PV3DBase.h:59
VectorHit::~VectorHit ( )
overridedefault

Member Function Documentation

float VectorHit::chi2 ( void  ) const
inline

Definition at line 81 of file VectorHit.h.

References theChi2.

Referenced by operator<().

81 { return theChi2; }
float theChi2
Definition: VectorHit.h:138
VectorHit* VectorHit::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 56 of file VectorHit.h.

References VectorHit().

56 { return new VectorHit(*this); }
VectorHit()
Definition: VectorHit.h:32
VectorHit* VectorHit::clone_ ( TkCloner const &  cloner,
TrajectoryStateOnSurface const &  tsos 
) const
inlineoverrideprivatevirtual

Reimplemented from TrackingRecHit.

Definition at line 120 of file VectorHit.h.

120  {
121  return cloner(*this, tsos).release();
122  }
RecHitPointer VectorHit::cloneSH ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 57 of file VectorHit.h.

57 { return std::make_shared<VectorHit>(*this); }
RecHitPointer VectorHit::cloneSH_ ( TkCloner const &  cloner,
TrajectoryStateOnSurface const &  tsos 
) const
inlineoverrideprivatevirtual

Reimplemented from TrackingRecHit.

Definition at line 123 of file VectorHit.h.

References TkCloner::makeShared().

123  {
124  return cloner.makeShared(*this, tsos);
125  }
ClusterRef VectorHit::cluster ( ) const
inline

Definition at line 108 of file VectorHit.h.

References OmniClusterRef::cluster_phase2OT(), and theLowerCluster.

Referenced by track_associator::hitsToClusterRefs().

108 { return theLowerCluster.cluster_phase2OT(); }
Phase2Cluster1DRef cluster_phase2OT() const
OmniClusterRef theLowerCluster
Definition: VectorHit.h:140
const AlgebraicSymMatrix44 & VectorHit::covMatrix ( ) const

Definition at line 171 of file VectorHit.cc.

References theCovMatrix.

Referenced by SeedingOTEDProducer::buildInitialTSOS().

171 { return theCovMatrix; }
AlgebraicSymMatrix44 theCovMatrix
Definition: VectorHit.h:137
float VectorHit::curvature ( ) const
inline

Definition at line 83 of file VectorHit.h.

References theCurvature.

83 { return theCurvature; }
float theCurvature
Definition: VectorHit.h:142
float VectorHit::curvatureError ( ) const
inline

Definition at line 84 of file VectorHit.h.

References theCurvatureError.

84 { return theCurvatureError; }
float theCurvatureError
Definition: VectorHit.h:143
int VectorHit::dimension ( ) const
inlineoverridevirtual

Implements BaseTrackerRecHit.

Definition at line 82 of file VectorHit.h.

References theDimension.

82 { return theDimension; }
static constexpr int theDimension
Definition: VectorHit.h:139
OmniClusterRef const& VectorHit::firstClusterRef ( ) const
inlineoverridevirtual

Implements BaseTrackerRecHit.

Definition at line 107 of file VectorHit.h.

References theLowerCluster.

Referenced by track_associator::hitsToClusterRefs(), and sharesInput().

107 { return theLowerCluster; }
OmniClusterRef theLowerCluster
Definition: VectorHit.h:140
void VectorHit::getKfComponents ( KfComponentsHolder holder) const
inlineoverridevirtual

Implements BaseTrackerRecHit.

Definition at line 70 of file VectorHit.h.

References getKfComponents4D().

70 { getKfComponents4D(holder); }
void getKfComponents4D(KfComponentsHolder &holder) const
Definition: VectorHit.cc:85
void VectorHit::getKfComponents4D ( KfComponentsHolder holder) const

Definition at line 85 of file VectorHit.cc.

References KfComponentsHolder::errors(), mps_fire::i, KfComponentsHolder::measuredErrors(), KfComponentsHolder::measuredParams(), KfComponentsHolder::params(), KfComponentsHolder::projFunc(), theCovMatrix, theDimension, theDirection, thePosition, KfComponentsHolder::tsosLocalErrors(), KfComponentsHolder::tsosLocalParameters(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by getKfComponents().

85  {
86  AlgebraicVector4& pars = holder.params<theDimension>();
87  pars[0] = theDirection.x();
88  pars[1] = theDirection.y();
89  pars[2] = thePosition.x();
90  pars[3] = thePosition.y();
91 
92  holder.errors<theDimension>() = theCovMatrix;
93 
95  for (int i = 0; i < 4; ++i)
96  pf.index[i] = i + 1;
97 
99  holder.measuredErrors<theDimension>() = holder.tsosLocalErrors().Sub<AlgebraicSymMatrix44>(1, 1);
100 }
T y() const
Definition: PV3DBase.h:60
LocalPoint thePosition
Definition: VectorHit.h:127
static constexpr int theDimension
Definition: VectorHit.h:139
AlgebraicSymMatrix44 theCovMatrix
Definition: VectorHit.h:137
AlgebraicROOTObject< D, D >::SymMatrix & measuredErrors()
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > AlgebraicSymMatrix44
ROOT::Math::SVector< double, 4 > AlgebraicVector4
AlgebraicROOTObject< D >::Vector & params()
AlgebraicROOTObject< D, D >::SymMatrix & errors()
ProjectMatrix< double, 5, D > & projFunc()
const AlgebraicVector5 & tsosLocalParameters() const
LocalVector theDirection
Definition: VectorHit.h:128
AlgebraicROOTObject< D >::Vector & measuredParams()
T x() const
Definition: PV3DBase.h:59
const AlgebraicSymMatrix55 & tsosLocalErrors() const
Global3DVector VectorHit::globalDirection ( ) const

Definition at line 152 of file VectorHit.cc.

References TrackingRecHit::det(), localDirection(), and BaseTrackerRecHit::surface().

Referenced by operator<<(), and theta().

152 { return (det()->surface().toGlobal(localDirection())); }
virtual LocalVector localDirection() const
Definition: VectorHit.h:75
const GeomDet * det() const
const Surface * surface() const final
Global3DVector VectorHit::globalDirectionVH ( ) const

Definition at line 145 of file VectorHit.cc.

References TrackingRecHit::det(), g, GeomDet::surface(), theDirection, Surface::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

145  {
146  Local3DVector theLocalDelta =
148  Global3DVector g = det()->surface().toGlobal(theLocalDelta);
149  return g;
150 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
Local3DVector LocalVector
Definition: LocalVector.h:12
T y() const
Definition: PV3DBase.h:60
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
const GeomDet * det() const
T z() const
Definition: PV3DBase.h:61
LocalVector theDirection
Definition: VectorHit.h:128
T x() const
Definition: PV3DBase.h:59
bool VectorHit::hasPositionAndError ( ) const
inlineoverridevirtual

to be redefined by daughter class

Reimplemented from BaseTrackerRecHit.

Definition at line 64 of file VectorHit.h.

References TrackingRecHit::det().

64  {
65  //if det is present pos&err are available as well.
66  //if det() is not present (null) the hit has been read from file and not updated
67  return det();
68  };
const GeomDet * det() const
bool VectorHit::isPhase2 ( ) const
inlineoverridevirtual

Reimplemented from BaseTrackerRecHit.

Definition at line 104 of file VectorHit.h.

104 { return true; }
virtual LocalVector VectorHit::localDirection ( ) const
inlinevirtual

Definition at line 75 of file VectorHit.h.

References theDirection.

Referenced by SeedingOTEDProducer::buildInitialTSOS(), globalDirection(), and operator<<().

75 { return theDirection; }
LocalVector theDirection
Definition: VectorHit.h:128
LocalError VectorHit::localDirectionError ( ) const

Definition at line 167 of file VectorHit.cc.

References theCovMatrix.

167  {
168  return LocalError(theCovMatrix[0][0], theCovMatrix[0][1], theCovMatrix[1][1]);
169 }
AlgebraicSymMatrix44 theCovMatrix
Definition: VectorHit.h:137
LocalPoint VectorHit::localPosition ( ) const
inlineoverridevirtual

Reimplemented from BaseTrackerRecHit.

Definition at line 74 of file VectorHit.h.

References thePosition.

Referenced by SeedingOTEDProducer::buildInitialTSOS(), and operator<<().

74 { return thePosition; }
LocalPoint thePosition
Definition: VectorHit.h:127
LocalError VectorHit::localPositionError ( ) const
overridevirtual

Reimplemented from BaseTrackerRecHit.

Definition at line 163 of file VectorHit.cc.

References theCovMatrix.

163  {
164  return LocalError(theCovMatrix[2][2], theCovMatrix[2][3], theCovMatrix[3][3]);
165 }
AlgebraicSymMatrix44 theCovMatrix
Definition: VectorHit.h:137
ClusterRef VectorHit::lowerCluster ( ) const
inline

"lower" is logical, not geometrically lower; in pixel-strip modules the "lower" is always a pixel

Definition at line 91 of file VectorHit.h.

References OmniClusterRef::cluster_phase2OT(), and theLowerCluster.

Referenced by lowerGlobalPos(), and SeedClusterRemoverPhase2::process().

Phase2Cluster1DRef cluster_phase2OT() const
OmniClusterRef theLowerCluster
Definition: VectorHit.h:140
OmniClusterRef const VectorHit::lowerClusterRef ( ) const
inline

Definition at line 93 of file VectorHit.h.

References theLowerCluster.

Referenced by ctfseeding::HitExtractorSTRP::cleanedOfClusters(), sharesClusters(), and sharesInput().

93 { return theLowerCluster; }
OmniClusterRef theLowerCluster
Definition: VectorHit.h:140
Global3DPoint VectorHit::lowerGlobalPos ( ) const

Definition at line 102 of file VectorHit.cc.

References TrackingRecHit::det(), lowerCluster(), StackGeomDet::lowerDet(), and phase2clusterGlobalPos().

Referenced by operator<<().

102  {
103  const StackGeomDet* stackDet = static_cast<const StackGeomDet*>(det());
104  const PixelGeomDetUnit* geomDetLower = static_cast<const PixelGeomDetUnit*>(stackDet->lowerDet());
105  return phase2clusterGlobalPos(geomDetLower, lowerCluster());
106 }
const GeomDetUnit * lowerDet() const
Definition: StackGeomDet.h:19
static Global3DPoint phase2clusterGlobalPos(const PixelGeomDetUnit *geomDet, ClusterRef cluster)
Definition: VectorHit.cc:114
const GeomDet * det() const
ClusterRef lowerCluster() const
&quot;lower&quot; is logical, not geometrically lower; in pixel-strip modules the &quot;lower&quot; is always a pixel ...
Definition: VectorHit.h:91
GlobalError VectorHit::lowerGlobalPosErr ( ) const

Definition at line 123 of file VectorHit.cc.

References TrackingRecHit::det(), StackGeomDet::lowerDet(), and phase2clusterGlobalPosErr().

Referenced by SeedingOTEDProducer::computeGlobalThetaError().

123  {
124  const StackGeomDet* stackDet = static_cast<const StackGeomDet*>(det());
125  const PixelGeomDetUnit* geomDetLower = static_cast<const PixelGeomDetUnit*>(stackDet->lowerDet());
126  return phase2clusterGlobalPosErr(geomDetLower);
127 }
const GeomDetUnit * lowerDet() const
Definition: StackGeomDet.h:19
const GeomDet * det() const
static GlobalError phase2clusterGlobalPosErr(const PixelGeomDetUnit *geomDet)
Definition: VectorHit.cc:135
float VectorHit::momentum ( float  magField) const

Definition at line 161 of file VectorHit.cc.

References funct::sin(), theta(), and transverseMomentum().

Referenced by SeedingOTEDProducer::buildInitialTSOS().

161 { return transverseMomentum(magField) / (1. * sin(theta())); }
const auto & magField
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
float transverseMomentum(float magField) const
Definition: VectorHit.cc:156
float theta() const
Definition: VectorHit.cc:154
Global3DPoint VectorHit::phase2clusterGlobalPos ( const PixelGeomDetUnit geomDet,
ClusterRef  cluster 
)
static

Definition at line 114 of file VectorHit.cc.

References runTauDisplay::gp, PixelTopology::localX(), PixelTopology::localY(), PixelGeomDetUnit::specificTopology(), GeomDet::surface(), and Surface::toGlobal().

Referenced by VectorHitBuilderAlgorithm::buildVectorHit(), lowerGlobalPos(), and upperGlobalPos().

114  {
115  const PixelTopology* topo = &geomDet->specificTopology();
116  float ix = cluster->center();
117  float iy = cluster->column() + 0.5f; // halfway the column
118  LocalPoint lp(topo->localX(ix), topo->localY(iy), 0); // x, y, z
119  Global3DPoint gp = geomDet->surface().toGlobal(lp);
120  return gp;
121 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
virtual float localX(float mpX) const =0
virtual float localY(float mpY) const =0
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
ClusterRef cluster() const
Definition: VectorHit.h:108
GlobalError VectorHit::phase2clusterGlobalPosErr ( const PixelGeomDetUnit geomDet)
static

Definition at line 135 of file VectorHit.cc.

References PixelTopology::pitch(), funct::pow(), PixelGeomDetUnit::specificTopology(), GeomDet::surface(), and HcalDetIdTransform::transform().

Referenced by VectorHitBuilderAlgorithm::buildVectorHit(), lowerGlobalPosErr(), and upperGlobalPosErr().

135  {
136  const PixelTopology* topo = &geomDet->specificTopology();
137  float pitchX = topo->pitch().first;
138  float pitchY = topo->pitch().second;
139  constexpr float invTwelve = 1. / 12;
140  LocalError le(pow(pitchX, 2) * invTwelve, 0, pow(pitchY, 2) * invTwelve); // e2_xx, e2_xy, e2_yy
141  GlobalError ge(ErrorFrameTransformer().transform(le, geomDet->surface()));
142  return ge;
143 }
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
virtual std::pair< float, float > pitch() const =0
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
unsigned transform(const HcalDetId &id, unsigned transformCode)
float VectorHit::phi ( ) const
inline

Definition at line 85 of file VectorHit.h.

References thePhi.

Referenced by Particle.Particle::__str__(), and ntupleDataFormat.Track::phiPull().

85 { return thePhi; }
float thePhi
Definition: VectorHit.h:144
std::vector< const TrackingRecHit * > VectorHit::recHits ( void  ) const
overridevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 185 of file VectorHit.cc.

185 { return {}; }
std::vector< TrackingRecHit * > VectorHit::recHits ( void  )
overridevirtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 188 of file VectorHit.cc.

188 { return {}; }
bool VectorHit::sharesClusters ( VectorHit const &  other,
SharedInputType  what 
) const

Definition at line 78 of file VectorHit.cc.

References TrackingRecHit::all, lowerClusterRef(), and upperClusterRef().

Referenced by sharesInput().

78  {
79  bool lower = this->lowerClusterRef() == other.lowerClusterRef();
80  bool upper = this->upperClusterRef() == other.upperClusterRef();
81 
82  return (what == TrackingRecHit::all) ? (lower && upper) : (upper || lower);
83 }
OmniClusterRef const upperClusterRef() const
Definition: VectorHit.h:94
OmniClusterRef const lowerClusterRef() const
Definition: VectorHit.h:93
bool VectorHit::sharesInput ( const TrackingRecHit other,
SharedInputType  what 
) const
overridevirtual

Returns true if the two TrackingRecHits are using the same input information (like Digis, Clusters, etc), false otherwise. The second argument specifies how much sharing is needed in order to return true: the value "all" means that all inputs of the two hits must be identical; the value "some" means that at least one of the inputs is in common.

Reimplemented from TrackingRecHit.

Definition at line 58 of file VectorHit.cc.

References TrackingRecHit::all, firstClusterRef(), TrackingRecHit::geographicalId(), trackerHitRTTI::isVector(), lowerClusterRef(), BaseTrackerRecHit::sameDetModule(), sharesClusters(), and upperClusterRef().

58  {
59  if (what == all && (geographicalId() != other->geographicalId()))
60  return false;
61 
62  if (!sameDetModule(*other))
63  return false;
64 
65  if (trackerHitRTTI::isVector(*other)) {
66  const VectorHit* otherVh = static_cast<const VectorHit*>(other);
67  return sharesClusters(*otherVh, what);
68  }
69 
70  if (what == all)
71  return false;
72 
73  // what about multi???
74  auto const& otherClus = reinterpret_cast<const BaseTrackerRecHit*>(other)->firstClusterRef();
75  return (otherClus == lowerClusterRef()) || (otherClus == upperClusterRef());
76 }
OmniClusterRef const upperClusterRef() const
Definition: VectorHit.h:94
bool sameDetModule(TrackingRecHit const &hit) const
bool sharesClusters(VectorHit const &other, SharedInputType what) const
Definition: VectorHit.cc:78
OmniClusterRef const lowerClusterRef() const
Definition: VectorHit.h:93
bool isVector(TrackingRecHit const &hit)
OmniClusterRef const & firstClusterRef() const override
Definition: VectorHit.h:107
DetId geographicalId() const
float VectorHit::theta ( ) const

Definition at line 154 of file VectorHit.cc.

References globalDirection(), and PV3DBase< T, PVType, FrameType >::theta().

Referenced by momentum(), and Tau.Tau::zImpact().

154 { return globalDirection().theta(); }
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
Global3DVector globalDirection() const
Definition: VectorHit.cc:152
float VectorHit::transverseMomentum ( float  magField) const

Definition at line 156 of file VectorHit.cc.

References alignCSCRings::e, F(), and theCurvature.

Referenced by SeedingOTEDProducer::buildInitialTSOS(), and momentum().

156  {
157  return magField * (CLHEP::c_light * 1e-5F) / theCurvature;
158  // pT [GeV] ~ 0.3 * B[T] * R [m], curvature is in cms, using precise value from speed of light
159  // because curvature is a signed quantity this transverse momentum is also signed
160 }
const auto & magField
float theCurvature
Definition: VectorHit.h:142
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
ClusterRef VectorHit::upperCluster ( ) const
inline

Definition at line 92 of file VectorHit.h.

References OmniClusterRef::cluster_phase2OT(), and theUpperCluster.

Referenced by SeedClusterRemoverPhase2::process(), and upperGlobalPos().

Phase2Cluster1DRef cluster_phase2OT() const
OmniClusterRef theUpperCluster
Definition: VectorHit.h:141
OmniClusterRef const VectorHit::upperClusterRef ( ) const
inline

Definition at line 94 of file VectorHit.h.

References theUpperCluster.

Referenced by ctfseeding::HitExtractorSTRP::cleanedOfClusters(), sharesClusters(), and sharesInput().

94 { return theUpperCluster; }
OmniClusterRef theUpperCluster
Definition: VectorHit.h:141
Global3DPoint VectorHit::upperGlobalPos ( ) const

Definition at line 108 of file VectorHit.cc.

References TrackingRecHit::det(), phase2clusterGlobalPos(), upperCluster(), and StackGeomDet::upperDet().

Referenced by operator<<().

108  {
109  const StackGeomDet* stackDet = static_cast<const StackGeomDet*>(det());
110  const PixelGeomDetUnit* geomDetUpper = static_cast<const PixelGeomDetUnit*>(stackDet->upperDet());
111  return phase2clusterGlobalPos(geomDetUpper, upperCluster());
112 }
static Global3DPoint phase2clusterGlobalPos(const PixelGeomDetUnit *geomDet, ClusterRef cluster)
Definition: VectorHit.cc:114
ClusterRef upperCluster() const
Definition: VectorHit.h:92
const GeomDet * det() const
const GeomDetUnit * upperDet() const
Definition: StackGeomDet.h:20
GlobalError VectorHit::upperGlobalPosErr ( ) const

Definition at line 129 of file VectorHit.cc.

References TrackingRecHit::det(), phase2clusterGlobalPosErr(), and StackGeomDet::upperDet().

129  {
130  const StackGeomDet* stackDet = static_cast<const StackGeomDet*>(det());
131  const PixelGeomDetUnit* geomDetUpper = static_cast<const PixelGeomDetUnit*>(stackDet->upperDet());
132  return phase2clusterGlobalPosErr(geomDetUpper);
133 }
const GeomDet * det() const
static GlobalError phase2clusterGlobalPosErr(const PixelGeomDetUnit *geomDet)
Definition: VectorHit.cc:135
const GeomDetUnit * upperDet() const
Definition: StackGeomDet.h:20

Member Data Documentation

float VectorHit::theChi2
private

Definition at line 138 of file VectorHit.h.

Referenced by chi2(), and VectorHit().

AlgebraicSymMatrix44 VectorHit::theCovMatrix
private
float VectorHit::theCurvature
private

Definition at line 142 of file VectorHit.h.

Referenced by curvature(), and transverseMomentum().

float VectorHit::theCurvatureError
private

Definition at line 143 of file VectorHit.h.

Referenced by curvatureError().

constexpr int VectorHit::theDimension = 4
staticprivate

Definition at line 139 of file VectorHit.h.

Referenced by dimension(), and getKfComponents4D().

LocalVector VectorHit::theDirection
private

Definition at line 128 of file VectorHit.h.

Referenced by getKfComponents4D(), globalDirectionVH(), and localDirection().

OmniClusterRef VectorHit::theLowerCluster
private

Definition at line 140 of file VectorHit.h.

Referenced by cluster(), firstClusterRef(), lowerCluster(), and lowerClusterRef().

float VectorHit::thePhi
private

Definition at line 144 of file VectorHit.h.

Referenced by phi().

LocalPoint VectorHit::thePosition
private

Definition at line 127 of file VectorHit.h.

Referenced by getKfComponents4D(), and localPosition().

OmniClusterRef VectorHit::theUpperCluster
private

Definition at line 141 of file VectorHit.h.

Referenced by upperCluster(), and upperClusterRef().