lcsim/src/org/lcsim/mc/CCDSim
diff -u -r1.5 -r1.6
--- FullCCDSimulation.java 17 Feb 2007 02:00:18 -0000 1.5
+++ FullCCDSimulation.java 3 Mar 2007 02:44:45 -0000 1.6
@@ -31,7 +31,7 @@
* objects, which emplement SimTrackerHit interface, so can be used instead
* of original Simulated Tracker Hits generated by Geant4.
* @author sinev U of Oregon; SLAC x2970; [log in to unmask]
- * @version $Id: FullCCDSimulation.java,v 1.5 2007/02/17 02:00:18 sinev Exp $
+ * @version $Id: FullCCDSimulation.java,v 1.6 2007/03/03 02:44:45 sinev Exp $
*/
public class FullCCDSimulation extends Driver
{
@@ -366,15 +366,27 @@
double resys = pszy*pszy/12.;
double thk = sp.getEpiDepth() * 0.001;
double mipsig = 0.;
+ double mipadc = 0.;
double noiev = esp.EVPERPAIR * esp.getNoiseRMS();
+ double noiadc = esp.getNoiseRMS()/esp.getADCscale();
double stnr = 1.;
for(int i=0; i<20; i++)
{
double tan = _tangs[i];
mipsig = sp.LOSSRATE * sp.getEpiDepth()*Math.sqrt(1.+tan*tan);
+ mipadc = mipsig/esp.getADCscale();
stnr = mipsig/noiev;
- resxs = pszx*pszx/(12.+Math.sqrt(stnr));
- resys = pszy*pszy/(12.+Math.sqrt(stnr));
+ if(debug) System.out.println("For tan lam: "+tan+" sign/noise = "+stnr);
+ if(stnr > 7.)
+ {
+ resxs = pszx*pszx/(12.+7.*((mipadc-5.*noiadc-1.)/mipadc)*Math.sqrt(stnr-7.));
+ resys = pszy*pszy/(12.+7.*((mipadc-5.*noiadc-1.)/mipadc)*Math.sqrt(stnr-7.));
+ }
+ else
+ {
+ resxs = pszx*pszx/12.;
+ resys = pszy*pszy/12.;
+ }
double antrm = 0.2 * tan * thk;
double var = resys + antrm*antrm;
_resalf[i]=var;
@@ -382,6 +394,7 @@
_rescrfp[i] = var;
_rescrfn[i] = var;
}
+ System.out.println("Resolution tables are initialized ");
}
if(_useGenTab)
{