#include <RecoTracker/TransientTrackingRecHit/interface/TSiStripMatchedRecHit.h>
Public Member Functions | |
virtual bool | canImproveWithTrack () const |
Returns true if the clone( const TrajectoryStateOnSurface&) method returns an improved hit, false if it returns an identical copy. | |
virtual RecHitPointer | clone (const TrajectoryStateOnSurface &ts) const |
Returns a copy of the hit with parameters and errors computed with respect to the TrajectoryStateOnSurface given as argument. | |
const GeomDetUnit * | detUnit () const |
CAUTION: the GeomDetUnit* is zero for composite hits (matched hits in the tracker, segments in the muon). | |
virtual void | getKfComponents (KfComponentsHolder &holder) const |
virtual AlgebraicSymMatrix | parametersError () const |
virtual ConstRecHitContainer | transientHits () const |
Composite interface: returns the component hits, if any. | |
Static Public Member Functions | |
static RecHitPointer | build (const GeomDet *geom, std::auto_ptr< TrackingRecHit > rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe=0, float weight=1., float annealing=1.) |
static RecHitPointer | build (const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe=0, float weight=1., float annealing=1.) |
Private Member Functions | |
virtual TSiStripMatchedRecHit * | clone () const |
TSiStripMatchedRecHit (const GeomDet *geom, std::auto_ptr< TrackingRecHit > rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, float weight, float annealing) | |
TSiStripMatchedRecHit (const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, float weight, float annealing) | |
Private Attributes | |
const StripClusterParameterEstimator * | theCPE |
const SiStripRecHitMatcher * | theMatcher |
Definition at line 10 of file TSiStripMatchedRecHit.h.
TSiStripMatchedRecHit::TSiStripMatchedRecHit | ( | const GeomDet * | geom, | |
const TrackingRecHit * | rh, | |||
const SiStripRecHitMatcher * | matcher, | |||
const StripClusterParameterEstimator * | cpe, | |||
float | weight, | |||
float | annealing | |||
) | [inline, private] |
Definition at line 43 of file TSiStripMatchedRecHit.h.
Referenced by build(), and clone().
00046 : 00047 GenericTransientTrackingRecHit(geom, *rh, weight, annealing), theMatcher(matcher),theCPE(cpe) {}
TSiStripMatchedRecHit::TSiStripMatchedRecHit | ( | const GeomDet * | geom, | |
std::auto_ptr< TrackingRecHit > | rh, | |||
const SiStripRecHitMatcher * | matcher, | |||
const StripClusterParameterEstimator * | cpe, | |||
float | weight, | |||
float | annealing | |||
) | [inline, private] |
Definition at line 49 of file TSiStripMatchedRecHit.h.
00052 : 00053 GenericTransientTrackingRecHit(geom, rh.release(), weight, annealing), theMatcher(matcher),theCPE(cpe) {}
static RecHitPointer TSiStripMatchedRecHit::build | ( | const GeomDet * | geom, | |
std::auto_ptr< TrackingRecHit > | rh, | |||
const SiStripRecHitMatcher * | matcher, | |||
const StripClusterParameterEstimator * | cpe = 0 , |
|||
float | weight = 1. , |
|||
float | annealing = 1. | |||
) | [inline, static] |
Definition at line 30 of file TSiStripMatchedRecHit.h.
References TSiStripMatchedRecHit(), and TransientTrackingRecHit::weight().
00033 { 00034 return RecHitPointer( new TSiStripMatchedRecHit( geom, rh, matcher,cpe,weight, annealing)); 00035 }
static RecHitPointer TSiStripMatchedRecHit::build | ( | const GeomDet * | geom, | |
const TrackingRecHit * | rh, | |||
const SiStripRecHitMatcher * | matcher, | |||
const StripClusterParameterEstimator * | cpe = 0 , |
|||
float | weight = 1. , |
|||
float | annealing = 1. | |||
) | [inline, static] |
Definition at line 23 of file TSiStripMatchedRecHit.h.
References TSiStripMatchedRecHit(), and TransientTrackingRecHit::weight().
Referenced by TkTransientTrackingRecHitBuilder::build(), ElectronSiStripSeedGenerator::checkHitsAndTSOS(), clone(), and TkGluedMeasurementDet::recHits().
00026 { 00027 return RecHitPointer( new TSiStripMatchedRecHit( geom, rh, matcher,cpe, weight, annealing)); 00028 }
virtual bool TSiStripMatchedRecHit::canImproveWithTrack | ( | ) | const [inline, virtual] |
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 38 of file TSiStripMatchedRecHit.h.
References theMatcher.
00038 {return (theMatcher != 0);}
virtual TSiStripMatchedRecHit* TSiStripMatchedRecHit::clone | ( | void | ) | const [inline, private, virtual] |
Reimplemented from GenericTransientTrackingRecHit.
Definition at line 55 of file TSiStripMatchedRecHit.h.
References TSiStripMatchedRecHit().
Referenced by clone().
00055 { 00056 return new TSiStripMatchedRecHit(*this); 00057 }
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 build(), clone(), SiStripRecHit2D::cluster(), SiStripRecHit2D::cluster_regional(), TransientTrackingRecHit::det(), GeomDet::geographicalId(), TransientTrackingRecHit::getAnnealingFactor(), gluedToStereo(), GenericTransientTrackingRecHit::hit(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localDirection(), ClusterParameterEstimator< T >::localParameters(), TrajectoryStateOnSurface::localParameters(), SiStripRecHitMatcher::match(), GluedGeomDet::monoDet(), SiStripMatchedRecHit2D::monoHit(), GeomDet::position(), HLT_VtxMuL3::result, GluedGeomDet::stereoDet(), SiStripMatchedRecHit2D::stereoHit(), GeomDet::surface(), theCPE, theMatcher, GloballyPositioned< T >::toLocal(), and TransientTrackingRecHit::weight().
00037 { 00038 if (theMatcher != 0) { 00039 const SiStripMatchedRecHit2D *orig = static_cast<const SiStripMatchedRecHit2D *> (this->hit()); 00040 const GeomDet *det = this->det(); 00041 const GluedGeomDet *gdet = static_cast<const GluedGeomDet *> (det); 00042 //if ((orig == 0) || (gdet == 0)) return this->clone(); // or just die ? 00043 LocalVector tkDir = (ts.isValid() ? ts.localDirection() : 00044 det->surface().toLocal( det->position()-GlobalPoint(0,0,0))); 00045 00046 if(theCPE != 0){ 00047 //approximation: the ts parameter on the glued surface are used on the mono 00048 // and stereo surface to re-evaluate cluster parameter. A further propagation 00049 //is slow// and useless (?) in this case. 00050 00051 const SiStripMatchedRecHit2D* better; 00052 00053 if(!orig->monoHit()->cluster().isNull()){ 00054 const SiStripCluster& monoclust = *orig->monoHit()->cluster(); 00055 const SiStripCluster& stereoclust = *orig->stereoHit()->cluster(); 00056 00057 StripClusterParameterEstimator::LocalValues lvMono = 00058 theCPE->localParameters( monoclust, *gdet->monoDet(), ts.localParameters()); 00059 StripClusterParameterEstimator::LocalValues lvStereo = 00060 theCPE->localParameters( stereoclust, *gdet->stereoDet(), gluedToStereo(ts, gdet)); 00061 00062 SiStripRecHit2D monoHit = SiStripRecHit2D( lvMono.first, lvMono.second, 00063 gdet->monoDet()->geographicalId(), 00064 orig->monoHit()->cluster()); 00065 00066 SiStripRecHit2D stereoHit = SiStripRecHit2D( lvStereo.first, lvStereo.second, 00067 gdet->stereoDet()->geographicalId(), 00068 orig->stereoHit()->cluster()); 00069 better = theMatcher->match(&monoHit,&stereoHit,gdet,tkDir); 00070 }else{ 00071 const SiStripCluster& monoclust = *orig->monoHit()->cluster_regional(); 00072 const SiStripCluster& stereoclust = *orig->stereoHit()->cluster_regional(); 00073 StripClusterParameterEstimator::LocalValues lvMono = 00074 theCPE->localParameters( monoclust, *gdet->monoDet(), ts.localParameters()); 00075 StripClusterParameterEstimator::LocalValues lvStereo = 00076 theCPE->localParameters( stereoclust, *gdet->stereoDet(), ts.localParameters()); 00077 00078 SiStripRecHit2D monoHit = SiStripRecHit2D( lvMono.first, lvMono.second, 00079 gdet->monoDet()->geographicalId(), 00080 orig->monoHit()->cluster_regional()); 00081 00082 SiStripRecHit2D stereoHit = SiStripRecHit2D( lvStereo.first, lvStereo.second, 00083 gdet->stereoDet()->geographicalId(), 00084 orig->stereoHit()->cluster_regional()); 00085 better = theMatcher->match(&monoHit,&stereoHit,gdet,tkDir); 00086 } 00087 00088 if (better == 0) { 00089 //dm::LogWarning("TSiStripMatchedRecHit") << "Refitting of a matched rechit returns NULL"; 00090 return this->clone(); 00091 } 00092 00093 RecHitPointer result = TSiStripMatchedRecHit::build( gdet, better, theMatcher,theCPE, weight(), getAnnealingFactor() ); 00094 delete better; //the ownership of the object is passed to the caller of the matcher 00095 return result; 00096 00097 }else{ 00098 const SiStripMatchedRecHit2D *better = theMatcher->match(orig,gdet,tkDir); 00099 if (better == 0) { 00100 //edm::LogWarning("TSiStripMatchedRecHit") << "Refitting of a matched rechit returns NULL"; 00101 return this->clone(); 00102 } 00103 RecHitPointer result = TSiStripMatchedRecHit::build( gdet, better, theMatcher,theCPE, weight(), getAnnealingFactor() ); 00104 delete better; //the ownership of the object is passed to the caller of the matcher 00105 return result; 00106 } 00107 } 00108 return this->clone(); 00109 00110 }
const GeomDetUnit* TSiStripMatchedRecHit::detUnit | ( | ) | const [inline, virtual] |
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 21 of file TSiStripMatchedRecHit.h.
virtual void TSiStripMatchedRecHit::getKfComponents | ( | KfComponentsHolder & | holder | ) | const [inline, virtual] |
Reimplemented from TrackingRecHit.
Definition at line 13 of file TSiStripMatchedRecHit.h.
References TransientTrackingRecHit::det(), and GenericTransientTrackingRecHit::hit().
00013 { 00014 HelpertRecHit2DLocalPos().getKfComponents(holder, *hit(), *det()); 00015 }
virtual AlgebraicSymMatrix TSiStripMatchedRecHit::parametersError | ( | ) | const [inline, virtual] |
Reimplemented from GenericTransientTrackingRecHit.
Definition at line 17 of file TSiStripMatchedRecHit.h.
References TransientTrackingRecHit::det(), and GenericTransientTrackingRecHit::localPositionError().
00017 { 00018 return HelpertRecHit2DLocalPos().parError( localPositionError(), *det()); 00019 }
TransientTrackingRecHit::ConstRecHitContainer TSiStripMatchedRecHit::transientHits | ( | ) | const [virtual] |
Composite interface: returns the component hits, if any.
Reimplemented from TransientTrackingRecHit.
Definition at line 115 of file TSiStripMatchedRecHit.cc.
References TSiStripRecHit2DLocalPos::build(), TransientTrackingRecHit::det(), GenericTransientTrackingRecHit::hit(), GluedGeomDet::monoDet(), SiStripMatchedRecHit2D::monoHit(), HLT_VtxMuL3::result, GluedGeomDet::stereoDet(), SiStripMatchedRecHit2D::stereoHit(), and theCPE.
00115 { 00116 ConstRecHitContainer result; 00117 00118 const GluedGeomDet *gdet = static_cast<const GluedGeomDet *> (this->det()); 00119 const SiStripMatchedRecHit2D *orig = static_cast<const SiStripMatchedRecHit2D *> (this->hit()); 00120 00121 result.push_back(TSiStripRecHit2DLocalPos::build( gdet->monoDet(),orig->monoHit(),theCPE)); 00122 result.push_back(TSiStripRecHit2DLocalPos::build( gdet->stereoDet(),orig->stereoHit(),theCPE)); 00123 return result; 00124 }
const StripClusterParameterEstimator* TSiStripMatchedRecHit::theCPE [private] |
const SiStripRecHitMatcher* TSiStripMatchedRecHit::theMatcher [private] |
Definition at line 41 of file TSiStripMatchedRecHit.h.
Referenced by canImproveWithTrack(), and clone().