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.
6 
7 
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 }
19 
21 {
22  return static_cast<const GeomDetUnit*>(det());
23 }
24 
25 
26 
27 // This private constructor copies the TrackingRecHit. It should be used when the
28 // TrackingRecHit exist already in some collection.
31  float weight, float annealing,
32  bool computeCoarseLocalPosition) :
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 }
65 
66 
67 
68 // Another private constructor. It creates the TrackingRecHit internally,
69 // avoiding redundent cloning.
71  const GeomDet* det,
72  // const SiPixelCluster& clust,
73  clusterRef clust,
75  float weight, float annealing) :
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 }
95 
96 
97 
98 
99 /*
100 SiPixelRecHit( const LocalPoint&, const LocalError&,
101  const DetId&,
102  const SiPixelCluster * cluster);
103 */
#define LogDebug(id)
unsigned int theClusterProbComputationFlag
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
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
TSiPixelRecHit(const GeomDet *geom, const SiPixelRecHit *rh, const PixelClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
const PixelClusterParameterEstimator * cpe() const
virtual const GeomDetUnit * detUnit() const
void setRawQualityWord(SiPixelRecHitQuality::QualWordType w)
Definition: SiPixelRecHit.h:72
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.
ClusterRef const & cluster() const
Definition: SiPixelRecHit.h:42
Our base class.
Definition: SiPixelRecHit.h:27