CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/Geometry/TrackerGeometryBuilder/src/RectangularPixelTopology.cc

Go to the documentation of this file.
00001 #include "Geometry/TrackerGeometryBuilder/interface/RectangularPixelTopology.h"
00002 
00006 // Modified for the large pixles.
00007 // Danek Kotlinski & Michele Pioppi, 3/06.
00008 // See documentation in the include file.
00009 
00010 //--------------------------------------------------------------------
00011 // PixelTopology interface. 
00012 // Transform LocalPoint in cm to measurement in pitch units.
00013 std::pair<float,float> RectangularPixelTopology::pixel( 
00014           const LocalPoint& p) const {
00015   using std::cout;
00016   using std::endl;
00017 
00018   // check limits       
00019   float py = p.y();
00020   float px = p.x();
00021   
00022   if(TP_DEBUG) {
00023     // This will catch points which are outside the active sensor area.
00024     // In the digitizer during the early induce_signal phase non valid
00025     // location are passed here. They are cleaned later.
00026     if( py<m_yoffset ) { // m_yoffset is negative 
00027       cout<<" wrong lp y "<<py<<" "<<m_yoffset<<endl;
00028       py = m_yoffset + EPSCM; // make sure it is in, add an EPS in cm
00029     }
00030     if( py>-m_yoffset ) {
00031       cout<<" wrong lp y "<<py<<" "<<-m_yoffset<<endl;
00032       py = -m_yoffset - EPSCM;
00033     }
00034     if( px<m_xoffset ) { // m_xoffset is negative 
00035       cout<<" wrong lp x "<<px<<" "<<m_xoffset<<endl;
00036       px = m_xoffset + EPSCM;
00037     }
00038     if( px>-m_xoffset ) {
00039       cout<<" wrong lp x "<<px<<" "<<-m_xoffset<<endl;
00040       px = -m_xoffset - EPSCM;
00041     }
00042   } // end TP_DEBUG
00043 
00044   float newybin=(py - m_yoffset)/m_pitchy;
00045   int iybin = int(newybin);
00046   float fractionY = newybin - iybin;
00047   //if(fractionY<0.) cout<<" fractiony "<<fractionY<<" "<<newybin<<endl;
00048   
00049   // Normalize it all to 1 ROC
00050   int iybin0 = (iybin%54); // 0-53
00051   int numROC = iybin/54;  // 0-7
00052   
00053   if (iybin0>53) {
00054     if(TP_DEBUG) {
00055       cout<<" very bad, newbiny "<<iybin0<<endl;
00056       cout<<py<<" "<<m_yoffset<<" "<<m_pitchy<<" "
00057           <<newybin<<" "<<iybin<<" "<<fractionY<<" "<<iybin0<<" "
00058           <<numROC<<endl;
00059     }
00060   } else if (iybin0==53) {   // inside big pixel
00061     iybin0=51;
00062     fractionY = (fractionY+1.)/2.;
00063   } else if (iybin0==52) {   // inside big pixel
00064     iybin0=51;
00065     fractionY = fractionY/2.;
00066   } else if (iybin0>1) {   // inside normal pixel
00067     iybin0=iybin0-1;
00068   } else if (iybin0==1) {   // inside big pixel
00069     iybin0=0;
00070     fractionY = (fractionY+1.)/2.;
00071   } else if (iybin0==0) {   // inside big pixel
00072     iybin0=0;
00073     fractionY = fractionY/2.;
00074   } else {
00075     if(TP_DEBUG) {
00076       cout<<" very bad, newbiny "<<newybin<<endl;
00077       cout<<py<<" "<<m_yoffset<<" "<<m_pitchy<<" "
00078           <<newybin<<" "<<iybin<<" "<<fractionY<<" "
00079           <<iybin0<<" "<<numROC<<endl;
00080     }
00081   }
00082   float mpY = float(numROC*52. + iybin0) + fractionY;
00083   if(TP_DEBUG && (mpY<0. || mpY>=416.)) {
00084     cout<<" bad pix y "<<mpY<<endl;
00085     cout<<py<<" "<<m_yoffset<<" "<<m_pitchy<<" "
00086         <<newybin<<" "<<iybin<<" "<<fractionY<<" "
00087         <<iybin0<<" "<<numROC<<endl;
00088   }
00089   
00090   // In X
00091   float newxbin=(px - m_xoffset) / m_pitchx; 
00092   int ixbin = int(newxbin);
00093   float fractionX = newxbin - ixbin;
00094   // if(fractionX<0.) {
00095   //   cout<<" fractionx "<<fractionX<<" "<<newxbin<<" "<<ixbin<<" ";
00096   //   cout<<px<<" "<<m_xoffset<<" "<<m_pitchx<<" "
00097   //      <<newxbin<<" "<<ixbin<<" "<<fractionX<<endl;
00098   // }
00099 
00100   if (ixbin>161) {
00101     if(TP_DEBUG) {
00102       cout<<" very bad, newbinx "<<ixbin<<endl;
00103       cout<<px<<" "<<m_xoffset<<" "<<m_pitchx<<" "
00104           <<newxbin<<" "<<ixbin<<" "<<fractionX<<endl;
00105     }
00106   } else if (ixbin>82) {   // inside normal pixel, ROC 1 
00107     ixbin=ixbin-2;
00108   } else if (ixbin==82) {   // inside bin pixel 
00109     ixbin=80;
00110     fractionX = (fractionX+1.)/2.;
00111   } else if (ixbin==81) {   // inside big pixel
00112     ixbin=80;
00113     fractionX = fractionX/2.;
00114   } else if (ixbin==80) {   // inside bin pixel, ROC 0 
00115     ixbin=79;
00116     fractionX = (fractionX+1.)/2.;
00117   } else if (ixbin==79) {   // inside big pixel
00118     ixbin=79;
00119     fractionX = fractionX/2.;
00120   } else if (ixbin<0) {   // outside range
00121     if(TP_DEBUG) {
00122       cout<<" very bad, newbinx "<<ixbin<<endl;
00123       cout<<px<<" "<<m_xoffset<<" "<<m_pitchx<<" "
00124           <<newxbin<<" "<<ixbin<<" "<<fractionX<<endl;
00125     }
00126   }
00127   
00128   float mpX = float(ixbin) + fractionX;
00129   
00130   if(TP_DEBUG && (mpX<0. || mpX>=160.) ) {
00131     cout<<" bad pix x "<<mpX<<" "<<endl;
00132     cout<<px<<" "<<m_xoffset<<" "<<m_pitchx<<" "
00133         <<newxbin<<" "<<ixbin<<" "<<fractionX<<endl;
00134   }
00135   
00136   return std::pair<float,float>(mpX,mpY);
00137 }
00138 //----------------------------------------------------------------------
00139 // Topology interface, go from Masurement to Local corrdinates
00140 // pixel coordinates (mp) -> cm (LocalPoint)
00141 LocalPoint RectangularPixelTopology::localPosition( 
00142         const MeasurementPoint& mp) const {
00143   using std::cout;
00144   using std::endl;
00145 
00146   float mpy = mp.y(); // measurements 
00147   float mpx = mp.x();
00148 
00149   // check limits
00150   if(TP_DEBUG) {
00151     if( mpy<0.) { //  
00152       cout<<" wrong mp y, fix "<<mpy<<" "
00153           <<0<<endl;
00154       mpy = 0.;
00155     }
00156     if( mpy>=m_ncols) {
00157       cout<<" wrong mp y, fix "<<mpy<<" "
00158           <<m_ncols<<endl;
00159       mpy = float(m_ncols) - EPS; // EPS is a small number
00160     }
00161     if( mpx<0.) { //  
00162       cout<<" wrong mp x, fix "<<mpx<<" "
00163           <<0<<endl;
00164       mpx = 0.;
00165     }
00166     if( mpx>=m_nrows) {
00167       cout<<" wrong mp x, fix "<<mpx<<" "
00168           <<m_nrows<<endl;
00169       mpx = float(m_nrows) - EPS; // EPS is a small number
00170     }
00171   } // if TP_DEBUG
00172   
00173 
00174   // IF IT WORKS OK REPLACE THE CODE BELOW BY A CALL TO localY()
00175   float lpY = localY(mpy);
00176 
00177 //   // Start with Y
00178 //   int binoffy = int(mpy);             // truncate to int
00179 //   float fractionY = mpy - binoffy; // find the fraction 
00180 //   float local_pitchy = m_pitchy;      // defaultpitch
00181 //   //if(fractionY<0.) cout<<" fractiony m "<<fractionY<<" "<<mpy<<endl;
00182 
00183 //   if (binoffy>415) {   // too large
00184 //     if(TP_DEBUG) { 
00185 //       cout<<" very bad, biny "<<binoffy<<endl;
00186 //       cout<<mpy<<" "<<binoffy<<" "
00187 //        <<fractionY<<" "<<local_pitchy<<" "<<m_yoffset<<endl;
00188 //     }
00189 //   } else if (binoffy==415) {    // ROC 7, last big pixel
00190 //     binoffy=binoffy+15;
00191 //     local_pitchy = 2 * m_pitchy;
00192 //   } else if (binoffy>364) {     // ROC 7
00193 //     binoffy=binoffy+15;
00194 //   } else if (binoffy==364) {    // ROC 7
00195 //     binoffy=binoffy+14;
00196 //     local_pitchy = 2 * m_pitchy;
00197     
00198 //   } else if (binoffy==363) {      // ROC 6
00199 //     binoffy=binoffy+13;
00200 //     local_pitchy = 2 * m_pitchy;    
00201 //   } else if (binoffy>312) {       // ROC 6
00202 //     binoffy=binoffy+13;
00203 //   } else if (binoffy==312) {      // ROC 6
00204 //     binoffy=binoffy+12;
00205 //     local_pitchy = 2 * m_pitchy;
00206     
00207 //   } else if (binoffy==311) {      // ROC 5
00208 //     binoffy=binoffy+11;
00209 //     local_pitchy = 2 * m_pitchy;    
00210 //   } else if (binoffy>260) {       // ROC 5
00211 //     binoffy=binoffy+11;
00212 //   } else if (binoffy==260) {      // ROC 5
00213 //     binoffy=binoffy+10;
00214 //     local_pitchy = 2 * m_pitchy;
00215     
00216 //   } else if (binoffy==259) {      // ROC 4
00217 //     binoffy=binoffy+9;
00218 //     local_pitchy = 2 * m_pitchy;    
00219 //   } else if (binoffy>208) {       // ROC 4
00220 //     binoffy=binoffy+9;
00221 //   } else if (binoffy==208) {      // ROC 4
00222 //     binoffy=binoffy+8;
00223 //     local_pitchy = 2 * m_pitchy;
00224     
00225 //   } else if (binoffy==207) {      // ROC 3
00226 //     binoffy=binoffy+7;
00227 //     local_pitchy = 2 * m_pitchy;    
00228 //     } else if (binoffy>156) {       // ROC 3
00229 //     binoffy=binoffy+7;
00230 //   } else if (binoffy==156) {      // ROC 3
00231 //     binoffy=binoffy+6;
00232 //     local_pitchy = 2 * m_pitchy;
00233     
00234 //   } else if (binoffy==155) {      // ROC 2
00235 //     binoffy=binoffy+5;
00236 //     local_pitchy = 2 * m_pitchy;    
00237 //   } else if (binoffy>104) {       // ROC 2
00238 //     binoffy=binoffy+5;
00239 //   } else if (binoffy==104) {      // ROC 2
00240 //     binoffy=binoffy+4;
00241 //     local_pitchy = 2 * m_pitchy;
00242     
00243 //   } else if (binoffy==103) {      // ROC 1
00244 //     binoffy=binoffy+3;
00245 //     local_pitchy = 2 * m_pitchy;    
00246 //   } else if (binoffy>52) {       // ROC 1
00247 //     binoffy=binoffy+3;
00248 //   } else if (binoffy==52) {      // ROC 1
00249 //     binoffy=binoffy+2;
00250 //     local_pitchy = 2 * m_pitchy;
00251     
00252 //   } else if (binoffy==51) {      // ROC 0
00253 //     binoffy=binoffy+1;
00254 //     local_pitchy = 2 * m_pitchy;    
00255 //   } else if (binoffy>0) {        // ROC 0
00256 //     binoffy=binoffy+1;
00257 //   } else if (binoffy==0) {       // ROC 0
00258 //     binoffy=binoffy+0;
00259 //     local_pitchy = 2 * m_pitchy;
00260 //   } else { // too small
00261 //     if(TP_DEBUG) { 
00262 //       cout<<" very bad, biny "<<binoffy<<endl;
00263 //       cout<<mpy<<" "<<binoffy<<" "
00264 //        <<fractionY<<" "<<local_pitchy<<" "<<m_yoffset<<endl;
00265 //     }
00266 //   }
00267   
00268 //   // The final position in local coordinates 
00269 //   float lpY = float(binoffy*m_pitchy) + fractionY*local_pitchy + 
00270 //     m_yoffset;
00271 //   if(TP_DEBUG && (lpY<m_yoffset || lpY>(-m_yoffset)) ) {
00272 //     cout<<" bad lp y "<<lpY<<endl; 
00273 //     cout<<mpy<<" "<<binoffy<<" "
00274 //      <<fractionY<<" "<<local_pitchy<<" "<<m_yoffset<<endl;
00275 //   }
00276   
00277 
00278   // IF IT WORKS OK REPLACE THE CODE BELOW BY A CALL TO localX()
00279   float lpX = localX(mpx);
00280 
00281 //   // Do the X
00282 //   int binoffx=int(mpx);             // truncate to int
00283 //   float fractionX = mpx - binoffx; // find the fraction 
00284 //   float local_pitchx = m_pitchx;      // defaultpitch
00285 //   //if(fractionX<0.) cout<<" fractionx m "<<fractionX<<" "<<mpx<<endl;
00286   
00287 //   if (binoffx>159) {   // too large
00288 //     if(TP_DEBUG) { 
00289 //       cout<<" very bad, binx "<<binoffx<<endl;
00290 //       cout<<mpx<<" "<<binoffx<<" "
00291 //        <<fractionX<<" "<<local_pitchx<<" "<<m_xoffset<<endl;
00292 //     }
00293 //   } else if (binoffx>80) {     // ROC 1
00294 //     binoffx=binoffx+2;
00295 //   } else if (binoffx==80) {    // ROC 1
00296 //     binoffx=binoffx+1;
00297 //     local_pitchx = 2 * m_pitchx;
00298     
00299 //   } else if (binoffx==79) {      // ROC 0
00300 //     binoffx=binoffx+0;
00301 //     local_pitchx = 2 * m_pitchx;    
00302 //   } else if (binoffx>=0) {       // ROC 0
00303 //     binoffx=binoffx+0;
00304     
00305 //   } else { // too small
00306 //     if(TP_DEBUG) { 
00307 //       cout<<" very bad, binx "<<binoffx<<endl;
00308 //       cout<<mpx<<" "<<binoffx<<" "
00309 //        <<fractionX<<" "<<local_pitchx<<" "<<m_xoffset<<endl;
00310 //     }
00311 //   }
00312   
00313 //   // The final position in local coordinates 
00314 //   float lpX = float(binoffx*m_pitchx) + fractionX*local_pitchx + 
00315 //     m_xoffset;
00316   
00317 //   if(TP_DEBUG && (lpX<m_xoffset || lpX>(-m_xoffset)) ) {
00318 //     cout<<" bad lp x "<<lpX<<endl; 
00319 //     cout<<mpx<<" "<<binoffx<<" "
00320 //      <<fractionX<<" "<<local_pitchx<<" "<<m_xoffset<<endl;
00321 //   }
00322   
00323   // Return it as a LocalPoint
00324   return LocalPoint( lpX, lpY);
00325 }
00326 //--------------------------------------------------------------------
00327 // 
00328 // measuremet to local transformation for X coordinate
00329 // X coordinate is in the ROC row number direction
00330 float RectangularPixelTopology::localX(const float mpx) const {
00331   using std::cout;
00332   using std::endl;
00333 
00334   int binoffx=int(mpx);             // truncate to int
00335   float fractionX = mpx - binoffx; // find the fraction 
00336   float local_pitchx = m_pitchx;      // defaultpitch
00337   //if(fractionX<0.) cout<<" fractionx m "<<fractionX<<" "<<mpx<<endl;
00338   
00339         if (binoffx>80) {            // ROC 1 - handles x on edge cluster
00340     binoffx=binoffx+2;
00341   } else if (binoffx==80) {    // ROC 1
00342     binoffx=binoffx+1;
00343     local_pitchx = 2 * m_pitchx;
00344     
00345   } else if (binoffx==79) {      // ROC 0
00346     binoffx=binoffx+0;
00347     local_pitchx = 2 * m_pitchx;    
00348   } else if (binoffx>=0) {       // ROC 0
00349     binoffx=binoffx+0;
00350     
00351   } else { // too small
00352     if(TP_DEBUG) { 
00353       cout<<" very bad, binx "<<binoffx<<endl;
00354       cout<<mpx<<" "<<binoffx<<" "
00355           <<fractionX<<" "<<local_pitchx<<" "<<m_xoffset<<endl;
00356     }
00357   }
00358   
00359   // The final position in local coordinates 
00360   float lpX = float(binoffx*m_pitchx) + fractionX*local_pitchx + 
00361     m_xoffset;
00362   
00363   if(TP_DEBUG && (lpX<m_xoffset || lpX>(-m_xoffset)) ) {
00364     cout<<" bad lp x "<<lpX<<endl; 
00365     cout<<mpx<<" "<<binoffx<<" "
00366         <<fractionX<<" "<<local_pitchx<<" "<<m_xoffset<<endl;
00367   }
00368 
00369   return lpX;
00370 } 
00371 
00372 // measuremet to local transformation for Y coordinate
00373 // Y is in the ROC column number direction 
00374 float RectangularPixelTopology::localY(const float mpy) const {
00375   using std::cout;
00376   using std::endl;
00377   int binoffy = int(mpy);             // truncate to int
00378   float fractionY = mpy - binoffy; // find the fraction 
00379   float local_pitchy = m_pitchy;      // defaultpitch
00380   //if(fractionY<0.) cout<<" fractiony m "<<fractionY<<" "<<mpy<<endl;
00381 
00382   if (binoffy>416) {            // ROC 8, not real ROC
00383     binoffy=binoffy+17;
00384   } else if (binoffy==416) {    // ROC 8
00385     binoffy=binoffy+16;
00386     local_pitchy = 2 * m_pitchy;
00387                 
00388   } else if (binoffy==415) {    // ROC 7, last big pixel
00389     binoffy=binoffy+15;
00390     local_pitchy = 2 * m_pitchy;
00391   } else if (binoffy>364) {     // ROC 7
00392     binoffy=binoffy+15;
00393   } else if (binoffy==364) {    // ROC 7
00394     binoffy=binoffy+14;
00395     local_pitchy = 2 * m_pitchy;
00396     
00397   } else if (binoffy==363) {      // ROC 6
00398     binoffy=binoffy+13;
00399     local_pitchy = 2 * m_pitchy;    
00400   } else if (binoffy>312) {       // ROC 6
00401     binoffy=binoffy+13;
00402   } else if (binoffy==312) {      // ROC 6
00403     binoffy=binoffy+12;
00404     local_pitchy = 2 * m_pitchy;
00405     
00406   } else if (binoffy==311) {      // ROC 5
00407     binoffy=binoffy+11;
00408     local_pitchy = 2 * m_pitchy;    
00409   } else if (binoffy>260) {       // ROC 5
00410     binoffy=binoffy+11;
00411   } else if (binoffy==260) {      // ROC 5
00412     binoffy=binoffy+10;
00413     local_pitchy = 2 * m_pitchy;
00414     
00415   } else if (binoffy==259) {      // ROC 4
00416     binoffy=binoffy+9;
00417     local_pitchy = 2 * m_pitchy;    
00418   } else if (binoffy>208) {       // ROC 4
00419     binoffy=binoffy+9;
00420   } else if (binoffy==208) {      // ROC 4
00421     binoffy=binoffy+8;
00422     local_pitchy = 2 * m_pitchy;
00423     
00424   } else if (binoffy==207) {      // ROC 3
00425     binoffy=binoffy+7;
00426     local_pitchy = 2 * m_pitchy;    
00427     } else if (binoffy>156) {       // ROC 3
00428     binoffy=binoffy+7;
00429   } else if (binoffy==156) {      // ROC 3
00430     binoffy=binoffy+6;
00431     local_pitchy = 2 * m_pitchy;
00432     
00433   } else if (binoffy==155) {      // ROC 2
00434     binoffy=binoffy+5;
00435     local_pitchy = 2 * m_pitchy;    
00436   } else if (binoffy>104) {       // ROC 2
00437     binoffy=binoffy+5;
00438   } else if (binoffy==104) {      // ROC 2
00439     binoffy=binoffy+4;
00440     local_pitchy = 2 * m_pitchy;
00441     
00442   } else if (binoffy==103) {      // ROC 1
00443     binoffy=binoffy+3;
00444     local_pitchy = 2 * m_pitchy;    
00445   } else if (binoffy>52) {       // ROC 1
00446     binoffy=binoffy+3;
00447   } else if (binoffy==52) {      // ROC 1
00448     binoffy=binoffy+2;
00449     local_pitchy = 2 * m_pitchy;
00450     
00451   } else if (binoffy==51) {      // ROC 0
00452     binoffy=binoffy+1;
00453     local_pitchy = 2 * m_pitchy;    
00454   } else if (binoffy>0) {        // ROC 0
00455     binoffy=binoffy+1;
00456   } else if (binoffy==0) {       // ROC 0
00457     binoffy=binoffy+0;
00458     local_pitchy = 2 * m_pitchy;
00459   } else { // too small
00460     if(TP_DEBUG) { 
00461       cout<<" very bad, biny "<<binoffy<<endl;
00462       cout<<mpy<<" "<<binoffy<<" "
00463           <<fractionY<<" "<<local_pitchy<<" "<<m_yoffset<<endl;
00464     }
00465   }
00466   
00467   // The final position in local coordinates 
00468   float lpY = float(binoffy*m_pitchy) + fractionY*local_pitchy + 
00469     m_yoffset;
00470   if(TP_DEBUG && (lpY<m_yoffset || lpY>(-m_yoffset)) ) {
00471     cout<<" bad lp y "<<lpY<<endl; 
00472     cout<<mpy<<" "<<binoffy<<" "
00473         <<fractionY<<" "<<local_pitchy<<" "<<m_yoffset<<endl;
00474   }
00475 
00476   return lpY;
00477 } 
00479 // Get hit errors in LocalPoint coordinates (cm)
00480 LocalError RectangularPixelTopology::localError( 
00481                                       const MeasurementPoint& mp,
00482                                       const MeasurementError& me) const {
00483   float pitchy=m_pitchy;
00484   int binoffy=int(mp.y());
00485   if( isItBigPixelInY(binoffy) )pitchy = 2.*m_pitchy;
00486 
00487   float pitchx=m_pitchx;
00488   int binoffx=int(mp.x());
00489   if( isItBigPixelInX(binoffx) )pitchx = 2.*m_pitchx;
00490 
00491   return LocalError( me.uu()*float(pitchx*pitchx), 0,
00492                      me.vv()*float(pitchy*pitchy));
00493 }
00495 // Get errors in pixel pitch units.
00496 MeasurementError RectangularPixelTopology::measurementError( 
00497                  const LocalPoint& lp,
00498                  const LocalError& le) const {
00499 
00500   float pitchy=m_pitchy;
00501   int iybin = int( (lp.y() - m_yoffset)/m_pitchy );   //get bin for equal picth 
00502   int iybin0 = iybin%54;  //This is just to avoid many ifs by using the periodicy
00503   //quasi bins 0,1,52,53 fall into larger pixels  
00504   if(iybin0==0 || iybin0==1 || iybin0==52 || iybin0==53 )
00505     pitchy = 2. * m_pitchy;
00506 
00507   float pitchx=m_pitchx;
00508   int ixbin = int( (lp.x() - m_xoffset)/m_pitchx );   //get bin for equal pitch
00509   //quasi bins 79,80,81,82 fall into the 2 larger pixels  
00510   if(ixbin>=79 && ixbin<=82) pitchx = 2. * m_pitchx;  
00511 
00512   return MeasurementError( le.xx()/float(pitchx*pitchx), 0,
00513                            le.yy()/float(pitchy*pitchy));
00514 }
00515 
00516 bool RectangularPixelTopology::containsBigPixelInX(const int& ixmin, const int& ixmax) const {
00517   bool big = false;
00518   for(int i=ixmin; i!=ixmax+1; i++) {
00519     if(isItBigPixelInX(i) && big==false) big=true;
00520   }
00521   return big;
00522 }
00523 
00524 bool RectangularPixelTopology::containsBigPixelInY(const int& iymin, const int& iymax) const {
00525   bool big = false;
00526   for(int i=iymin; i!=iymax+1; i++) {
00527     if(isItBigPixelInY(i) && big==false) big=true;
00528   }
00529   return big;
00530 }