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

#include <TSiPixelRecHit.h>

Inheritance diagram for TSiPixelRecHit:
TransientTrackingRecHit TrackingRecHit ReferenceCountedPoolAllocated BlockWipedPoolAllocated

Public Types

typedef SiPixelRecHit::ClusterRef clusterRef
 
- 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
 
virtual float clusterProbability () const
 Probability of the compatibility of the track with the pixel cluster shape. More...
 
const
PixelClusterParameterEstimator
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 SiPixelRecHitspecificHit () const
 
virtual ~TSiPixelRecHit ()
 
- Public Member Functions inherited from TransientTrackingRecHit
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 SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, float weight=1., float annealing=1., bool computeCoarseLocalPosition=false)
 
static RecHitPointer build (const LocalPoint &pos, const LocalError &err, const GeomDet *det, clusterRef cluster, const PixelClusterParameterEstimator *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 TSiPixelRecHitclone () const
 
 TSiPixelRecHit (const GeomDet *geom, const SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
 
 TSiPixelRecHit (const LocalPoint &pos, const LocalError &err, const GeomDet *det, clusterRef clust, const PixelClusterParameterEstimator *cpe, float weight, float annealing)
 

Private Attributes

unsigned int theClusterProbComputationFlag
 
const
PixelClusterParameterEstimator
theCPE
 
SiPixelRecHit 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 14 of file TSiPixelRecHit.h.

Member Typedef Documentation

Definition at line 17 of file TSiPixelRecHit.h.

Constructor & Destructor Documentation

virtual TSiPixelRecHit::~TSiPixelRecHit ( )
inlinevirtual

Definition at line 20 of file TSiPixelRecHit.h.

20 {}
TSiPixelRecHit::TSiPixelRecHit ( const GeomDet geom,
const SiPixelRecHit rh,
const PixelClusterParameterEstimator cpe,
float  weight,
float  annealing,
bool  computeCoarseLocalPosition 
)
private

This private constructor copies the TrackingRecHit. It should be used when the TrackingRecHit exist already in some collection.

Definition at line 29 of file TSiPixelRecHit.cc.

References SiPixelRecHit::cluster(), PixelCPEBase::clusterProbComputationFlag(), cpe(), GeomDet::geographicalId(), relativeConstraints::geom, BaseSiTrackerRecHit2DLocalPos::hasPositionAndError(), ClusterParameterEstimator< T >::localParameters(), LogDebug, PixelCPEBase::rawQualityWord(), SiPixelRecHit::setRawQualityWord(), theClusterProbComputationFlag, theCPE, and theHitData.

Referenced by build(), and clone().

32  :
33  TransientTrackingRecHit(geom, *rh, weight, annealing), theCPE(cpe)
34 {
35  if (rh->hasPositionAndError() || !computeCoarseLocalPosition)
37  else{
38  const GeomDetUnit* gdu = dynamic_cast<const GeomDetUnit*>(geom);
39  if (gdu){
41  LogDebug("TSiPixelRecHit")<<"calculating coarse position/error.";
42  theHitData = SiPixelRecHit(lval.first, lval.second,geom->geographicalId(),rh->cluster());
43  }else{
44  edm::LogError("TSiPixelRecHit") << " geomdet does not cast into geomdet unit. cannot create pixel local parameters.";
46  }
47  }
48 
49  // Additionally, fill the SiPixeRecHitQuality from the PixelCPE.
50  const PixelCPEBase * cpeB = dynamic_cast< const PixelCPEBase* >( cpe );
51  if (cpeB) {
54  }
55  // else {
56  // Huh? We are using the obsolete CPEFromDetPosition???
57  // &&& Possibly complain in here.
58 
59  // &&& In fact, a better long-term option is to simply move this interface
60  // &&& into the ClusterParameterEstimator and make it a real interface
61  // &&& class.
62  // }
63 
64 }
#define LogDebug(id)
unsigned int theClusterProbComputationFlag
SiPixelRecHitQuality::QualWordType rawQualityWord() const
const PixelClusterParameterEstimator * theCPE
std::pair< LocalPoint, LocalError > LocalValues
SiPixelRecHit theHitData
unsigned int clusterProbComputationFlag() const
Definition: PixelCPEBase.h:156
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
const PixelClusterParameterEstimator * cpe() const
void setRawQualityWord(SiPixelRecHitQuality::QualWordType w)
Definition: SiPixelRecHit.h:72
TransientTrackingRecHit(const GeomDet *geom=0, float weight=1., float annealing=1.)
ClusterRef const & cluster() const
Definition: SiPixelRecHit.h:42
Our base class.
Definition: SiPixelRecHit.h:27
TSiPixelRecHit::TSiPixelRecHit ( const LocalPoint pos,
const LocalError err,
const GeomDet det,
clusterRef  clust,
const PixelClusterParameterEstimator cpe,
float  weight,
float  annealing 
)
private

Another private constructor. It creates the TrackingRecHit internally, avoiding redundent cloning.

Definition at line 70 of file TSiPixelRecHit.cc.

References PixelCPEBase::clusterProbComputationFlag(), cpe(), PixelCPEBase::rawQualityWord(), SiPixelRecHit::setRawQualityWord(), theClusterProbComputationFlag, and theHitData.

75  :
76  TransientTrackingRecHit(det,weight, annealing),
77  theHitData( pos, err, det->geographicalId(), clust),
78  theCPE(cpe)
79 {
80  // Additionally, fill the SiPixeRecHitQuality from the PixelCPE.
81  const PixelCPEBase * cpeB = dynamic_cast< const PixelCPEBase* >( cpe );
82  if (cpeB) {
85  }
86  // else {
87  // Huh? We are using the obsolete CPEFromDetPosition???
88  // &&& Possibly complain in here.
89 
90  // &&& In fact, a better long-term option is to simply move this interface
91  // &&& into the ClusterParameterEstimator and make it a real interface
92  // &&& class.
93  // }
94 }
unsigned int theClusterProbComputationFlag
SiPixelRecHitQuality::QualWordType rawQualityWord() const
const PixelClusterParameterEstimator * theCPE
SiPixelRecHit theHitData
unsigned int clusterProbComputationFlag() const
Definition: PixelCPEBase.h:156
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
const PixelClusterParameterEstimator * cpe() const
void setRawQualityWord(SiPixelRecHitQuality::QualWordType w)
Definition: SiPixelRecHit.h:72
TransientTrackingRecHit(const GeomDet *geom=0, float weight=1., float annealing=1.)

Member Function Documentation

static RecHitPointer TSiPixelRecHit::build ( const GeomDet geom,
const SiPixelRecHit rh,
const PixelClusterParameterEstimator cpe,
float  weight = 1.,
float  annealing = 1.,
bool  computeCoarseLocalPosition = false 
)
inlinestatic

Definition at line 60 of file TSiPixelRecHit.h.

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

Referenced by TkTransientTrackingRecHitBuilder::build(), TkPixelMeasurementDet::buildRecHit(), clone(), and TkTransientTrackingRecHitBuilder::oldbuild().

63  {
64  return RecHitPointer( new TSiPixelRecHit( geom, rh, cpe,weight, annealing, computeCoarseLocalPosition));
65  }
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
TSiPixelRecHit(const GeomDet *geom, const SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
static RecHitPointer TSiPixelRecHit::build ( const LocalPoint pos,
const LocalError err,
const GeomDet det,
clusterRef  cluster,
const PixelClusterParameterEstimator cpe,
float  weight = 1.,
float  annealing = 1. 
)
inlinestatic

Definition at line 67 of file TSiPixelRecHit.h.

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

71  {
72  return RecHitPointer( new TSiPixelRecHit( pos, err, det, cluster, cpe,weight, annealing));
73  }
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
TSiPixelRecHit(const GeomDet *geom, const SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
virtual bool TSiPixelRecHit::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 48 of file TSiPixelRecHit.h.

48 {return true;}
TSiPixelRecHit::RecHitPointer TSiPixelRecHit::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 8 of file TSiPixelRecHit.cc.

References build(), SiPixelRecHit::cluster(), TransientTrackingRecHit::det(), detUnit(), TransientTrackingRecHit::getAnnealingFactor(), ClusterParameterEstimator< T >::localParameters(), specificHit(), theCPE, theHitData, TSiPixelRecHit(), and TransientTrackingRecHit::weight().

9 {
10  if (theCPE == 0){
11  return new TSiPixelRecHit( det(), &theHitData, 0, weight(), getAnnealingFactor(),false);
12  }else{
13  const SiPixelCluster& clust = *specificHit()->cluster();
15  theCPE->localParameters( clust, *detUnit(), ts);
16  return TSiPixelRecHit::build( lv.first, lv.second, det(), specificHit()->cluster(), theCPE, weight(), getAnnealingFactor());
17  }
18 }
static RecHitPointer build(const GeomDet *geom, const SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, float weight=1., float annealing=1., bool computeCoarseLocalPosition=false)
const SiPixelRecHit * specificHit() const
const PixelClusterParameterEstimator * theCPE
std::pair< LocalPoint, LocalError > LocalValues
SiPixelRecHit theHitData
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
TSiPixelRecHit(const GeomDet *geom, const SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
virtual const GeomDetUnit * detUnit() const
Pixel cluster – collection of neighboring pixels above threshold.
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
ClusterRef const & cluster() const
Definition: SiPixelRecHit.h:42
virtual TSiPixelRecHit* TSiPixelRecHit::clone ( void  ) const
inlineprivatevirtual

Implements TransientTrackingRecHit.

Definition at line 114 of file TSiPixelRecHit.h.

References TSiPixelRecHit().

114  {
115  return new TSiPixelRecHit(*this);
116  }
TSiPixelRecHit(const GeomDet *geom, const SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
virtual float TSiPixelRecHit::clusterProbability ( ) const
inlinevirtual

Probability of the compatibility of the track with the pixel cluster shape.

Reimplemented from TransientTrackingRecHit.

Definition at line 77 of file TSiPixelRecHit.h.

References SiPixelRecHit::clusterProbability(), theClusterProbComputationFlag, and theHitData.

77  {
79  }
unsigned int theClusterProbComputationFlag
float clusterProbability(unsigned int flags=0) const
SiPixelRecHit theHitData
const PixelClusterParameterEstimator* TSiPixelRecHit::cpe ( ) const
inline

Definition at line 58 of file TSiPixelRecHit.h.

References theCPE.

Referenced by TSiPixelRecHit().

58 {return theCPE;}
const PixelClusterParameterEstimator * theCPE
const GeomDetUnit * TSiPixelRecHit::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 20 of file TSiPixelRecHit.cc.

References TransientTrackingRecHit::det().

Referenced by clone().

21 {
22  return static_cast<const GeomDetUnit*>(det());
23 }
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
virtual int TSiPixelRecHit::dimension ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 30 of file TSiPixelRecHit.h.

References RecHit2DLocalPos::dimension(), and theHitData.

30 {return theHitData.dimension();}
SiPixelRecHit theHitData
virtual int dimension() const
virtual void TSiPixelRecHit::getKfComponents ( KfComponentsHolder holder) const
inlinevirtual

Reimplemented from TrackingRecHit.

Definition at line 35 of file TSiPixelRecHit.h.

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

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

Implements TransientTrackingRecHit.

Definition at line 39 of file TSiPixelRecHit.h.

References theHitData.

Referenced by recHits().

39 {return &theHitData;};
SiPixelRecHit theHitData
virtual LocalPoint TSiPixelRecHit::localPosition ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 32 of file TSiPixelRecHit.h.

References BaseSiTrackerRecHit2DLocalPos::localPosition(), and theHitData.

Referenced by TrackerDpgAnalysis::insertMeasurement().

32 {return theHitData.localPosition();}
virtual LocalPoint localPosition() const
SiPixelRecHit theHitData
virtual LocalError TSiPixelRecHit::localPositionError ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 33 of file TSiPixelRecHit.h.

References BaseSiTrackerRecHit2DLocalPos::localPositionError(), and theHitData.

virtual LocalError localPositionError() const
SiPixelRecHit theHitData
virtual AlgebraicVector TSiPixelRecHit::parameters ( void  ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 22 of file TSiPixelRecHit.h.

References RecHit2DLocalPos::parameters(), and theHitData.

22 {return theHitData.parameters();}
SiPixelRecHit theHitData
virtual AlgebraicVector parameters() const
virtual AlgebraicSymMatrix TSiPixelRecHit::parametersError ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 24 of file TSiPixelRecHit.h.

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

24  {
26  // return theHitData->parametersError();
27  }
virtual LocalError localPositionError() const
SiPixelRecHit 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 TSiPixelRecHit::projectionMatrix ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 29 of file TSiPixelRecHit.h.

References RecHit2DLocalPos::projectionMatrix(), and theHitData.

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

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 41 of file TSiPixelRecHit.h.

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

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

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 44 of file TSiPixelRecHit.h.

References RecHit2DLocalPos::recHits(), and theHitData.

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

Definition at line 57 of file TSiPixelRecHit.h.

References theHitData.

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

57 {return &theHitData;};
SiPixelRecHit theHitData

Member Data Documentation

unsigned int TSiPixelRecHit::theClusterProbComputationFlag
private

Definition at line 87 of file TSiPixelRecHit.h.

Referenced by clusterProbability(), and TSiPixelRecHit().

const PixelClusterParameterEstimator* TSiPixelRecHit::theCPE
private

Definition at line 86 of file TSiPixelRecHit.h.

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

SiPixelRecHit TSiPixelRecHit::theHitData
private