00001 #include "VisReco/VisCustomTracker/interface/VisCuTkLayer.h" 00002 #include "VisReco/VisCustomTracker/interface/VisCuTkPartDetector.h" 00003 #include "VisReco/VisCustomTracker/interface/VisCuTkSubDetector.h" 00004 00005 #include <iostream> 00006 00007 using namespace std; 00008 00009 VisCuTkLayer::VisCuTkLayer(int idc, VisCuTkPartDetector* PartDtc){ 00010 idLayer = idc; 00011 partDetector = PartDtc; 00012 int ncomponent = 0; 00013 visible = false; 00014 int id0 = 0; 00015 slWindow = 0; 00016 00017 if(partDetector->getOwner()->getId()== 1){ //1=pixel 00018 if(partDetector->getId()== 1 || partDetector->getId()== 3){ //end-cap 00019 ncomponent = 7; 00020 } 00021 else{ncomponent = 8;} //barrel 00022 } 00023 if(partDetector->getOwner()->getId()== 2){ //inner-silicon 00024 if(partDetector->getId()== 1 || partDetector->getId()== 3){ //end-cap 00025 ncomponent = 3; 00026 } 00027 else{ncomponent = 12;} //barrel 00028 } 00029 if(partDetector->getOwner()->getId()== 3){ //outer-silicon 00030 if(partDetector->getId()== 1){ //end-cap-z 00031 if (idLayer== 1) ncomponent = 4; 00032 if (idLayer== 2 || idLayer== 3) ncomponent = 5; 00033 if (idLayer== 4 || idLayer== 5 || idLayer== 6) ncomponent = 6; 00034 if (idLayer== 7 || idLayer== 8 || idLayer== 9) ncomponent = 7; 00035 id0=7-ncomponent; 00036 } 00037 if(partDetector->getId()== 3){ //endcap+z 00038 if (idLayer== 9) ncomponent = 4; 00039 if (idLayer== 8 || idLayer== 7) ncomponent = 5; 00040 if (idLayer== 6 || idLayer== 5 || idLayer== 4) ncomponent = 6; 00041 if (idLayer== 3 || idLayer== 2 || idLayer== 1) ncomponent = 7; 00042 id0=7-ncomponent; 00043 } 00044 if(partDetector->getId()== 2){ //barrel 00045 ncomponent = 12; 00046 } 00047 } 00048 for(int i=1; i<(ncomponent+1); i++){ 00049 addComponent(i,new VisCuTkSubLayer(id0+i,this)); 00050 } 00051 } 00052 VisCuTkLayer::~VisCuTkLayer(){ 00053 } 00054