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 | Static Public Member Functions | Private Member Functions | Private Attributes
TSiStripRecHit2DLocalPos Class Reference

#include <TSiStripRecHit2DLocalPos.h>

Inheritance diagram for TSiStripRecHit2DLocalPos:
TransientTrackingRecHit TrackingRecHit ReferenceCountedPoolAllocated BlockWipedPoolAllocated

Public Types

typedef SiStripRecHit2D::ClusterRef SiStripClusterRef
 
typedef edm::LazyGetter
< SiStripCluster >::value_ref 
SiStripRegionalClusterRef
 
- 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 }
 

Public Member Functions

virtual bool canImproveWithTrack () const
 
virtual RecHitPointer clone (const TrajectoryStateOnSurface &ts) const
 
const
StripClusterParameterEstimator
cpe () const
 
virtual const GeomDetUnitdetUnit () const
 
virtual int dimension () const
 
virtual void getKfComponents (KfComponentsHolder &holder) const
 
virtual const TrackingRecHithit () const
 
virtual LocalPoint localPosition () const
 
virtual LocalError localPositionError () const
 
virtual AlgebraicVector parameters () const
 
virtual AlgebraicSymMatrix parametersError () 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...
 
const SiStripRecHit2DspecificHit () const
 
virtual ~TSiStripRecHit2DLocalPos ()
 
- 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
 
float getAnnealingFactor () const
 
virtual GlobalPoint globalPosition () const
 
virtual GlobalError globalPositionError () const
 
void setAnnealingFactor (float annealing)
 
void setWeight (float weight)
 interface needed to set the transient hit weight and to read it back More...
 
virtual const Surfacesurface () const
 
 TransientTrackingRecHit (const GeomDet *geom=0, float weight=1., float annealing=1.)
 
 TransientTrackingRecHit (const GeomDet *geom, DetId id, Type type=valid, float weight=1., float annealing=1.)
 
 TransientTrackingRecHit (const GeomDet *geom, TrackingRecHit::id_type id, Type type=valid, float weight=1., float annealing=1.)
 
 TransientTrackingRecHit (const GeomDet *geom, TrackingRecHit const &rh, float weight=1., float annealing=1.)
 
float weight () const
 
- Public Member Functions inherited from TrackingRecHit
DetId geographicalId () const
 
Type getType () const
 
bool isValid () 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)
 
Type type () 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 SiStripRecHit2D *rh, const StripClusterParameterEstimator *cpe, float weight=1., float annealing=1., bool computeCoarseLocalPosition=false)
 
static RecHitPointer build (const LocalPoint &pos, const LocalError &err, const GeomDet *det, const SiStripClusterRef clust, const StripClusterParameterEstimator *cpe, float weight=1., float annealing=1.)
 
static RecHitPointer build (const LocalPoint &pos, const LocalError &err, const GeomDet *det, const SiStripRegionalClusterRef clust, const StripClusterParameterEstimator *cpe, float weight=1., float annealing=1.)
 
- 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 TSiStripRecHit2DLocalPosclone () const
 
virtual ConstRecHitContainer transientHits () const
 Composite interface: returns the component hits, if any. More...
 
 TSiStripRecHit2DLocalPos (const GeomDet *geom, const SiStripRecHit2D *rh, const StripClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
 
 TSiStripRecHit2DLocalPos (const LocalPoint &pos, const LocalError &err, const GeomDet *det, const SiStripClusterRef clust, const StripClusterParameterEstimator *cpe, float weight, float annealing)
 Creates the TrackingRecHit internally, avoids redundent cloning. More...
 
 TSiStripRecHit2DLocalPos (const LocalPoint &pos, const LocalError &err, const GeomDet *det, const SiStripRegionalClusterRef clust, const StripClusterParameterEstimator *cpe, float weight, float annealing)
 

Private Attributes

const
StripClusterParameterEstimator
theCPE
 
SiStripRecHit2D theHitData
 

Additional Inherited Members

- 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
 
- Protected Member Functions inherited from TrackingRecHit
void setId (id_type iid)
 
void setType (Type ttype)
 

Detailed Description

Definition at line 12 of file TSiStripRecHit2DLocalPos.h.

Member Typedef Documentation

Definition at line 15 of file TSiStripRecHit2DLocalPos.h.

Definition at line 17 of file TSiStripRecHit2DLocalPos.h.

Constructor & Destructor Documentation

virtual TSiStripRecHit2DLocalPos::~TSiStripRecHit2DLocalPos ( )
inlinevirtual

Definition at line 19 of file TSiStripRecHit2DLocalPos.h.

19 {}
TSiStripRecHit2DLocalPos::TSiStripRecHit2DLocalPos ( const GeomDet geom,
const SiStripRecHit2D rh,
const StripClusterParameterEstimator cpe,
float  weight,
float  annealing,
bool  computeCoarseLocalPosition 
)
inlineprivate

Definition at line 89 of file TSiStripRecHit2DLocalPos.h.

References SiStripRecHit2D::cluster(), SiStripRecHit2D::cluster_regional(), GeomDet::geographicalId(), relativeConstraints::geom, BaseSiTrackerRecHit2DLocalPos::hasPositionAndError(), edm::Ref< C, T, F >::isNonnull(), ClusterParameterEstimator< T >::localParameters(), LogDebug, theCPE, and theHitData.

Referenced by build(), and clone().

92  :
93  TransientTrackingRecHit(geom, weight, annealing), theCPE(cpe)
94  {
95  if (rh->hasPositionAndError() || !computeCoarseLocalPosition)
97  else{
98  if (computeCoarseLocalPosition && !cpe){
99  edm::LogError("TSiStripRecHit2DLocalPos")<<" trying to compute coarse local position but CPE is not provided. Not computing local position from disk for the transient tracking rechit.";
101  }
102  else{
103  const GeomDetUnit* gdu = dynamic_cast<const GeomDetUnit*>(geom);
104  LogDebug("TSiStripRecHit2DLocalPos")<<"calculating coarse position/error.";
105  if (gdu){
106  if (rh->cluster().isNonnull()){
108  theHitData = SiStripRecHit2D(lval.first, lval.second, geom->geographicalId(),rh->cluster());
109  }else{
111  theHitData = SiStripRecHit2D(lval.first, lval.second, geom->geographicalId(),rh->cluster_regional());
112  }
113  }else{
114  edm::LogError("TSiStripRecHit2DLocalPos")<<" geomdet does not cast into geomdet unit. cannot create strip local parameters.";
116  }
117  }
118  }
119  }
#define LogDebug(id)
const StripClusterParameterEstimator * theCPE
ClusterRegionalRef const & cluster_regional() const
std::pair< LocalPoint, LocalError > LocalValues
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:248
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
ClusterRef const & cluster() const
TransientTrackingRecHit(const GeomDet *geom=0, float weight=1., float annealing=1.)
TSiStripRecHit2DLocalPos::TSiStripRecHit2DLocalPos ( const LocalPoint pos,
const LocalError err,
const GeomDet det,
const SiStripClusterRef  clust,
const StripClusterParameterEstimator cpe,
float  weight,
float  annealing 
)
inlineprivate

Creates the TrackingRecHit internally, avoids redundent cloning.

Definition at line 122 of file TSiStripRecHit2DLocalPos.h.

126  :
127  TransientTrackingRecHit(det, weight, annealing), theHitData(pos, err, det->geographicalId(), clust),
128  theCPE(cpe){}
const StripClusterParameterEstimator * theCPE
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
TransientTrackingRecHit(const GeomDet *geom=0, float weight=1., float annealing=1.)
TSiStripRecHit2DLocalPos::TSiStripRecHit2DLocalPos ( const LocalPoint pos,
const LocalError err,
const GeomDet det,
const SiStripRegionalClusterRef  clust,
const StripClusterParameterEstimator cpe,
float  weight,
float  annealing 
)
inlineprivate

Definition at line 135 of file TSiStripRecHit2DLocalPos.h.

139  :
140  TransientTrackingRecHit(det, weight, annealing), theHitData(pos, err, det->geographicalId(), clust),
141  theCPE(cpe){}
const StripClusterParameterEstimator * theCPE
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
TransientTrackingRecHit(const GeomDet *geom=0, float weight=1., float annealing=1.)

Member Function Documentation

static RecHitPointer TSiStripRecHit2DLocalPos::build ( const GeomDet geom,
const SiStripRecHit2D rh,
const StripClusterParameterEstimator cpe,
float  weight = 1.,
float  annealing = 1.,
bool  computeCoarseLocalPosition = false 
)
inlinestatic

Definition at line 59 of file TSiStripRecHit2DLocalPos.h.

References TSiStripRecHit2DLocalPos(), and TransientTrackingRecHit::weight().

Referenced by TkTransientTrackingRecHitBuilder::build(), TkStripMeasurementDet::buildRecHit(), TkStripMeasurementDet::buildRecHits(), ProjectedRecHit2D::clone(), clone(), TkTransientTrackingRecHitBuilder::oldbuild(), ProjectedRecHit2D::ProjectedRecHit2D(), TSiStripMatchedRecHit::transientHits(), and ProjectedRecHit2D::transientHits().

62  {
63  return RecHitPointer( new TSiStripRecHit2DLocalPos( geom, rh, cpe, weight, annealing,computeCoarseLocalPosition));
64  }
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
TSiStripRecHit2DLocalPos(const GeomDet *geom, const SiStripRecHit2D *rh, const StripClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
static RecHitPointer TSiStripRecHit2DLocalPos::build ( const LocalPoint pos,
const LocalError err,
const GeomDet det,
const SiStripClusterRef  clust,
const StripClusterParameterEstimator cpe,
float  weight = 1.,
float  annealing = 1. 
)
inlinestatic

Definition at line 66 of file TSiStripRecHit2DLocalPos.h.

References TSiStripRecHit2DLocalPos(), and TransientTrackingRecHit::weight().

70  {
71  return RecHitPointer( new TSiStripRecHit2DLocalPos( pos, err, det, clust, cpe, weight, annealing));
72  }
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
TSiStripRecHit2DLocalPos(const GeomDet *geom, const SiStripRecHit2D *rh, const StripClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
static RecHitPointer TSiStripRecHit2DLocalPos::build ( const LocalPoint pos,
const LocalError err,
const GeomDet det,
const SiStripRegionalClusterRef  clust,
const StripClusterParameterEstimator cpe,
float  weight = 1.,
float  annealing = 1. 
)
inlinestatic

Definition at line 74 of file TSiStripRecHit2DLocalPos.h.

References TSiStripRecHit2DLocalPos(), and TransientTrackingRecHit::weight().

78  {
79  return RecHitPointer( new TSiStripRecHit2DLocalPos( pos, err, det, clust, cpe, weight, annealing));
80  }
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
TSiStripRecHit2DLocalPos(const GeomDet *geom, const SiStripRecHit2D *rh, const StripClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
virtual bool TSiStripRecHit2DLocalPos::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 TransientTrackingRecHit.

Definition at line 49 of file TSiStripRecHit2DLocalPos.h.

49 {return true;}
TransientTrackingRecHit::RecHitPointer TSiStripRecHit2DLocalPos::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.

FIXME: this only uses the first cluster and ignores the others

FIXME: should report the problem somehow

Reimplemented from TransientTrackingRecHit.

Definition at line 9 of file TSiStripRecHit2DLocalPos.cc.

References build(), clone(), SiStripRecHit2D::cluster(), SiStripRecHit2D::cluster_regional(), TransientTrackingRecHit::det(), detUnit(), TransientTrackingRecHit::getAnnealingFactor(), ClusterParameterEstimator< T >::localParameters(), specificHit(), theCPE, and TransientTrackingRecHit::weight().

10 {
11  if (theCPE != 0) {
12 
14 
15  if(!specificHit()->cluster().isNull()){
16  const SiStripCluster& clust = *specificHit()->cluster();
18  theCPE->localParameters( clust, *detUnit(), ts);
19  return TSiStripRecHit2DLocalPos::build( lv.first, lv.second, det(),
20  specificHit()->cluster(), theCPE, weight(), getAnnealingFactor());
21  }else{
22  const SiStripCluster& clust = *specificHit()->cluster_regional();
24  theCPE->localParameters( clust, *detUnit(), ts);
25  return TSiStripRecHit2DLocalPos::build( lv.first, lv.second, det(),
26  specificHit()->cluster_regional(), theCPE, weight(), getAnnealingFactor());
27  }
28 
29  }
31  else return clone();
32 }
const SiStripRecHit2D * specificHit() const
const StripClusterParameterEstimator * theCPE
virtual const GeomDetUnit * detUnit() const
virtual TSiStripRecHit2DLocalPos * clone() const
ClusterRegionalRef const & cluster_regional() const
static RecHitPointer build(const GeomDet *geom, const SiStripRecHit2D *rh, const StripClusterParameterEstimator *cpe, float weight=1., float annealing=1., bool computeCoarseLocalPosition=false)
std::pair< LocalPoint, LocalError > LocalValues
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
ClusterRef const & cluster() const
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
virtual TSiStripRecHit2DLocalPos* TSiStripRecHit2DLocalPos::clone ( void  ) const
inlineprivatevirtual

Implements TransientTrackingRecHit.

Definition at line 145 of file TSiStripRecHit2DLocalPos.h.

References TSiStripRecHit2DLocalPos().

Referenced by clone().

145  {
146  return new TSiStripRecHit2DLocalPos(*this);
147  }
TSiStripRecHit2DLocalPos(const GeomDet *geom, const SiStripRecHit2D *rh, const StripClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
const StripClusterParameterEstimator* TSiStripRecHit2DLocalPos::cpe ( ) const
inline

Definition at line 57 of file TSiStripRecHit2DLocalPos.h.

References theCPE.

Referenced by ProjectedRecHit2D::ProjectedRecHit2D(), and transientHits().

57 {return theCPE;}
const StripClusterParameterEstimator * theCPE
const GeomDetUnit * TSiStripRecHit2DLocalPos::detUnit ( ) const
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 34 of file TSiStripRecHit2DLocalPos.cc.

References TransientTrackingRecHit::det().

Referenced by clone().

35 {
36  return static_cast<const GeomDetUnit*>(det());
37 }
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
virtual int TSiStripRecHit2DLocalPos::dimension ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 33 of file TSiStripRecHit2DLocalPos.h.

References RecHit2DLocalPos::dimension(), and theHitData.

33 {return theHitData.dimension();}
virtual int dimension() const
virtual void TSiStripRecHit2DLocalPos::getKfComponents ( KfComponentsHolder holder) const
inlinevirtual

Reimplemented from TrackingRecHit.

Definition at line 22 of file TSiStripRecHit2DLocalPos.h.

References TransientTrackingRecHit::det(), HelpertRecHit2DLocalPos::getKfComponents(), and theHitData.

22  {
24  }
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 const TrackingRecHit* TSiStripRecHit2DLocalPos::hit ( void  ) const
inlinevirtual

Implements TransientTrackingRecHit.

Definition at line 38 of file TSiStripRecHit2DLocalPos.h.

References theHitData.

Referenced by recHits().

38 {return &theHitData;};
virtual LocalPoint TSiStripRecHit2DLocalPos::localPosition ( ) const
inlinevirtual
virtual LocalError TSiStripRecHit2DLocalPos::localPositionError ( ) const
inlinevirtual
virtual AlgebraicVector TSiStripRecHit2DLocalPos::parameters ( void  ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 26 of file TSiStripRecHit2DLocalPos.h.

References RecHit2DLocalPos::parameters(), and theHitData.

26 {return theHitData.parameters();}
virtual AlgebraicVector parameters() const
virtual AlgebraicSymMatrix TSiStripRecHit2DLocalPos::parametersError ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 27 of file TSiStripRecHit2DLocalPos.h.

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

27  {
29  // return theHitData->parametersError();
30  }
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)
virtual AlgebraicMatrix TSiStripRecHit2DLocalPos::projectionMatrix ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 32 of file TSiStripRecHit2DLocalPos.h.

References RecHit2DLocalPos::projectionMatrix(), and theHitData.

32 {return theHitData.projectionMatrix();}
virtual AlgebraicMatrix projectionMatrix() const
virtual std::vector<const TrackingRecHit*> TSiStripRecHit2DLocalPos::recHits ( ) const
inlinevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 40 of file TSiStripRecHit2DLocalPos.h.

References hit(), and TrackingRecHit::recHits().

40  {
41  return hit()->recHits();
42  }
virtual std::vector< const TrackingRecHit * > recHits() const =0
Access to component RecHits (if any)
virtual const TrackingRecHit * hit() const
virtual std::vector<TrackingRecHit*> TSiStripRecHit2DLocalPos::recHits ( )
inlinevirtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 43 of file TSiStripRecHit2DLocalPos.h.

References RecHit2DLocalPos::recHits(), and theHitData.

43  {
44  return theHitData.recHits();
45  }
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
const SiStripRecHit2D* TSiStripRecHit2DLocalPos::specificHit ( ) const
inline

Definition at line 56 of file TSiStripRecHit2DLocalPos.h.

References theHitData.

Referenced by clone(), TkAlCaOverlapTagger::produce(), and transientHits().

56 {return &theHitData;};
TransientTrackingRecHit::ConstRecHitContainer TSiStripRecHit2DLocalPos::transientHits ( ) const
privatevirtual

Composite interface: returns the component hits, if any.

Reimplemented from TransientTrackingRecHit.

Definition at line 40 of file TSiStripRecHit2DLocalPos.cc.

References TSiStripRecHit1D::build(), cpe(), TransientTrackingRecHit::det(), query::result, and specificHit().

40  {
43  result.push_back(TSiStripRecHit1D::build( det(),&hit1d,
44  cpe()));
45 
46  return result;
47 }
const SiStripRecHit2D * specificHit() const
static RecHitPointer build(const GeomDet *geom, const SiStripRecHit1D *rh, const StripClusterParameterEstimator *cpe, float weight=1., float annealing=1., bool computeCoarseLocalPosition=false)
const StripClusterParameterEstimator * cpe() const
tuple result
Definition: query.py:137
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer

Member Data Documentation

const StripClusterParameterEstimator* TSiStripRecHit2DLocalPos::theCPE
private

Definition at line 87 of file TSiStripRecHit2DLocalPos.h.

Referenced by clone(), cpe(), and TSiStripRecHit2DLocalPos().

SiStripRecHit2D TSiStripRecHit2DLocalPos::theHitData
private