Difference between revisions of "Tegan's HDGEANT and mcsmear questions"

From GlueXWiki
Jump to: navigation, search
(Created page with "= New code = * Poisson statistics smearing still needs a value for the energy of one dark hit. * What should we use for an energy threshold to write out events? A 4 mV thres...")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
= New code =  
+
= mcsmear =  
* Poisson statistics smearing still needs a value for the energy of one dark hit.
+
*Sean Dobbs changed the mc_parms attenuation length to 310.
* What should we use for an energy threshold to write out events?  A 4 mV threshold was used before.  4 MeV?
+
**Shall we change both the mc_parms value and the 'variation=mc' values to 525 instead?
* The change to the data structure will be just adding 'incident_id="int"' to 'bcalTruthHit.'
+
*Code for grabbing attenuation lengths and effective velocities from the database on a channel-by-channel basis is done.
** If we don't change the data structure, we'll change bcal_index in the code and get rid of the incident particle filling.
+
**For 'variation=mc,' this is the same as using the mc_parms values.
** I'd prefer changing the data structure, since we'll eventually want to implement incident particle dependent smearing (I assume), and it seems relatively easy to do it now.
+
*Initially, when setting the energy threshold for a hit, Mark gave me a calculation that came out to 3.5 MeV.  Later, Elton gave me the same calculation (with some different numbers) that came out to 2.25 MeV.  The checked-in version is using 3.5 MeV, since it was done quite a long time ago. Should this be changed now?
* Time smearing: the time resolution in the code for the fADC is stated as 4 ns / sqrt(12). This was used before because we were using 0.1 ns bins rather than 4 ns bins.
+
** Is this value what we'd want to use for smearing a single truth time?
+
  
= Old code =
+
= DBCALShower =
* We need to decide whether or not we want to keep this method available for people to choose to use.
+
*The non-linear correction to the cluster energy is not doing what it should be, from what I can tell.
* If we do keep it:
+
*A 1 GeV photon at 90 degrees deposits about 0.945 GeV into mcsmear.  The cluster energy from that output gives approximately the same.  The shower energy is only marginally larger.  The correction is a scale factor and an exponent.  Each of those is calculated from a third-degree polynomial in zentry, using the following coefficients:
** Need to find a value for the energy of one dark hit that causes waveforms to more closely resemble data and also that gives reasonable pedestal variation.
+
 
** By fixing an electronic noise smearing, then altering the dark hit energy, it looks like we want something like the current energy divided by 10 or so.
+
  if( ! DBCALGeometry::summingOn() ) {
** It should be easy to set the dark hit energy based on what amplitude in mV we want the dark pulses to have, if we have any feeling for that (1 mV amplitude ~ 1 MeV energy deposition).
+
 
 +
    // these are energy calibration parameters -- no summing of cells
 +
   
 +
    m_scaleZ_p0 =  0.950774;
 +
    m_scaleZ_p1 =  0.000483979;
 +
    m_scaleZ_p2 =  -2.08086e-06;
 +
    m_scaleZ_p3 =  8.08534e-10;
 +
   
 +
    m_nonlinZ_p0 =  0.0152548;
 +
    m_nonlinZ_p1 =  0;
 +
    m_nonlinZ_p2 =  0;   
 +
    m_nonlinZ_p3 =  0;
 +
  }
 +
  else{
 +
   
 +
    // these are energy calibration parameters -- 1.2.3.4 summing
 +
   
 +
    //last updated for svn revision 9233
 +
    m_scaleZ_p0 =  0.992437;
 +
    m_scaleZ_p1 =  0.00039242;
 +
    m_scaleZ_p2 =  -2.23135e-06;
 +
    m_scaleZ_p3 =  1.40158e-09;
 +
   
 +
    m_nonlinZ_p0 =  -0.0147086;
 +
    m_nonlinZ_p1 =  9.69207e-05;
 +
    m_nonlinZ_p2 =  0;   
 +
    m_nonlinZ_p3 =  0;
 +
 
 +
  }
 +
 
 +
The correction is as follows:
 +
 
 +
    float scale = m_scaleZ_p0  + m_scaleZ_p1*zEntry + m_scaleZ_p2*(zEntry*zEntry) + m_scaleZ_p3*(zEntry*zEntry*zEntry);
 +
    float nonlin = m_nonlinZ_p0  + m_nonlinZ_p1*zEntry + m_nonlinZ_p2*(zEntry*zEntry) + m_nonlinZ_p3*(zEntry*zEntry*zEntry);
 +
 
 +
    shower->E = pow( (shower->E_raw ) / scale, 1 / ( 1 + nonlin ) );
 +
 
 +
For 90 degrees (zEntry ~ zShower - zTarget = 0), the scale and nonlin terms are just the first parameters.
 +
 
 +
When using a 1 GeV photon, where 0.945 GeV is in the cluster (E_raw above), this formulation gives a corrected shower energy of 0.95151 GeV.
 +
**Where exactly did these numbers come from?  They must be related to Matt Shepherd's paper, but it's a bit hard to follow.
 +
*Should we just re-do this study for the correction, or is there a better way to do this?
 +
**I think having mcsmear output digihits was mentioned at some point.  Do we think that's the best solution?

Latest revision as of 12:22, 24 June 2015

mcsmear

  • Sean Dobbs changed the mc_parms attenuation length to 310.
    • Shall we change both the mc_parms value and the 'variation=mc' values to 525 instead?
  • Code for grabbing attenuation lengths and effective velocities from the database on a channel-by-channel basis is done.
    • For 'variation=mc,' this is the same as using the mc_parms values.
  • Initially, when setting the energy threshold for a hit, Mark gave me a calculation that came out to 3.5 MeV. Later, Elton gave me the same calculation (with some different numbers) that came out to 2.25 MeV. The checked-in version is using 3.5 MeV, since it was done quite a long time ago. Should this be changed now?

DBCALShower

  • The non-linear correction to the cluster energy is not doing what it should be, from what I can tell.
  • A 1 GeV photon at 90 degrees deposits about 0.945 GeV into mcsmear. The cluster energy from that output gives approximately the same. The shower energy is only marginally larger. The correction is a scale factor and an exponent. Each of those is calculated from a third-degree polynomial in zentry, using the following coefficients:
 if( ! DBCALGeometry::summingOn() ) {
   // these are energy calibration parameters -- no summing of cells
   
   m_scaleZ_p0 =  0.950774;
   m_scaleZ_p1 =  0.000483979;
   m_scaleZ_p2 =  -2.08086e-06;
   m_scaleZ_p3 =  8.08534e-10;
   
   m_nonlinZ_p0 =  0.0152548;
   m_nonlinZ_p1 =  0;
   m_nonlinZ_p2 =  0;    
   m_nonlinZ_p3 =  0;
 }
 else{
   
   // these are energy calibration parameters -- 1.2.3.4 summing
   
   //last updated for svn revision 9233 
   m_scaleZ_p0 =  0.992437;
   m_scaleZ_p1 =  0.00039242;
   m_scaleZ_p2 =  -2.23135e-06;
   m_scaleZ_p3 =  1.40158e-09;
   
   m_nonlinZ_p0 =  -0.0147086;
   m_nonlinZ_p1 =  9.69207e-05;
   m_nonlinZ_p2 =  0;    
   m_nonlinZ_p3 =  0;
 }

The correction is as follows:

   float scale = m_scaleZ_p0  + m_scaleZ_p1*zEntry + m_scaleZ_p2*(zEntry*zEntry) + m_scaleZ_p3*(zEntry*zEntry*zEntry);
   float nonlin = m_nonlinZ_p0  + m_nonlinZ_p1*zEntry + m_nonlinZ_p2*(zEntry*zEntry) + m_nonlinZ_p3*(zEntry*zEntry*zEntry);
   shower->E = pow( (shower->E_raw ) / scale, 1 / ( 1 + nonlin ) );

For 90 degrees (zEntry ~ zShower - zTarget = 0), the scale and nonlin terms are just the first parameters.

When using a 1 GeV photon, where 0.945 GeV is in the cluster (E_raw above), this formulation gives a corrected shower energy of 0.95151 GeV.

    • Where exactly did these numbers come from? They must be related to Matt Shepherd's paper, but it's a bit hard to follow.
  • Should we just re-do this study for the correction, or is there a better way to do this?
    • I think having mcsmear output digihits was mentioned at some point. Do we think that's the best solution?