46 double phi,
r,dx,dy, dy1;
47 double xp[4],yp[4],xp1,yp1;
48 double vhbot,vhtop,vhapo;
49 double rmedio[]={0.041,0.0701,0.0988,0.255,0.340,0.430,0.520,0.610,0.696,0.782,0.868,0.965,1.080};
50 double xt1,yt1,xs1=0.,ys1=0.,xt2,yt2,xs2,ys2,pv1,pv2;
65 if(nlay >12 && nlay <19){
67 xp[0]=r-vhtop;yp[0]=-vhapo;
68 xp[1]=r+vhtop;yp[1]=-vhapo;
69 xp[2]=r+vhtop;yp[2]=vhapo;
70 xp[3]=r-vhtop;yp[3]=vhapo;
73 xp[0]=r-vhapo;yp[0]=-vhbot;
74 xp[1]=r+vhapo;yp[1]=-vhtop;
75 xp[2]=r+vhapo;yp[2]=vhtop;
76 xp[3]=r-vhapo;yp[3]=vhbot;
81 xp[
j] = xp1;yp[
j]=yp1;
84 numod=mod->
idModule;
if(numod>100)numod=numod-100;
89 xt1=rmedio[nlay-31]; yt1=-vhtop/2.;
90 xs1 = xt1*
cos(phi)-yt1*
sin(phi);
91 ys1 = xt1*
sin(phi)+yt1*
cos(phi);
92 xt2=rmedio[nlay-31]; yt2=vhtop/2.;
93 xs2 = xt2*
cos(phi)-yt2*
sin(phi);
94 ys2 = xt2*
sin(phi)+yt2*
cos(phi);
100 xp[0]=vane*(dx+dx/8.);yp[0]=numod*(dy1);
101 xp[1]=vane*(dx+dx/8.)+dx;yp[1]=numod*(dy1);
102 xp[2]=vane*(dx+dx/8.)+dx;yp[2]=numod*(dy1)+dy;
103 xp[3]=vane*(dx+dx/8.);yp[3]=numod*(dy1)+dy;
105 xt1=
r; yt1=-vhtop/2.;
106 xs1 = xt1*
cos(phi)-yt1*
sin(phi);
107 ys1 = xt1*
sin(phi)+yt1*
cos(phi);
109 xs2 = xt2*
cos(phi)-yt2*
sin(phi);
110 ys2 = xt2*
sin(phi)+yt2*
cos(phi);
113 if(fabs(pv1-pv2)>
M_PI && numod==1)pv1=pv1-2.*
M_PI;
114 if(fabs(pv1-pv2)>
M_PI && numod!=1)pv2=pv2+2.*
M_PI;
115 xp[0]=mod->
posz-vhapo/2.;yp[0]=4.2*pv1;
116 xp[1]=mod->
posz+vhapo/2.;yp[1]=4.2*pv1;
117 xp[2]=mod->
posz+vhapo/2. ;yp[2]=4.2*pv2;
118 xp[3]=mod->
posz-vhapo/2.;yp[3]=4.2*pv2;
133 for(
int j=0;
j<4;
j++){
138 sprintf(buffer,
"%X",mod->
idex);
141 bool FPIX_M_1 =
false ;
142 bool FPIX_M_2 =
false ;
143 bool FPIX_P_1 =
false ;
144 bool FPIX_P_2 =
false ;
145 bool BPIX_L_1 =
false ;
146 bool BPIX_L_2 =
false ;
147 bool BPIX_L_3 =
false ;
149 if(moduleName.find(
"PixelEndcap")!=string::npos || moduleName.find(
"PixelBarrel")!=string::npos) {
157 if( moduleName.find(
"PixelEndcap 3")!=string::npos ) {FPIX_M_1 =
true;}
158 if( moduleName.find(
"PixelEndcap 4")!=string::npos ) {FPIX_M_2 =
true;}
159 if( moduleName.find(
"PixelEndcap 1")!=string::npos ) {FPIX_P_1 =
true;}
160 if( moduleName.find(
"PixelEndcap 2")!=string::npos ) {FPIX_P_2 =
true;}
161 if( moduleName.find(
"PixelBarrel 1")!=string::npos ) {BPIX_L_1 =
true;}
162 if( moduleName.find(
"PixelBarrel 2")!=string::npos ) {BPIX_L_2 =
true;}
163 if( moduleName.find(
"PixelBarrel 3")!=string::npos ) {BPIX_L_3 =
true;}
165 *
svgfile <<
" <svg:polygon detid=\""
169 <<
"\" onclick=\"SvgMap.showData(evt);\" onmouseover=\"SvgMap.showData(evt);\" onmouseout=\"SvgMap.showData(evt);\" entries=\""
182 for(
int k=0;
k<
np;
k++)
186 xd[
k] = xd[
k] * 1.8 - 60 ;
187 yd[
k] = yd[
k] * 2.0 - 30 ;
191 xd[
k] = xd[
k] * 1.8 - 60 ;
192 yd[
k] = yd[
k] * 2.0 - 60 ;
196 xd[
k] = xd[
k] * 1.8 - 1020 ;
197 yd[
k] = yd[
k] * 2.0 - 30 ;
201 xd[
k] = xd[
k] * 1.8 - 1020 ;
202 yd[
k] = yd[
k] * 2.0 - 60 ;
206 xd[
k] = xd[
k] * 1.2 - 130 ;
210 xd[
k] = xd[
k] * 1.2 - 30 ;
214 xd[
k] = xd[
k] * 1.2 - 240 ;
217 *
svgfile << xd[
k] <<
"," << yd[
k] <<
" " ;
239 while (getline( *
jsfile, line ))
247 for (
int layer=1; layer < 44; layer++)
268 for (
int layer=1; layer < 44; layer++)
286 for (
int layer=1; layer < 44; layer++)
314 if( TKType ==
"Averages" || TKType ==
"Entries")
316 *
svgfile <<
" <svg:g id=\"theColorMap\" transform=\"translate(0, 0)\" style=\"visibility: visible;\">" << endl ;
318 *
svgfile <<
" <svg:g id=\"theColorMap\" transform=\"translate(0, 0)\" style=\"visibility: hidden;\">" << endl ;
327 for(
int i=99;
i>=0;
i--)
329 *
svgfile <<
" <svg:polygon id=\"map\" fill=\"rgb("
353 if(
i == 0 ||
i==20 ||
i==40 ||
i==60 ||
i==80 ||
i==99)
356 *
svgfile <<
" <svg:text id=\"colorCodeMark"
358 <<
"\" class=\"normalText\" x=\""
362 <<
"\" font-size=\"20\">"
372 *
svgfile <<
" </svg:g>" << endl ;
374 if( TKType ==
"Alarms" )
376 *
svgfile <<
" <svg:g id=\"theAlarmMap\" transform=\"translate(0, 0)\" style=\"visibility: visible;\">" << endl ;
378 *
svgfile <<
" <svg:g id=\"theAlarmMap\" transform=\"translate(0, 0)\" style=\"visibility: hidden;\">" << endl ;
381 *
svgfile <<
" <svg:polygon id=\"map\" fill =\"rgb(255,0,0)\" points=\"1300,300 1325,300 1325,320 1300,320\" />" << endl ;
382 *
svgfile <<
" <svg:text id=\"ERROR\" class=\"normalText\" x=\"1334\" y=\"317\" font-size=\"20\">ERROR </svg:text>" << endl ;
384 *
svgfile <<
" <svg:polygon id=\"map\" fill =\"rgb(0,255,0)\" points=\"1300,330 1325,330 1325,350 1300,350\" />" << endl ;
385 *
svgfile <<
" <svg:text id=\"OK\" class=\"normalText\" x=\"1334\" y=\"347\" font-size=\"20\">OK </svg:text>" << endl ;
387 *
svgfile <<
" <svg:polygon id=\"map\" fill =\"rgb(255,255,0)\" points=\"1300,360 1325,360 1325,380 1300,380\" />" << endl ;
388 *
svgfile <<
" <svg:text id=\"WARNING\" class=\"normalText\" x=\"1334\" y=\"377\" font-size=\"20\">WARNING </svg:text>" << endl ;
390 *
svgfile <<
" <svg:polygon id=\"map\" fill =\"rgb(0,0,255)\" points=\"1300,390 1325,390 1325,410 1300,410\" />" << endl ;
391 *
svgfile <<
" <svg:text id=\"OTHER\" class=\"normalText\" x=\"1334\" y=\"407\" font-size=\"20\">OTHER </svg:text>" << endl ;
393 *
svgfile <<
" <svg:polygon id=\"map\" fill =\"rgb(255,255,255)\" points=\"1300,420 1325,420 1325,440 1300,440\" />" << endl ;
394 *
svgfile <<
" <svg:text id=\"UNDEFINED\" class=\"normalText\" x=\"1334\" y=\"437\" font-size=\"20\">UNDEFINED</svg:text>" << endl ;
396 *
svgfile <<
" </svg:g>" << endl ;
400 *
svgfile <<
" <svg:text id=\"colorCodeME\" class=\"normalText\" x=\"1000\" y=\"4000\">"
406 while (getline( *
jsfile, line ))
int module(int fedId, int fedCh)
void defwindow(int num_lay)
Sin< T >::type sin(const T &t)
void drawModule(TmModule *mod, int key, int nlay, bool print_total)
double phival(double x, double y)
std::string moduleName(Provenance const &provenance)
Cos< T >::type cos(const T &t)
SiPixelTrackerMap(std::string s=" ", int xsize1=340, int ysize1=200)
void print(bool print_total=true, std::string TKType="Averages", float minval=0., float maxval=0.)
volatile std::atomic< bool > shutdown_flag false
static bool isRingStereo(int key)
T mod(const T &a, const T &b)