CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TSiPixelRecHit.cc
Go to the documentation of this file.
5 #include<typeinfo>
6 
8 {
9  if (theCPE == 0){
10  return new TSiPixelRecHit( det(), &theHitData, 0,false);
11  }else{
12  const SiPixelCluster& clust = *specificHit()->cluster();
14  theCPE->localParameters( clust, *detUnit(), ts);
15  return TSiPixelRecHit::build( lv.first, lv.second, det(), specificHit()->cluster(), theCPE);
16  }
17 }
18 
20 {
21  return static_cast<const GeomDetUnit*>(det());
22 }
23 
24 
25 
26 // This private constructor copies the TrackingRecHit. It should be used when the
27 // TrackingRecHit exist already in some collection.
30  bool computeCoarseLocalPosition) :
31  TransientTrackingRecHit(geom, *rh), theCPE(cpe), theHitData(*rh)
32 {
33  if (! (rh->hasPositionAndError() || !computeCoarseLocalPosition)) {
34  const GeomDetUnit* gdu = dynamic_cast<const GeomDetUnit*>(geom);
35  if (gdu){
37  LogDebug("TSiPixelRecHit")<<"calculating coarse position/error.";
38  theHitData = SiPixelRecHit(lval.first, lval.second,geom->geographicalId(),rh->cluster());
39  }else{
40  edm::LogError("TSiPixelRecHit") << " geomdet does not cast into geomdet unit. cannot create pixel local parameters.";
41  }
42  }
43 
44  // Additionally, fill the SiPixeRecHitQuality from the PixelCPE.
47 
48 }
49 
50 
51 
52 // Another private constructor. It creates the TrackingRecHit internally,
53 // avoiding redundent cloning.
55  const GeomDet* det,
56  clusterRef const & clust,
57  const PixelClusterParameterEstimator* cpe) :
58  TransientTrackingRecHit(det), theCPE(cpe),
59  theHitData( pos, err, det->geographicalId(), clust)
60 {
61  // Additionally, fill the SiPixeRecHitQuality from the PixelCPE.
64 }
65 
#define LogDebug(id)
unsigned int theClusterProbComputationFlag
bool hasPositionAndError() const
to be redefined by daughter class
virtual SiPixelRecHitQuality::QualWordType rawQualityWord() const
const SiPixelRecHit * specificHit() const
const PixelClusterParameterEstimator * theCPE
std::pair< LocalPoint, LocalError > LocalValues
SiPixelRecHit theHitData
TSiPixelRecHit(const GeomDet *geom, const SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, bool computeCoarseLocalPosition)
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
static RecHitPointer build(const GeomDet *geom, const SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, bool computeCoarseLocalPosition=false)
ClusterRef cluster() const
Definition: SiPixelRecHit.h:41
virtual const GeomDetUnit * detUnit() const
void setRawQualityWord(SiPixelRecHitQuality::QualWordType w)
Definition: SiPixelRecHit.h:71
Pixel cluster – collection of neighboring pixels above threshold.
virtual TSiPixelRecHit * clone() const
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
Our base class.
Definition: SiPixelRecHit.h:22