CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/DataFormats/TrackerRecHit2D/src/SiPixelRecHit.cc

Go to the documentation of this file.
00001 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
00002 
00003 
00004 //--- The overall probability.  flags is the 32-bit-packed set of flags that
00005 //--- our own concrete implementation of clusterProbability() uses to direct
00006 //--- the computation based on the information stored in the quality word
00007 //--- (and which was computed by the CPE).  The default of flags==0 returns
00008 //--- probX*probY*(1-log(probX*probY)) because of Morris' note.
00009 //--- Flags are static and kept in the transient rec hit.
00010 float SiPixelRecHit::clusterProbability(unsigned int flags) const
00011 {
00012   if (!hasFilledProb()) {
00013     return 1;
00014   }
00015   else if (flags == 1) {
00016     return probabilityXY() * probabilityQ();
00017   }
00018   else if (flags == 2) {
00019     return probabilityQ();
00020   }
00021   else {
00022     return probabilityXY();
00023   }
00024 }
00025