#include <TkDetMap.h>
Public Member Functions | |
int16_t | FindLayer (uint32_t &detid) |
void | getComponents (int &layer, int &nchX, double &lowX, double &highX, int &nchY, double &lowY, double &highY) |
uint32_t | getDetFromBin (int layer, int ix, int iy) |
uint32_t | getDetFromBin (std::string layerName, int ix, int iy) |
void | getDetsForLayer (int layer, std::vector< uint32_t > &output) |
std::string | getLayerName (int &in) |
int | getLayerNum (std::string &in) |
void | getSubDetLayerSide (int &in, SiStripDetId::SubDetector &, uint32_t &layer, uint32_t &side) |
const TkLayerMap::XYbin & | getXY (uint32_t &) |
TkDetMap (const edm::ParameterSet &, const edm::ActivityRegistry &) | |
TkDetMap () | |
~TkDetMap () | |
Private Types | |
typedef std::vector< TkLayerMap * > | detmapType |
Private Member Functions | |
void | doMe () |
Private Attributes | |
uint32_t | cached_detid |
int16_t | cached_layer |
TkLayerMap::XYbin | cached_XYbin |
detmapType | TkMap |
Definition at line 108 of file TkDetMap.h.
typedef std::vector<TkLayerMap*> TkDetMap::detmapType [private] |
Definition at line 136 of file TkDetMap.h.
TkDetMap::TkDetMap | ( | ) |
Definition at line 609 of file TkDetMap.cc.
References doMe().
:cached_detid(0), cached_layer(TkLayerMap::INVALID){ doMe(); }
TkDetMap::TkDetMap | ( | const edm::ParameterSet & | p, |
const edm::ActivityRegistry & | a | ||
) |
Definition at line 603 of file TkDetMap.cc.
References doMe().
:cached_detid(0), cached_layer(TkLayerMap::INVALID){ doMe(); }
TkDetMap::~TkDetMap | ( | ) |
Definition at line 625 of file TkDetMap.cc.
References TkMap.
void TkDetMap::doMe | ( | ) | [private] |
Definition at line 615 of file TkDetMap.cc.
References LogTrace, and TkMap.
Referenced by TkDetMap().
{ LogTrace("TkDetMap") <<"TkDetMap::constructor "; TkMap.resize(35); //Create TkLayerMap for each layer declared in the TkLayerEnum for(int layer=1;layer<35;++layer){ TkMap[layer]=new TkLayerMap(layer); } }
int16_t TkDetMap::FindLayer | ( | uint32_t & | detid | ) |
Definition at line 646 of file TkDetMap.cc.
References cached_detid, cached_layer, cached_XYbin, cond::rpcobgas::detid, TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, TkLayerMap::layerSearch(), LogTrace, and TkMap.
Referenced by TkHistoMap::add(), SiStripMonitorMuonHLT::analyze(), SiStripMonitorMuonHLT::analyzeOnTrackClusters(), TkHistoMap::fill(), SiStripMonitorMuonHLT::GeometryFromTrackGeom(), TkHistoMap::getEntries(), TkHistoMap::getValue(), getXY(), SiStripMonitorMuonHLT::Normalizer(), and TkHistoMap::setBinContent().
{ if(detid==cached_detid) return cached_layer; cached_detid=detid; int16_t layer=TkLayerMap::layerSearch(detid); LogTrace("TkDetMap") <<"[FindLayer] detid "<< detid << " layer " << layer; if(layer!=cached_layer){ cached_layer=layer; } cached_XYbin=TkMap[cached_layer]->getXY(detid,layer); LogTrace("TkDetMap") <<"[FindLayer] detid "<< detid << " cached_XYbin " << cached_XYbin.ix << " "<< cached_XYbin.iy; return cached_layer; }
void TkDetMap::getComponents | ( | int & | layer, |
int & | nchX, | ||
double & | lowX, | ||
double & | highX, | ||
int & | nchY, | ||
double & | lowY, | ||
double & | highY | ||
) |
Definition at line 678 of file KalmanAlignmentAlgorithm.cc.
References Alignable::components(), and KalmanAlignmentAlgorithm::getComponents().
Referenced by TkHistoMap::createTkHistoMap().
{ comps.push_back( ali ); vector<Alignable*> nextComps = ali->components(); vector<Alignable*>::iterator it; for ( it = nextComps.begin(); it != nextComps.end(); ++it ) getComponents( *it, comps ); }
uint32_t TkDetMap::getDetFromBin | ( | std::string | layerName, |
int | ix, | ||
int | iy | ||
) | [inline] |
Definition at line 127 of file TkDetMap.h.
References getDetFromBin(), and getLayerNum().
Referenced by getDetFromBin().
{return getDetFromBin(getLayerNum(layerName),ix,iy);}
uint32_t TkDetMap::getDetFromBin | ( | int | layer, |
int | ix, | ||
int | iy | ||
) | [inline] |
Definition at line 126 of file TkDetMap.h.
References TkMap.
Referenced by TkHistoMap::createTkHistoMap(), TkHistoMap::getDetId(), and SiStripQualityChecker::getModuleStatus().
{ return TkMap[layer]->getDetFromBin(ix,iy); }
void TkDetMap::getDetsForLayer | ( | int | layer, |
std::vector< uint32_t > & | output | ||
) |
Definition at line 677 of file TkDetMap.cc.
References edm::size_(), and TkMap.
Referenced by TkHistoMap::dumpInTkMap(), and SiStripTrackerMapCreator::paintTkMapFromHistogram().
std::string TkDetMap::getLayerName | ( | int & | in | ) |
Definition at line 684 of file TkDetMap.cc.
References TkLayerMap::TECM_W1, TkLayerMap::TECM_W2, TkLayerMap::TECM_W3, TkLayerMap::TECM_W4, TkLayerMap::TECM_W5, TkLayerMap::TECM_W6, TkLayerMap::TECM_W7, TkLayerMap::TECM_W8, TkLayerMap::TECM_W9, TkLayerMap::TECP_W1, TkLayerMap::TECP_W2, TkLayerMap::TECP_W3, TkLayerMap::TECP_W4, TkLayerMap::TECP_W5, TkLayerMap::TECP_W6, TkLayerMap::TECP_W7, TkLayerMap::TECP_W8, TkLayerMap::TECP_W9, TkLayerMap::TIB_L1, TkLayerMap::TIB_L2, TkLayerMap::TIB_L3, TkLayerMap::TIB_L4, TkLayerMap::TIDM_D1, TkLayerMap::TIDM_D2, TkLayerMap::TIDM_D3, TkLayerMap::TIDP_D1, TkLayerMap::TIDP_D2, TkLayerMap::TIDP_D3, TkLayerMap::TOB_L1, TkLayerMap::TOB_L2, TkLayerMap::TOB_L3, TkLayerMap::TOB_L4, TkLayerMap::TOB_L5, and TkLayerMap::TOB_L6.
Referenced by SiStripMonitorMuonHLT::analyze(), SiStripMonitorMuonHLT::analyzeOnTrackClusters(), SiStripMonitorMuonHLT::createMEs(), TkHistoMap::folderDefinition(), SiStripMonitorMuonHLT::GeometryFromTrackGeom(), and SiStripMonitorMuonHLT::Normalizer().
{ switch (in) { case TkLayerMap::TIB_L1: return "TIB_L1"; case TkLayerMap::TIB_L2: return "TIB_L2"; case TkLayerMap::TIB_L3: return "TIB_L3"; case TkLayerMap::TIB_L4: return "TIB_L4"; case TkLayerMap::TIDP_D1: return "TIDP_D1"; case TkLayerMap::TIDP_D2: return "TIDP_D2"; case TkLayerMap::TIDP_D3: return "TIDP_D3"; case TkLayerMap::TIDM_D1: return "TIDM_D1"; case TkLayerMap::TIDM_D2: return "TIDM_D2"; case TkLayerMap::TIDM_D3: return "TIDM_D3"; case TkLayerMap::TOB_L1: return "TOB_L1"; case TkLayerMap::TOB_L2: return "TOB_L2"; case TkLayerMap::TOB_L3: return "TOB_L3"; case TkLayerMap::TOB_L4: return "TOB_L4"; case TkLayerMap::TOB_L5: return "TOB_L5"; case TkLayerMap::TOB_L6: return "TOB_L6"; case TkLayerMap::TECP_W1: return "TECP_W1"; case TkLayerMap::TECP_W2: return "TECP_W2"; case TkLayerMap::TECP_W3: return "TECP_W3"; case TkLayerMap::TECP_W4: return "TECP_W4"; case TkLayerMap::TECP_W5: return "TECP_W5"; case TkLayerMap::TECP_W6: return "TECP_W6"; case TkLayerMap::TECP_W7: return "TECP_W7"; case TkLayerMap::TECP_W8: return "TECP_W8"; case TkLayerMap::TECP_W9: return "TECP_W9"; case TkLayerMap::TECM_W1: return "TECM_W1"; case TkLayerMap::TECM_W2: return "TECM_W2"; case TkLayerMap::TECM_W3: return "TECM_W3"; case TkLayerMap::TECM_W4: return "TECM_W4"; case TkLayerMap::TECM_W5: return "TECM_W5"; case TkLayerMap::TECM_W6: return "TECM_W6"; case TkLayerMap::TECM_W7: return "TECM_W7"; case TkLayerMap::TECM_W8: return "TECM_W8"; case TkLayerMap::TECM_W9: return "TECM_W9"; } return "Invalid"; }
int TkDetMap::getLayerNum | ( | std::string & | in | ) |
Definition at line 759 of file TkDetMap.cc.
References TkLayerMap::TECM_W1, TkLayerMap::TECM_W2, TkLayerMap::TECM_W3, TkLayerMap::TECM_W4, TkLayerMap::TECM_W5, TkLayerMap::TECM_W6, TkLayerMap::TECM_W7, TkLayerMap::TECM_W8, TkLayerMap::TECM_W9, TkLayerMap::TECP_W1, TkLayerMap::TECP_W2, TkLayerMap::TECP_W3, TkLayerMap::TECP_W4, TkLayerMap::TECP_W5, TkLayerMap::TECP_W6, TkLayerMap::TECP_W7, TkLayerMap::TECP_W8, TkLayerMap::TECP_W9, TkLayerMap::TIB_L1, TkLayerMap::TIB_L2, TkLayerMap::TIB_L3, TkLayerMap::TIB_L4, TkLayerMap::TIDM_D1, TkLayerMap::TIDM_D2, TkLayerMap::TIDM_D3, TkLayerMap::TIDP_D1, TkLayerMap::TIDP_D2, TkLayerMap::TIDP_D3, TkLayerMap::TOB_L1, TkLayerMap::TOB_L2, TkLayerMap::TOB_L3, TkLayerMap::TOB_L4, TkLayerMap::TOB_L5, and TkLayerMap::TOB_L6.
Referenced by getDetFromBin(), TkHistoMap::getLayerNum(), and SiStripTrackerMapCreator::paintTkMapFromHistogram().
{ if(in.compare( "TIB_L1")==0) return TkLayerMap::TIB_L1; if(in.compare( "TIB_L2")==0) return TkLayerMap::TIB_L2; if(in.compare( "TIB_L3")==0) return TkLayerMap::TIB_L3; if(in.compare( "TIB_L4")==0) return TkLayerMap::TIB_L4; if(in.compare( "TIDP_D1")==0) return TkLayerMap::TIDP_D1; if(in.compare( "TIDP_D2")==0) return TkLayerMap::TIDP_D2; if(in.compare( "TIDP_D3")==0) return TkLayerMap::TIDP_D3; if(in.compare( "TIDM_D1")==0) return TkLayerMap::TIDM_D1; if(in.compare( "TIDM_D2")==0) return TkLayerMap::TIDM_D2; if(in.compare( "TIDM_D3")==0) return TkLayerMap::TIDM_D3; if(in.compare( "TOB_L1")==0) return TkLayerMap::TOB_L1; if(in.compare( "TOB_L2")==0) return TkLayerMap::TOB_L2; if(in.compare( "TOB_L3")==0) return TkLayerMap::TOB_L3; if(in.compare( "TOB_L4")==0) return TkLayerMap::TOB_L4; if(in.compare( "TOB_L5")==0) return TkLayerMap::TOB_L5; if(in.compare( "TOB_L6")==0) return TkLayerMap::TOB_L6; if(in.compare( "TECP_W1")==0) return TkLayerMap::TECP_W1; if(in.compare( "TECP_W2")==0) return TkLayerMap::TECP_W2; if(in.compare( "TECP_W3")==0) return TkLayerMap::TECP_W3; if(in.compare( "TECP_W4")==0) return TkLayerMap::TECP_W4; if(in.compare( "TECP_W5")==0) return TkLayerMap::TECP_W5; if(in.compare( "TECP_W6")==0) return TkLayerMap::TECP_W6; if(in.compare( "TECP_W7")==0) return TkLayerMap::TECP_W7; if(in.compare( "TECP_W8")==0) return TkLayerMap::TECP_W8; if(in.compare( "TECP_W9")==0) return TkLayerMap::TECP_W9; if(in.compare( "TECM_W1")==0) return TkLayerMap::TECM_W1; if(in.compare( "TECM_W2")==0) return TkLayerMap::TECM_W2; if(in.compare( "TECM_W3")==0) return TkLayerMap::TECM_W3; if(in.compare( "TECM_W4")==0) return TkLayerMap::TECM_W4; if(in.compare( "TECM_W5")==0) return TkLayerMap::TECM_W5; if(in.compare( "TECM_W6")==0) return TkLayerMap::TECM_W6; if(in.compare( "TECM_W7")==0) return TkLayerMap::TECM_W7; if(in.compare( "TECM_W8")==0) return TkLayerMap::TECM_W8; if(in.compare( "TECM_W9")==0) return TkLayerMap::TECM_W9; return 0; }
void TkDetMap::getSubDetLayerSide | ( | int & | in, |
SiStripDetId::SubDetector & | subDet, | ||
uint32_t & | layer, | ||
uint32_t & | side | ||
) |
Definition at line 831 of file TkDetMap.cc.
References sistripsummary::TEC, TkLayerMap::TECM_W1, TkLayerMap::TECM_W2, TkLayerMap::TECM_W3, TkLayerMap::TECM_W4, TkLayerMap::TECM_W5, TkLayerMap::TECM_W6, TkLayerMap::TECM_W7, TkLayerMap::TECM_W8, TkLayerMap::TECM_W9, TkLayerMap::TECP_W1, TkLayerMap::TECP_W2, TkLayerMap::TECP_W3, TkLayerMap::TECP_W4, TkLayerMap::TECP_W5, TkLayerMap::TECP_W6, TkLayerMap::TECP_W7, TkLayerMap::TECP_W8, TkLayerMap::TECP_W9, sistripsummary::TIB, TkLayerMap::TIB_L1, TkLayerMap::TIB_L2, TkLayerMap::TIB_L3, TkLayerMap::TIB_L4, sistripsummary::TID, TkLayerMap::TIDM_D1, TkLayerMap::TIDM_D2, TkLayerMap::TIDM_D3, TkLayerMap::TIDP_D1, TkLayerMap::TIDP_D2, TkLayerMap::TIDP_D3, sistripsummary::TOB, TkLayerMap::TOB_L1, TkLayerMap::TOB_L2, TkLayerMap::TOB_L3, TkLayerMap::TOB_L4, TkLayerMap::TOB_L5, and TkLayerMap::TOB_L6.
Referenced by SiStripMonitorMuonHLT::createMEs(), and TkHistoMap::folderDefinition().
{ switch (in) { case TkLayerMap::TIB_L1: subDet = SiStripDetId::TIB; layer = 1; break; case TkLayerMap::TIB_L2: subDet = SiStripDetId::TIB; layer = 2; break; case TkLayerMap::TIB_L3: subDet = SiStripDetId::TIB; layer = 3; break; case TkLayerMap::TIB_L4: subDet = SiStripDetId::TIB; layer = 4; break; case TkLayerMap::TIDP_D1: subDet = SiStripDetId::TID; layer = 1; side=2; break; case TkLayerMap::TIDP_D2: subDet = SiStripDetId::TID; layer = 2; side=2; break; case TkLayerMap::TIDP_D3: subDet = SiStripDetId::TID; layer = 3; side=2; break; case TkLayerMap::TIDM_D1: subDet = SiStripDetId::TID; layer = 1; side=1; break; case TkLayerMap::TIDM_D2: subDet = SiStripDetId::TID; layer = 2; side=1; break; case TkLayerMap::TIDM_D3: subDet = SiStripDetId::TID; layer = 3; side=1; break; case TkLayerMap::TOB_L1: subDet = SiStripDetId::TOB; layer = 1; break; case TkLayerMap::TOB_L2: subDet = SiStripDetId::TOB; layer = 2; break; case TkLayerMap::TOB_L3: subDet = SiStripDetId::TOB; layer = 3; break; case TkLayerMap::TOB_L4: subDet = SiStripDetId::TOB; layer = 4; break; case TkLayerMap::TOB_L5: subDet = SiStripDetId::TOB; layer = 5; break; case TkLayerMap::TOB_L6: subDet = SiStripDetId::TOB; layer = 6; break; case TkLayerMap::TECP_W1: subDet = SiStripDetId::TEC; layer = 1; side=2; break; case TkLayerMap::TECP_W2: subDet = SiStripDetId::TEC; layer = 2; side=2; break; case TkLayerMap::TECP_W3: subDet = SiStripDetId::TEC; layer = 3; side=2; break; case TkLayerMap::TECP_W4: subDet = SiStripDetId::TEC; layer = 4; side=2; break; case TkLayerMap::TECP_W5: subDet = SiStripDetId::TEC; layer = 5; side=2; break; case TkLayerMap::TECP_W6: subDet = SiStripDetId::TEC; layer = 6; side=2; break; case TkLayerMap::TECP_W7: subDet = SiStripDetId::TEC; layer = 7; side=2; break; case TkLayerMap::TECP_W8: subDet = SiStripDetId::TEC; layer = 8; side=2; break; case TkLayerMap::TECP_W9: subDet = SiStripDetId::TEC; layer = 9; side=2; break; case TkLayerMap::TECM_W1: subDet = SiStripDetId::TEC; layer = 1; side=1; break; case TkLayerMap::TECM_W2: subDet = SiStripDetId::TEC; layer = 2; side=1; break; case TkLayerMap::TECM_W3: subDet = SiStripDetId::TEC; layer = 3; side=1; break; case TkLayerMap::TECM_W4: subDet = SiStripDetId::TEC; layer = 4; side=1; break; case TkLayerMap::TECM_W5: subDet = SiStripDetId::TEC; layer = 5; side=1; break; case TkLayerMap::TECM_W6: subDet = SiStripDetId::TEC; layer = 6; side=1; break; case TkLayerMap::TECM_W7: subDet = SiStripDetId::TEC; layer = 7; side=1; break; case TkLayerMap::TECM_W8: subDet = SiStripDetId::TEC; layer = 8; side=1; break; case TkLayerMap::TECM_W9: subDet = SiStripDetId::TEC; layer = 9; side=1; break; } }
const TkLayerMap::XYbin & TkDetMap::getXY | ( | uint32_t & | detid | ) |
Definition at line 633 of file TkDetMap.cc.
References cached_detid, cached_layer, cached_XYbin, FindLayer(), TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, LogTrace, TkLayerMap::XYbin::x, and TkLayerMap::XYbin::y.
Referenced by TkHistoMap::add(), TkHistoMap::fill(), TkHistoMap::getEntries(), TkHistoMap::getValue(), SiStripTrackerMapCreator::paintTkMapFromHistogram(), and TkHistoMap::setBinContent().
{ LogTrace("TkDetMap") <<"[getXY] detid "<< detid << " cache " << cached_detid << " layer " << cached_layer << " XY " << cached_XYbin.ix << " " << cached_XYbin.iy << " " << cached_XYbin.x << " " << cached_XYbin.y ; if(detid==cached_detid) return cached_XYbin; /*FIXME*/ //if (layer!=INVALID) FindLayer(detid); LogTrace("TkDetMap") <<"[getXY] detid "<< detid << " cache " << cached_detid << " layer " << cached_layer << " XY " << cached_XYbin.ix << " " << cached_XYbin.iy << " " << cached_XYbin.x << " " << cached_XYbin.y ; return cached_XYbin; }
uint32_t TkDetMap::cached_detid [private] |
Definition at line 138 of file TkDetMap.h.
Referenced by FindLayer(), and getXY().
int16_t TkDetMap::cached_layer [private] |
Definition at line 139 of file TkDetMap.h.
Referenced by FindLayer(), and getXY().
TkLayerMap::XYbin TkDetMap::cached_XYbin [private] |
Definition at line 140 of file TkDetMap.h.
Referenced by FindLayer(), and getXY().
detmapType TkDetMap::TkMap [private] |
Definition at line 137 of file TkDetMap.h.
Referenced by doMe(), FindLayer(), getDetFromBin(), getDetsForLayer(), and ~TkDetMap().