CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

TkLayerMap Class Reference

#include <TkDetMap.h>

List of all members.

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
}

Public Member Functions

double & get_highX ()
double & get_highY ()
double & get_lowX ()
double & get_lowY ()
int & get_nchX ()
int & get_nchY ()
uint32_t * getBinToDet ()
uint32_t getDetFromBin (int ix, int iy)
const XYbin getXY (uint32_t &detid, int layerEnumNb=0)
 TkLayerMap (int in)
 ~TkLayerMap ()

Static Public Member Functions

static const int16_t layerSearch (uint32_t detid)

Private Member Functions

void createTEC (std::vector< uint32_t > &TkDetIdList, int layer)
void createTIB (std::vector< uint32_t > &TkDetIdList, int layer)
void createTID (std::vector< uint32_t > &TkDetIdList, int layer)
void createTOB (std::vector< uint32_t > &TkDetIdList, int layer)
XYbin getXY_TEC (uint32_t &detid, int layerEnumNb=0)
XYbin getXY_TIB (uint32_t &detid, int layerEnumNb=0)
XYbin getXY_TID (uint32_t &detid, int layerEnumNb=0)
XYbin getXY_TOB (uint32_t &detid, int layerEnumNb=0)
void initialize (int layer)

Private Attributes

std::vector< uint32_t > BinForRing
uint32_t * binToDet
double highX
double highY
int layerEnumNb_
double lowX
double lowY
std::vector< uint32_t > ModulesInRingBack
std::vector< uint32_t > ModulesInRingFront
int nchX
int nchY
uint32_t Nrod
uint32_t Nstring_ext
uint32_t Offset
std::vector< uint32_t > SingleExtString
XYbin xybin

Detailed Description

Definition at line 11 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 

Definition at line 22 of file TkDetMap.h.


Constructor & Destructor Documentation

TkLayerMap::TkLayerMap ( int  in)

Definition at line 14 of file TkDetMap.cc.

References createTEC(), createTIB(), createTID(), createTOB(), SiStripDetInfoFileReader::getAllDetIds(), recoMuon::in, initialize(), layerEnumNb_, LogTrace, cmsCodeRules::cppFunctionSkipper::operator, 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.

                            :layerEnumNb_(in){

  LogTrace("TkLayerMap") <<" TkLayerMap::constructor for layer " << in;

  initialize(layerEnumNb_);

 if(!edm::Service<SiStripDetInfoFileReader>().isAvailable()){
    edm::LogError("TkLayerMap") << 
      "\n------------------------------------------"
      "\nUnAvailable Service SiStripDetInfoFileReader: please insert in the configuration file an instance like"
      "\n\tprocess.SiStripDetInfoFileReader = cms.Service(\"SiStripDetInfoFileReader\")"
      "\n------------------------------------------";
  }
 
  SiStripDetInfoFileReader * fr=edm::Service<SiStripDetInfoFileReader>().operator->();

  std::vector<uint32_t> TkDetIdList=fr->getAllDetIds();
  
  switch (layerEnumNb_)
    {
    case TkLayerMap::TIB_L1:
    case TkLayerMap::TIB_L2:
    case TkLayerMap::TIB_L3:
    case TkLayerMap::TIB_L4:         
      createTIB(TkDetIdList,layerEnumNb_);
      break;
    case TkLayerMap::TIDP_D1:
    case TkLayerMap::TIDP_D2:
    case TkLayerMap::TIDP_D3:
    case TkLayerMap::TIDM_D1:
    case TkLayerMap::TIDM_D2:
    case TkLayerMap::TIDM_D3:
      createTID(TkDetIdList,layerEnumNb_); 
      break;
    case TkLayerMap::TOB_L1:
    case TkLayerMap::TOB_L2:
    case TkLayerMap::TOB_L3:
    case TkLayerMap::TOB_L4:
    case TkLayerMap::TOB_L5:
    case TkLayerMap::TOB_L6:
      createTOB(TkDetIdList,layerEnumNb_); 
    break;
    case TkLayerMap::TECP_W1:
    case TkLayerMap::TECP_W2:
    case TkLayerMap::TECP_W3:
    case TkLayerMap::TECP_W4:
    case TkLayerMap::TECP_W5: 
    case TkLayerMap::TECP_W6:
    case TkLayerMap::TECP_W7:
    case TkLayerMap::TECP_W8:
    case TkLayerMap::TECP_W9:
    case TkLayerMap::TECM_W1:
    case TkLayerMap::TECM_W2:
    case TkLayerMap::TECM_W3:
    case TkLayerMap::TECM_W4:
    case TkLayerMap::TECM_W5: 
    case TkLayerMap::TECM_W6:
    case TkLayerMap::TECM_W7:
    case TkLayerMap::TECM_W8:
    case TkLayerMap::TECM_W9:
      createTEC(TkDetIdList,layerEnumNb_); 
      break;
    default:
      edm::LogError("TkLayerMap") <<" TkLayerMap::requested creation of a wrong layer Nb "<< layerEnumNb_; 
    }
}
TkLayerMap::~TkLayerMap ( ) [inline]

Definition at line 61 of file TkDetMap.h.

References binToDet.

               {
    delete [] binToDet;
  };

Member Function Documentation

void TkLayerMap::createTEC ( std::vector< uint32_t > &  TkDetIdList,
int  layer 
) [private]

Definition at line 487 of file TkDetMap.cc.

References binToDet, SiStripSubStructure::getTECDetectors(), getXY_TEC(), highY, TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, j, LogTrace, lowY, nchX, Nstring_ext, TECM_W1, TkLayerMap::XYbin::x, xybin, and TkLayerMap::XYbin::y.

Referenced by TkLayerMap().

                                                                          {
  
  std::vector<uint32_t> LayerDetIdList;
  SiStripSubStructure siStripSubStructure;
  
  //extract  vector of module in the layer
  siStripSubStructure.getTECDetectors(TkDetIdList,LayerDetIdList,(layerEnumNb-TkLayerMap::TECM_W1)/9+1,(layerEnumNb-TkLayerMap::TECM_W1)%9+1,0,0);
  
  LogTrace("TkLayerMap") << "[TkLayerMap::createTEC] layer side " << (layerEnumNb-TkLayerMap::TECM_W1)/9+1 << " " << (layerEnumNb-TkLayerMap::TECM_W1)%9+1  << " number of dets " << LayerDetIdList.size() << " lowY " << lowY << " high " << highY << " Nstring " << Nstring_ext;

  for(size_t j=0;j<LayerDetIdList.size();++j){
    xybin=getXY_TEC(LayerDetIdList[j],layerEnumNb);
    binToDet[(xybin.ix-1)+nchX*(xybin.iy-1)]=LayerDetIdList[j];
    LogTrace("TkLayerMap") << "[TkLayerMap::createTEC] " << LayerDetIdList[j]<< " " << xybin.ix << " " << xybin.iy  << " " << xybin.x << " " << xybin.y ;
    
  }
}
void TkLayerMap::createTIB ( std::vector< uint32_t > &  TkDetIdList,
int  layer 
) [private]

Definition at line 436 of file TkDetMap.cc.

References binToDet, SiStripSubStructure::getTIBDetectors(), getXY_TIB(), highY, TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, j, LogTrace, lowY, nchX, Nstring_ext, TkLayerMap::XYbin::x, xybin, and TkLayerMap::XYbin::y.

Referenced by TkLayerMap().

                                                                          {
  
  std::vector<uint32_t> LayerDetIdList;
  SiStripSubStructure siStripSubStructure;
  
  //extract  vector of module in the layer
  siStripSubStructure.getTIBDetectors(TkDetIdList,LayerDetIdList,layerEnumNb,0,0,0);

  LogTrace("TkLayerMap") << "[TkLayerMap::createTIB12] layer " << layerEnumNb  << " number of dets " << LayerDetIdList.size() << " lowY " << lowY << " high " << highY << " Nstring " << Nstring_ext;

  for(size_t j=0;j<LayerDetIdList.size();++j){
    xybin=getXY_TIB(LayerDetIdList[j],layerEnumNb);
    binToDet[(xybin.ix-1)+nchX*(xybin.iy-1)]=LayerDetIdList[j];
    LogTrace("TkLayerMap") << "[TkLayerMap::createTIB] " << LayerDetIdList[j]<< " " << xybin.ix << " " << xybin.iy  << " " << xybin.x << " " << xybin.y ;
  }
}
void TkLayerMap::createTID ( std::vector< uint32_t > &  TkDetIdList,
int  layer 
) [private]

Definition at line 470 of file TkDetMap.cc.

References binToDet, SiStripSubStructure::getTIDDetectors(), getXY_TID(), highY, TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, j, LogTrace, lowY, nchX, Nstring_ext, TIDM_D1, TkLayerMap::XYbin::x, xybin, and TkLayerMap::XYbin::y.

Referenced by TkLayerMap().

                                                                          {
  
  std::vector<uint32_t> LayerDetIdList;
  SiStripSubStructure siStripSubStructure;
  
  //extract  vector of module in the layer
  siStripSubStructure.getTIDDetectors(TkDetIdList,LayerDetIdList,(layerEnumNb-TkLayerMap::TIDM_D1)/3+1,(layerEnumNb-TkLayerMap::TIDM_D1)%3+1,0,0);

  LogTrace("TkLayerMap") << "[TkLayerMap::createTID] layer side " << (layerEnumNb-TkLayerMap::TIDM_D1)/3+1 << " nb " << (layerEnumNb-TkLayerMap::TIDM_D1)%3+1  << " number of dets " << LayerDetIdList.size() << " lowY " << lowY << " high " << highY << " Nstring " << Nstring_ext;
  
  for(size_t j=0;j<LayerDetIdList.size();++j){
    xybin=getXY_TID(LayerDetIdList[j],layerEnumNb);
    binToDet[(xybin.ix-1)+nchX*(xybin.iy-1)]=LayerDetIdList[j];
    LogTrace("TkLayerMap") << "[TkLayerMap::createTID] " << LayerDetIdList[j]<< " " << xybin.ix << " " << xybin.iy  << " " << xybin.x << " " << xybin.y ;
  }
}
void TkLayerMap::createTOB ( std::vector< uint32_t > &  TkDetIdList,
int  layer 
) [private]

Definition at line 453 of file TkDetMap.cc.

References binToDet, SiStripSubStructure::getTOBDetectors(), getXY_TOB(), highY, TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, j, LogTrace, lowY, nchX, Nstring_ext, TkLayerMap::XYbin::x, xybin, and TkLayerMap::XYbin::y.

Referenced by TkLayerMap().

                                                                          {
  
  std::vector<uint32_t> LayerDetIdList;
  SiStripSubStructure siStripSubStructure;
  
  //extract  vector of module in the layer
  siStripSubStructure.getTOBDetectors(TkDetIdList,LayerDetIdList,layerEnumNb-10,0,0);

  LogTrace("TkLayerMap") << "[TkLayerMap::createTOB] layer " << layerEnumNb-10  << " number of dets " << LayerDetIdList.size() << " lowY " << lowY << " high " << highY << " Nstring " << Nstring_ext;

  for(size_t j=0;j<LayerDetIdList.size();++j){
    xybin=getXY_TOB(LayerDetIdList[j],layerEnumNb);
    binToDet[(xybin.ix-1)+nchX*(xybin.iy-1)]=LayerDetIdList[j];
    LogTrace("TkLayerMap") << "[TkLayerMap::createTOB] " << LayerDetIdList[j]<< " " << xybin.ix << " " << xybin.iy  << " " << xybin.x << " " << xybin.y ;
  }
}
double& TkLayerMap::get_highX ( ) [inline]

Definition at line 70 of file TkDetMap.h.

References highX.

{return highX;}
double& TkLayerMap::get_highY ( ) [inline]

Definition at line 72 of file TkDetMap.h.

References highY.

{return highY;}
double& TkLayerMap::get_lowX ( ) [inline]

Definition at line 69 of file TkDetMap.h.

References lowX.

{return lowX;}
double& TkLayerMap::get_lowY ( ) [inline]

Definition at line 71 of file TkDetMap.h.

References lowY.

{return lowY;}
int& TkLayerMap::get_nchX ( ) [inline]

Definition at line 67 of file TkDetMap.h.

References nchX.

{return nchX;}
int& TkLayerMap::get_nchY ( ) [inline]

Definition at line 68 of file TkDetMap.h.

References nchY.

{return nchY;}
uint32_t* TkLayerMap::getBinToDet ( ) [inline]

Definition at line 77 of file TkDetMap.h.

References binToDet.

{return binToDet;}
uint32_t TkLayerMap::getDetFromBin ( int  ix,
int  iy 
)

Definition at line 81 of file TkDetMap.cc.

References binToDet, nchX, and nchY.

                                                {
  
  int val=(ix-1)+nchX*(iy-1);
  if(val>-1 && val < nchX*nchY)
    return binToDet[val];
  return 0;
}
const TkLayerMap::XYbin TkLayerMap::getXY ( uint32_t &  detid,
int  layerEnumNb = 0 
)

Definition at line 506 of file TkDetMap.cc.

References Exception, getXY_TEC(), getXY_TIB(), getXY_TID(), getXY_TOB(), layerEnumNb_, layerSearch(), LogTrace, TIB_L1, TIB_L4, TIDM_D1, TIDP_D3, TOB_L1, and TOB_L6.

                                                                       {
  LogTrace("TkLayerMap") << "[TkLayerMap::getXY] " << detid << " layer " << layerEnumNb; 

  if(!layerEnumNb)
    layerEnumNb=layerSearch(detid);

  if(layerEnumNb!=layerEnumNb_)
    throw cms::Exception("CorruptedData")
      << "[TkLayerMap::getXY] Fill of DetId " << detid << " layerEnumNb " << layerEnumNb << " are requested to wrong TkLayerMap " << layerEnumNb_ << " \nPlease check the TkDetMap code"; 
 

  if(layerEnumNb>=TkLayerMap::TIB_L1 && layerEnumNb<=TkLayerMap::TIB_L4)  
    return getXY_TIB(detid,layerEnumNb);
  else if(layerEnumNb>=TkLayerMap::TIDM_D1 && layerEnumNb<=TkLayerMap::TIDP_D3)  
    return getXY_TID(detid,layerEnumNb); 
  else if(layerEnumNb>=TkLayerMap::TOB_L1 && layerEnumNb<=TkLayerMap::TOB_L6)  
    return getXY_TOB(detid,layerEnumNb); 
  else 
    return getXY_TEC(detid,layerEnumNb); 
}
TkLayerMap::XYbin TkLayerMap::getXY_TEC ( uint32_t &  detid,
int  layerEnumNb = 0 
) [private]

Definition at line 577 of file TkDetMap.cc.

References BinForRing, funct::D, TECDetId::isBackPetal(), TECDetId::isStereo(), TECDetId::isZMinusSide(), TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, layerSearch(), lowX, lowY, TECDetId::moduleNumber(), ModulesInRingBack, ModulesInRingFront, TECDetId::petalNumber(), TECDetId::ring(), TkLayerMap::XYbin::x, xybin, and TkLayerMap::XYbin::y.

Referenced by createTEC(), and getXY().

                                                                     {  
  if(!layerEnumNb)
    layerEnumNb=layerSearch(detid);

  TECDetId D(detid);
  xybin.ix=D.isZMinusSide()?BinForRing[7]-BinForRing[D.ring()]+1:BinForRing[D.ring()]; //after the introduction of plus and minus histos, the BinForRing should have been changed. on the contrary we hack this part of the code 
  if(D.isStereo())
    xybin.ix+=(D.isZMinusSide()?-1:1);

  if(D.isZMinusSide()){
    xybin.iy= (D.petalNumber()-1)*(ModulesInRingFront[D.ring()]+ModulesInRingBack[D.ring()]) + ModulesInRingFront[D.ring()] - D.moduleNumber() +1;
    if(D.isBackPetal())
      xybin.iy+=ModulesInRingBack[D.ring()];
  }else{ 
    xybin.iy= (D.petalNumber()-1)*(ModulesInRingFront[D.ring()]+ModulesInRingBack[D.ring()])+D.moduleNumber();
    if(D.isBackPetal())
      xybin.iy+=ModulesInRingFront[D.ring()];
  }

  xybin.x=lowX+xybin.ix-0.5;
  xybin.y=lowY+xybin.iy-0.5;
  return xybin;
}
TkLayerMap::XYbin TkLayerMap::getXY_TIB ( uint32_t &  detid,
int  layerEnumNb = 0 
) [private]

Definition at line 527 of file TkDetMap.cc.

References funct::D, TIBDetId::isInternalString(), TIBDetId::isStereo(), TIBDetId::isZMinusSide(), TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, TIBDetId::layerNumber(), layerSearch(), lowX, lowY, TIBDetId::moduleNumber(), Nstring_ext, Offset, SingleExtString, TIBDetId::stringNumber(), TkLayerMap::XYbin::x, xybin, and TkLayerMap::XYbin::y.

Referenced by createTIB(), and getXY().

                                                                     {  
  if(!layerEnumNb)
    layerEnumNb=layerSearch(detid);

  TIBDetId D(detid);
  if(D.layerNumber()%2){
    Offset=D.isInternalString()?2:1;
  }else{
    Offset=D.isInternalString()?1:2;
  }
  xybin.ix=2*(D.isZMinusSide()?-1*D.moduleNumber()+3:D.moduleNumber()+2)+Offset;
  xybin.iy=D.isInternalString()?D.stringNumber()+SingleExtString[D.stringNumber()]:D.stringNumber();
  if(D.layerNumber()<3 && !D.isStereo())
    xybin.iy+=Nstring_ext+2;
  
  xybin.x=lowX+xybin.ix-0.5;
  xybin.y=lowY+xybin.iy-0.5;
  return xybin;
}
TkLayerMap::XYbin TkLayerMap::getXY_TID ( uint32_t &  detid,
int  layerEnumNb = 0 
) [private]

Definition at line 562 of file TkDetMap.cc.

References funct::D, TIDDetId::isBackRing(), TIDDetId::isStereo(), TIDDetId::isZMinusSide(), TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, layerSearch(), lowX, lowY, TIDDetId::moduleNumber(), TIDDetId::ring(), TkLayerMap::XYbin::x, xybin, and TkLayerMap::XYbin::y.

Referenced by createTID(), and getXY().

                                                                     {  
  if(!layerEnumNb)
    layerEnumNb=layerSearch(detid);

  TIDDetId D(detid);
  xybin.ix=D.isZMinusSide()?-3*D.ring()+10:3*D.ring()-2;
  if(D.isStereo())
    xybin.ix+=(D.isZMinusSide()?-1:1);
  xybin.iy= int(2. * D.moduleNumber() - (D.isBackRing()?0.:1.));

  xybin.x=lowX+xybin.ix-0.5;
  xybin.y=lowY+xybin.iy-0.5;
  return xybin;
}
TkLayerMap::XYbin TkLayerMap::getXY_TOB ( uint32_t &  detid,
int  layerEnumNb = 0 
) [private]

Definition at line 547 of file TkDetMap.cc.

References funct::D, TOBDetId::isStereo(), TOBDetId::isZMinusSide(), TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, TOBDetId::layerNumber(), layerSearch(), lowX, lowY, TOBDetId::moduleNumber(), Nrod, TOBDetId::rodNumber(), TkLayerMap::XYbin::x, xybin, and TkLayerMap::XYbin::y.

Referenced by createTOB(), and getXY().

                                                                     {  
  if(!layerEnumNb)
    layerEnumNb=layerSearch(detid);

  TOBDetId D(detid);
  xybin.ix=D.isZMinusSide()?-1*D.moduleNumber()+7:D.moduleNumber()+6;
  xybin.iy=D.rodNumber();  
  if(D.layerNumber()<3 && !D.isStereo())
    xybin.iy+=Nrod+2;

  xybin.x=lowX+xybin.ix-0.5;
  xybin.y=lowY+xybin.iy-0.5;
  return xybin;
}
void TkLayerMap::initialize ( int  layer) [private]

Definition at line 108 of file TkDetMap.cc.

References BinForRing, binToDet, highX, highY, i, LogTrace, lowX, lowY, ModulesInRingBack, ModulesInRingFront, nchX, nchY, Nrod, Nstring_ext, SingleExtString, 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().

                                    {

  switch (layer){
  case TkLayerMap::TIB_L1: //TIBL1
    
    Nstring_ext=30;
    SingleExtString.insert(SingleExtString.begin(),8,0);
    SingleExtString.insert(SingleExtString.begin()+8,7,1);
    SingleExtString.insert(SingleExtString.begin()+15,8,2);
    SingleExtString.insert(SingleExtString.begin()+23,7,3);
    nchX=12;
    lowX=-6;
    highX=6;
    nchY=2*(Nstring_ext+1);
    lowY=-1.*(Nstring_ext+1.);
    highY=(Nstring_ext+1);
    
    break;
    case TkLayerMap::TIB_L2:
    
    Nstring_ext=38;
    SingleExtString.insert(SingleExtString.begin(),10,0);
    SingleExtString.insert(SingleExtString.begin()+10,9,1);
    SingleExtString.insert(SingleExtString.begin()+19,10,2);
    SingleExtString.insert(SingleExtString.begin()+29,9,3);
    nchX=12;
    lowX=-6;
    highX=6;
    nchY=2*(Nstring_ext+1);
    lowY=-1.*(Nstring_ext+1.);
    highY=(Nstring_ext+1);

    break;
  case TkLayerMap::TIB_L3:

    Nstring_ext=46; 
    SingleExtString.insert(SingleExtString.begin(),23,0);
    SingleExtString.insert(SingleExtString.begin()+23,23,1);
    nchX=12;
    lowX=-6;
    highX=6;
    nchY=Nstring_ext;
    lowY=0;
    highY=nchY;

    break;
  case TkLayerMap::TIB_L4:

    Nstring_ext=56;
    SingleExtString.insert(SingleExtString.begin(),14,0);
    SingleExtString.insert(SingleExtString.begin()+14,14,1);
    SingleExtString.insert(SingleExtString.begin()+28,14,2);
    SingleExtString.insert(SingleExtString.begin()+42,14,3);
    nchX=12;
    lowX=-6.;
    highX=6.;
    nchY=Nstring_ext;
    lowY=0.;
    highY=nchY;

    break;
  case TkLayerMap::TIDM_D1:  //TID
  case TkLayerMap::TIDM_D2:  //TID
  case TkLayerMap::TIDM_D3:  //TID

    nchX=7;
    lowX=-7.;
    highX=0.;
    nchY=40;
    lowY=0.0;
    highY=1.*nchY;

    break;
  case TkLayerMap::TIDP_D1:  //TID
  case TkLayerMap::TIDP_D2:  //TID
  case TkLayerMap::TIDP_D3:  //TID
    
    nchX=7;
    lowX=0.;
    highX=7.;
    nchY=40;
    lowY=0.0;
    highY=1.*nchY;

    break;
  case TkLayerMap::TOB_L1:  //TOBL1

    Nrod=42;
    nchX=12;
    lowX=-6.;
    highX=6.;
    nchY=2*(Nrod+1);
    lowY=-1.*(Nrod+1.);
    highY=(Nrod+1.);

    break;
  case TkLayerMap::TOB_L2:
    
    Nrod=48;
    nchX=12;
    lowX=-6.;
    highX=6.;
    nchY=int(2.*(Nrod+1.));
    lowY=-1.*(Nrod+1.);
    highY=(Nrod+1.);
    
    break;
  case TkLayerMap::TOB_L3: //TOBL3
   
    Nrod=54;
    nchX=12;
    lowX=-6.;
    highX=6.;
    nchY=Nrod;
    lowY=0.;
    highY=1.*Nrod;
    
    break;
  case TkLayerMap::TOB_L4:
    
    Nrod=60;
    nchX=12;
    lowX=-6.;
    highX=6.;
    nchY=Nrod;
    lowY=0.;
    highY=1.*Nrod;

    break;
  case TkLayerMap::TOB_L5:
    
    Nrod=66;
    nchX=12;
    lowX=-6.;
    highX=6.;
    nchY=Nrod;
    lowY=0.;
    highY=1.*Nrod;

    break;
  case TkLayerMap::TOB_L6:
    
    Nrod=74;
    nchX=12;
    lowX=-6.;
    highX=6.;
    nchY=Nrod;
    lowY=0.;
    highY=1.*Nrod;

    break;
  default: //TEC
    switch (layer){
    case TkLayerMap::TECM_W1:
    case TkLayerMap::TECM_W2:
    case TkLayerMap::TECM_W3:
      nchX=16;
      lowX=-16.;
      highX=0.;
      nchY=80;
      lowY=0.;
      highY=1.*nchY;

      BinForRing.push_back(0); //null value for component 0
      BinForRing.push_back(1);
      BinForRing.push_back(4);
      BinForRing.push_back(7);
      BinForRing.push_back(9);
      BinForRing.push_back(11);
      BinForRing.push_back(14);
      BinForRing.push_back(16);
      break;
    case TkLayerMap::TECM_W4:
    case TkLayerMap::TECM_W5: 
    case TkLayerMap::TECM_W6:
      nchX=13;
      lowX=-16.;
      highX=-3.;
      nchY=80;
      lowY=0.;
      highY=1.*nchY;

      BinForRing.push_back(0); //null value for component 0
      BinForRing.push_back(0);
      BinForRing.push_back(1);
      BinForRing.push_back(4);
      BinForRing.push_back(6);
      BinForRing.push_back(8);
      BinForRing.push_back(11);
      BinForRing.push_back(13);
      break;
    case TkLayerMap::TECM_W7:
    case TkLayerMap::TECM_W8:
      nchX=10;
      lowX=-16.;
      highX=-6.;
      nchY=80;
      lowY=0.;
      highY=1.*nchY;

      BinForRing.push_back(0); //null value for component 0
      BinForRing.push_back(0);
      BinForRing.push_back(0);
      BinForRing.push_back(1);
      BinForRing.push_back(3);
      BinForRing.push_back(5);
      BinForRing.push_back(8);
      BinForRing.push_back(10);
      break;
    case TkLayerMap::TECM_W9:
      nchX=8;
      lowX=-16.;
      highX=-8.;
      nchY=80;
      lowY=0.;
      highY=1.*nchY;

      BinForRing.push_back(0); //null value for component 0
      BinForRing.push_back(0);
      BinForRing.push_back(0);
      BinForRing.push_back(0);
      BinForRing.push_back(1);
      BinForRing.push_back(3);
      BinForRing.push_back(6);
      BinForRing.push_back(8);
      break;
    case TkLayerMap::TECP_W1:
    case TkLayerMap::TECP_W2:
    case TkLayerMap::TECP_W3:
      nchX=16;
      lowX=0.;
      highX=16.;
      nchY=80;
      lowY=0.;
      highY=1.*nchY;

      BinForRing.push_back(0); //null value for component 0
      BinForRing.push_back(1);
      BinForRing.push_back(4);
      BinForRing.push_back(7);
      BinForRing.push_back(9);
      BinForRing.push_back(11);
      BinForRing.push_back(14);
      BinForRing.push_back(16);
      break;
    case TkLayerMap::TECP_W4:
    case TkLayerMap::TECP_W5: 
    case TkLayerMap::TECP_W6:
      nchX=13;
      lowX=3.;
      highX=16.;
      nchY=80;
      lowY=0.;
      highY=1.*nchY;

      BinForRing.push_back(0); //null value for component 0
      BinForRing.push_back(0);
      BinForRing.push_back(1);
      BinForRing.push_back(4);
      BinForRing.push_back(6);
      BinForRing.push_back(8);
      BinForRing.push_back(11);
      BinForRing.push_back(13);
      break;
    case TkLayerMap::TECP_W7:
    case TkLayerMap::TECP_W8:
      nchX=10;
      lowX=6.;
      highX=16.;
      nchY=80;
      lowY=0.;
      highY=1.*nchY;

      BinForRing.push_back(0); //null value for component 0
      BinForRing.push_back(0);
      BinForRing.push_back(0);
      BinForRing.push_back(1);
      BinForRing.push_back(3);
      BinForRing.push_back(5);
      BinForRing.push_back(8);
      BinForRing.push_back(10);
      break;
    case TkLayerMap::TECP_W9:
      nchX=8;
      lowX=8.;
      highX=16.;
      nchY=80;
      lowY=0.;
      highY=1.*nchY;

      BinForRing.push_back(0); //null value for component 0
      BinForRing.push_back(0);
      BinForRing.push_back(0);
      BinForRing.push_back(0);
      BinForRing.push_back(1);
      BinForRing.push_back(3);
      BinForRing.push_back(6);
      BinForRing.push_back(8);
    }


    ModulesInRingFront.push_back(0); //null value for component 0
    ModulesInRingFront.push_back(2);
    ModulesInRingFront.push_back(2);
    ModulesInRingFront.push_back(3);
    ModulesInRingFront.push_back(4);
    ModulesInRingFront.push_back(2);
    ModulesInRingFront.push_back(4);
    ModulesInRingFront.push_back(5);

    ModulesInRingBack.push_back(0); //null value for component 0
    ModulesInRingBack.push_back(1);    
    ModulesInRingBack.push_back(1);    
    ModulesInRingBack.push_back(2);    
    ModulesInRingBack.push_back(3);    
    ModulesInRingBack.push_back(3);    
    ModulesInRingBack.push_back(3);    
    ModulesInRingBack.push_back(5);
  }
  
  for (size_t i=0;i<SingleExtString.size();i++)
    LogTrace("TkLayerMap") << "[initialize SingleExtString["<<i<<"] " << SingleExtString[i];

  binToDet= new uint32_t[nchX*nchY];
  for(size_t i=0;i<(size_t) nchX*nchY;++i)
    binToDet[i]=0;
}
const int16_t TkLayerMap::layerSearch ( uint32_t  detid) [static]

Definition at line 89 of file TkDetMap.cc.

References funct::D, TOBDetId::layerNumber(), TIBDetId::layerNumber(), TIDDetId::side(), TECDetId::side(), SiStripDetId::TEC, TECM_W1, SiStripDetId::TIB, TIB_L1, SiStripDetId::TID, TIDM_D1, SiStripDetId::TOB, TOB_L1, TIDDetId::wheel(), and TECDetId::wheel().

Referenced by TkDetMap::FindLayer(), getXY(), getXY_TEC(), getXY_TIB(), getXY_TID(), and getXY_TOB().

                                                   {
  
    //  switch((detid>>25)&0x7){
  if(SiStripDetId(detid).subDetector()==SiStripDetId::TIB){
    TIBDetId D(detid);
    return TkLayerMap::TIB_L1  -1 +D.layerNumber();
  } else if (SiStripDetId(detid).subDetector()==SiStripDetId::TID){
    TIDDetId D(detid);
    return TkLayerMap::TIDM_D1 -1 + (D.side() -1)*3 + D.wheel();
  } else if (SiStripDetId(detid).subDetector()==SiStripDetId::TOB){
    TOBDetId D(detid);
    return TkLayerMap::TOB_L1  -1 +D.layerNumber();
  } else if (SiStripDetId(detid).subDetector()==SiStripDetId::TEC){
    TECDetId D(detid);
    return TkLayerMap::TECM_W1 -1 + (D.side() -1)*9 + D.wheel();
  }
  return 0;
}

Member Data Documentation

std::vector<uint32_t> TkLayerMap::BinForRing [private]

Definition at line 103 of file TkDetMap.h.

Referenced by getXY_TEC(), and initialize().

uint32_t* TkLayerMap::binToDet [private]
double TkLayerMap::highX [private]

Definition at line 100 of file TkDetMap.h.

Referenced by get_highX(), and initialize().

double TkLayerMap::highY [private]

Definition at line 101 of file TkDetMap.h.

Referenced by createTEC(), createTIB(), createTID(), createTOB(), get_highY(), and initialize().

int TkLayerMap::layerEnumNb_ [private]

Definition at line 97 of file TkDetMap.h.

Referenced by getXY(), and TkLayerMap().

double TkLayerMap::lowX [private]

Definition at line 100 of file TkDetMap.h.

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

double TkLayerMap::lowY [private]
std::vector<uint32_t> TkLayerMap::ModulesInRingBack [private]

Definition at line 103 of file TkDetMap.h.

Referenced by getXY_TEC(), and initialize().

std::vector<uint32_t> TkLayerMap::ModulesInRingFront [private]

Definition at line 103 of file TkDetMap.h.

Referenced by getXY_TEC(), and initialize().

int TkLayerMap::nchX [private]

Definition at line 98 of file TkDetMap.h.

Referenced by createTEC(), createTIB(), createTID(), createTOB(), get_nchX(), getDetFromBin(), and initialize().

int TkLayerMap::nchY [private]

Definition at line 99 of file TkDetMap.h.

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

uint32_t TkLayerMap::Nrod [private]

Definition at line 104 of file TkDetMap.h.

Referenced by getXY_TOB(), and initialize().

uint32_t TkLayerMap::Nstring_ext [private]

Definition at line 104 of file TkDetMap.h.

Referenced by createTEC(), createTIB(), createTID(), createTOB(), getXY_TIB(), and initialize().

uint32_t TkLayerMap::Offset [private]

Definition at line 104 of file TkDetMap.h.

Referenced by getXY_TIB().

std::vector<uint32_t> TkLayerMap::SingleExtString [private]

Definition at line 103 of file TkDetMap.h.

Referenced by getXY_TIB(), and initialize().