CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiPixelRecHit.cc
Go to the documentation of this file.
2 
4  const DetId& id,
5  SiPixelClusterRefNew const& cluster):
7  qualWord_(0),
8  cluster_(cluster)
9 {
10 }
11 
13  SharedInputType what) const
14 {
15  if (geographicalId() != other->geographicalId()) return false;
16  if(! other->isValid()) return false;
17 
18  const SiPixelRecHit* otherCast = static_cast<const SiPixelRecHit*>(other);
19 
20  return cluster_ == otherCast->cluster();
21 }
22 
23 //--- The overall probability. flags is the 32-bit-packed set of flags that
24 //--- our own concrete implementation of clusterProbability() uses to direct
25 //--- the computation based on the information stored in the quality word
26 //--- (and which was computed by the CPE). The default of flags==0 returns
27 //--- probX*probY*(1-log(probX*probY)) because of Morris' note.
28 //--- Flags are static and kept in the transient rec hit.
29 float SiPixelRecHit::clusterProbability(unsigned int flags) const
30 {
31  if (!hasFilledProb()) {
32  return 1;
33  }
34  else if (flags == 1) {
35  return probabilityXY() * probabilityQ();
36  }
37  else if (flags == 2) {
38  return probabilityQ();
39  }
40  else {
41  return probabilityXY();
42  }
43 }
44 
SharedInputType
definition of equality via shared input
bool hasFilledProb() const
float clusterProbability(unsigned int flags=0) const
virtual bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
Definition: DetId.h:20
bool isValid() const
float probabilityXY() const
Definition: SiPixelRecHit.h:87
SiPixelClusterRefNew cluster_
DetId geographicalId() const
ClusterRef const & cluster() const
Definition: SiPixelRecHit.h:42
float probabilityQ() const
Definition: SiPixelRecHit.h:90
Our base class.
Definition: SiPixelRecHit.h:27