Ignore:
Timestamp:
07/18/01 09:26:02 (23 years ago)
Author:
bigongia
Message:
Some debugging printout added. They are activated using option
verbose_level 4. C.Bigongiari:wq
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/ReflectorII/ph2cph.c

    r787 r869  
    122122  h    = ph->h;
    123123
     124  /* CBC */
     125  Debug("@0 x r %f %f %f %f %f %f\n", x[0], x[1], x[2],
     126                                      r[0], r[1], r[2]);
     127
     128  /*
     129  x[0] = 125.0;
     130  x[1] = 125.0;
     131  x[2] = 0.0;  */                          /* ground => obs. level =>  z=0   */
     132
     133  /*  get director cosines x,y on ground */ 
     134
     135  /*
     136  r[0] = 0.0;     
     137  r[1] = 0.0;   
     138  r[2] = 1.0;   
     139  */
     140  /* CBC */
     141
    124142  /*!@'
    125143
     
    140158  /*  find data point to be used in Lagrange interpolation (-> k) */
    141159
    142   FindLagrange(Reflectivity,k,wl,nReflectivity);
     160  FindLagrange(Reflectivity,k,wl);
    143161         
    144162  /*  if random > reflectivity then goes to the TOP of the loop again */
     
    160178  -- */
    161179
    162   Debug("@1 %f %f %f %f %f %f\n", x[0], x[1], x[2], r[0], r[1], r[2]);
     180  Debug("@1 x r %f %f %f %f %f %f\n", x[0], x[1], x[2], r[0], r[1], r[2]);
    163181 
    164182  /*  change to the system of the CT */
     
    166184  applyMxV( OmegaCT, x, xCT );
    167185  applyMxV( OmegaCT, r, rCT );       
     186
     187  /* CBC */
     188  Debug("@2 xCT rCT %f %f %f %f %f %f\n", xCT[0], xCT[1], xCT[2],
     189        rCT[0], rCT[1], rCT[2]);
     190  /* CBC */
     191
    168192
    169193  /*
     
    246270  xcut[1] = xCT[1] + rCT[1]/rCT[2]*(xcut[2]-xCT[2]);
    247271
     272  /* CBC */
     273  Debug("@3 xcut %f %f\n", xcut[0], xcut[1]);
     274  /* CBC */
     275
    248276  /*  convert to Curvilinear distance over the parabolic dish */
    249277         
     
    251279  sy = Lin2Curv( xcut[1] );
    252280         
     281  /* CBC */
     282  Debug("@4 sx sy %f %f\n", sx, sy);
     283  /* CBC */
     284
    253285  /*  is it outside the dish? */
    254286         
     
    289321  }
    290322           
     323  /* CBC */
     324  Debug("@5 theta phi %f %f\n", ct_data[i_mirror].theta,
     325                                ct_data[i_mirror].phi);
     326  /* CBC */
     327
    291328  /*  calculate matrices for the mirror */
    292329       
     
    298335  /* change to the system of the mirror */
    299336       
     337  /* CBC */
     338  Debug("@6 mirror %f %f %f\n",ct_data[i_mirror].x,
     339                            ct_data[i_mirror].y,
     340                            ct_data[i_mirror].z);
     341  /* CBC */
     342
    300343  /* first translation... */
    301344
     
    303346  xmm[1] = xCT[1] - ct_data[i_mirror].y;
    304347  xmm[2] = xCT[2] - ct_data[i_mirror].z;
    305        
     348 
     349
     350  /* CBC */
     351  Debug("@7 xmm %f %f %f\n", xmm[0], xmm[1], xmm[2]);
     352  /* CBC */
     353       
    306354  /* ...then rotation */
    307355
    308356  applyMxV( Omega, xmm, xm );
    309357  applyMxV( Omega, rCT, rm );
     358
     359  /* CBC */
     360  Debug("@8 xm rm %f %f %f %f %f %f\n", xm[0], xm[1], xm[2],
     361                                  rm[0], rm[1], rm[2]);
     362  /* CBC */
    310363
    311364  /*
     
    318371  rm[1] /= rnorm;
    319372  rm[2] /= rnorm;
     373
     374  /* CBC */
     375  Debug("@9 rm-norm %f %f %f\n", rm[0], rm[1], rm[2]);
     376  /* CBC */
    320377
    321378  /*
     
    400457  xcut[1] = xm[1] + rm[1]/rm[2]*(xcut[2]-xm[2]);
    401458
     459  /* CBC */
     460  Debug("@10 xcut %f %f %f\n", xcut[0], xcut[1], xcut[2]);
     461  /* CBC */
     462
    402463  /*
    403464  ++
     
    424485  rnor[2] = (float) (2.0*(xcut[2] - 2.0*ct_Focal[i_mirror]));
    425486
     487  /* CBC */
     488  Debug("@11 rnor %f %f %f\n", rnor[0], rnor[1], rnor[2]);
     489  /* CBC */
     490
    426491  rnorm    = -NORM( rnor );
    427492  rnor[0] /= rnorm;
    428493  rnor[1] /= rnorm;
    429494  rnor[2] /= rnorm;
     495
     496  /* CBC */
     497  Debug("@12 rnor-norm %f %f %f\n", rnor[0], rnor[1], rnor[2]);
     498  /* CBC */
    430499
    431500  /*
     
    440509
    441510  calpha = (float) fabs(rnor[0]*rm[0] + rnor[1]*rm[1] + rnor[2]*rm[2]);
     511
     512  /* CBC */
     513  Debug("@13 calpha %f\n", calpha);
     514  /* CBC */
    442515       
    443516  /*  finally!!! we have the reflected trajectory of the photon */
     
    446519  rrefl[1] = (float) (2.0*rnor[1]*calpha - rm[1]);
    447520  rrefl[2] = (float) (2.0*rnor[2]*calpha - rm[2]);
     521
     522  /* CBC */
     523  Debug("@14 rrefl %f %f %f\n", rrefl[0], rrefl[1], rrefl[2]);
     524  /* CBC */
    448525
    449526  rnorm     = NORM( rrefl );
     
    452529  rrefl[2] /= rnorm;
    453530
     531  /* CBC */
     532  Debug("@15 rrefl-norm %f %f %f\n", rrefl[0], rrefl[1], rrefl[2]);
     533  /* CBC */
     534
    454535  /*  let's go back to the coordinate system of the CT */
    455536
     
    458539  applyMxV( OmegaI, xcut, xcutCT);
    459540  applyMxV( OmegaI, rrefl, rreflCT);
     541
     542  /* CBC */
     543  Debug("@16 xcutCT rreflCT %f %f %f %f %f %f\n", xcutCT[0], xcutCT[1],
     544        xcutCT[2], rreflCT[0], rreflCT[1], rreflCT[2]);
     545  /* CBC */
    460546
    461547  /*  ...then translation */
     
    464550  xcutCT[1] += ct_data[i_mirror].y;
    465551  xcutCT[2] += ct_data[i_mirror].z;
     552
     553  /* CBC */
     554  Debug("@17 xcutCT %f %f %f\n", xcutCT[0], xcutCT[1], xcutCT[2]);
     555  /* CBC */
    466556 
    467557  /*
     
    475565  xcam[1] = xcutCT[1] + rreflCT[1]*t;
    476566  xcam[2] = xcutCT[2] + rreflCT[2]*t;
     567
     568  /* CBC */
     569  Debug("@18 xcam %f %f %f\n", xcam[0], xcam[1], xcam[2]);
     570  /* CBC */
    477571     
    478572  /*
     
    486580  xcam[1] += AxisDeviation[1][i_mirror];
    487581
     582  /* CBC */
     583  Debug("@19 xcam-AD %f %f \n", xcam[0], xcam[1]);
     584  /* CBC */
     585
    488586  /*
    489587  ++
     
    500598  xcam[0] += (float) (NormalRandomNumbers[0] * ct_PSpread_mean);
    501599  xcam[1] += (float) (NormalRandomNumbers[1] * ct_PSpread_mean);
     600
     601  /* CBC */
     602  Debug("@20 xcam-SM %f %f \n", xcam[0], xcam[1]);
     603  /* CBC */
    502604
    503605  /*  check whether the photon goes out of the camera */
     
    548650  /*  show it */
    549651
    550   Debug("@2 %f %f %f %f %f %f %f %f %f\n"
    551         "@3 %f %f %d %f %f %f %f\n"
    552         "@4 %f %f %f %f\n",
     652  Debug("@22 %f %f %f\n"
     653        "@23 %f %f %f %f %f %f\n"
     654        "@24 %f %f %d %f %f %f %f\n"
     655        "@25 %f %f %f %f\n\n",
    553656        xCT[0], xCT[1], xCT[2], rCT[0], rCT[1], rCT[2],
    554657            xcut[0], xcut[1], xcut[2],
Note: See TracChangeset for help on using the changeset viewer.