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
TSiStripRecHit1D Class Reference

#include <TSiStripRecHit1D.h>

Inheritance diagram for TSiStripRecHit1D:
TransientTrackingRecHit TrackingRecHit ReferenceCountedPoolAllocated BlockWipedPoolAllocated

Public Types

typedef SiStripRecHit1D::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 SiStripRecHit1DspecificHit () const
 
virtual ~TSiStripRecHit1D ()
 
- 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
 
virtual ConstRecHitContainer transientHits () const
 Composite interface: returns the component hits, if any. More...
 
 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 SiStripRecHit1D *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 TSiStripRecHit1Dclone () const
 
 TSiStripRecHit1D (const GeomDet *geom, const SiStripRecHit1D *rh, const StripClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
 
 TSiStripRecHit1D (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...
 
 TSiStripRecHit1D (const LocalPoint &pos, const LocalError &err, const GeomDet *det, const SiStripRegionalClusterRef clust, const StripClusterParameterEstimator *cpe, float weight, float annealing)
 

Private Attributes

const
StripClusterParameterEstimator
theCPE
 
SiStripRecHit1D 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 13 of file TSiStripRecHit1D.h.

Member Typedef Documentation

Definition at line 16 of file TSiStripRecHit1D.h.

Definition at line 18 of file TSiStripRecHit1D.h.

Constructor & Destructor Documentation

virtual TSiStripRecHit1D::~TSiStripRecHit1D ( )
inlinevirtual

Definition at line 20 of file TSiStripRecHit1D.h.

20 {}
TSiStripRecHit1D::TSiStripRecHit1D ( const GeomDet geom,
const SiStripRecHit1D rh,
const StripClusterParameterEstimator cpe,
float  weight,
float  annealing,
bool  computeCoarseLocalPosition 
)
inlineprivate

Definition at line 94 of file TSiStripRecHit1D.h.

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

Referenced by build(), and clone().

97  :
98  TransientTrackingRecHit(geom, weight, annealing), theCPE(cpe)
99  {
100  if (rh->hasPositionAndError() || !computeCoarseLocalPosition)
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  LocalError le(lval.second.xx(),0.,DBL_MAX); //Correct??
109  theHitData = SiStripRecHit1D(lval.first, le, geom->geographicalId(),rh->cluster());
110  }else{
112  LocalError le(lval.second.xx(),0.,DBL_MAX); //Correct??
113  theHitData = SiStripRecHit1D(lval.first, le, geom->geographicalId(),rh->cluster_regional());
114  }
115  }else{
116  edm::LogError("TSiStripRecHit2DLocalPos")<<" geomdet does not cast into geomdet unit. cannot create strip local parameters.";
117  theHitData = SiStripRecHit1D(*rh);
118  }
119  }
120  }
#define LogDebug(id)
bool hasPositionAndError() 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:249
const StripClusterParameterEstimator * theCPE
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
SiStripRecHit1D theHitData
ClusterRegionalRef const & cluster_regional() const
TransientTrackingRecHit(const GeomDet *geom=0, float weight=1., float annealing=1.)
ClusterRef const & cluster() const
TSiStripRecHit1D::TSiStripRecHit1D ( 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 123 of file TSiStripRecHit1D.h.

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

Definition at line 136 of file TSiStripRecHit1D.h.

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

Member Function Documentation

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

Definition at line 64 of file TSiStripRecHit1D.h.

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

Referenced by TkTransientTrackingRecHitBuilder::build(), clone(), TkTransientTrackingRecHitBuilder::oldbuild(), and TSiStripRecHit2DLocalPos::transientHits().

67  {
68  return RecHitPointer( new TSiStripRecHit1D( geom, rh, cpe, weight, annealing,computeCoarseLocalPosition));
69  }
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
TSiStripRecHit1D(const GeomDet *geom, const SiStripRecHit1D *rh, const StripClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
static RecHitPointer TSiStripRecHit1D::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 71 of file TSiStripRecHit1D.h.

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

75  {
76  return RecHitPointer( new TSiStripRecHit1D( pos, err, det, clust, cpe, weight, annealing));
77  }
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
TSiStripRecHit1D(const GeomDet *geom, const SiStripRecHit1D *rh, const StripClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
static RecHitPointer TSiStripRecHit1D::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 79 of file TSiStripRecHit1D.h.

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

83  {
84  return RecHitPointer( new TSiStripRecHit1D( pos, err, det, clust, cpe, weight, annealing));
85  }
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
TSiStripRecHit1D(const GeomDet *geom, const SiStripRecHit1D *rh, const StripClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
virtual bool TSiStripRecHit1D::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 54 of file TSiStripRecHit1D.h.

54 {return true;}
TransientTrackingRecHit::RecHitPointer TSiStripRecHit1D::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

Reimplemented from TransientTrackingRecHit.

Definition at line 8 of file TSiStripRecHit1D.cc.

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

9 {
10  if (theCPE != 0) {
11 
13 
14  if(!specificHit()->cluster().isNull()){
15  const SiStripCluster& clust = *specificHit()->cluster();
17  theCPE->localParameters( clust, *detUnit(), ts);
18  LocalError le(lv.second.xx(),0.,DBL_MAX); //Correct??
19 
20  return TSiStripRecHit1D::build( lv.first, le, det(),
21  specificHit()->cluster(), theCPE, weight(), getAnnealingFactor());
22  }else{
23  const SiStripCluster& clust = *specificHit()->cluster_regional();
25  theCPE->localParameters( clust, *detUnit(), ts);
26  LocalError le(lv.second.xx(),0.,DBL_MAX); //Correct??
27  return TSiStripRecHit1D::build( lv.first, le, det(),
28  specificHit()->cluster_regional(), theCPE, weight(), getAnnealingFactor());
29  }
30 
31  }
32  else {
33  //FIXME. It should report the problem with a LogWarning;
34  return clone();
35  }
36 }
const SiStripRecHit1D * specificHit() const
std::pair< LocalPoint, LocalError > LocalValues
static RecHitPointer build(const GeomDet *geom, const SiStripRecHit1D *rh, const StripClusterParameterEstimator *cpe, float weight=1., float annealing=1., bool computeCoarseLocalPosition=false)
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
const StripClusterParameterEstimator * theCPE
ClusterRegionalRef const & cluster_regional() const
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
ClusterRef const & cluster() const
virtual const GeomDetUnit * detUnit() const
virtual TSiStripRecHit1D * clone() const
virtual TSiStripRecHit1D* TSiStripRecHit1D::clone ( void  ) const
inlineprivatevirtual

Implements TransientTrackingRecHit.

Definition at line 146 of file TSiStripRecHit1D.h.

References TSiStripRecHit1D().

Referenced by clone().

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

Definition at line 62 of file TSiStripRecHit1D.h.

References theCPE.

62 {return theCPE;}
const StripClusterParameterEstimator * theCPE
const GeomDetUnit * TSiStripRecHit1D::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 38 of file TSiStripRecHit1D.cc.

References TransientTrackingRecHit::det().

Referenced by clone().

39 {
40  return static_cast<const GeomDetUnit*>(det());
41 }
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
virtual int TSiStripRecHit1D::dimension ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 38 of file TSiStripRecHit1D.h.

References RecHit1D::dimension(), and theHitData.

38 {return theHitData.dimension();}
virtual int dimension() const
Return the RecHit dimension.
Definition: RecHit1D.h:48
SiStripRecHit1D theHitData
virtual void TSiStripRecHit1D::getKfComponents ( KfComponentsHolder holder) const
inlinevirtual

Reimplemented from TrackingRecHit.

Definition at line 23 of file TSiStripRecHit1D.h.

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

23  {
25  }
static void getKfComponents(KfComponentsHolder &holder, const TrackingRecHit &hit2dLocalPos, const GeomDet &det)
SiStripRecHit1D theHitData
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
virtual const TrackingRecHit* TSiStripRecHit1D::hit ( void  ) const
inlinevirtual

Implements TransientTrackingRecHit.

Definition at line 43 of file TSiStripRecHit1D.h.

References theHitData.

Referenced by recHits().

43 {return &theHitData;};
SiStripRecHit1D theHitData
virtual LocalPoint TSiStripRecHit1D::localPosition ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 40 of file TSiStripRecHit1D.h.

References SiStripRecHit1D::localPosition(), and theHitData.

Referenced by TrackerDpgAnalysis::insertMeasurement().

40 {return theHitData.localPosition();}
virtual LocalPoint localPosition() const
Local position.
SiStripRecHit1D theHitData
virtual LocalError TSiStripRecHit1D::localPositionError ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 41 of file TSiStripRecHit1D.h.

References SiStripRecHit1D::localPositionError(), and theHitData.

virtual LocalError localPositionError() const
Error on the local position.
SiStripRecHit1D theHitData
virtual AlgebraicVector TSiStripRecHit1D::parameters ( void  ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 28 of file TSiStripRecHit1D.h.

References RecHit1D::parameters(), and theHitData.

28 {return theHitData.parameters();}
SiStripRecHit1D theHitData
virtual AlgebraicVector parameters() const
Return just the x.
Definition: RecHit1D.cc:17
virtual AlgebraicSymMatrix TSiStripRecHit1D::parametersError ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 31 of file TSiStripRecHit1D.h.

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

31  {
33  // return theHitData->parametersError();
34  }
virtual LocalError localPositionError() const
Error on the local position.
SiStripRecHit1D theHitData
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 TSiStripRecHit1D::projectionMatrix ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 37 of file TSiStripRecHit1D.h.

References RecHit1D::projectionMatrix(), and theHitData.

37 {return theHitData.projectionMatrix();}
SiStripRecHit1D theHitData
virtual AlgebraicMatrix projectionMatrix() const
Return the projection matrix.
Definition: RecHit1D.h:41
virtual std::vector<const TrackingRecHit*> TSiStripRecHit1D::recHits ( ) const
inlinevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 45 of file TSiStripRecHit1D.h.

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

45  {
46  return hit()->recHits();
47  }
virtual std::vector< const TrackingRecHit * > recHits() const =0
Access to component RecHits (if any)
virtual const TrackingRecHit * hit() const
virtual std::vector<TrackingRecHit*> TSiStripRecHit1D::recHits ( )
inlinevirtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 48 of file TSiStripRecHit1D.h.

References SiStripRecHit1D::recHits(), and theHitData.

48  {
49  return theHitData.recHits();
50  }
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
SiStripRecHit1D theHitData
const SiStripRecHit1D* TSiStripRecHit1D::specificHit ( ) const
inline

Definition at line 61 of file TSiStripRecHit1D.h.

References theHitData.

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

61 {return &theHitData;};
SiStripRecHit1D theHitData

Member Data Documentation

const StripClusterParameterEstimator* TSiStripRecHit1D::theCPE
private

Definition at line 92 of file TSiStripRecHit1D.h.

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

SiStripRecHit1D TSiStripRecHit1D::theHitData
private