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

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 20 of file TkDetMap.h.

20  { INVALID=0,
21  TIB_L1, TIB_L2, TIB_L3, TIB_L4, //1-4
22  TIDM_D1, TIDM_D2, TIDM_D3, //5-7
23  TIDP_D1, TIDP_D2, TIDP_D3, //8-10
24  TOB_L1, TOB_L2, TOB_L3, TOB_L4, TOB_L5, TOB_L6, //11-16
27  NUMLAYERS }; //35

Constructor & Destructor Documentation

TkLayerMap::TkLayerMap ( )
inline

Definition at line 29 of file TkDetMap.h.

29 {}
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 31 of file TkDetMap.h.

References binForRing_, binToDet_, highX_, highY_, initMap(), layer_, lowX_, lowY_, modulesInRingBack_, modulesInRingFront_, nchX_, nchY_, nRod_, nStringExt_, singleExtStr_, and tTopo_.

35  {}
36  , const std::vector<uint32_t>& modulesInRingFront = {}
37  , const std::vector<uint32_t>& modulesInRingBack = {}
38  , const std::vector<uint32_t>& binForRing = {}
39  , uint32_t nstring_ext = 0, uint32_t nrod = 0
40  )
41  : layer_(layer)
42  , nchX_(nchX), lowX_(lowX), highX_(highX)
43  , nchY_(nchY), lowY_(lowY), highY_(highY)
44  , tTopo_(tTopo)
45  , singleExtStr_(singleExtString)
46  , modulesInRingFront_(modulesInRingFront), modulesInRingBack_(modulesInRingBack)
47  , binForRing_(binForRing)
48  , nStringExt_(nstring_ext), nRod_(nrod)
49  , binToDet_(std::vector<DetId>(std::size_t(nchX*nchY), 0))
50  {
51  initMap(tkDetIdList);
52  }
std::vector< uint32_t > binForRing_
Definition: TkDetMap.h:118
const TrackerTopology * tTopo_
Definition: TkDetMap.h:115
void initMap(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:9
double lowY_
Definition: TkDetMap.h:114
uint32_t nStringExt_
Definition: TkDetMap.h:119
double lowX_
Definition: TkDetMap.h:112
std::vector< uint32_t > modulesInRingBack_
Definition: TkDetMap.h:118
uint32_t nRod_
Definition: TkDetMap.h:119
double highY_
Definition: TkDetMap.h:114
std::vector< uint32_t > singleExtStr_
Definition: TkDetMap.h:117
std::size_t nchX_
Definition: TkDetMap.h:111
std::vector< DetId > binToDet_
Definition: TkDetMap.h:121
int layer_
Definition: TkDetMap.h:110
std::vector< uint32_t > modulesInRingFront_
Definition: TkDetMap.h:118
double highX_
Definition: TkDetMap.h:112
std::size_t nchY_
Definition: TkDetMap.h:113
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 54 of file TkDetMap.h.

References binForRing_, binToDet_, highX_, highY_, initMap(), initMap_TEC(), initMap_TIB(), initMap_TID(), initMap_TOB(), layer_, lowX_, lowY_, modulesInRingBack_, modulesInRingFront_, nchX_, nchY_, nRod_, nStringExt_, singleExtStr_, and tTopo_.

58  {}
59  , std::vector<uint32_t>&& modulesInRingFront = {}
60  , std::vector<uint32_t>&& modulesInRingBack = {}
61  , std::vector<uint32_t>&& binForRing = {}
62  , uint32_t nstring_ext = 0, uint32_t nrod = 0
63  )
64  : layer_(layer)
65  , nchX_(nchX), lowX_(lowX), highX_(highX)
66  , nchY_(nchY), lowY_(lowY), highY_(highY)
67  , tTopo_(tTopo)
68  , singleExtStr_(singleExtString)
69  , modulesInRingFront_(modulesInRingFront), modulesInRingBack_(modulesInRingBack)
70  , binForRing_(binForRing)
71  , nStringExt_(nstring_ext), nRod_(nrod)
72  , binToDet_(std::vector<DetId>(std::size_t(nchX*nchY), 0))
73  {
74  initMap(tkDetIdList);
75  }
std::vector< uint32_t > binForRing_
Definition: TkDetMap.h:118
const TrackerTopology * tTopo_
Definition: TkDetMap.h:115
void initMap(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:9
double lowY_
Definition: TkDetMap.h:114
uint32_t nStringExt_
Definition: TkDetMap.h:119
double lowX_
Definition: TkDetMap.h:112
std::vector< uint32_t > modulesInRingBack_
Definition: TkDetMap.h:118
uint32_t nRod_
Definition: TkDetMap.h:119
double highY_
Definition: TkDetMap.h:114
std::vector< uint32_t > singleExtStr_
Definition: TkDetMap.h:117
std::size_t nchX_
Definition: TkDetMap.h:111
std::vector< DetId > binToDet_
Definition: TkDetMap.h:121
int layer_
Definition: TkDetMap.h:110
std::vector< uint32_t > modulesInRingFront_
Definition: TkDetMap.h:118
double highX_
Definition: TkDetMap.h:112
std::size_t nchY_
Definition: TkDetMap.h:113

Member Function Documentation

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

Definition at line 84 of file TkDetMap.h.

References layerSearch(), and nchX_.

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

84 { return (ix-1)+nchX_*(iy-1); }
std::size_t nchX_
Definition: TkDetMap.h:111
double TkLayerMap::get_highX ( ) const
inline

Definition at line 92 of file TkDetMap.h.

References highX_.

92 { return highX_; }
double highX_
Definition: TkDetMap.h:112
double TkLayerMap::get_highY ( ) const
inline

Definition at line 94 of file TkDetMap.h.

References highY_.

94 { return highY_; }
double highY_
Definition: TkDetMap.h:114
double TkLayerMap::get_lowX ( ) const
inline

Definition at line 91 of file TkDetMap.h.

References lowX_.

91 { return lowX_; }
double lowX_
Definition: TkDetMap.h:112
double TkLayerMap::get_lowY ( ) const
inline

Definition at line 93 of file TkDetMap.h.

References lowY_.

93 { return lowY_; }
double lowY_
Definition: TkDetMap.h:114
std::size_t TkLayerMap::get_nchX ( ) const
inline

Definition at line 89 of file TkDetMap.h.

References nchX_.

89 { return nchX_; }
std::size_t nchX_
Definition: TkDetMap.h:111
std::size_t TkLayerMap::get_nchY ( ) const
inline

Definition at line 90 of file TkDetMap.h.

References nchY_.

90 { return nchY_; }
std::size_t nchY_
Definition: TkDetMap.h:113
const std::vector<DetId>& TkLayerMap::getBinToDet ( ) const
inline

Definition at line 95 of file TkDetMap.h.

References binToDet_.

95 { return binToDet_; }
std::vector< DetId > binToDet_
Definition: TkDetMap.h:121
DetId TkLayerMap::getDetFromBin ( int  ix,
int  iy 
) const
inline

Definition at line 97 of file TkDetMap.h.

References bin(), binToDet_, getXY(), getXY_TEC(), getXY_TIB(), getXY_TID(), getXY_TOB(), training_settings::idx, INVALID, nchX_, and nchY_.

Referenced by TkDetMap::getDetFromBin().

97  {
98  const auto idx = bin(ix, iy);
99  return ( idx < nchX_*nchY_ ) ? binToDet_[idx] : DetId(0);
100  }
std::size_t nchX_
Definition: TkDetMap.h:111
std::vector< DetId > binToDet_
Definition: TkDetMap.h:121
Definition: DetId.h:18
std::size_t bin(std::size_t ix, std::size_t iy) const
Definition: TkDetMap.h:84
std::size_t nchY_
Definition: TkDetMap.h:113
const TkLayerMap::XYbin TkLayerMap::getXY ( DetId  detid,
int  layerEnumNb = TkLayerMap::INVALID 
) const

Definition at line 139 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_.

Referenced by getDetFromBin(), and TkDetMap::getDetsForLayer().

140 {
141  LogTrace("TkLayerMap") << "[TkLayerMap::getXY] " << detid.rawId() << " layer " << layerEnumNb;
142 
143  if ( ! layerEnumNb ) layerEnumNb = layerSearch(detid, tTopo_);
144 
145  if ( layerEnumNb != layer_ )
146  throw cms::Exception("CorruptedData")
147  << "[TkLayerMap::getXY] Fill of DetId " << detid.rawId() << " layerEnumNb " << layerEnumNb << " are requested to wrong TkLayerMap " << layer_ << " \nPlease check the TkDetMap code";
148 
149  if ( layerEnumNb >= TkLayerMap::TIB_L1 && layerEnumNb <= TkLayerMap::TIB_L4 )
150  return getXY_TIB(detid);
151  else if ( layerEnumNb >= TkLayerMap::TIDM_D1 && layerEnumNb <= TkLayerMap::TIDP_D3 )
152  return getXY_TID(detid);
153  else if ( layerEnumNb >= TkLayerMap::TOB_L1 && layerEnumNb <= TkLayerMap::TOB_L6 )
154  return getXY_TOB(detid);
155  else
156  return getXY_TEC(detid);
157 }
const TrackerTopology * tTopo_
Definition: TkDetMap.h:115
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
static const int16_t layerSearch(DetId detid, const TrackerTopology *tTopo)
Definition: TkDetMap.cc:123
XYbin getXY_TID(DetId detid) const
Definition: TkDetMap.cc:196
XYbin getXY_TIB(DetId detid) const
Definition: TkDetMap.cc:159
#define LogTrace(id)
int layer_
Definition: TkDetMap.h:110
XYbin getXY_TEC(DetId detid) const
Definition: TkDetMap.cc:212
XYbin getXY_TOB(DetId detid) const
Definition: TkDetMap.cc:180
TkLayerMap::XYbin TkLayerMap::getXY_TEC ( DetId  detid) const
private

Definition at line 212 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 getDetFromBin(), getXY(), and initMap_TEC().

213 {
214  XYbin xyb;
215  xyb.ix = ( ( tTopo_->tecIsZMinusSide(detid) ?
216  binForRing_[7]-binForRing_[tTopo_->tecRing(detid)]+1 :
217  binForRing_[tTopo_->tecRing(detid)] )
218  + ( tTopo_->tecIsStereo(detid) ?
219  ( tTopo_->tecIsZMinusSide(detid) ? -1 : 1 ) : 0 ) );
220 
221  xyb.iy = ( (tTopo_->tecPetalNumber(detid)-1)*(modulesInRingFront_[tTopo_->tecRing(detid)] + modulesInRingBack_[tTopo_->tecRing(detid)])
222  + ( tTopo_->tecIsZMinusSide(detid) ?
224  + ( tTopo_->tecIsBackPetal(detid) ? modulesInRingBack_[tTopo_->tecRing(detid)] : 0 )
225  : tTopo_->tecModule(detid) + ( tTopo_->tecIsBackPetal(detid) ? modulesInRingFront_[tTopo_->tecRing(detid)] : 0 ) ) );
226 
227  xyb.x = lowX_+xyb.ix-0.5;
228  xyb.y = lowY_+xyb.iy-0.5;
229 
230  return xyb;
231 }
std::vector< uint32_t > binForRing_
Definition: TkDetMap.h:118
const TrackerTopology * tTopo_
Definition: TkDetMap.h:115
unsigned int tecRing(const DetId &id) const
ring id
double lowY_
Definition: TkDetMap.h:114
double lowX_
Definition: TkDetMap.h:112
bool tecIsZMinusSide(const DetId &id) const
bool tecIsStereo(const DetId &id) const
std::vector< uint32_t > modulesInRingBack_
Definition: TkDetMap.h:118
unsigned int tecModule(const DetId &id) const
bool tecIsBackPetal(const DetId &id) const
std::vector< uint32_t > modulesInRingFront_
Definition: TkDetMap.h:118
unsigned int tecPetalNumber(const DetId &id) const
TkLayerMap::XYbin TkLayerMap::getXY_TIB ( DetId  detid) const
private

Definition at line 159 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 getDetFromBin(), getXY(), and initMap_TIB().

160 {
161  XYbin xyb;
162  xyb.ix = ( 2*( tTopo_->tibIsZMinusSide(detid) ?
163  -1*tTopo_->tibModule(detid)+3 :
164  tTopo_->tibModule(detid)+2 )
165  + ( tTopo_->tibLayer(detid) % 2 ?
166  ( tTopo_->tibIsInternalString(detid) ? 2 : 1 ) :
167  ( tTopo_->tibIsInternalString(detid) ? 1 : 2 ) ) );
168  xyb.iy = ( ( tTopo_->tibIsInternalString(detid) ?
169  tTopo_->tibString(detid)+singleExtStr_[tTopo_->tibString(detid)] :
170  tTopo_->tibString(detid) )
171  + ( ( tTopo_->tibLayer(detid) < 3 ) && ( ! tTopo_->tibIsStereo(detid) ) ?
172  nStringExt_+2 : 0 ) );
173 
174  xyb.x = lowX_+xyb.ix-0.5;
175  xyb.y = lowY_+xyb.iy-0.5;
176 
177  return xyb;
178 }
unsigned int tibLayer(const DetId &id) const
unsigned int tibString(const DetId &id) const
const TrackerTopology * tTopo_
Definition: TkDetMap.h:115
double lowY_
Definition: TkDetMap.h:114
uint32_t nStringExt_
Definition: TkDetMap.h:119
double lowX_
Definition: TkDetMap.h:112
bool tibIsZMinusSide(const DetId &id) const
std::vector< uint32_t > singleExtStr_
Definition: TkDetMap.h:117
unsigned int tibModule(const DetId &id) const
bool tibIsStereo(const DetId &id) const
bool tibIsInternalString(const DetId &id) const
TkLayerMap::XYbin TkLayerMap::getXY_TID ( DetId  detid) const
private

Definition at line 196 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 getDetFromBin(), getXY(), and initMap_TID().

197 {
198  XYbin xyb;
199  xyb.ix = ( ( tTopo_->tidIsZMinusSide(detid) ?
200  -3*tTopo_->tidRing(detid)+10 :
201  3*tTopo_->tidRing(detid)-2 )
202  + ( tTopo_->tidIsStereo(detid) ?
203  ( tTopo_->tidIsZMinusSide(detid) ? -1 : 1 ) : 0 ) );
204  xyb.iy = 2*tTopo_->tidModule(detid) - ( tTopo_->tidIsBackRing(detid) ? 0 : 1 );
205 
206  xyb.x = lowX_+xyb.ix-0.5;
207  xyb.y = lowY_+xyb.iy-0.5;
208 
209  return xyb;
210 }
unsigned int tidRing(const DetId &id) const
const TrackerTopology * tTopo_
Definition: TkDetMap.h:115
double lowY_
Definition: TkDetMap.h:114
double lowX_
Definition: TkDetMap.h:112
bool tidIsStereo(const DetId &id) const
bool tidIsZMinusSide(const DetId &id) const
unsigned int tidModule(const DetId &id) const
bool tidIsBackRing(const DetId &id) const
TkLayerMap::XYbin TkLayerMap::getXY_TOB ( DetId  detid) const
private

Definition at line 180 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 getDetFromBin(), getXY(), and initMap_TOB().

181 {
182  XYbin xyb;
183  xyb.ix = ( tTopo_->tobIsZMinusSide(detid) ?
184  -1*tTopo_->tobModule(detid)+7 :
185  tTopo_->tobModule(detid)+6 );
186  xyb.iy = ( tTopo_->tobRod(detid)
187  + ( tTopo_->tobLayer(detid) < 3 && ! tTopo_->tobIsStereo(detid) ?
188  nRod_+2 : 0 ) );
189 
190  xyb.x = lowX_+xyb.ix-0.5;
191  xyb.y = lowY_+xyb.iy-0.5;
192 
193  return xyb;
194 }
bool tobIsStereo(const DetId &id) const
const TrackerTopology * tTopo_
Definition: TkDetMap.h:115
double lowY_
Definition: TkDetMap.h:114
double lowX_
Definition: TkDetMap.h:112
uint32_t nRod_
Definition: TkDetMap.h:119
bool tobIsZMinusSide(const DetId &id) const
unsigned int tobModule(const DetId &id) const
unsigned int tobRod(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
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.

Referenced by TkLayerMap().

10 {
11  switch(layer_) {
12  case TkLayerMap::TIB_L1:
13  case TkLayerMap::TIB_L2:
14  case TkLayerMap::TIB_L3:
15  case TkLayerMap::TIB_L4:
16  initMap_TIB(TkDetIdList);
17  break;
24  initMap_TID(TkDetIdList);
25  break;
26  case TkLayerMap::TOB_L1:
27  case TkLayerMap::TOB_L2:
28  case TkLayerMap::TOB_L3:
29  case TkLayerMap::TOB_L4:
30  case TkLayerMap::TOB_L5:
31  case TkLayerMap::TOB_L6:
32  initMap_TOB(TkDetIdList);
33  break;
52  initMap_TEC(TkDetIdList);
53  break;
54  default:
55  edm::LogError("TkLayerMap") << " TkLayerMap::requested creation of a wrong layer Nb " << layer_;
56  }
57 }
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:59
void initMap_TID(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:91
int layer_
Definition: TkDetMap.h:110
void initMap_TEC(const std::vector< uint32_t > &tkDetIdList)
Definition: TkDetMap.cc:107
void TkLayerMap::initMap_TEC ( const std::vector< uint32_t > &  tkDetIdList)
private

Definition at line 107 of file TkDetMap.cc.

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

Referenced by initMap(), and TkLayerMap().

108 {
109  //extract vector of module in the layer
110  std::vector<uint32_t> LayerDetIdList;
111  SiStripSubStructure::getTECDetectors(TkDetIdList, LayerDetIdList, tTopo_, (layer_-TkLayerMap::TECM_W1)/9+1, (layer_-TkLayerMap::TECM_W1)%9+1, 0, 0);
112 
113  LogTrace("TkLayerMap") << "[TkLayerMap::createTEC] layer side " << (layer_-TkLayerMap::TECM_W1)/9+1 << " " << (layer_-TkLayerMap::TECM_W1)%9+1 << " number of dets " << LayerDetIdList.size() << " lowY " << lowY_ << " high " << highY_ << " Nstring " << nStringExt_;
114 
115  for ( uint32_t det : LayerDetIdList ) {
116  const auto xyb = getXY_TEC(det);
117  binToDet_[bin(xyb.ix, xyb.iy)] = det;
118 
119  LogTrace("TkLayerMap") << "[TkLayerMap::createTEC] " << det << " " << xyb.ix << " " << xyb.iy << " " << xyb.x << " " << xyb.y;
120  }
121 }
const TrackerTopology * tTopo_
Definition: TkDetMap.h:115
double lowY_
Definition: TkDetMap.h:114
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:119
double highY_
Definition: TkDetMap.h:114
#define LogTrace(id)
std::vector< DetId > binToDet_
Definition: TkDetMap.h:121
int layer_
Definition: TkDetMap.h:110
XYbin getXY_TEC(DetId detid) const
Definition: TkDetMap.cc:212
std::size_t bin(std::size_t ix, std::size_t iy) const
Definition: TkDetMap.h:84
void TkLayerMap::initMap_TIB ( const std::vector< uint32_t > &  tkDetIdList)
private

Definition at line 59 of file TkDetMap.cc.

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

Referenced by initMap(), and TkLayerMap().

60 {
61  //extract vector of module in the layer
62  std::vector<uint32_t> LayerDetIdList;
63  SiStripSubStructure::getTIBDetectors(TkDetIdList, LayerDetIdList, tTopo_, layer_, 0, 0, 0);
64 
65  LogTrace("TkLayerMap") << "[TkLayerMap::createTIB12] layer " << layer_ << " number of dets " << LayerDetIdList.size() << " lowY " << lowY_ << " high " << highY_ << " Nstring " << nStringExt_;
66 
67  for ( uint32_t det : LayerDetIdList ) {
68  const auto xyb = getXY_TIB(det);
69  binToDet_[bin(xyb.ix, xyb.iy)] = det;
70 
71  LogTrace("TkLayerMap") << "[TkLayerMap::createTIB] " << det << " " << xyb.ix << " " << xyb.iy << " " << xyb.x << " " << 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:115
double lowY_
Definition: TkDetMap.h:114
uint32_t nStringExt_
Definition: TkDetMap.h:119
XYbin getXY_TIB(DetId detid) const
Definition: TkDetMap.cc:159
double highY_
Definition: TkDetMap.h:114
#define LogTrace(id)
std::vector< DetId > binToDet_
Definition: TkDetMap.h:121
int layer_
Definition: TkDetMap.h:110
std::size_t bin(std::size_t ix, std::size_t iy) const
Definition: TkDetMap.h:84
void TkLayerMap::initMap_TID ( const std::vector< uint32_t > &  tkDetIdList)
private

Definition at line 91 of file TkDetMap.cc.

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

Referenced by initMap(), and TkLayerMap().

92 {
93  //extract vector of module in the layer
94  std::vector<uint32_t> LayerDetIdList;
95  SiStripSubStructure::getTIDDetectors(TkDetIdList, LayerDetIdList, tTopo_, (layer_-TkLayerMap::TIDM_D1)/3+1, (layer_-TkLayerMap::TIDM_D1)%3+1, 0, 0);
96 
97  LogTrace("TkLayerMap") << "[TkLayerMap::createTID] layer side " << (layer_-TkLayerMap::TIDM_D1)/3+1 << " nb " << (layer_-TkLayerMap::TIDM_D1)%3+1 << " number of dets " << LayerDetIdList.size() << " lowY " << lowY_ << " high " << highY_ << " Nstring " << nStringExt_;
98 
99  for ( uint32_t det : LayerDetIdList ) {
100  const auto xyb = getXY_TID(det);
101  binToDet_[bin(xyb.ix, xyb.iy)] = det;
102 
103  LogTrace("TkLayerMap") << "[TkLayerMap::createTID] " << det << " " << xyb.ix << " " << xyb.iy << " " << xyb.x << " " << xyb.y ;
104  }
105 }
const TrackerTopology * tTopo_
Definition: TkDetMap.h:115
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:114
uint32_t nStringExt_
Definition: TkDetMap.h:119
XYbin getXY_TID(DetId detid) const
Definition: TkDetMap.cc:196
double highY_
Definition: TkDetMap.h:114
#define LogTrace(id)
std::vector< DetId > binToDet_
Definition: TkDetMap.h:121
int layer_
Definition: TkDetMap.h:110
std::size_t bin(std::size_t ix, std::size_t iy) const
Definition: TkDetMap.h:84
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(), and TkLayerMap().

76 {
77  //extract vector of module in the layer
78  std::vector<uint32_t> LayerDetIdList;
79  SiStripSubStructure::getTOBDetectors(TkDetIdList, LayerDetIdList, tTopo_, layer_-10, 0, 0);
80 
81  LogTrace("TkLayerMap") << "[TkLayerMap::createTOB] layer " << layer_-10 << " number of dets " << LayerDetIdList.size() << " lowY " << lowY_ << " high " << highY_ << " Nstring " << nStringExt_;
82 
83  for ( uint32_t det : LayerDetIdList ) {
84  const auto xyb = getXY_TOB(det);
85  binToDet_[bin(xyb.ix, xyb.iy)] = det;
86 
87  LogTrace("TkLayerMap") << "[TkLayerMap::createTOB] " << det << " " << xyb.ix << " " << xyb.iy << " " << xyb.x << " " << xyb.y;
88  }
89 }
const TrackerTopology * tTopo_
Definition: TkDetMap.h:115
double lowY_
Definition: TkDetMap.h:114
uint32_t nStringExt_
Definition: TkDetMap.h:119
double highY_
Definition: TkDetMap.h:114
#define LogTrace(id)
std::vector< DetId > binToDet_
Definition: TkDetMap.h:121
int layer_
Definition: TkDetMap.h:110
std::size_t bin(std::size_t ix, std::size_t iy) const
Definition: TkDetMap.h:84
XYbin getXY_TOB(DetId detid) const
Definition: TkDetMap.cc:180
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)
const int16_t TkLayerMap::layerSearch ( DetId  detid,
const TrackerTopology tTopo 
)
static

Definition at line 123 of file TkDetMap.cc.

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 bin(), TkDetMap::findLayer(), and getXY().

124 {
125  switch (detid.subdetId()) {
126  case SiStripDetId::TIB:
127  return TkLayerMap::TIB_L1 -1 + tTopo->tibLayer(detid);
128  case SiStripDetId::TID:
129  return TkLayerMap::TIDM_D1 -1 + (tTopo->tidSide(detid)-1)*3 + tTopo->tidWheel(detid);
130  case SiStripDetId::TOB:
131  return TkLayerMap::TOB_L1 -1 + tTopo->tobLayer(detid);
132  case SiStripDetId::TEC:
133  return TkLayerMap::TECM_W1 -1 + (tTopo->tecSide(detid)-1)*9 + tTopo->tecWheel(detid);
134  default:
135  return 0;
136  }
137 }
unsigned int tibLayer(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int tidSide(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:41
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const

Member Data Documentation

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

Definition at line 118 of file TkDetMap.h.

Referenced by getXY_TEC(), and TkLayerMap().

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

Definition at line 112 of file TkDetMap.h.

Referenced by get_highX(), and TkLayerMap().

double TkLayerMap::highY_
private

Definition at line 114 of file TkDetMap.h.

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

int TkLayerMap::layer_
private

Definition at line 110 of file TkDetMap.h.

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

double TkLayerMap::lowX_
private

Definition at line 112 of file TkDetMap.h.

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

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

Definition at line 118 of file TkDetMap.h.

Referenced by getXY_TEC(), and TkLayerMap().

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

Definition at line 118 of file TkDetMap.h.

Referenced by getXY_TEC(), and TkLayerMap().

std::size_t TkLayerMap::nchX_
private

Definition at line 111 of file TkDetMap.h.

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

std::size_t TkLayerMap::nchY_
private

Definition at line 113 of file TkDetMap.h.

Referenced by get_nchY(), getDetFromBin(), and TkLayerMap().

uint32_t TkLayerMap::nRod_
private

Definition at line 119 of file TkDetMap.h.

Referenced by getXY_TOB(), and TkLayerMap().

uint32_t TkLayerMap::nStringExt_
private

Definition at line 119 of file TkDetMap.h.

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

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

Definition at line 117 of file TkDetMap.h.

Referenced by getXY_TIB(), and TkLayerMap().

const TrackerTopology* TkLayerMap::tTopo_
private