CMS 3D CMS Logo

Functions
trackerHierarchy.h File Reference
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
#include <string>

Go to the source code of this file.

Functions

std::string trackerHierarchy (const TrackerTopology *tTopo, unsigned int id)
 

Function Documentation

◆ trackerHierarchy()

std::string trackerHierarchy ( const TrackerTopology tTopo,
unsigned int  id 
)

Definition at line 7 of file trackerHierarchy.cc.

7  {
8  DetId id(rawid);
9  int subdetid = id.subdetId();
10  switch (subdetid) {
11  // PXB
13  char theLayer = tTopo->pxbLayer(id);
14  char theLadder = tTopo->pxbLadder(id);
15  char theModule = tTopo->pxbModule(id);
16  char key[] = {1, theLayer, theLadder, theModule};
17  return std::string(key, 4);
18  }
19 
20  // P1XF
22  char thePanel = tTopo->pxfPanel(id);
23  char theDisk = tTopo->pxfDisk(id);
24  char theBlade = tTopo->pxfBlade(id);
25  char theModule = tTopo->pxfModule(id);
26  char key[] = {2, char(tTopo->pxfSide(id)), thePanel, theDisk, theBlade, theModule};
27  return std::string(key, 6);
28  }
29 
30  // TIB
31  case StripSubdetector::TIB: {
32  char theLayer = tTopo->tibLayer(id);
33  std::vector<unsigned int> theString = tTopo->tibStringInfo(id);
34  char theModule = tTopo->tibModule(id);
35  //side = (theString[0] == 1 ) ? "-" : "+";
36  //part = (theString[1] == 1 ) ? "int" : "ext";
37  char key[] = {3,
38  theLayer,
39  char(theString[0]),
40  char(theString[1]),
41  char(theString[2]),
42  theModule,
43  char(tTopo->tibGlued(id) ? tTopo->tibIsStereo(id) + 1 : 0)};
44  return std::string(key, tTopo->tibGlued(id) ? 7 : 6);
45  }
46 
47  // TID
48  case StripSubdetector::TID: {
49  unsigned int theDisk = tTopo->tidWheel(id);
50  unsigned int theRing = tTopo->tidRing(id);
51  // side = (tTopo->tidSide(id) == 1 ) ? "-" : "+";
52  // part = (tTopo->tidOrder(id) == 1 ) ? "back" : "front";
53  char key[] = {4,
54  char(tTopo->tidSide(id)),
55  char(theDisk),
56  char(theRing),
57  char(tTopo->tidOrder(id)),
58  char(tTopo->tidModule(id)),
59  char(tTopo->tidGlued(id) ? tTopo->tidIsStereo(id) + 1 : 0)};
60  return std::string(key, tTopo->tidGlued(id) ? 7 : 6);
61  }
62 
63  // TOB
64  case StripSubdetector::TOB: {
65  unsigned int theLayer = tTopo->tobLayer(id);
66  unsigned int theModule = tTopo->tobModule(id);
67  // side = (tTopo->side(id) == 1 ) ? "-" : "+";
68  char key[] = {5,
69  char(theLayer),
70  char(tTopo->tobSide(id)),
71  char(tTopo->tobRod(id)),
72  char(theModule),
73  char(tTopo->tobGlued(id) ? tTopo->tobIsStereo(id) + 1 : 0)};
74  return std::string(key, tTopo->tobGlued(id) ? 6 : 5);
75  }
76 
77  // TEC
78  case StripSubdetector::TEC: {
79  unsigned int theWheel = tTopo->tecWheel(id);
80  unsigned int theModule = tTopo->tecModule(id);
81  unsigned int theRing = tTopo->tecRing(id);
82  // side = (tTopo->tecSide(id) == 1 ) ? "-" : "+";
83  // petal = (tTopo->tecOrder(id) == 1 ) ? "back" : "front";
84  // int out_side = (tTopo->tecSide(id) == 1 ) ? -1 : 1;
85 
86  char key[] = {6,
87  char(tTopo->tecSide(id)),
88  char(theWheel),
89  char(tTopo->tecOrder(id)),
90  char(tTopo->tecPetalNumber(id)),
91  char(theRing),
92  char(theModule),
93  char(tTopo->tecGlued(id) ? tTopo->tecIsStereo(id) + 1 : 0)};
94  return std::string(key, tTopo->tecGlued(id) ? 8 : 7);
95  }
96  default:
97  return std::string();
98  }
99 }

References triggerObjects_cff::id, crabWrapper::key, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerTopology::pxbLadder(), TrackerTopology::pxbLayer(), TrackerTopology::pxbModule(), TrackerTopology::pxfBlade(), TrackerTopology::pxfDisk(), TrackerTopology::pxfModule(), TrackerTopology::pxfPanel(), TrackerTopology::pxfSide(), AlCaHLTBitMon_QueryRunRegistry::string, StripSubdetector::TEC, TrackerTopology::tecGlued(), TrackerTopology::tecIsStereo(), TrackerTopology::tecModule(), TrackerTopology::tecOrder(), TrackerTopology::tecPetalNumber(), TrackerTopology::tecRing(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), StripSubdetector::TIB, TrackerTopology::tibGlued(), TrackerTopology::tibIsStereo(), TrackerTopology::tibLayer(), TrackerTopology::tibModule(), TrackerTopology::tibStringInfo(), StripSubdetector::TID, TrackerTopology::tidGlued(), TrackerTopology::tidIsStereo(), TrackerTopology::tidModule(), TrackerTopology::tidOrder(), TrackerTopology::tidRing(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), StripSubdetector::TOB, TrackerTopology::tobGlued(), TrackerTopology::tobIsStereo(), TrackerTopology::tobLayer(), TrackerTopology::tobModule(), TrackerTopology::tobRod(), and TrackerTopology::tobSide().

PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
TrackerTopology::tibGlued
uint32_t tibGlued(const DetId &id) const
Definition: TrackerTopology.h:337
TrackerTopology::tobIsStereo
bool tobIsStereo(const DetId &id) const
Definition: TrackerTopology.h:264
TrackerTopology::pxfSide
unsigned int pxfSide(const DetId &id) const
Definition: TrackerTopology.h:192
TrackerTopology::pxbLadder
unsigned int pxbLadder(const DetId &id) const
Definition: TrackerTopology.h:155
TrackerTopology::tecIsStereo
bool tecIsStereo(const DetId &id) const
Definition: TrackerTopology.h:265
TrackerTopology::tidModule
unsigned int tidModule(const DetId &id) const
Definition: TrackerTopology.h:175
TrackerTopology::tidRing
unsigned int tidRing(const DetId &id) const
Definition: TrackerTopology.h:218
TrackerTopology::tobRod
unsigned int tobRod(const DetId &id) const
Definition: TrackerTopology.h:195
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
TrackerTopology::tidIsStereo
bool tidIsStereo(const DetId &id) const
Definition: TrackerTopology.h:267
TrackerTopology::pxfPanel
unsigned int pxfPanel(const DetId &id) const
Definition: TrackerTopology.h:450
DetId
Definition: DetId.h:17
TrackerTopology::tibStringInfo
std::vector< unsigned int > tibStringInfo(const DetId &id) const
Definition: TrackerTopology.h:421
TrackerTopology::tibIsStereo
bool tibIsStereo(const DetId &id) const
Definition: TrackerTopology.h:266
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
TrackerTopology::tecGlued
uint32_t tecGlued(const DetId &id) const
Definition: TrackerTopology.h:342
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackerTopology::tidOrder
unsigned int tidOrder(const DetId &id) const
Definition: TrackerTopology.h:212
TrackerTopology::tecPetalNumber
unsigned int tecPetalNumber(const DetId &id) const
Definition: TrackerTopology.h:221
TrackerTopology::tibModule
unsigned int tibModule(const DetId &id) const
Definition: TrackerTopology.h:172
TrackerTopology::tidSide
unsigned int tidSide(const DetId &id) const
Definition: TrackerTopology.h:190
TrackerTopology::tecRing
unsigned int tecRing(const DetId &id) const
ring id
Definition: TrackerTopology.h:217
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
TrackerTopology::tobGlued
uint32_t tobGlued(const DetId &id) const
Definition: TrackerTopology.h:347
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
StripSubdetector::TEC
static constexpr auto TEC
Definition: StripSubdetector.h:19
TrackerTopology::tobModule
unsigned int tobModule(const DetId &id) const
Definition: TrackerTopology.h:166
TrackerTopology::pxbModule
unsigned int pxbModule(const DetId &id) const
Definition: TrackerTopology.h:160
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
TrackerTopology::tidGlued
uint32_t tidGlued(const DetId &id) const
Definition: TrackerTopology.h:352
TrackerTopology::tecOrder
unsigned int tecOrder(const DetId &id) const
Definition: TrackerTopology.h:206
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
TrackerTopology::tecModule
unsigned int tecModule(const DetId &id) const
Definition: TrackerTopology.h:169
TrackerTopology::pxfBlade
unsigned int pxfBlade(const DetId &id) const
Definition: TrackerTopology.h:447
crabWrapper.key
key
Definition: crabWrapper.py:19
TrackerTopology::tecWheel
unsigned int tecWheel(const DetId &id) const
Definition: TrackerTopology.h:198
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
TrackerTopology::tobSide
unsigned int tobSide(const DetId &id) const
Definition: TrackerTopology.h:180
TrackerTopology::tibLayer
unsigned int tibLayer(const DetId &id) const
Definition: TrackerTopology.h:150
TrackerTopology::tecSide
unsigned int tecSide(const DetId &id) const
Definition: TrackerTopology.h:184