Commit in lcsim/sandbox/NickSinev/PixSim on MAIN
CCDChargeSpreadComputer.java-1701.2 removed
CCDSpecifications.java-1241.2 removed
ChargeSpreadComputer.java-491.2 removed
ChargeSpreadTable.java-4411.2 removed
PixelatedSensorSpecs.java-291.2 removed
-813
5 removed files
removing dead brunch. I have started different aproach, and is going to commit new code here.

lcsim/sandbox/NickSinev/PixSim
CCDChargeSpreadComputer.java removed after 1.2
diff -N CCDChargeSpreadComputer.java
--- CCDChargeSpreadComputer.java	10 Aug 2007 23:27:20 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,170 +0,0 @@
-package org.lcsim.mc.PixSim;
-import org.lcsim.mc.CCDSim.LorentzAngle;
-import hep.physics.vec.Hep3Vector;
-import hep.physics.vec.VecOp;
-import hep.physics.vec.BasicHep3Vector;
-
-
-/**
- * Charge spread computer for the CCDs (traditional type - charge is diffusing
- * in the undepleted area of sensitive element, reaches deepleted area and
- * travels here in the electric and magnetic field
- *  
- * @author sinev
- * @version $Id: CCDChargeSpreadComputer.java,v 1.2 2007/08/10 23:27:20 sinev Exp $
- */
-public class CCDChargeSpreadComputer implements ChargeSpreadComputer
-{
-    /**
-    * Returns the fraction of charge, generated at point xg,yg,zg and collected in 1 um**2
-    * area around collection point xc,yc (collection point z is 0.) All coordinates are in
-    * local system for the given sensor, the 0.,0.,0. point is the center of the pixel, under
-    * which charge was generated, while xc and yc may belong to another pixel.
-    */
-
-    private Hep3Vector Bfield = null;
-    private Hep3Vector Efield = null;
-    private Hep3Vector Lorentz = null;
-    private double lorentzangle = 0.;
-    private double temp = 190.;
-    private double Beff = 5.;
-    private double athick = 20.;
-    private double dthick = 4.;
-    private double celszx = 1.;
-    private double celszy = 1.;
-    private double q = -1.;
-    private int ctyp = 0;
-    private final double[] Aref = {0.765,-0.14};
-    private final double[] Adir = {0.,0.97833,-0.805,0.21667}; 
-    private LorentzAngle la = new LorentzAngle();
-
-    public CCDChargeSpreadComputer()
-    {
-     Bfield = new BasicHep3Vector(0.,5.,0.);
-     Efield = new BasicHep3Vector(0.,0.,0.25E5);
-     calculateLorentzAngle();
-    }
-
-    /**
-    * Setting the value and direction of magnetic fiels in local
-    * coordinate system. For barrel CCDs it will be 0.,B,0. (as local Y is along global Z)
-    * and for endcap ccd it will be 0.,0.,+-B az local Z is in the direction of global Z
-    * Though sign of B will be different for endcaps on +Z and -Z, we, essantually, don't care,
-    * as in that case electrical and magnetic field have cross product equal to 0., so no Lorentz
-    * angle corrections are needed. E field is assumed always along local Z for electron collecting
-    * CCDs and opposite to Z for hole collecting CCDs (so charge is always moved in the direction
-    * of decreasing z, and, in general, is assumed to be collected at z=0.  
-    */
- 
-    public void setBfield( Hep3Vector B)
-    {
-     ((BasicHep3Vector) Bfield).setV(B.x(),B.y(),B.z());
-     calculateLorentzAngle();
-    }
-
-    /**
-    *  Setting the value of electrival field. The field is always directed along local
-    *  Z axiz, and always have such sign, that charge is collected at Z=0.
-    *  So only magnitude of E field should be provided as argument E 
-    *
-    */
-    public void setEfield( double E )
-    {
-     ((BasicHep3Vector) Efield).setV(0.,0., -q*Math.abs(E));
-     calculateLorentzAngle();
-    }
-
-    /** 
-    * Setting the sensor parameters by providing Sensor Specifications
-    *
-    */
-
-    public void setSensor( PixelatedSensorSpecs sp)
-    {
-      athick = sp.getActiveThickness();
-      dthick = sp.getDepletedThickness();     
-      temp = sp.getOperatingTemperature();
-      double ef = 0.;
-      if(dthick > 0.01) ef = sp.getBiasVoltage()/(dthick*0.0001);
-      setEfield(ef);  
-    }
-
-    public void setCellSizeX(double csx)
-    {
-     celszx = csx;
-    }
- 
-    public void setCellSizeY(double csy)
-    {
-     celszy = csy;
-    }
-
-    public double getChargeFractionAt(double xg, double yg, double zg, double xc, double yc)
-    {
-     double[] ce = calculateCentroid(xg,yg,zg);
-     double dx = xc - ce[0];
-     double dy = yc - ce[1];
-     double rsq = dx*dx+dy*dy;
-     double sigd = 0.;
-     double sigr = 0.;
-     double frr = 0.;
-     double frd = 1.;
-     double chd = 0.;
-     double difg = athick-dthick; 
-     if(zg < dthick)
-     {
-      if(celszx*celszy > sigd*sigd)
-      {
-       if((Math.abs(dx) < 0.5*celszx) && (Math.abs(dy) < 0.5*celszy))
-        chd = 1./(celszx*celszy);
-      }
-      else
-      {
-       double nor = 1./(2.*Math.PI*sigd*sigd);
-       chd = nor * Math.exp(-rsq/(2.*sigd*sigd));
-      }
-     }
-     else
-     {
-      double ddf = (zg-dthick)/difg;
-      frr = ddf;
-      frd = 1.-frr;
-      sigd = 0.;
-      for(int i=0; i<Adir.length; i++)
-       sigd+=Adir[i]*Math.pow(ddf,(double) i);
-      sigd*=difg;
-      sigr=0.;
-      for(int i=0; i<Aref.length; i++)
-       sigr+=Aref[i]*Math.pow(ddf,(double) i);
-      sigr*=difg;  
-      double nor = 1./(2.*Math.PI*sigd*sigd);
-      chd = frd*nor * Math.exp(-rsq/(2.*sigd*sigd));
-      nor = 1./(2.*Math.PI*sigr*sigr);
-      chd+= frr*nor * Math.exp(-rsq/(2.*sigr*sigr));
-     } 
-     return chd;   
-    }
-
-    private double[] calculateCentroid(double x, double y, double z)
-    {
-     double[] centr = new double[2];
-     double lof = 0.;
-     double dz = z;
-     if(z>dthick) dz = dthick;
-     Hep3Vector lu = VecOp.unit(Lorentz);
-     double ld = dz*Math.tan(lorentzangle);
-     centr[0]=x+ld*lu.x();
-     centr[1]=y+ld*lu.y();
-     return centr;
-    }
-    
-    private void calculateLorentzAngle()
-    {
-     if(q > 0.) ctyp=1; 
-     Lorentz = VecOp.cross(Bfield,Efield);
-     double ef = Math.sqrt(Efield.x()*Efield.x()+Efield.y()*Efield.y()+Efield.z()*Efield.z());
-     if(ef > 1.) Beff = Math.sqrt(Lorentz.x()*Lorentz.x()+Lorentz.y()*Lorentz.y()+Lorentz.z()*Lorentz.z())/ef;
-     lorentzangle = q*la.getLorentzAngle(Beff,ef,temp,ctyp);
-    } 
-
-}

lcsim/sandbox/NickSinev/PixSim
CCDSpecifications.java removed after 1.2
diff -N CCDSpecifications.java
--- CCDSpecifications.java	10 Aug 2007 23:27:20 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,124 +0,0 @@
-package org.lcsim.mc.PixSim;
-
-/**
- * provides CCD specifications for simulation of CCD response to charge particle hit .
- * Specifications defined by this class: epitaxial layer depth (thicknes), depleted layer depth
- * pixel size in x direction and pixel size in y direction. Everything in micrometers
- * @author Sinev   U of Oregon; [log in to unmask] ; SLAC x2970
- * @version $Id: CCDSpecifications.java,v 1.2 2007/08/10 23:27:20 sinev Exp $
- */
-public class CCDSpecifications implements PixelatedSensorSpecs
-{
-    // Everything is in micrometers here
-    public final int NSSPECS = 6;
-    public final int PSIZEXOF = 0;
-    public final int PSIZEYOF = 1;
-    public final int THICKNESSOF = 2;
-    public final int DEPLTHICKNESSOF = 3;
-    public final int OPTEMPERATUREOF = 4;
-    public final int VOLTAGEOF = 5;
-    private double[] senspecs = new double[NSSPECS];  
-    private static CCDSpecifications theSpec;
-
-/**
- * Default constructor.
- * Specifies following parameters: <BR>
- * Epi layer thickness (depth) 20 <i>micrometers</i> <BR>
- * Deplition depth 4 <i>micrometers</i> <BR>
- * Pixel size 20 x 20 <i>micrometers</i>
- * 
- */  
-    public CCDSpecifications()
-    {
-      theSpec = this;
-//
-//    seting default values
-//
-      senspecs[PSIZEXOF]=20.;
-      senspecs[PSIZEYOF]=20.;
-      senspecs[THICKNESSOF] = 20.;
-      senspecs[DEPLTHICKNESSOF]=4.;
-      senspecs[OPTEMPERATUREOF]=190.;
-      senspecs[VOLTAGEOF]=10.;
-    }
-
-/**
- * Method to access instance of the CCDSpecifications class.
- * Used to ensure that all part of the code are accessing the same
- * instance of CCDSpec. This method should be used whenever CcdSpec is needed
- * instead of building new instance. 
- **/
-    public static CCDSpecifications instance()
-    {
-     if(theSpec == null) { theSpec = new CCDSpecifications(); }
-     return theSpec;      
-    }
-
-/**
- * access to specifications as array of doubles
- * 
-*/
-
-   public double[] getSensorSpecs() { return senspecs; }
-
-/**
- * access to particular specifications: pixel size in X (microns, local x) 
- *
- */
-
-   public double getPixelSizeX()
-   {
-    return senspecs[PSIZEXOF];
-   }
-
-/**
- * access to particular specifications: pixel size in Y (microns, local y) 
- *
- */
-
-   public double getPixelSizeY()
-   {
-    return senspecs[PSIZEYOF];
-   }
-
-/**
- * access to particular specifications: actve layer thickness (microns) 
- *
- */
-
-   public double getActiveThickness()
-   {
-    return senspecs[THICKNESSOF];
-   }
-
-/**
- * access to particular specifications: depleted layer thickness (microns) 
- *
- */
-
-   public double getDepletedThickness()
-   {
-    return senspecs[DEPLTHICKNESSOF];
-   }
-
-/**
- * access to particular specifications: operating temperature (Kelvin) 
- *
- */
-
-   public double getOperatingTemperature()
-   {
-    return senspecs[OPTEMPERATUREOF];
-   }
-
-/**
- * access to particular specifications: operating bias voltage (Volts) 
- *
- */
-
-   public double getBiasVoltage()
-   {
-    return senspecs[VOLTAGEOF];
-   }
-}
- 
\ No newline at end of file

lcsim/sandbox/NickSinev/PixSim
ChargeSpreadComputer.java removed after 1.2
diff -N ChargeSpreadComputer.java
--- ChargeSpreadComputer.java	10 Aug 2007 23:27:20 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,49 +0,0 @@
-package org.lcsim.mc.PixSim;
-import hep.physics.vec.Hep3Vector;
-
-/**
- * A general interface for accessing software,
- * calculating collected charge density for the
- * given observation point and given charge generation
- * point.
- * Program, implementing this interface is supposed to take
- * into account sensor parameters and B field (to correctly
- * calculate Lorentz angle), and take into account diffusion
- * (mainly in undepleted regions) and charge transport in the depleted regions.
- * Different types of sensors may have completely different objects, implementing
- * this interface.
- * @author sinev
- * @version $Id: ChargeSpreadComputer.java,v 1.2 2007/08/10 23:27:20 sinev Exp $
- */
-public interface ChargeSpreadComputer
-{
-    /**
-    * Returns the fraction of charge, generated at point xg,yg,zg and collected in 1 um**2
-    * area around collection point xc,yc (collection point z is 0.) All coordinates are in
-    * local system for the given sensor, the 0.,0.,0. point is the center of the pixel, under
-    * which charge was generated, while xc and yc may belong to another pixel.
-    */
- 
-    public double getChargeFractionAt(double xg, double yg, double zg, double xc, double yc);
-
-    /**
-    * Setting the value of the magnetic field in the detector (in general it
-    * is assumed that magnetic field is directed along z axis of the global coordinate
-    * system. 
-    *
-    */
-
-    public void setBfield( Hep3Vector B);
-
-    /** 
-    * Setting the sensor parameters by providing Sensor Specifications
-    *
-    */
-
-    public void setSensor( PixelatedSensorSpecs sp);
-
-    public void setCellSizeX(double csx);
- 
-    public void setCellSizeY(double csy);
-
-}

lcsim/sandbox/NickSinev/PixSim
ChargeSpreadTable.java removed after 1.2
diff -N ChargeSpreadTable.java
--- ChargeSpreadTable.java	10 Aug 2007 23:27:20 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,441 +0,0 @@
-package org.lcsim.mc.PixSim;
-import java.util.*;
-import java.io.*;
-import java.text.*;
-import hep.physics.vec.Hep3Vector;
-import hep.physics.vec.BasicHep3Vector;
-
-/**
- * A program which provides fractions of the charge, generated at 
- * the given 3D point inside sensitive volume under center pixel
- * collected in the surrunding pixels (including central one).
- * It does it by table lookup
- * The table may be pre-generated, and saved in the user cache.
- * If the table with given sensor parameters is not found,
- * it is generated and saved in cache.
- *  
- * 
- * Modifications:  August 3, 2007 - C programs created <BR> 
- * @author  sinev  U of Oregon, SLAC. x2970 <BR>
- *
- * @version $Id: ChargeSpreadTable.java,v 1.2 2007/08/10 23:27:20 sinev Exp $
-*    
-*/
-
-public class ChargeSpreadTable
-{
-   private boolean debug = false;
-   private boolean table_created = false;
-   private PixelatedSensorSpecs specs = null;
-   private int NDepths = 20;
-   private int NSPntsX = 20;
-   private int NSPntsY = 20;
-   private int NPixelsX = 11;
-   private int NPixelsY = 11;
-   private Hep3Vector _Bfield = new BasicHep3Vector(0.,5.,0.);
-   private double _bV = 10.;
-   private static float[][][][][] _table = null;
-   private String _sname = "ccd_classic";
-   private String _suffix = "";
-   ChargeSpreadComputer chscomp=null;
-   FileWriter ofw = null;
-   DecimalFormat df = new DecimalFormat();
-  
-    /** 
-     * Default constructor. Create table for default sensor type,
-     * which is ccd_classic, with default table dimensions:
-     * points in grid: 20 in depth, 20 in X and 20 in Y;
-     * number of pixels: 11 in X and 11 in Y (notice this numbers are better to be odd)
-     */
-
-    public ChargeSpreadTable()
-    {
-     System.out.println("Creating ChargeSpreadTable for sensor: "+_sname);
-     CreateTable();    
-    }
-
-    public ChargeSpreadTable(String sensor)
-    {
-     _sname = sensor;
-     CreateTable(); 
-    }
-
-    public ChargeSpreadTable(String sensor, String suffix)
-    {
-     _sname = sensor;
-     _suffix = suffix;
-     CreateTable();
-    }
-
-    public ChargeSpreadTable(String sensor, int nd, int nspx, int nspy, int npxx, int npxy)
-    {
-     _sname = sensor;
-     NDepths = nd;
-     NSPntsX = nspx;
-     NSPntsY = nspy;
-     NPixelsX = npxx;
-     NPixelsY = npxy;
-     CreateTable();
-    }
-
-    public ChargeSpreadTable(String sensor, String suffix, int nd, int nspx, int nspy, int npxx, int npxy)
-    {
-     _sname = sensor;
-     _suffix = suffix;
-     NDepths = nd;
-     NSPntsX = nspx;
-     NSPntsY = nspy;
-     NPixelsX = npxx;
-     NPixelsY = npxy;
-     CreateTable();
-    }
- 
-
-
-    public void setBField(Hep3Vector B)
-    {
-     ((BasicHep3Vector) _Bfield).setV(B.x(),B.y(),B.z());
-    }
-
-    public void setBiasVolt(double V)
-    {
-     _bV = V;
-    }
-
-    
-    private void CreateTable()
-    {
-        _table = new float[NDepths][NSPntsX][NSPntsY][NPixelsX][NPixelsY];
-        int[] _tabDimPar = null;
-        int nip = 20; 
-
-        if(_sname.compareTo("ccd_classic") == 0)
-        { 
-          specs = CCDSpecifications.instance();
-          chscomp = new CCDChargeSpreadComputer();
-          chscomp.setBfield(_Bfield);
-          chscomp.setSensor(specs);
-        }  
-        
-        String cacheDir = System.getProperty("user.home");
-        File cachedir = new File(cacheDir);
-        table_created = false;
-        if(cachedir == null)
-        {
-          System.out.println("ChargeSpreadTable is unable to find user home directory!"); 
-        }
-        else
-        {
-         File home = new File(cachedir,".cache");
-         String fname = _sname + _suffix + "_CST.dat";
-         File cache = new File(home,fname);
-         if(cache.exists())
-         {
-          String rstr=null;
-          BufferedReader r=null;
-          table_created = true;
-          System.out.println("Found ChargeSpreadTable file "+cache.getAbsolutePath());
-          boolean pmatch = true;
-          FileInputStream fins = null;
-          try
-          {
-           fins = new FileInputStream(cache);
-          }
-          catch(FileNotFoundException e)
-          {
-          }
-          finally
-          {
-          }
-          if(fins != null)
-          {    
-           r = new BufferedReader(new InputStreamReader(fins));
-           if((rstr = readNextNonCommentLine(r)) != null)
-           {
-            String[] tokens = rstr.split("\\s+");
-            int ntp = tokens.length;
-            _tabDimPar = new int[ntp];
-            for(int i=0; i<ntp; i++)
-            {
-             try
-             {
-              int ival = Integer.parseInt(tokens[i],10);
-              System.out.println("Read: "+ival);
-              _tabDimPar[i]=ival;
-             }
-             catch(NumberFormatException e)
-             {
-              System.out.println("string: "+tokens[i]+" cannot be parsed to int!");
-             }
-             finally
-             {
-             }
-            }
-           }
-          }
-          if(_tabDimPar[0] != NDepths) table_created = false;
-          if(_tabDimPar[1] != NSPntsX) table_created = false;
-          if(_tabDimPar[2] != NSPntsY) table_created = false;
-          if(_tabDimPar[3] != NPixelsX) table_created = false;
-          if(_tabDimPar[4] != NPixelsY) table_created = false;
-          if(table_created)
-          {
-           double[] senspcs = specs.getSensorSpecs();
-           int nsp = senspcs.length;
-           double[] readspcs = new double[nsp];
-           int sprd = 0;
-           while(sprd < nsp)
-           {
-            rstr = readNextNonCommentLine(r);
-            if(rstr == null)
-            {
-             System.out.println("Unexpected end of file! Not all sensor specs are read!");
-             break;
-            }
-            String[] tokens = rstr.split("\\s+");
-            int ntps = tokens.length;
-            for(int i=0; i<ntps; i++)
-            {
-             try
-             {
-              double val = Double.parseDouble(tokens[i]);
-              System.out.println("Read: "+val);
-              readspcs[sprd]=val;
-              sprd++;
-             }
-             catch(NumberFormatException e)
-             {
-              System.out.println("string: "+tokens[i]+" cannot be parsed to double!");
-             }
-             finally
-             {
-             }
-            } 
-           }
-           if(sprd != nsp) table_created = false;
-           if(table_created)
-           {   
-            for(int i=0; i<nsp; i++)
-             if(Math.abs(readspcs[i]/senspcs[i] - 1.) > 0.001) table_created = false;
-           }
-          }
-          if(table_created)
-          {
-           int nvalues = NDepths * NSPntsX * NSPntsY * NPixelsX * NPixelsY;
-           System.out.println("Reading "+nvalues+" elements from table file");
-           int nrd=0;
-           int nd = 0;
-           int npx = 0;
-           int npy = 0;
-           int npxx = 0;
-           int npxy = 0;
-           while((rstr = readNextNonCommentLine(r)) != null)
-           {
-            String[] tokens = rstr.split("\\s+");
-            int ntps = tokens.length;
-            for(int i=0; i<ntps; i++)
-            {
-             try
-             {
-              double val = Double.parseDouble(tokens[i]);
-              float fv = (float) val;
-              if(nrd < nvalues)
-               _table[nd][npx][npy][npxx][npxy]=fv;
-              nrd++;
-              npxy++;
-              if(npxy == NPixelsY)
-              {
-               npxy = 0;
-               npxx++;
-               if(npxx == NPixelsX)
-               {
-                npxx=0;
-                npy++;
-                if(npy==NSPntsY)
-                {
-                 npy=0;
-                 npx++;
-                 if(npx == NSPntsX)
-                 {
-                  npx=0;
-                  nd++; 
-                 }
-                }  
-               } 
-              } 
-             }
-             catch(NumberFormatException e)
-             {
-              System.out.println("string: "+tokens[i]+" cannot be parsed to double!");
-             }
-             finally
-             {
-             }
-            }
-            if(nrd >= nvalues) break; 
-           }      
-          } 
-         }
-         else
-         {
-          System.out.println("Table file does not exist. Creating new table");
-          df.setMaximumFractionDigits(6);
-          try
-          { 
-           cache.createNewFile();
-           ofw = new FileWriter(cache);
-           ofw.write("//  Charge Spread Table for sensor "+_sname+_suffix+"\n");
-           Date date = new Date();
-           DateFormat daf = new SimpleDateFormat();
-           ofw.write("// Table was created: "+daf.format(date)+"\n");
-           ofw.write(" "+NDepths+" "+NSPntsX+" "+NSPntsY+" "+NPixelsX+" "+NPixelsY+"\n");
-           double[] senspcs = specs.getSensorSpecs();
-           int nsp = senspcs.length;
-           for(int i=0; i<nsp; i++)
-            ofw.write(df.format(senspcs[i])+" ");
-           ofw.write("/n");
-           int cpixx = (NPixelsX-1)/2 - 1;
-           int cpixy = (NPixelsY-1)/2 - 1;
-           double xps = senspcs[0];
-           double yps = senspcs[1];
-           double thickn = senspcs[2];
-           double dx = xps/NSPntsX;
-           double dy = yps/NSPntsY;
-           double dz = thickn/NDepths;
-           double xd = 0.;
-           double yd = 0.;
-           double xs = 0.;
-           double ys = 0.;
-           double zd = 0.;     
-           double dxi = xps/nip;
-           double dyi = yps/nip;
-           chscomp.setCellSizeX(dxi);
-           chscomp.setCellSizeY(dyi);
-           int nvalues = NDepths * NSPntsX * NSPntsY * NPixelsX * NPixelsY;
-           System.out.println("Calculating and recording "+nvalues+" elements into table file");
-           int nwr=0;
-           int nd = 0;
-           int npx = 0;
-           int npy = 0;
-           int npxx = 0;
-           int npxy = 0;
-           while(nwr < nvalues)
-           {
-            int ntps = NDepths;
-            if(NDepths > 10)
-            {
-             if((NDepths%2) == 0)
-              ntps = NDepths/2;
-             if(NDepths > 20)
-             {
-              if((NDepths%3)==0)
-               ntps = NDepths/3;
-              if((ntps>10) && ((NDepths%5)==0))
-               ntps = NDepths/5;
-             }                
-            } 
-            for(int i=0; i<ntps; i++)
-            {
-             xd = dx*npx + dx/2. - xps/2;
-             yd = dy*npy + dy/2. - yps/2;
-             zd = dz*nd + dz/2.;
-             double aop = xps * yps; 
-             double schf = 0.;
-             double xof = (npxx - cpixx) * xps;
-             double yof = (npxy - cpixy) * yps;
-             for(int j=0; j<nip; j++)
-             {
-              ys = j*dyi + dyi/2 - yps/2 + yof;
-              for(int k=0; k<nip; k++)
-              {
-               xs = k*dxi+dxi/2-xps/2+xof;
-               schf = schf + chscomp.getChargeFractionAt(xs,ys,xd,yd,zd);
-              }
-             }
-             schf*=aop;
-             _table[nd][npx][npy][npxx][npxy] = (float) schf;
-             ofw.write(" "+df.format(schf));
-             nwr++;
-             npxy++;
-             if(npxy == NPixelsY)
-             {
-              npxy = 0;
-              npxx++;
-              if(npxx == NPixelsX)
-              {
-               npxx=0;
-               npy++;
-               if(npy==NSPntsY)
-               {
-                npy=0;
-                npx++;
-                if(npx == NSPntsX)
-                {
-                 npx=0;
-                 nd++; 
-                }  
-               } 
-              } 
-             }
-             if(nwr >= nvalues) break; 
-            }
-            ofw.write("\n");
-           }                  
-          }
-          catch(IOException e)
-          {
-           System.out.println("IOException caught: "+e.getMessage());
-          }
-          finally
-          {
-          } 
-         }          
-        } 
-    }
-
-    private String readNextNonCommentLine(BufferedReader r)
-    {
-      boolean comfl = false;
-      String readstr = null;
-      try
-      {
-       readstr = r.readLine();
-       if(readstr != null)
-       { 
-        if(readstr.contains("/*")) comfl = true;
-        while(comfl)
-        { 
-         readstr = r.readLine();
-         if(readstr.contains("*/")) comfl=false;
-         if(!comfl) readstr = r.readLine(); 
-        }
-        if(readstr!= null)
-        {
-         int cind = readstr.indexOf("//");
-         while (cind != -1)
-         { 
-          if(cind > 0)
-          {
-           String clstr = readstr.substring(0,cind-1);
-           readstr = clstr;
-          }
-          if(cind == 0)
-          { 
-           readstr = r.readLine();
-           cind = readstr.indexOf("//");
-          }            
-         } 
-        }       
-       }
-      }
-      catch(IOException e)
-      {
-       System.out.println("readNextNonCommentLine(): IOException caught: "+e.getMessage());
-      }
-      finally
-      {
-      }
-      return readstr;
-    } 
-    
-}
\ No newline at end of file

lcsim/sandbox/NickSinev/PixSim
PixelatedSensorSpecs.java removed after 1.2
diff -N PixelatedSensorSpecs.java
--- PixelatedSensorSpecs.java	10 Aug 2007 23:27:20 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-package org.lcsim.mc.PixSim;
-
-
-/**
- * A general interface for Pixelated detector specification
- * All such specification should implement it.
- * @author sinev
- * @version $Id: PixelatedSensorSpecs.java,v 1.2 2007/08/10 23:27:20 sinev Exp $
- */
-public interface PixelatedSensorSpecs
-{
-    public double[] getSensorSpecs();
-    /** 
-     * Returns the detector specific cell id.
-     */
-
-    public double getPixelSizeX();
-
-    public double getPixelSizeY();
- 
-    public double getActiveThickness();
-
-    public double getDepletedThickness();
-
-    public double getOperatingTemperature();
-
-    public double getBiasVoltage();
-
-}
CVSspam 0.2.8