CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions
HitInfo Class Reference

#include <HitInfo.h>

Public Member Functions

 HitInfo ()
 
 ~HitInfo ()
 

Static Public Member Functions

static std::string getInfo (const DetId &id, const TrackerTopology *tTopo)
 
static std::string getInfo (const TrackingRecHit &recHit, const TrackerTopology *tTopo)
 
static std::string getInfo (const std::vector< const TrackingRecHit * > &recHits, const TrackerTopology *tTopo)
 
static std::string getInfo (const PSimHit &simHit, const TrackerTopology *tTopo)
 

Detailed Description

Definition at line 13 of file HitInfo.h.

Constructor & Destructor Documentation

HitInfo::HitInfo ( )

Definition at line 13 of file HitInfo.cc.

14 {
15 }
HitInfo::~HitInfo ( )

Definition at line 18 of file HitInfo.cc.

19 {
20 }

Member Function Documentation

string HitInfo::getInfo ( const DetId id,
const TrackerTopology tTopo 
)
static

Definition at line 23 of file HitInfo.cc.

References info(), connectstrParser::o, PixelSubdetector::PixelBarrel, TrackerTopology::pxbLadder(), TrackerTopology::pxbLayer(), TrackerTopology::pxbModule(), TrackerTopology::pxfBlade(), TrackerTopology::pxfDisk(), TrackerTopology::pxfModule(), TrackerTopology::pxfPanel(), and TrackerTopology::pxfSide().

Referenced by TripletFilter::checkTrack(), TrackCleaner::cleanTracks(), LowPtClusterShapeSeedComparitor::compatible(), PixelTripletLowPtGenerator::hitTriplets(), ValidHitPairFilter::operator()(), and ClusterShapeTrackFilter::operator()().

24 {
25  string info;
26 
27  if(id.subdetId() == int(PixelSubdetector::PixelBarrel))
28  {
29  // 0 + (layer-1)<<1 + (ladder-1)%2 : 0-5
30 
31  ostringstream o;
32  o << " (" << tTopo->pxbLayer(id) << "|" << tTopo->pxbLadder(id)
33  << "|" << tTopo->pxbModule(id) << ")";
34  info += o.str();
35  }
36  else
37  {
38  // 6 + (disk-1)<<1 + (panel-1)%2
39 
40  ostringstream o;
41  o << " (" << tTopo->pxfSide(id) << "|" << tTopo->pxfDisk(id)
42  << "|" << tTopo->pxfBlade(id) << "|" << tTopo->pxfPanel(id)
43  << "|" << tTopo->pxfModule(id) << ")";
44  info += o.str();
45  }
46 
47  return info;
48 }
static const TGPicture * info(bool iBackgroundIsBlack)
unsigned int pxfDisk(const DetId &id) const
unsigned int pxbLadder(const DetId &id) const
unsigned int pxbModule(const DetId &id) const
unsigned int pxfModule(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
unsigned int pxfSide(const DetId &id) const
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
string HitInfo::getInfo ( const TrackingRecHit recHit,
const TrackerTopology tTopo 
)
static

Definition at line 51 of file HitInfo.cc.

References TrackingRecHit::geographicalId().

52 {
53  DetId id(recHit.geographicalId());
54 
55  return getInfo(id, tTopo);
56 }
Definition: DetId.h:18
DetId geographicalId() const
static std::string getInfo(const DetId &id, const TrackerTopology *tTopo)
Definition: HitInfo.cc:23
string HitInfo::getInfo ( const std::vector< const TrackingRecHit * > &  recHits,
const TrackerTopology tTopo 
)
static

Definition at line 59 of file HitInfo.cc.

References info().

60 {
61  string info;
62 
63  for(vector<const TrackingRecHit *>::const_iterator
64  recHit = recHits.begin();
65  recHit!= recHits.end(); recHit++)
66  info += getInfo(**recHit, tTopo);
67 
68  return info;
69 }
static const TGPicture * info(bool iBackgroundIsBlack)
static std::string getInfo(const DetId &id, const TrackerTopology *tTopo)
Definition: HitInfo.cc:23
string HitInfo::getInfo ( const PSimHit simHit,
const TrackerTopology tTopo 
)
static

Definition at line 72 of file HitInfo.cc.

References PSimHit::detUnitId(), info(), connectstrParser::o, and PSimHit::particleType().

73 {
74  string info;
75 
76  DetId id = DetId(simHit.detUnitId());
77 
78  {
79  ostringstream o;
80  o << simHit.particleType();
81 
82  info += " | pid=" + o.str();
83  }
84 
85  {
86  ostringstream o;
87  o << id.subdetId();
88 
89  info += " | " + o.str();
90  }
91 
92  return info + getInfo(id, tTopo);
93 }
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: DetId.h:18
int particleType() const
Definition: PSimHit.h:85
static std::string getInfo(const DetId &id, const TrackerTopology *tTopo)
Definition: HitInfo.cc:23
unsigned int detUnitId() const
Definition: PSimHit.h:93