CMS 3D CMS Logo

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

#include <TSiStripMatchedRecHit.h>

Inheritance diagram for TSiStripMatchedRecHit:
GenericTransientTrackingRecHit TransientTrackingRecHit TrackingRecHit ReferenceCountedPoolAllocated BlockWipedPoolAllocated

Classes

struct  DontCloneRecHit
 Dummy struct to pass to the constructor to say 'please don't clone the hit'. More...
 

Public Member Functions

virtual bool canImproveWithTrack () const
 
void clearPersistentHit ()
 
virtual RecHitPointer clone (const TrajectoryStateOnSurface &ts) const
 
void clonePersistentHit ()
 take ownership of the hit, if it wasn't owned (note: if it was owned, this code will leak it) More...
 
const GeomDetUnitdetUnit () const
 
virtual void getKfComponents (KfComponentsHolder &holder) const
 
virtual AlgebraicSymMatrix parametersError () const
 
virtual ConstRecHitContainer transientHits () const
 Composite interface: returns the component hits, if any. More...
 
- Public Member Functions inherited from GenericTransientTrackingRecHit
virtual int dimension () const
 
virtual const TrackingRecHithit () const
 
virtual LocalPoint localPosition () const
 
virtual LocalError localPositionError () const
 
virtual AlgebraicVector parameters () const
 
virtual AlgebraicMatrix projectionMatrix () const
 
virtual std::vector< const
TrackingRecHit * > 
recHits () const
 Access to component RecHits (if any) More...
 
virtual std::vector
< TrackingRecHit * > 
recHits ()
 Non-const access to component RecHits (if any) More...
 
virtual ~GenericTransientTrackingRecHit ()
 
- Public Member Functions inherited from TransientTrackingRecHit
virtual float clusterProbability () const
 cluster probability, overloaded by pixel rechits. More...
 
const GeomDetdet () const
 The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds. More...
 
float errorGlobalR () const
 
float errorGlobalRPhi () const
 
float errorGlobalZ () const
 
virtual GlobalPoint globalPosition () const
 
virtual GlobalError globalPositionError () const
 
virtual const Surfacesurface () const
 
 TransientTrackingRecHit (const GeomDet *geom=0)
 
 TransientTrackingRecHit (const GeomDet *geom, DetId id, Type type=valid)
 
 TransientTrackingRecHit (const GeomDet *geom, TrackingRecHit::id_type id, Type type=valid)
 
 TransientTrackingRecHit (const GeomDet *geom, TrackingRecHit const &rh)
 
- Public Member Functions inherited from TrackingRecHit
DetId geographicalId () const
 
unsigned int getRTTI () const
 
Type getType () const
 
virtual bool hasPositionAndError () const
 to be redefined by daughter class More...
 
bool isValid () const
 
id_type rawId () const
 
virtual void recHitsV (std::vector< const TrackingRecHit * > &) const
 
virtual void recHitsV (std::vector< TrackingRecHit * > &)
 
virtual bool sharesInput (const TrackingRecHit *other, SharedInputType what) const
 
 TrackingRecHit (DetId id, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
 TrackingRecHit (DetId id, unsigned int rt, Type type=valid)
 
Type type () const
 
virtual float weight () const
 
virtual ~TrackingRecHit ()
 
- Public Member Functions inherited from ReferenceCountedPoolAllocated
void addReference () const
 
const
ReferenceCountedPoolAllocated
operator= (const ReferenceCountedPoolAllocated &)
 
 ReferenceCountedPoolAllocated ()
 
 ReferenceCountedPoolAllocated (const ReferenceCountedPoolAllocated &iRHS)
 
unsigned int references () const
 
void removeReference () const
 
virtual ~ReferenceCountedPoolAllocated ()
 
- Public Member Functions inherited from BlockWipedPoolAllocated
virtual ~BlockWipedPoolAllocated ()
 

Static Public Member Functions

static RecHitPointer build (const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe=0, bool computeCoarseLocalPosition=false)
 
static RecHitPointer build (const GeomDet *geom, std::auto_ptr< TrackingRecHit > rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe=0, bool computeCoarseLocalPosition=false)
 
static void buildInPlace (std::auto_ptr< TSiStripMatchedRecHit > &memory, const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe=0, bool computeCoarseLocalPosition=false)
 
- Static Public Member Functions inherited from GenericTransientTrackingRecHit
static RecHitPointer build (const GeomDet *geom, const TrackingRecHit *rh)
 
- Static Public Member Functions inherited from BlockWipedPoolAllocated
static BlockWipedAllocatorallocator (size_t s)
 
static void operator delete (void *p, size_t s)
 
static void * operator new (size_t s, void *p)
 
static void * operator new (size_t s)
 
static BlockWipedAllocator::Stat stat (size_t s)
 
static void usePool ()
 

Private Member Functions

virtual TSiStripMatchedRecHitclone () const
 
void ComputeCoarseLocalPosition ()
 
 TSiStripMatchedRecHit (const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, bool computeCoarseLocalPosition)
 
 TSiStripMatchedRecHit (const GeomDet *geom, std::auto_ptr< TrackingRecHit > rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, bool computeCoarseLocalPosition)
 
 TSiStripMatchedRecHit (const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, bool computeCoarseLocalPosition, const DontCloneRecHit &)
 

Private Attributes

const
StripClusterParameterEstimator
theCPE
 
const SiStripRecHitMatchertheMatcher
 

Additional Inherited Members

- Public Types inherited from GenericTransientTrackingRecHit
typedef TrackingRecHit::Type Type
 
- Public Types inherited from TransientTrackingRecHit
typedef std::vector
< ConstRecHitPointer
ConstRecHitContainer
 
typedef
ConstReferenceCountingPointer
< TransientTrackingRecHit
ConstRecHitPointer
 
typedef std::vector
< ConstRecHitPointer
RecHitContainer
 
typedef
ReferenceCountingPointer
< TransientTrackingRecHit
RecHitPointer
 
- Public Types inherited from TrackingRecHit
typedef unsigned int id_type
 
enum  SharedInputType { all, some }
 definition of equality via shared input More...
 
enum  Type { valid = 0, missing = 1, inactive = 2, bad = 3 }
 
- Static Public Attributes inherited from TrackingRecHit
static const int rttiShift = 24
 
static const int typeMask = 0xf
 
- Static Public Attributes inherited from ReferenceCountedPoolAllocated
static int s_alive =0
 
static int s_referenced =0
 
- Static Public Attributes inherited from BlockWipedPoolAllocated
static int s_alive =0
 
static bool s_usePool =false
 
- Protected Member Functions inherited from GenericTransientTrackingRecHit
 GenericTransientTrackingRecHit (const GeomDet *geom, const TrackingRecHit &rh)
 
 GenericTransientTrackingRecHit (const GeomDet *geom, TrackingRecHit *rh)
 for derived classes convenience, does not clone! More...
 
 GenericTransientTrackingRecHit (const GenericTransientTrackingRecHit &other)
 
- Protected Member Functions inherited from TrackingRecHit
void setId (id_type iid)
 
void setRTTI (unsigned int rt)
 
void setType (Type ttype)
 
- Protected Attributes inherited from GenericTransientTrackingRecHit
TrackingRecHittrackingRecHit_
 

Detailed Description

Definition at line 13 of file TSiStripMatchedRecHit.h.

Constructor & Destructor Documentation

TSiStripMatchedRecHit::TSiStripMatchedRecHit ( const GeomDet geom,
const TrackingRecHit rh,
const SiStripRecHitMatcher matcher,
const StripClusterParameterEstimator cpe,
bool  computeCoarseLocalPosition 
)
inlineprivate

Definition at line 75 of file TSiStripMatchedRecHit.h.

References ComputeCoarseLocalPosition().

Referenced by build(), buildInPlace(), and clone().

78  :
79  GenericTransientTrackingRecHit(geom, *rh), theMatcher(matcher),theCPE(cpe) {
80  if (computeCoarseLocalPosition) ComputeCoarseLocalPosition();
81  }
const StripClusterParameterEstimator * theCPE
const SiStripRecHitMatcher * theMatcher
GenericTransientTrackingRecHit(const GeomDet *geom, const TrackingRecHit &rh)
TSiStripMatchedRecHit::TSiStripMatchedRecHit ( const GeomDet geom,
std::auto_ptr< TrackingRecHit rh,
const SiStripRecHitMatcher matcher,
const StripClusterParameterEstimator cpe,
bool  computeCoarseLocalPosition 
)
inlineprivate

Definition at line 83 of file TSiStripMatchedRecHit.h.

References ComputeCoarseLocalPosition().

86  :
87  GenericTransientTrackingRecHit(geom, rh.release()), theMatcher(matcher),theCPE(cpe) {
88  if (computeCoarseLocalPosition) ComputeCoarseLocalPosition();
89  }
const StripClusterParameterEstimator * theCPE
const SiStripRecHitMatcher * theMatcher
GenericTransientTrackingRecHit(const GeomDet *geom, const TrackingRecHit &rh)
TSiStripMatchedRecHit::TSiStripMatchedRecHit ( const GeomDet geom,
const TrackingRecHit rh,
const SiStripRecHitMatcher matcher,
const StripClusterParameterEstimator cpe,
bool  computeCoarseLocalPosition,
const DontCloneRecHit  
)
inlineprivate

Definition at line 90 of file TSiStripMatchedRecHit.h.

References ComputeCoarseLocalPosition().

94  :
95  GenericTransientTrackingRecHit(geom, const_cast<TrackingRecHit *>(rh)), theMatcher(matcher),theCPE(cpe) {
96  if (computeCoarseLocalPosition) ComputeCoarseLocalPosition();
97  }
const StripClusterParameterEstimator * theCPE
const SiStripRecHitMatcher * theMatcher
GenericTransientTrackingRecHit(const GeomDet *geom, const TrackingRecHit &rh)

Member Function Documentation

static RecHitPointer TSiStripMatchedRecHit::build ( const GeomDet geom,
const TrackingRecHit rh,
const SiStripRecHitMatcher matcher,
const StripClusterParameterEstimator cpe = 0,
bool  computeCoarseLocalPosition = false 
)
inlinestatic

Definition at line 26 of file TSiStripMatchedRecHit.h.

References TSiStripMatchedRecHit().

Referenced by TkGluedMeasurementDet::HitCollectorForRecHits::add(), SiStripElectronSeedGenerator::altCheckHitsAndTSOS(), TkTransientTrackingRecHitBuilder::build(), SiStripElectronSeedGenerator::checkHitsAndTSOS(), and TkTransientTrackingRecHitBuilder::oldbuild().

29  {
30  return RecHitPointer( new TSiStripMatchedRecHit( geom, rh, matcher,cpe, computeCoarseLocalPosition));
31  }
TSiStripMatchedRecHit(const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, bool computeCoarseLocalPosition)
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
static RecHitPointer TSiStripMatchedRecHit::build ( const GeomDet geom,
std::auto_ptr< TrackingRecHit rh,
const SiStripRecHitMatcher matcher,
const StripClusterParameterEstimator cpe = 0,
bool  computeCoarseLocalPosition = false 
)
inlinestatic

Definition at line 33 of file TSiStripMatchedRecHit.h.

References TSiStripMatchedRecHit().

36  {
37  return RecHitPointer( new TSiStripMatchedRecHit( geom, rh, matcher,cpe, computeCoarseLocalPosition));
38  }
TSiStripMatchedRecHit(const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, bool computeCoarseLocalPosition)
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
static void TSiStripMatchedRecHit::buildInPlace ( std::auto_ptr< TSiStripMatchedRecHit > &  memory,
const GeomDet geom,
const TrackingRecHit rh,
const SiStripRecHitMatcher matcher,
const StripClusterParameterEstimator cpe = 0,
bool  computeCoarseLocalPosition = false 
)
inlinestatic

Build this hit on the heap, but possibly starting from already allocated memory. if 'memory' is not null, it will call the placed delete, and then the placed new to make a new hit if 'memory' is null, it will fill it with a new heap-allocated hit both at entry and exit of this method any rechit in 'memory' DOES NOT own it's persistent rechit

Definition at line 51 of file TSiStripMatchedRecHit.h.

References TSiStripMatchedRecHit().

Referenced by TkGluedMeasurementDet::HitCollectorForFastMeasurements::add().

55  {
56  if (memory.get()) {
57  memory->~TSiStripMatchedRecHit(); // call destructor
58  new (memory.get()) TSiStripMatchedRecHit( geom, rh, matcher,cpe, computeCoarseLocalPosition, DontCloneRecHit());
59  } else {
60  memory.reset(new TSiStripMatchedRecHit( geom, rh, matcher,cpe,computeCoarseLocalPosition, DontCloneRecHit()));
61  }
62  }
TSiStripMatchedRecHit(const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, bool computeCoarseLocalPosition)
Definition: vlib.h:187
virtual bool TSiStripMatchedRecHit::canImproveWithTrack ( ) const
inlinevirtual

Returns true if the clone( const TrajectoryStateOnSurface&) method returns an improved hit, false if it returns an identical copy. In order to avoid redundent copies one should call canImproveWithTrack() before calling clone( const TrajectoryStateOnSurface&).

Reimplemented from GenericTransientTrackingRecHit.

Definition at line 41 of file TSiStripMatchedRecHit.h.

References theMatcher.

41 {return (theMatcher != 0);}
const SiStripRecHitMatcher * theMatcher
void TSiStripMatchedRecHit::clearPersistentHit ( )
inline

drop the pointer to the hit, so that it's not deleted by the destructor. you must call this before deleting the TSiStripMatchedRecHit IF AND ONLY IF it doesn't own the rechit

Definition at line 68 of file TSiStripMatchedRecHit.h.

References GenericTransientTrackingRecHit::trackingRecHit_.

TSiStripMatchedRecHit::RecHitPointer TSiStripMatchedRecHit::clone ( const TrajectoryStateOnSurface ts) const
virtual

Returns a copy of the hit with parameters and errors computed with respect to the TrajectoryStateOnSurface given as argument. For concrete hits not capable to improve their parameters and errors this method returns an exact copy, and is equivalent to clone() without arguments.

Reimplemented from TransientTrackingRecHit.

Definition at line 36 of file TSiStripMatchedRecHit.cc.

References clone(), TransientTrackingRecHit::det(), GeomDet::geographicalId(), gluedToStereo(), GenericTransientTrackingRecHit::hit(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localDirection(), ClusterParameterEstimator< T >::localParameters(), SiStripRecHitMatcher::match(), SiStripMatchedRecHit2D::monoCluster(), SiStripMatchedRecHit2D::monoClusterRef(), GluedGeomDet::monoDet(), GeomDet::position(), SiStripMatchedRecHit2D::stereoCluster(), SiStripMatchedRecHit2D::stereoClusterRef(), GluedGeomDet::stereoDet(), GeomDet::surface(), theCPE, theMatcher, GloballyPositioned< T >::toLocal(), and TSiStripMatchedRecHit().

37 {
38  if (theMatcher != 0) {
39  const SiStripMatchedRecHit2D *orig = static_cast<const SiStripMatchedRecHit2D *> (this->hit());
40  const GeomDet *det = this->det();
41  const GluedGeomDet *gdet = static_cast<const GluedGeomDet *> (det);
42  //if ((orig == 0) || (gdet == 0)) return this->clone(); // or just die ?
43  LocalVector tkDir = (ts.isValid() ? ts.localDirection() :
44  det->surface().toLocal( det->position()-GlobalPoint(0,0,0)));
45 
46  if(theCPE != 0){
47  //approximation: the ts parameter on the glued surface are used on the mono
48  // and stereo surface to re-evaluate cluster parameter. A further propagation
49  //is slow// and useless (?) in this case.
50 
51 
52  const SiStripCluster& monoclust = orig->monoCluster();
53  const SiStripCluster& stereoclust = orig->stereoCluster();
54 
56  theCPE->localParameters( monoclust, *gdet->monoDet(), ts);
58  theCPE->localParameters( stereoclust, *gdet->stereoDet(), gluedToStereo(ts, gdet));
59 
60  SiStripRecHit2D monoHit = SiStripRecHit2D( lvMono.first, lvMono.second,
61  gdet->monoDet()->geographicalId(),
62  orig->monoClusterRef());
63 
64  SiStripRecHit2D stereoHit = SiStripRecHit2D( lvStereo.first, lvStereo.second,
65  gdet->stereoDet()->geographicalId(),
66  orig->stereoClusterRef());
67  const SiStripMatchedRecHit2D* better = theMatcher->match(&monoHit,&stereoHit,gdet,tkDir);
68 
69  if (better == 0) {
70  //dm::LogWarning("TSiStripMatchedRecHit") << "Refitting of a matched rechit returns NULL";
71  return this->clone();
72  }
73 
74  return RecHitPointer(new TSiStripMatchedRecHit( gdet, better, theMatcher,theCPE, false, DontCloneRecHit()));
75  // delete better; //the ownership of the object is passed to the caller of the matcher
76 
77  }
78  /*
79  // not supported anymore....
80  else{
81  const SiStripMatchedRecHit2D *better = theMatcher->match(orig,gdet,tkDir);
82  if (better == 0) {
83  //edm::LogWarning("TSiStripMatchedRecHit") << "Refitting of a matched rechit returns NULL";
84  return this->clone();
85  }
86  return RecHitPointer(new TSiStripMatchedRecHit( gdet, better, theMatcher,theCPE, false, DontCloneRecHit()));
87  // delete better; //the ownership of the object is passed to the caller of the matcher
88  }
89  */
90  }
91  return this->clone();
92 
93 }
TSiStripMatchedRecHit(const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, bool computeCoarseLocalPosition)
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:20
SiStripMatchedRecHit2D * match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
SiStripCluster const & monoCluster() const
LocalVector localDirection() const
OmniClusterRef const & stereoClusterRef() const
virtual const TrackingRecHit * hit() const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const StripClusterParameterEstimator * theCPE
const LocalTrajectoryParameters & gluedToStereo(const TrajectoryStateOnSurface &tsos, const GluedGeomDet *gdet)
std::pair< LocalPoint, LocalError > LocalValues
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:41
LocalPoint toLocal(const GlobalPoint &gp) const
const SiStripRecHitMatcher * theMatcher
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
OmniClusterRef const & monoClusterRef() const
SiStripCluster const & stereoCluster() const
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:21
virtual TSiStripMatchedRecHit * clone() const
virtual TSiStripMatchedRecHit* TSiStripMatchedRecHit::clone ( void  ) const
inlineprivatevirtual

Reimplemented from GenericTransientTrackingRecHit.

Definition at line 102 of file TSiStripMatchedRecHit.h.

References TSiStripMatchedRecHit().

Referenced by clone().

102  {
103  return new TSiStripMatchedRecHit(*this);
104  }
TSiStripMatchedRecHit(const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, bool computeCoarseLocalPosition)
void TSiStripMatchedRecHit::clonePersistentHit ( )
inline

take ownership of the hit, if it wasn't owned (note: if it was owned, this code will leak it)

Definition at line 65 of file TSiStripMatchedRecHit.h.

References TrackingRecHit::clone(), and GenericTransientTrackingRecHit::trackingRecHit_.

virtual TrackingRecHit * clone() const =0
void TSiStripMatchedRecHit::ComputeCoarseLocalPosition ( )
private

Definition at line 127 of file TSiStripMatchedRecHit.cc.

References TransientTrackingRecHit::det(), GeomDet::geographicalId(), BaseTrackerRecHit::hasPositionAndError(), ClusterParameterEstimator< T >::localParameters(), LogDebug, SiStripRecHitMatcher::match(), SiStripMatchedRecHit2D::monoCluster(), SiStripMatchedRecHit2D::monoClusterRef(), GluedGeomDet::monoDet(), GeomDet::position(), SiStripMatchedRecHit2D::stereoCluster(), SiStripMatchedRecHit2D::stereoClusterRef(), GluedGeomDet::stereoDet(), GeomDet::surface(), theCPE, theMatcher, GloballyPositioned< T >::toLocal(), and GenericTransientTrackingRecHit::trackingRecHit_.

Referenced by TSiStripMatchedRecHit().

127  {
128  if (!theCPE || !theMatcher) return;
129  const SiStripMatchedRecHit2D *orig = static_cast<const SiStripMatchedRecHit2D *> (trackingRecHit_);
130  if ( (!orig) || orig->hasPositionAndError()) return;
131 
132  LogDebug("TSiStripMatchedRecHit")<<"calculating coarse position/error.";
133  const GeomDet *det = this->det();
134  const GluedGeomDet *gdet = static_cast<const GluedGeomDet *> (det);
135  LocalVector tkDir = det->surface().toLocal( det->position()-GlobalPoint(0,0,0));
136 
137  const SiStripCluster& monoclust = orig->monoCluster();
138  const SiStripCluster& stereoclust = orig->stereoCluster();
139 
141  theCPE->localParameters( monoclust, *gdet->monoDet());
143  theCPE->localParameters( stereoclust, *gdet->stereoDet());
144 
145  SiStripRecHit2D monoHit = SiStripRecHit2D( lvMono.first, lvMono.second,
146  gdet->monoDet()->geographicalId(),
147  orig->monoClusterRef());
148 
149  SiStripRecHit2D stereoHit = SiStripRecHit2D( lvStereo.first, lvStereo.second,
150  gdet->stereoDet()->geographicalId(),
151  orig->stereoClusterRef());
152  SiStripMatchedRecHit2D* better = theMatcher->match(&monoHit,&stereoHit,gdet,tkDir);
153 
154  if (!better) {
155  edm::LogWarning("TSiStripMatchedRecHit")<<"could not get a matching rechit.";
156  }else{
157  delete trackingRecHit_;
158  trackingRecHit_ = better;
159  }
160 
161 }
#define LogDebug(id)
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:20
bool hasPositionAndError() const
to be redefined by daughter class
SiStripMatchedRecHit2D * match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
SiStripCluster const & monoCluster() const
OmniClusterRef const & stereoClusterRef() const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const StripClusterParameterEstimator * theCPE
std::pair< LocalPoint, LocalError > LocalValues
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:41
LocalPoint toLocal(const GlobalPoint &gp) const
const SiStripRecHitMatcher * theMatcher
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
OmniClusterRef const & monoClusterRef() const
SiStripCluster const & stereoCluster() const
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:21
const GeomDetUnit* TSiStripMatchedRecHit::detUnit ( ) const
inlinevirtual

CAUTION: the GeomDetUnit* is zero for composite hits (matched hits in the tracker, segments in the muon). Always check this pointer before using it!

Reimplemented from TransientTrackingRecHit.

Definition at line 24 of file TSiStripMatchedRecHit.h.

24 {return 0;}
virtual void TSiStripMatchedRecHit::getKfComponents ( KfComponentsHolder holder) const
inlinevirtual

Reimplemented from TrackingRecHit.

Definition at line 16 of file TSiStripMatchedRecHit.h.

References TransientTrackingRecHit::det(), HelpertRecHit2DLocalPos::getKfComponents(), and GenericTransientTrackingRecHit::hit().

16  {
18  }
virtual const TrackingRecHit * hit() const
static void getKfComponents(KfComponentsHolder &holder, const TrackingRecHit &hit2dLocalPos, const GeomDet &det)
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
virtual AlgebraicSymMatrix TSiStripMatchedRecHit::parametersError ( ) const
inlinevirtual

Reimplemented from GenericTransientTrackingRecHit.

Definition at line 20 of file TSiStripMatchedRecHit.h.

References TransientTrackingRecHit::det(), GenericTransientTrackingRecHit::localPositionError(), and HelpertRecHit2DLocalPos::parError().

20  {
22  }
virtual LocalError localPositionError() const
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
static AlgebraicSymMatrix parError(const LocalError &le, const GeomDet &det)
TransientTrackingRecHit::ConstRecHitContainer TSiStripMatchedRecHit::transientHits ( ) const
virtual

Composite interface: returns the component hits, if any.

Reimplemented from TransientTrackingRecHit.

Definition at line 98 of file TSiStripMatchedRecHit.cc.

References TSiStripRecHit2DLocalPos::build(), TransientTrackingRecHit::det(), GenericTransientTrackingRecHit::hit(), ClusterParameterEstimator< T >::localParameters(), m, SiStripMatchedRecHit2D::monoCluster(), SiStripMatchedRecHit2D::monoClusterRef(), GluedGeomDet::monoDet(), SiStripMatchedRecHit2D::monoHit(), query::result, alignCSCRings::s, SiStripMatchedRecHit2D::stereoCluster(), SiStripMatchedRecHit2D::stereoClusterRef(), GluedGeomDet::stereoDet(), SiStripMatchedRecHit2D::stereoHit(), and theCPE.

98  {
100 
101  const GluedGeomDet *gdet = static_cast<const GluedGeomDet *> (this->det());
102  const SiStripMatchedRecHit2D *orig = static_cast<const SiStripMatchedRecHit2D *> (this->hit());
103 
104  if (theCPE!=nullptr) {
105  // this is at least the third place I read (write) this logic...
106  const SiStripCluster& monoclust = orig->monoCluster();
107  const SiStripCluster& stereoclust = orig->stereoCluster();
108 
110  theCPE->localParameters( monoclust, *gdet->monoDet());
112  theCPE->localParameters( stereoclust, *gdet->stereoDet());
113 
114  result.push_back(TSiStripRecHit2DLocalPos::build(lvMono.first, lvMono.second, gdet->monoDet(),
115  orig->monoClusterRef(), theCPE));
116  result.push_back(TSiStripRecHit2DLocalPos::build(lvStereo.first, lvStereo.second, gdet->stereoDet(),
117  orig->stereoClusterRef(), theCPE));
118  }
119  else {
120  auto m = orig->monoHit(); auto s = orig->stereoHit();
121  result.push_back(TSiStripRecHit2DLocalPos::build( gdet->monoDet(),&m,theCPE));
122  result.push_back(TSiStripRecHit2DLocalPos::build( gdet->stereoDet(),&s,theCPE));
123  }
124  return result;
125 }
static RecHitPointer build(const GeomDet *geom, const SiStripRecHit2D *rh, const StripClusterParameterEstimator *cpe, bool computeCoarseLocalPosition=false)
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:20
SiStripCluster const & monoCluster() const
OmniClusterRef const & stereoClusterRef() const
virtual const TrackingRecHit * hit() const
const StripClusterParameterEstimator * theCPE
std::pair< LocalPoint, LocalError > LocalValues
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
tuple result
Definition: query.py:137
OmniClusterRef const & monoClusterRef() const
SiStripRecHit2D stereoHit() const
SiStripRecHit2D monoHit() const
SiStripCluster const & stereoCluster() const
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:21

Member Data Documentation

const StripClusterParameterEstimator* TSiStripMatchedRecHit::theCPE
private

Definition at line 72 of file TSiStripMatchedRecHit.h.

Referenced by clone(), ComputeCoarseLocalPosition(), and transientHits().

const SiStripRecHitMatcher* TSiStripMatchedRecHit::theMatcher
private

Definition at line 71 of file TSiStripMatchedRecHit.h.

Referenced by canImproveWithTrack(), clone(), and ComputeCoarseLocalPosition().