CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TkLayerMap Class Reference

#include <TkDetMap.h>

Classes

struct  XYbin
 

Public Types

enum  TkLayerEnum {
  INVALID = 0, TIB_L1, TIB_L2, TIB_L3,
  TIB_L4, TIDM_D1, TIDM_D2, TIDM_D3,
  TIDP_D1, TIDP_D2, TIDP_D3, TOB_L1,
  TOB_L2, TOB_L3, TOB_L4, TOB_L5,
  TOB_L6, TECM_W1, TECM_W2, TECM_W3,
  TECM_W4, TECM_W5, TECM_W6, TECM_W7,
  TECM_W8, TECM_W9, TECP_W1, TECP_W2,
  TECP_W3, TECP_W4, TECP_W5, TECP_W6,
  TECP_W7, TECP_W8, TECP_W9, NUMLAYERS
}
 

Public Member Functions

double get_highX () const
 
double get_highY () const
 
double get_lowX () const
 
double get_lowY () const
 
std::size_t get_nchX () const
 
std::size_t get_nchY () const
 
const std::vector< DetId > & getBinToDet () const
 
DetId getDetFromBin (int ix, int iy) const
 
const XYbin getXY (DetId detid, int layerEnumNb=TkLayerMap::INVALID) const
 
void initMap (const std::vector< uint32_t > &tkDetIdList)
 
 TkLayerMap ()
 
 TkLayerMap (int layer, std::size_t nchX, double lowX, double highX, std::size_t nchY, double lowY, double highY, const TrackerTopology *tTopo, const std::vector< uint32_t > &tkDetIdList, const std::vector< uint32_t > &singleExtString={}, const std::vector< uint32_t > &modulesInRingFront={}, const std::vector< uint32_t > &modulesInRingBack={}, const std::vector< uint32_t > &binForRing={}, uint32_t nstring_ext=0, uint32_t nrod=0)
 
 TkLayerMap (int layer, std::size_t nchX, double lowX, double highX, std::size_t nchY, double lowY, double highY, const TrackerTopology *tTopo, const std::vector< uint32_t > &tkDetIdList, std::vector< uint32_t > &&singleExtString={}, std::vector< uint32_t > &&modulesInRingFront={}, std::vector< uint32_t > &&modulesInRingBack={}, std::vector< uint32_t > &&binForRing={}, uint32_t nstring_ext=0, uint32_t nrod=0)
 

Static Public Member Functions

static const int16_t layerSearch (DetId detid, const TrackerTopology *tTopo)
 

Private Member Functions

std::size_t bin (std::size_t ix, std::size_t iy) const
 
XYbin getXY_TEC (DetId detid) const
 
XYbin getXY_TIB (DetId detid) const
 
XYbin getXY_TID (DetId detid) const
 
XYbin getXY_TOB (DetId detid) const
 
void initMap_TEC (const std::vector< uint32_t > &tkDetIdList)
 
void initMap_TIB (const std::vector< uint32_t > &tkDetIdList)
 
void initMap_TID (const std::vector< uint32_t > &tkDetIdList)
 
void initMap_TOB (const std::vector< uint32_t > &tkDetIdList)
 

Private Attributes

std::vector< uint32_t > binForRing_
 
std::vector< DetIdbinToDet_
 
double highX_
 
double highY_
 
int layer_
 
double lowX_
 
double lowY_
 
std::vector< uint32_t > modulesInRingBack_
 
std::vector< uint32_t > modulesInRingFront_
 
std::size_t nchX_
 
std::size_t nchY_
 
uint32_t nRod_
 
uint32_t nStringExt_
 
std::vector< uint32_t > singleExtStr_
 
const TrackerTopologytTopo_
 

Detailed Description

Definition at line 10 of file TkDetMap.h.

Member Enumeration Documentation

◆ TkLayerEnum

Enumerator
INVALID 
TIB_L1 
TIB_L2 
TIB_L3 
TIB_L4 
TIDM_D1 
TIDM_D2 
TIDM_D3 
TIDP_D1 
TIDP_D2 
TIDP_D3 
TOB_L1 
TOB_L2 
TOB_L3 
TOB_L4 
TOB_L5 
TOB_L6 
TECM_W1 
TECM_W2 
TECM_W3 
TECM_W4 
TECM_W5 
TECM_W6 
TECM_W7 
TECM_W8 
TECM_W9 
TECP_W1 
TECP_W2 
TECP_W3 
TECP_W4 
TECP_W5 
TECP_W6 
TECP_W7 
TECP_W8 
TECP_W9 
NUMLAYERS 

Definition at line 19 of file TkDetMap.h.

19  {
20  INVALID = 0,
21  TIB_L1,
22  TIB_L2,
23  TIB_L3,
24  TIB_L4, //1-4
25  TIDM_D1,
26  TIDM_D2,
27  TIDM_D3, //5-7
28  TIDP_D1,
29  TIDP_D2,
30  TIDP_D3, //8-10
31  TOB_L1,
32  TOB_L2,
33  TOB_L3,
34  TOB_L4,
35  TOB_L5,
36  TOB_L6, //11-16
37  TECM_W1,
38  TECM_W2,
39  TECM_W3,
40  TECM_W4,
41  TECM_W5,
42  TECM_W6,
43  TECM_W7,
44  TECM_W8,
45  TECM_W9, //17-25
46  TECP_W1,
47  TECP_W2,
48  TECP_W3,
49  TECP_W4,
50  TECP_W5,
51  TECP_W6,
52  TECP_W7,
53  TECP_W8,
54  TECP_W9, //26-34
55  NUMLAYERS
56  }; //35

Constructor & Destructor Documentation

◆ TkLayerMap() [1/3]

TkLayerMap::TkLayerMap ( )
inline

Definition at line 58 of file TkDetMap.h.

58 {}

◆ TkLayerMap() [2/3]

TkLayerMap::TkLayerMap ( int  layer,
std::size_t  nchX,
double  lowX,
double  highX,
std::size_t  nchY,
double  lowY,
double  highY,
const TrackerTopology tTopo,
const std::vector< uint32_t > &  tkDetIdList,
const std::vector< uint32_t > &  singleExtString = {},
const std::vector< uint32_t > &  modulesInRingFront = {},
const std::vector< uint32_t > &  modulesInRingBack = {},
const std::vector< uint32_t > &  binForRing = {},
uint32_t  nstring_ext = 0,
uint32_t  nrod = 0 
)
inline

Definition at line 60 of file TkDetMap.h.

69  {},
70  const std::vector<uint32_t>& modulesInRingFront = {},
71  const std::vector<uint32_t>& modulesInRingBack = {},
72  const std::vector<uint32_t>& binForRing = {},
73  uint32_t nstring_ext = 0,
74  uint32_t nrod = 0)
75  : layer_(layer),
76  nchX_(nchX),
77  lowX_(lowX),
78  highX_(highX),
79  nchY_(nchY),
80  lowY_(lowY),
81  highY_(highY),
82  tTopo_(tTopo),
83  singleExtStr_(singleExtString),
84  modulesInRingFront_(modulesInRingFront),
85  modulesInRingBack_(modulesInRingBack),
86  binForRing_(binForRing),
87  nStringExt_(nstring_ext),
88  nRod_(nrod),
89  binToDet_(std::vector<DetId>(std::size_t(nchX * nchY), 0)) {
90  initMap(tkDetIdList);
91  }

◆ TkLayerMap() [3/3]

TkLayerMap::TkLayerMap ( int  layer,
std::size_t  nchX,
double  lowX,
double  highX,
std::size_t  nchY,
double  lowY,
double  highY,
const TrackerTopology tTopo,
const std::vector< uint32_t > &  tkDetIdList,
std::vector< uint32_t > &&  singleExtString = {},
std::vector< uint32_t > &&  modulesInRingFront = {},
std::vector< uint32_t > &&  modulesInRingBack = {},
std::vector< uint32_t > &&  binForRing = {},
uint32_t  nstring_ext = 0,
uint32_t  nrod = 0 
)
inline

Definition at line 93 of file TkDetMap.h.

102  {},
103  std::vector<uint32_t>&& modulesInRingFront = {},
104  std::vector<uint32_t>&& modulesInRingBack = {},
105  std::vector<uint32_t>&& binForRing = {},
106  uint32_t nstring_ext = 0,
107  uint32_t nrod = 0)
108  : layer_(layer),
109  nchX_(nchX),
110  lowX_(lowX),
111  highX_(highX),
112  nchY_(nchY),
113  lowY_(lowY),
114  highY_(highY),
115  tTopo_(tTopo),
116  singleExtStr_(singleExtString),
117  modulesInRingFront_(modulesInRingFront),
118  modulesInRingBack_(modulesInRingBack),
119  binForRing_(binForRing),
120  nStringExt_(nstring_ext),
121  nRod_(nrod),
122  binToDet_(std::vector<DetId>(std::size_t(nchX * nchY), 0)) {
123  initMap(tkDetIdList);
124  }

Member Function Documentation

◆ bin()

std::size_t TkLayerMap::bin ( std::size_t  ix,
std::size_t  iy 
) const
inlineprivate

Definition at line 134 of file TkDetMap.h.

134 { return (ix - 1) + nchX_ * (iy - 1); }

References nchX_.

Referenced by getDetFromBin(), initMap_TEC(), initMap_TIB(), initMap_TID(), and initMap_TOB().

◆ get_highX()

double TkLayerMap::get_highX ( ) const
inline

Definition at line 142 of file TkDetMap.h.

142 { return highX_; }

References highX_.

◆ get_highY()

double TkLayerMap::get_highY ( ) const
inline

Definition at line 144 of file TkDetMap.h.

144 { return highY_; }

References highY_.

◆ get_lowX()

double TkLayerMap::get_lowX ( ) const
inline

Definition at line 141 of file TkDetMap.h.

141 { return lowX_; }

References lowX_.

◆ get_lowY()

double TkLayerMap::get_lowY ( ) const
inline

Definition at line 143 of file TkDetMap.h.

143 { return lowY_; }

References lowY_.

◆ get_nchX()

std::size_t TkLayerMap::get_nchX ( ) const
inline

Definition at line 139 of file TkDetMap.h.

139 { return nchX_; }

References nchX_.

◆ get_nchY()

std::size_t TkLayerMap::get_nchY ( ) const
inline

Definition at line 140 of file TkDetMap.h.

140 { return nchY_; }

References nchY_.

◆ getBinToDet()

const std::vector<DetId>& TkLayerMap::getBinToDet ( ) const
inline

Definition at line 145 of file TkDetMap.h.

145 { return binToDet_; }

References binToDet_.

◆ getDetFromBin()

DetId TkLayerMap::getDetFromBin ( int  ix,
int  iy 
) const
inline

Definition at line 147 of file TkDetMap.h.

147  {
148  const auto idx = bin(ix, iy);
149  return (idx < nchX_ * nchY_) ? binToDet_[idx] : DetId(0);
150  }

References bin(), binToDet_, charmTagsComputerCvsB_cfi::idx, nchX_, and nchY_.

◆ getXY()

const TkLayerMap::XYbin TkLayerMap::getXY ( DetId  detid,
int  layerEnumNb = TkLayerMap::INVALID 
) const

Definition at line 156 of file TkDetMap.cc.

156  {
157  LogTrace("TkLayerMap") << "[TkLayerMap::getXY] " << detid.rawId() << " layer " << layerEnumNb;
158 
159  if (!layerEnumNb)
160  layerEnumNb = layerSearch(detid, tTopo_);
161 
162  if (layerEnumNb != layer_)
163  throw cms::Exception("CorruptedData")
164  << "[TkLayerMap::getXY] Fill of DetId " << detid.rawId() << " layerEnumNb " << layerEnumNb
165  << " are requested to wrong TkLayerMap " << layer_ << " \nPlease check the TkDetMap code";
166 
167  if (layerEnumNb >= TkLayerMap::TIB_L1 && layerEnumNb <= TkLayerMap::TIB_L4)
168  return getXY_TIB(detid);
169  else if (layerEnumNb >= TkLayerMap::TIDM_D1 && layerEnumNb <= TkLayerMap::TIDP_D3)
170  return getXY_TID(detid);
171  else if (layerEnumNb >= TkLayerMap::TOB_L1 && layerEnumNb <= TkLayerMap::TOB_L6)
172  return getXY_TOB(detid);
173  else
174  return getXY_TEC(detid);
175 }

References Exception, getXY_TEC(), getXY_TIB(), getXY_TID(), getXY_TOB(), layer_, layerSearch(), LogTrace, DetId::rawId(), TIB_L1, TIB_L4, TIDM_D1, TIDP_D3, TOB_L1, TOB_L6, and tTopo_.

◆ getXY_TEC()

TkLayerMap::XYbin TkLayerMap::getXY_TEC ( DetId  detid) const
private

Definition at line 215 of file TkDetMap.cc.

215  {
216  XYbin xyb;
217  xyb.ix = ((tTopo_->tecIsZMinusSide(detid) ? binForRing_[7] - binForRing_[tTopo_->tecRing(detid)] + 1
218  : binForRing_[tTopo_->tecRing(detid)]) +
219  (tTopo_->tecIsStereo(detid) ? (tTopo_->tecIsZMinusSide(detid) ? -1 : 1) : 0));
220 
221  xyb.iy = ((tTopo_->tecPetalNumber(detid) - 1) *
223  (tTopo_->tecIsZMinusSide(detid)
224  ? modulesInRingFront_[tTopo_->tecRing(detid)] - tTopo_->tecModule(detid) + 1 +
225  (tTopo_->tecIsBackPetal(detid) ? modulesInRingBack_[tTopo_->tecRing(detid)] : 0)
226  : tTopo_->tecModule(detid) +
227  (tTopo_->tecIsBackPetal(detid) ? modulesInRingFront_[tTopo_->tecRing(detid)] : 0)));
228 
229  xyb.x = lowX_ + xyb.ix - 0.5;
230  xyb.y = lowY_ + xyb.iy - 0.5;
231 
232  return xyb;
233 }

References binForRing_, TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, lowX_, lowY_, modulesInRingBack_, modulesInRingFront_, TrackerTopology::tecIsBackPetal(), TrackerTopology::tecIsStereo(), TrackerTopology::tecIsZMinusSide(), TrackerTopology::tecModule(), TrackerTopology::tecPetalNumber(), TrackerTopology::tecRing(), tTopo_, TkLayerMap::XYbin::x, and TkLayerMap::XYbin::y.

Referenced by getXY(), and initMap_TEC().

◆ getXY_TIB()

TkLayerMap::XYbin TkLayerMap::getXY_TIB ( DetId  detid) const
private

Definition at line 177 of file TkDetMap.cc.

177  {
178  XYbin xyb;
179  xyb.ix = (2 * (tTopo_->tibIsZMinusSide(detid) ? -1 * tTopo_->tibModule(detid) + 3 : tTopo_->tibModule(detid) + 2) +
180  (tTopo_->tibLayer(detid) % 2 ? (tTopo_->tibIsInternalString(detid) ? 2 : 1)
181  : (tTopo_->tibIsInternalString(detid) ? 1 : 2)));
182  xyb.iy = ((tTopo_->tibIsInternalString(detid) ? tTopo_->tibString(detid) + singleExtStr_[tTopo_->tibString(detid)]
183  : tTopo_->tibString(detid)) +
184  ((tTopo_->tibLayer(detid) < 3) && (!tTopo_->tibIsStereo(detid)) ? nStringExt_ + 2 : 0));
185 
186  xyb.x = lowX_ + xyb.ix - 0.5;
187  xyb.y = lowY_ + xyb.iy - 0.5;
188 
189  return xyb;
190 }

References TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, lowX_, lowY_, nStringExt_, singleExtStr_, TrackerTopology::tibIsInternalString(), TrackerTopology::tibIsStereo(), TrackerTopology::tibIsZMinusSide(), TrackerTopology::tibLayer(), TrackerTopology::tibModule(), TrackerTopology::tibString(), tTopo_, TkLayerMap::XYbin::x, and TkLayerMap::XYbin::y.

Referenced by getXY(), and initMap_TIB().

◆ getXY_TID()

TkLayerMap::XYbin TkLayerMap::getXY_TID ( DetId  detid) const
private

Definition at line 203 of file TkDetMap.cc.

203  {
204  XYbin xyb;
205  xyb.ix = ((tTopo_->tidIsZMinusSide(detid) ? -3 * tTopo_->tidRing(detid) + 10 : 3 * tTopo_->tidRing(detid) - 2) +
206  (tTopo_->tidIsStereo(detid) ? (tTopo_->tidIsZMinusSide(detid) ? -1 : 1) : 0));
207  xyb.iy = 2 * tTopo_->tidModule(detid) - (tTopo_->tidIsBackRing(detid) ? 0 : 1);
208 
209  xyb.x = lowX_ + xyb.ix - 0.5;
210  xyb.y = lowY_ + xyb.iy - 0.5;
211 
212  return xyb;
213 }

References TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, lowX_, lowY_, TrackerTopology::tidIsBackRing(), TrackerTopology::tidIsStereo(), TrackerTopology::tidIsZMinusSide(), TrackerTopology::tidModule(), TrackerTopology::tidRing(), tTopo_, TkLayerMap::XYbin::x, and TkLayerMap::XYbin::y.

Referenced by getXY(), and initMap_TID().

◆ getXY_TOB()

TkLayerMap::XYbin TkLayerMap::getXY_TOB ( DetId  detid) const
private

Definition at line 192 of file TkDetMap.cc.

192  {
193  XYbin xyb;
194  xyb.ix = (tTopo_->tobIsZMinusSide(detid) ? -1 * tTopo_->tobModule(detid) + 7 : tTopo_->tobModule(detid) + 6);
195  xyb.iy = (tTopo_->tobRod(detid) + (tTopo_->tobLayer(detid) < 3 && !tTopo_->tobIsStereo(detid) ? nRod_ + 2 : 0));
196 
197  xyb.x = lowX_ + xyb.ix - 0.5;
198  xyb.y = lowY_ + xyb.iy - 0.5;
199 
200  return xyb;
201 }

References TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, lowX_, lowY_, nRod_, TrackerTopology::tobIsStereo(), TrackerTopology::tobIsZMinusSide(), TrackerTopology::tobLayer(), TrackerTopology::tobModule(), TrackerTopology::tobRod(), tTopo_, TkLayerMap::XYbin::x, and TkLayerMap::XYbin::y.

Referenced by getXY(), and initMap_TOB().

◆ initMap()

void TkLayerMap::initMap ( const std::vector< uint32_t > &  tkDetIdList)

Definition at line 9 of file TkDetMap.cc.

9  {
10  switch (layer_) {
11  case TkLayerMap::TIB_L1:
12  case TkLayerMap::TIB_L2:
13  case TkLayerMap::TIB_L3:
14  case TkLayerMap::TIB_L4:
15  initMap_TIB(TkDetIdList);
16  break;
23  initMap_TID(TkDetIdList);
24  break;
25  case TkLayerMap::TOB_L1:
26  case TkLayerMap::TOB_L2:
27  case TkLayerMap::TOB_L3:
28  case TkLayerMap::TOB_L4:
29  case TkLayerMap::TOB_L5:
30  case TkLayerMap::TOB_L6:
31  initMap_TOB(TkDetIdList);
32  break;
51  initMap_TEC(TkDetIdList);
52  break;
53  default:
54  edm::LogError("TkLayerMap") << " TkLayerMap::requested creation of a wrong layer Nb " << layer_;
55  }
56 }

References initMap_TEC(), initMap_TIB(), initMap_TID(), initMap_TOB(), layer_, TECM_W1, TECM_W2, TECM_W3, TECM_W4, TECM_W5, TECM_W6, TECM_W7, TECM_W8, TECM_W9, TECP_W1, TECP_W2, TECP_W3, TECP_W4, TECP_W5, TECP_W6, TECP_W7, TECP_W8, TECP_W9, TIB_L1, TIB_L2, TIB_L3, TIB_L4, TIDM_D1, TIDM_D2, TIDM_D3, TIDP_D1, TIDP_D2, TIDP_D3, TOB_L1, TOB_L2, TOB_L3, TOB_L4, TOB_L5, and TOB_L6.

◆ initMap_TEC()

void TkLayerMap::initMap_TEC ( const std::vector< uint32_t > &  tkDetIdList)
private

Definition at line 117 of file TkDetMap.cc.

117  {
118  //extract vector of module in the layer
119  std::vector<uint32_t> LayerDetIdList;
121  LayerDetIdList,
122  tTopo_,
123  (layer_ - TkLayerMap::TECM_W1) / 9 + 1,
124  (layer_ - TkLayerMap::TECM_W1) % 9 + 1,
125  0,
126  0);
127 
128  LogTrace("TkLayerMap") << "[TkLayerMap::createTEC] layer side " << (layer_ - TkLayerMap::TECM_W1) / 9 + 1 << " "
129  << (layer_ - TkLayerMap::TECM_W1) % 9 + 1 << " number of dets " << LayerDetIdList.size()
130  << " lowY " << lowY_ << " high " << highY_ << " Nstring " << nStringExt_;
131 
132  for (uint32_t det : LayerDetIdList) {
133  const auto xyb = getXY_TEC(det);
134  binToDet_[bin(xyb.ix, xyb.iy)] = det;
135 
136  LogTrace("TkLayerMap") << "[TkLayerMap::createTEC] " << det << " " << xyb.ix << " " << xyb.iy << " " << xyb.x << " "
137  << xyb.y;
138  }
139 }

References bin(), binToDet_, SiStripSubStructure::getTECDetectors(), getXY_TEC(), highY_, layer_, LogTrace, lowY_, nStringExt_, TECM_W1, and tTopo_.

Referenced by initMap().

◆ initMap_TIB()

void TkLayerMap::initMap_TIB ( const std::vector< uint32_t > &  tkDetIdList)
private

Definition at line 58 of file TkDetMap.cc.

58  {
59  //extract vector of module in the layer
60  std::vector<uint32_t> LayerDetIdList;
61  SiStripSubStructure::getTIBDetectors(TkDetIdList, LayerDetIdList, tTopo_, layer_, 0, 0, 0);
62 
63  LogTrace("TkLayerMap") << "[TkLayerMap::createTIB12] layer " << layer_ << " number of dets " << LayerDetIdList.size()
64  << " lowY " << lowY_ << " high " << highY_ << " Nstring " << nStringExt_;
65 
66  for (uint32_t det : LayerDetIdList) {
67  const auto xyb = getXY_TIB(det);
68  binToDet_[bin(xyb.ix, xyb.iy)] = det;
69 
70  LogTrace("TkLayerMap") << "[TkLayerMap::createTIB] " << det << " " << xyb.ix << " " << xyb.iy << " " << xyb.x << " "
71  << xyb.y;
72  }
73 }

References bin(), binToDet_, SiStripSubStructure::getTIBDetectors(), getXY_TIB(), highY_, layer_, LogTrace, lowY_, nStringExt_, and tTopo_.

Referenced by initMap().

◆ initMap_TID()

void TkLayerMap::initMap_TID ( const std::vector< uint32_t > &  tkDetIdList)
private

Definition at line 93 of file TkDetMap.cc.

93  {
94  //extract vector of module in the layer
95  std::vector<uint32_t> LayerDetIdList;
97  LayerDetIdList,
98  tTopo_,
99  (layer_ - TkLayerMap::TIDM_D1) / 3 + 1,
100  (layer_ - TkLayerMap::TIDM_D1) % 3 + 1,
101  0,
102  0);
103 
104  LogTrace("TkLayerMap") << "[TkLayerMap::createTID] layer side " << (layer_ - TkLayerMap::TIDM_D1) / 3 + 1 << " nb "
105  << (layer_ - TkLayerMap::TIDM_D1) % 3 + 1 << " number of dets " << LayerDetIdList.size()
106  << " lowY " << lowY_ << " high " << highY_ << " Nstring " << nStringExt_;
107 
108  for (uint32_t det : LayerDetIdList) {
109  const auto xyb = getXY_TID(det);
110  binToDet_[bin(xyb.ix, xyb.iy)] = det;
111 
112  LogTrace("TkLayerMap") << "[TkLayerMap::createTID] " << det << " " << xyb.ix << " " << xyb.iy << " " << xyb.x << " "
113  << xyb.y;
114  }
115 }

References bin(), binToDet_, SiStripSubStructure::getTIDDetectors(), getXY_TID(), highY_, layer_, LogTrace, lowY_, nStringExt_, TIDM_D1, and tTopo_.

Referenced by initMap().

◆ initMap_TOB()

void TkLayerMap::initMap_TOB ( const std::vector< uint32_t > &  tkDetIdList)
private

Definition at line 75 of file TkDetMap.cc.

75  {
76  //extract vector of module in the layer
77  std::vector<uint32_t> LayerDetIdList;
78  SiStripSubStructure::getTOBDetectors(TkDetIdList, LayerDetIdList, tTopo_, layer_ - 10, 0, 0);
79 
80  LogTrace("TkLayerMap") << "[TkLayerMap::createTOB] layer " << layer_ - 10 << " number of dets "
81  << LayerDetIdList.size() << " lowY " << lowY_ << " high " << highY_ << " Nstring "
82  << nStringExt_;
83 
84  for (uint32_t det : LayerDetIdList) {
85  const auto xyb = getXY_TOB(det);
86  binToDet_[bin(xyb.ix, xyb.iy)] = det;
87 
88  LogTrace("TkLayerMap") << "[TkLayerMap::createTOB] " << det << " " << xyb.ix << " " << xyb.iy << " " << xyb.x << " "
89  << xyb.y;
90  }
91 }

References bin(), binToDet_, SiStripSubStructure::getTOBDetectors(), getXY_TOB(), highY_, layer_, LogTrace, lowY_, nStringExt_, and tTopo_.

Referenced by initMap().

◆ layerSearch()

const int16_t TkLayerMap::layerSearch ( DetId  detid,
const TrackerTopology tTopo 
)
static

Definition at line 141 of file TkDetMap.cc.

141  {
142  switch (detid.subdetId()) {
143  case SiStripDetId::TIB:
144  return TkLayerMap::TIB_L1 - 1 + tTopo->tibLayer(detid);
145  case SiStripDetId::TID:
146  return TkLayerMap::TIDM_D1 - 1 + (tTopo->tidSide(detid) - 1) * 3 + tTopo->tidWheel(detid);
147  case SiStripDetId::TOB:
148  return TkLayerMap::TOB_L1 - 1 + tTopo->tobLayer(detid);
149  case SiStripDetId::TEC:
150  return TkLayerMap::TECM_W1 - 1 + (tTopo->tecSide(detid) - 1) * 9 + tTopo->tecWheel(detid);
151  default:
152  return 0;
153  }
154 }

References DetId::subdetId(), SiStripDetId::TEC, TECM_W1, TrackerTopology::tecSide(), TrackerTopology::tecWheel(), SiStripDetId::TIB, TIB_L1, TrackerTopology::tibLayer(), SiStripDetId::TID, TIDM_D1, TrackerTopology::tidSide(), TrackerTopology::tidWheel(), SiStripDetId::TOB, TOB_L1, and TrackerTopology::tobLayer().

Referenced by TkDetMap::findLayer(), and getXY().

Member Data Documentation

◆ binForRing_

std::vector<uint32_t> TkLayerMap::binForRing_
private

Definition at line 169 of file TkDetMap.h.

Referenced by getXY_TEC().

◆ binToDet_

std::vector<DetId> TkLayerMap::binToDet_
private

◆ highX_

double TkLayerMap::highX_
private

Definition at line 163 of file TkDetMap.h.

Referenced by get_highX().

◆ highY_

double TkLayerMap::highY_
private

Definition at line 165 of file TkDetMap.h.

Referenced by get_highY(), initMap_TEC(), initMap_TIB(), initMap_TID(), and initMap_TOB().

◆ layer_

int TkLayerMap::layer_
private

Definition at line 161 of file TkDetMap.h.

Referenced by getXY(), initMap(), initMap_TEC(), initMap_TIB(), initMap_TID(), and initMap_TOB().

◆ lowX_

double TkLayerMap::lowX_
private

Definition at line 163 of file TkDetMap.h.

Referenced by get_lowX(), getXY_TEC(), getXY_TIB(), getXY_TID(), and getXY_TOB().

◆ lowY_

double TkLayerMap::lowY_
private

◆ modulesInRingBack_

std::vector<uint32_t> TkLayerMap::modulesInRingBack_
private

Definition at line 169 of file TkDetMap.h.

Referenced by getXY_TEC().

◆ modulesInRingFront_

std::vector<uint32_t> TkLayerMap::modulesInRingFront_
private

Definition at line 169 of file TkDetMap.h.

Referenced by getXY_TEC().

◆ nchX_

std::size_t TkLayerMap::nchX_
private

Definition at line 162 of file TkDetMap.h.

Referenced by bin(), get_nchX(), and getDetFromBin().

◆ nchY_

std::size_t TkLayerMap::nchY_
private

Definition at line 164 of file TkDetMap.h.

Referenced by get_nchY(), and getDetFromBin().

◆ nRod_

uint32_t TkLayerMap::nRod_
private

Definition at line 170 of file TkDetMap.h.

Referenced by getXY_TOB().

◆ nStringExt_

uint32_t TkLayerMap::nStringExt_
private

Definition at line 170 of file TkDetMap.h.

Referenced by getXY_TIB(), initMap_TEC(), initMap_TIB(), initMap_TID(), and initMap_TOB().

◆ singleExtStr_

std::vector<uint32_t> TkLayerMap::singleExtStr_
private

Definition at line 168 of file TkDetMap.h.

Referenced by getXY_TIB().

◆ tTopo_

const TrackerTopology* TkLayerMap::tTopo_
private
TrackerTopology::tidIsZMinusSide
bool tidIsZMinusSide(const DetId &id) const
Definition: TrackerTopology.h:259
TkLayerMap::TIB_L3
Definition: TkDetMap.h:23
TkLayerMap::TIB_L2
Definition: TkDetMap.h:22
TrackerTopology::tibIsInternalString
bool tibIsInternalString(const DetId &id) const
Definition: TrackerTopology.h:429
TkLayerMap::TOB_L4
Definition: TkDetMap.h:34
TkLayerMap::TECM_W4
Definition: TkDetMap.h:40
SiStripSubStructure::getTIDDetectors
void getTIDDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tidDetRawIds, const TrackerTopology *trackerTopology, uint32_t side=0, uint32_t wheel=0, uint32_t ring=0, uint32_t ster=0)
TkLayerMap::modulesInRingFront_
std::vector< uint32_t > modulesInRingFront_
Definition: TkDetMap.h:169
TkLayerMap::modulesInRingBack_
std::vector< uint32_t > modulesInRingBack_
Definition: TkDetMap.h:169
TkLayerMap::nRod_
uint32_t nRod_
Definition: TkDetMap.h:170
SiStripSubStructure::getTIBDetectors
void getTIBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tibDetRawIds, const TrackerTopology *trackerTopology, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t int_ext=0, uint32_t string=0)
TrackerTopology::tobIsStereo
bool tobIsStereo(const DetId &id) const
Definition: TrackerTopology.h:264
TrackerTopology::tecIsZMinusSide
bool tecIsZMinusSide(const DetId &id) const
Definition: TrackerTopology.h:262
TkLayerMap::TECP_W9
Definition: TkDetMap.h:54
TkLayerMap::TOB_L1
Definition: TkDetMap.h:31
TkLayerMap::TECM_W5
Definition: TkDetMap.h:41
TkLayerMap::TECM_W1
Definition: TkDetMap.h:37
TkLayerMap::TIDP_D1
Definition: TkDetMap.h:28
TrackerTopology::tecIsStereo
bool tecIsStereo(const DetId &id) const
Definition: TrackerTopology.h:265
charmTagsComputerCvsB_cfi.idx
idx
Definition: charmTagsComputerCvsB_cfi.py:108
TkLayerMap::highX_
double highX_
Definition: TkDetMap.h:163
TkLayerMap::TECP_W6
Definition: TkDetMap.h:51
TrackerTopology::tidModule
unsigned int tidModule(const DetId &id) const
Definition: TrackerTopology.h:175
TkLayerMap::TOB_L6
Definition: TkDetMap.h:36
TkLayerMap::getXY_TEC
XYbin getXY_TEC(DetId detid) const
Definition: TkDetMap.cc:215
TkLayerMap::binToDet_
std::vector< DetId > binToDet_
Definition: TkDetMap.h:172
TkLayerMap::initMap_TID
void initMap_TID(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:93
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::tidIsStereo
bool tidIsStereo(const DetId &id) const
Definition: TrackerTopology.h:267
TkLayerMap::getXY_TOB
XYbin getXY_TOB(DetId detid) const
Definition: TkDetMap.cc:192
DetId
Definition: DetId.h:17
TkLayerMap::TECP_W5
Definition: TkDetMap.h:50
TkLayerMap::TOB_L5
Definition: TkDetMap.h:35
TkLayerMap::TIDM_D3
Definition: TkDetMap.h:27
TkLayerMap::TIDP_D2
Definition: TkDetMap.h:29
SiStripSubStructure::getTECDetectors
void getTECDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tecDetRawIds, const TrackerTopology *trackerTopology, uint32_t side=0, uint32_t wheel=0, uint32_t petal_bkw_frw=0, uint32_t petal=0, uint32_t ring=0, uint32_t ster=0)
TkLayerMap::getXY_TIB
XYbin getXY_TIB(DetId detid) const
Definition: TkDetMap.cc:177
TrackerTopology::tibIsStereo
bool tibIsStereo(const DetId &id) const
Definition: TrackerTopology.h:266
TkLayerMap::TECP_W4
Definition: TkDetMap.h:49
SiStripDetId::TEC
static constexpr auto TEC
Definition: SiStripDetId.h:40
TkLayerMap::TECM_W6
Definition: TkDetMap.h:42
TkLayerMap::lowY_
double lowY_
Definition: TkDetMap.h:165
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
TkLayerMap::binForRing_
std::vector< uint32_t > binForRing_
Definition: TkDetMap.h:169
TkLayerMap::TIDP_D3
Definition: TkDetMap.h:30
TkLayerMap::TECM_W9
Definition: TkDetMap.h:45
TkLayerMap::TECM_W8
Definition: TkDetMap.h:44
TrackerTopology::tibString
unsigned int tibString(const DetId &id) const
Definition: TrackerTopology.h:419
TkLayerMap::layerSearch
static const int16_t layerSearch(DetId detid, const TrackerTopology *tTopo)
Definition: TkDetMap.cc:141
edm::LogError
Definition: MessageLogger.h:183
TkLayerMap::TECM_W7
Definition: TkDetMap.h:43
TrackerTopology::tecPetalNumber
unsigned int tecPetalNumber(const DetId &id) const
Definition: TrackerTopology.h:221
TrackerTopology::tobIsZMinusSide
bool tobIsZMinusSide(const DetId &id) const
Definition: TrackerTopology.h:253
TkLayerMap::TECM_W2
Definition: TkDetMap.h:38
TkLayerMap::nchY_
std::size_t nchY_
Definition: TkDetMap.h:164
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
TkLayerMap::TECP_W7
Definition: TkDetMap.h:52
SiStripDetId::TOB
static constexpr auto TOB
Definition: SiStripDetId.h:39
TkLayerMap::NUMLAYERS
Definition: TkDetMap.h:55
TkLayerMap::getXY_TID
XYbin getXY_TID(DetId detid) const
Definition: TkDetMap.cc:203
TkLayerMap::TIB_L1
Definition: TkDetMap.h:21
TkLayerMap::lowX_
double lowX_
Definition: TkDetMap.h:163
TkLayerMap::TIB_L4
Definition: TkDetMap.h:24
TkLayerMap::bin
std::size_t bin(std::size_t ix, std::size_t iy) const
Definition: TkDetMap.h:134
TkLayerMap::initMap_TEC
void initMap_TEC(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:117
SiStripDetId::TID
static constexpr auto TID
Definition: SiStripDetId.h:38
TkLayerMap::TECP_W8
Definition: TkDetMap.h:53
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
TrackerTopology::tidIsBackRing
bool tidIsBackRing(const DetId &id) const
Definition: TrackerTopology.h:441
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
TkLayerMap::TECP_W1
Definition: TkDetMap.h:46
SiStripSubStructure::getTOBDetectors
void getTOBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tobDetRawIds, const TrackerTopology *trackerTopology, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t rod=0)
TrackerTopology::tobModule
unsigned int tobModule(const DetId &id) const
Definition: TrackerTopology.h:166
TkLayerMap::TECP_W2
Definition: TkDetMap.h:47
TkLayerMap::TECP_W3
Definition: TkDetMap.h:48
TkLayerMap::highY_
double highY_
Definition: TkDetMap.h:165
Exception
Definition: hltDiff.cc:246
TkLayerMap::TIDM_D2
Definition: TkDetMap.h:26
SiStripDetId::TIB
static constexpr auto TIB
Definition: SiStripDetId.h:37
TrackerTopology::tecModule
unsigned int tecModule(const DetId &id) const
Definition: TrackerTopology.h:169
TkLayerMap::initMap
void initMap(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:9
TkLayerMap::TIDM_D1
Definition: TkDetMap.h:25
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
TrackerTopology::tecIsBackPetal
bool tecIsBackPetal(const DetId &id) const
Definition: TrackerTopology.h:414
TkLayerMap::TECM_W3
Definition: TkDetMap.h:39
TkLayerMap::tTopo_
const TrackerTopology * tTopo_
Definition: TkDetMap.h:166
TkLayerMap::singleExtStr_
std::vector< uint32_t > singleExtStr_
Definition: TkDetMap.h:168
TkLayerMap::layer_
int layer_
Definition: TkDetMap.h:161
TkLayerMap::TOB_L3
Definition: TkDetMap.h:33
TkLayerMap::initMap_TIB
void initMap_TIB(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:58
TrackerTopology::tibIsZMinusSide
bool tibIsZMinusSide(const DetId &id) const
Definition: TrackerTopology.h:256
TrackerTopology::tecWheel
unsigned int tecWheel(const DetId &id) const
Definition: TrackerTopology.h:198
TkLayerMap::nchX_
std::size_t nchX_
Definition: TkDetMap.h:162
TkLayerMap::initMap_TOB
void initMap_TOB(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:75
TkLayerMap::nStringExt_
uint32_t nStringExt_
Definition: TkDetMap.h:170
TkLayerMap::INVALID
Definition: TkDetMap.h:20
TkLayerMap::TOB_L2
Definition: TkDetMap.h:32
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