CMS 3D CMS Logo

Functions
trackerHierarchy.cc File Reference
#include "Geometry/TrackerGeometryBuilder/interface/trackerHierarchy.h"
#include <string>
#include <vector>

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 6 of file trackerHierarchy.cc.

References hcalTTPDigis_cfi::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().

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