CMS 3D CMS Logo

HitInfo.cc
Go to the documentation of this file.
2 
5 
8 
9 #include <sstream>
10 using namespace std;
11 
12 /*****************************************************************************/
14 
15 /*****************************************************************************/
17 
18 /*****************************************************************************/
19 string HitInfo::getInfo(const DetId &id, const TrackerTopology *tTopo) {
20  string info;
21 
22  if (id.subdetId() == int(PixelSubdetector::PixelBarrel)) {
23  // 0 + (layer-1)<<1 + (ladder-1)%2 : 0-5
24 
25  ostringstream o;
26  o << " (" << tTopo->pxbLayer(id) << "|" << tTopo->pxbLadder(id) << "|" << tTopo->pxbModule(id) << ")";
27  info += o.str();
28  } else {
29  // 6 + (disk-1)<<1 + (panel-1)%2
30 
31  ostringstream o;
32  o << " (" << tTopo->pxfSide(id) << "|" << tTopo->pxfDisk(id) << "|" << tTopo->pxfBlade(id) << "|"
33  << tTopo->pxfPanel(id) << "|" << tTopo->pxfModule(id) << ")";
34  info += o.str();
35  }
36 
37  return info;
38 }
39 
40 /*****************************************************************************/
41 string HitInfo::getInfo(const TrackingRecHit &recHit, const TrackerTopology *tTopo) {
42  DetId id(recHit.geographicalId());
43 
44  return getInfo(id, tTopo);
45 }
46 
47 /*****************************************************************************/
48 string HitInfo::getInfo(const vector<const TrackingRecHit *> &recHits, const TrackerTopology *tTopo) {
49  string info;
50 
51  for (vector<const TrackingRecHit *>::const_iterator recHit = recHits.begin(); recHit != recHits.end(); recHit++)
52  info += getInfo(**recHit, tTopo);
53 
54  return info;
55 }
56 
57 /*****************************************************************************/
58 string HitInfo::getInfo(const PSimHit &simHit, const TrackerTopology *tTopo) {
59  string info;
60 
61  DetId id = DetId(simHit.detUnitId());
62 
63  {
64  ostringstream o;
65  o << simHit.particleType();
66 
67  info += " | pid=" + o.str();
68  }
69 
70  {
71  ostringstream o;
72  o << id.subdetId();
73 
74  info += " | " + o.str();
75  }
76 
77  return info + getInfo(id, tTopo);
78 }
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
HitInfo::~HitInfo
~HitInfo()
Definition: HitInfo.cc:16
TrackerTopology::pxfSide
unsigned int pxfSide(const DetId &id) const
Definition: TrackerTopology.h:192
TrackerTopology
Definition: TrackerTopology.h:16
TrackerTopology::pxbLadder
unsigned int pxbLadder(const DetId &id) const
Definition: TrackerTopology.h:155
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
TrackerTopology::pxfPanel
unsigned int pxfPanel(const DetId &id) const
Definition: TrackerTopology.h:450
DetId
Definition: DetId.h:17
TrackerTopology.h
TrackingRecHit.h
HitInfo::HitInfo
HitInfo()
Definition: HitInfo.cc:13
PSimHit.h
rpcPointValidation_cfi.simHit
simHit
Definition: rpcPointValidation_cfi.py:24
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
TrackerTopology::pxfModule
unsigned int pxfModule(const DetId &id) const
Definition: TrackerTopology.h:163
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
IdealGeometryRecord.h
TrackingRecHit
Definition: TrackingRecHit.h:21
std
Definition: JetResolutionObject.h:76
TrackerTopology::pxbModule
unsigned int pxbModule(const DetId &id) const
Definition: TrackerTopology.h:160
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
TrackerTopology::pxfBlade
unsigned int pxfBlade(const DetId &id) const
Definition: TrackerTopology.h:447
HitInfo.h
PSimHit
Definition: PSimHit.h:15
HitInfo::getInfo
static std::string getInfo(const DetId &id, const TrackerTopology *tTopo)
Definition: HitInfo.cc:19