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

From GlueXWiki
Jump to: navigation, search
(New code)
Line 1: Line 1:
= New code =  
+
= mcsmear =  
*What should the nominal overbias and temperature be?  I've been working under the assumptions of 1.0 V OB and 10 degrees C.
+
*Sean Dobbs changed the mc_parms attenuation length to 310.
* Electronic noise/dark hit smearing done with pedestal widths studied recently.
+
*Code for grabbing attenuation lengths and effective velocities from the database on a channel-by-channel basis is done.
**These were single-sample widths.  Do we want to emulate the f250 ADC pedestal algorithm instead (average of four samples)?
+
**For 'variation=mc,' this is the same as using the mc_parms values.
**Single sample widths are around 1.2 channels.  f250PulsePedestal data output gives about 0.9 channel pedestal widths.
+
*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?
* Poisson statistics smearing still needs a value for the energy of one dark hit.
+
**Elton: 0.31 MeV, deposited at the center of the module, per pixel firedFor 10 degrees, 1.0 V OB, and attenuated to the end of the module, 0.11 MeV or soThis is [current code value]/6.
+
* The change to the data structure will be just adding 'incident_id="int"' to 'bcalTruthHit.'
+
**Should we also add EUP/EDN, tUP/tDN to the data structure?
+
**If we do not, we'll have to grab C_EFFECTIVE and ATTEN_LENGTH from the ccdb in mcsmear instead of doing it in hdgeant like usual.
+
  
*I've changed the data structure and tested the output of the new code.  With the old code, a hit would be up to 1 GeV or so, usually around 50 - 300 MeV.
+
= DBCALShower =
**With the new code, I'm seeing numbers like 0.1 - 5 MeVI'm trying to figure out where in the code I might have messed up.
+
*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 mcsmearThe 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:
  
= Old code =
+
  if( ! DBCALGeometry::summingOn() ) {
* We need to decide whether or not we want to keep this method available for people to choose to use.
+
 
 +
    // 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?

Revision as of 17:42, 23 June 2015

mcsmear

  • Sean Dobbs changed the mc_parms attenuation length to 310.
  • 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?