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  }
std::vector< uint32_t > binForRing_
Definition: TkDetMap.h:169
const TrackerTopology * tTopo_
Definition: TkDetMap.h:166
void initMap(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:9
double lowY_
Definition: TkDetMap.h:165
uint32_t nStringExt_
Definition: TkDetMap.h:170
double lowX_
Definition: TkDetMap.h:163
std::vector< uint32_t > modulesInRingBack_
Definition: TkDetMap.h:169
uint32_t nRod_
Definition: TkDetMap.h:170
double highY_
Definition: TkDetMap.h:165
std::vector< uint32_t > singleExtStr_
Definition: TkDetMap.h:168
std::size_t nchX_
Definition: TkDetMap.h:162
std::vector< DetId > binToDet_
Definition: TkDetMap.h:172
int layer_
Definition: TkDetMap.h:161
std::vector< uint32_t > modulesInRingFront_
Definition: TkDetMap.h:169
double highX_
Definition: TkDetMap.h:163
std::size_t nchY_
Definition: TkDetMap.h:164

◆ 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  }
std::vector< uint32_t > binForRing_
Definition: TkDetMap.h:169
const TrackerTopology * tTopo_
Definition: TkDetMap.h:166
void initMap(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:9
double lowY_
Definition: TkDetMap.h:165
uint32_t nStringExt_
Definition: TkDetMap.h:170
double lowX_
Definition: TkDetMap.h:163
std::vector< uint32_t > modulesInRingBack_
Definition: TkDetMap.h:169
uint32_t nRod_
Definition: TkDetMap.h:170
double highY_
Definition: TkDetMap.h:165
std::vector< uint32_t > singleExtStr_
Definition: TkDetMap.h:168
std::size_t nchX_
Definition: TkDetMap.h:162
std::vector< DetId > binToDet_
Definition: TkDetMap.h:172
int layer_
Definition: TkDetMap.h:161
std::vector< uint32_t > modulesInRingFront_
Definition: TkDetMap.h:169
double highX_
Definition: TkDetMap.h:163
std::size_t nchY_
Definition: TkDetMap.h:164

Member Function Documentation

◆ bin()

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

◆ get_highX()

double TkLayerMap::get_highX ( ) const
inline

Definition at line 142 of file TkDetMap.h.

References highX_.

142 { return highX_; }
double highX_
Definition: TkDetMap.h:163

◆ get_highY()

double TkLayerMap::get_highY ( ) const
inline

Definition at line 144 of file TkDetMap.h.

References highY_.

144 { return highY_; }
double highY_
Definition: TkDetMap.h:165

◆ get_lowX()

double TkLayerMap::get_lowX ( ) const
inline

Definition at line 141 of file TkDetMap.h.

References lowX_.

141 { return lowX_; }
double lowX_
Definition: TkDetMap.h:163

◆ get_lowY()

double TkLayerMap::get_lowY ( ) const
inline

Definition at line 143 of file TkDetMap.h.

References lowY_.

143 { return lowY_; }
double lowY_
Definition: TkDetMap.h:165

◆ get_nchX()

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

Definition at line 139 of file TkDetMap.h.

References nchX_.

139 { return nchX_; }
std::size_t nchX_
Definition: TkDetMap.h:162

◆ get_nchY()

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

Definition at line 140 of file TkDetMap.h.

References nchY_.

140 { return nchY_; }
std::size_t nchY_
Definition: TkDetMap.h:164

◆ getBinToDet()

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

Definition at line 145 of file TkDetMap.h.

References binToDet_.

145 { return binToDet_; }
std::vector< DetId > binToDet_
Definition: TkDetMap.h:172

◆ getDetFromBin()

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

Definition at line 147 of file TkDetMap.h.

References bin(), binToDet_, heavyIonCSV_trainingSettings::idx, ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::ix(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::iy(), nchX_, and nchY_.

147  {
148  const auto idx = bin(ix, iy);
149  return (idx < nchX_ * nchY_) ? binToDet_[idx] : DetId(0);
150  }
std::size_t bin(std::size_t ix, std::size_t iy) const
Definition: TkDetMap.h:134
std::size_t nchX_
Definition: TkDetMap.h:162
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
std::vector< DetId > binToDet_
Definition: TkDetMap.h:172
Definition: DetId.h:17
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
std::size_t nchY_
Definition: TkDetMap.h:164

◆ getXY()

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

Definition at line 156 of file TkDetMap.cc.

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_.

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 }
const TrackerTopology * tTopo_
Definition: TkDetMap.h:166
static const int16_t layerSearch(DetId detid, const TrackerTopology *tTopo)
Definition: TkDetMap.cc:141
#define LogTrace(id)
XYbin getXY_TEC(DetId detid) const
Definition: TkDetMap.cc:215
int layer_
Definition: TkDetMap.h:161
XYbin getXY_TOB(DetId detid) const
Definition: TkDetMap.cc:192
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
XYbin getXY_TIB(DetId detid) const
Definition: TkDetMap.cc:177
XYbin getXY_TID(DetId detid) const
Definition: TkDetMap.cc:203

◆ getXY_TEC()

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

Definition at line 215 of file TkDetMap.cc.

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().

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 }
unsigned int tecPetalNumber(const DetId &id) const
std::vector< uint32_t > binForRing_
Definition: TkDetMap.h:169
const TrackerTopology * tTopo_
Definition: TkDetMap.h:166
double lowY_
Definition: TkDetMap.h:165
bool tecIsZMinusSide(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
double lowX_
Definition: TkDetMap.h:163
unsigned int tecModule(const DetId &id) const
std::vector< uint32_t > modulesInRingBack_
Definition: TkDetMap.h:169
bool tecIsBackPetal(const DetId &id) const
bool tecIsStereo(const DetId &id) const
std::vector< uint32_t > modulesInRingFront_
Definition: TkDetMap.h:169

◆ getXY_TIB()

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

Definition at line 177 of file TkDetMap.cc.

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().

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 }
unsigned int tibModule(const DetId &id) const
const TrackerTopology * tTopo_
Definition: TkDetMap.h:166
bool tibIsZMinusSide(const DetId &id) const
unsigned int tibString(const DetId &id) const
double lowY_
Definition: TkDetMap.h:165
uint32_t nStringExt_
Definition: TkDetMap.h:170
bool tibIsStereo(const DetId &id) const
double lowX_
Definition: TkDetMap.h:163
std::vector< uint32_t > singleExtStr_
Definition: TkDetMap.h:168
bool tibIsInternalString(const DetId &id) const
unsigned int tibLayer(const DetId &id) const

◆ getXY_TID()

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

Definition at line 203 of file TkDetMap.cc.

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().

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 }
const TrackerTopology * tTopo_
Definition: TkDetMap.h:166
bool tidIsBackRing(const DetId &id) const
double lowY_
Definition: TkDetMap.h:165
double lowX_
Definition: TkDetMap.h:163
bool tidIsZMinusSide(const DetId &id) const
unsigned int tidModule(const DetId &id) const
bool tidIsStereo(const DetId &id) const
unsigned int tidRing(const DetId &id) const

◆ getXY_TOB()

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

Definition at line 192 of file TkDetMap.cc.

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().

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 }
unsigned int tobLayer(const DetId &id) const
bool tobIsZMinusSide(const DetId &id) const
const TrackerTopology * tTopo_
Definition: TkDetMap.h:166
double lowY_
Definition: TkDetMap.h:165
double lowX_
Definition: TkDetMap.h:163
bool tobIsStereo(const DetId &id) const
uint32_t nRod_
Definition: TkDetMap.h:170
unsigned int tobRod(const DetId &id) const
unsigned int tobModule(const DetId &id) const

◆ initMap()

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

Definition at line 9 of file TkDetMap.cc.

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.

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 }
void initMap_TOB(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:75
void initMap_TIB(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:58
Log< level::Error, false > LogError
void initMap_TID(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:93
int layer_
Definition: TkDetMap.h:161
void initMap_TEC(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:117

◆ initMap_TEC()

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

Definition at line 117 of file TkDetMap.cc.

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

Referenced by initMap().

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 }
const TrackerTopology * tTopo_
Definition: TkDetMap.h:166
double lowY_
Definition: TkDetMap.h:165
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)
uint32_t nStringExt_
Definition: TkDetMap.h:170
#define LogTrace(id)
std::size_t bin(std::size_t ix, std::size_t iy) const
Definition: TkDetMap.h:134
double highY_
Definition: TkDetMap.h:165
XYbin getXY_TEC(DetId detid) const
Definition: TkDetMap.cc:215
std::vector< DetId > binToDet_
Definition: TkDetMap.h:172
int layer_
Definition: TkDetMap.h:161

◆ initMap_TIB()

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

Definition at line 58 of file TkDetMap.cc.

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

Referenced by initMap().

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 }
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)
const TrackerTopology * tTopo_
Definition: TkDetMap.h:166
double lowY_
Definition: TkDetMap.h:165
uint32_t nStringExt_
Definition: TkDetMap.h:170
#define LogTrace(id)
std::size_t bin(std::size_t ix, std::size_t iy) const
Definition: TkDetMap.h:134
double highY_
Definition: TkDetMap.h:165
std::vector< DetId > binToDet_
Definition: TkDetMap.h:172
int layer_
Definition: TkDetMap.h:161
XYbin getXY_TIB(DetId detid) const
Definition: TkDetMap.cc:177

◆ initMap_TID()

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

Definition at line 93 of file TkDetMap.cc.

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

Referenced by initMap().

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 }
const TrackerTopology * tTopo_
Definition: TkDetMap.h:166
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)
double lowY_
Definition: TkDetMap.h:165
uint32_t nStringExt_
Definition: TkDetMap.h:170
#define LogTrace(id)
std::size_t bin(std::size_t ix, std::size_t iy) const
Definition: TkDetMap.h:134
double highY_
Definition: TkDetMap.h:165
std::vector< DetId > binToDet_
Definition: TkDetMap.h:172
int layer_
Definition: TkDetMap.h:161
XYbin getXY_TID(DetId detid) const
Definition: TkDetMap.cc:203

◆ initMap_TOB()

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

Definition at line 75 of file TkDetMap.cc.

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

Referenced by initMap().

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 }
const TrackerTopology * tTopo_
Definition: TkDetMap.h:166
double lowY_
Definition: TkDetMap.h:165
uint32_t nStringExt_
Definition: TkDetMap.h:170
#define LogTrace(id)
std::size_t bin(std::size_t ix, std::size_t iy) const
Definition: TkDetMap.h:134
double highY_
Definition: TkDetMap.h:165
std::vector< DetId > binToDet_
Definition: TkDetMap.h:172
int layer_
Definition: TkDetMap.h:161
XYbin getXY_TOB(DetId detid) const
Definition: TkDetMap.cc:192
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)

◆ layerSearch()

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

Definition at line 141 of file TkDetMap.cc.

References INVALID, 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().

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 TkLayerMap::INVALID;
153  }
154 }
unsigned int tobLayer(const DetId &id) const
static constexpr auto TID
Definition: SiStripDetId.h:38
unsigned int tidSide(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
unsigned int tecSide(const DetId &id) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr auto TOB
Definition: SiStripDetId.h:39
static constexpr auto TIB
Definition: SiStripDetId.h:37
unsigned int tibLayer(const DetId &id) const
static constexpr auto TEC
Definition: SiStripDetId.h:40

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