Skip to Content.
Sympa Menu

sphenix-software-l - [Sphenix-software-l] no mtg/release of calo calib macros/code check in/ new digitization temporary fix

sphenix-software-l AT lists.bnl.gov

Subject: sPHENIX discussion of software

List archive

Chronological Thread  
  • From: "Frantz, Justin" <frantz AT ohio.edu>
  • To: "sphenix-hcal-l AT lists.bnl.gov" <sphenix-hcal-l AT lists.bnl.gov>, "sphenix-emcal-l AT lists.bnl.gov" <sphenix-emcal-l AT lists.bnl.gov>, "sphenix-calibration-l AT lists.bnl.gov" <sphenix-calibration-l AT lists.bnl.gov>, "sphenix-software-l AT lists.bnl.gov" <sphenix-software-l AT lists.bnl.gov>
  • Subject: [Sphenix-software-l] no mtg/release of calo calib macros/code check in/ new digitization temporary fix
  • Date: Wed, 11 May 2022 06:14:10 +0000

Hi all,

First, we will not have the Calo Calib mtg tomorrow because of preparing for the S&C review...perhaps if we need to have any S&C review related discussions we could use that time frame (1-3pm)...I will contact anyone that I need that for individually, but let me know if you have a new plot for the review you'd like to discuss with me, or if there's something for the review I can provide anyone with, then we can set up discussion preferably around that normal meeting time.

For the other subjects of this email: the code releases etc: 

Sorry for the massive delay, had some problems, lost some work which needed recoded [excerated by the switch in NX authentication which caused the need to kill a long standing session] but the code for the new updates to the tower slope module including the new fitting macro along with several other promised pieces of code are now available in github.    The pull request is made but not yet merged so I will give the link to my personal fork from which you should be able to access it.
This includes  a macro /info for running the over the calorimeter data from MDC2.   See pretty detailed explanatory comments inside the macros and in the README.md's (start looking at that one in the macros linke below) in the directories/folders containing the codes/macros.  

Most importantly the important macros including the MDC2 one located here: https://github.com/jtaou/macros/tree/jfcalocalib_slope_mdc2/calibrations/calo/tower_slope_macro
see the readme which has much detailed info.  Note the provided MDC2 macro runs the tower slope calibrations modules (one for each calo sys)  but could be easily modified/extended for other codes.
The code for the tower slope module is here and should be merged into the main branch soon:
https://github.com/jtaou/coresoftware/tree/jf_cal_mdc2_prd_towslope/calibrations/calorimeter/calo_tower_slope


Also as promised here is the code I added to effectively remove the digitization as a temporary fix in place of mocking up the pulse extraction procedure.  The way I described my mods in words was correct, I copy the fix below. It looks slightly more complicated now because I made it function this way for now ONLY if you are running RawTowerDigitizer in the new DoDecal mode.  So I didn't have to hardly touch the original code which still runs as usual if you dont' turn the new code on with this flag.  obviously this is to be replaced for all modes soon with the pulse extraction simulation, and if it works under testing and other are comfortable with it I can implement it more widely since I believe it is much more accurate to reality because of the full pulse/pedestal sampling than what is currently in place which works as if we only had an old-fashioned, single digitization of the entire pulse which we know is not corresponding to reality.  But for now and for testing with the MDC2 production tests, we will go with this current implementation.   Indeed these fixes and more statistics have very much improved the performance of the slope method, which I will show with updated plots I am making for the S&C review.    Here's the code snippet (from coresoft/ g4sim/g4calo/ RawTowerDigitization::simple_photon_digitization)  ...Except for the green colored section in the middle the rest of the code is unchanged in all but two lines in which a single line was simply separated into 2 equivalent steps. Test result for cemc is shown below smoothness for 1M bin per 10 GeV-- previously the digitzied ADC unit discreteness was showing up at the ~0.005 level.  

  const double photon_count_mean = energy * m_PhotonElecYieldVisibleGeV;
  const int photon_count = gsl_ran_poisson(m_RandomGenerator, photon_count_mean);
  const int signal_ADC = floor(photon_count / m_PhotonElecADC);
  const double pedestal = m_PedstalCentralADC + ((m_PedstalWidthADC > 0) ? gsl_ran_gaussian(m_RandomGenerator, m_PedstalWidthADC) : 0);
  const int sum_ADC = signal_ADC + (int) pedestal;
  double  sum_ADC_d = (double) sum_ADC; 

  // temporary fix to remove digitization for decalibration tests
  // to be replaced permanently for all cases with sim of pulse extraction/fitting  
  if (m_DoDecal)
    {
      double signal_ADC_d = 1.*photon_count;
      signal_ADC_d /= m_PhotonElecADC;  
      sum_ADC_d  = signal_ADC_d + pedestal;
    }
...
    digi_tower->set_energy(sum_ADC_d);


Test results: x-axis is towe energy





 ---------------------------------------------- 

Justin Frantz, Ph. D.  he 

RHIC UEC/Diversity Working Group 

Brookhaven National Lab, sPHENIX Experiment 

Associate Professor 

Ohio University Dept. Of Physics and Astronomy    

frantz AT ohio.edu    

646-228-2539   

PERSONAL ZOOM MEETING:  369-910-7530   Password:  1   

https://us02web.zoom.us/j/3699107530?pwd=TkZLeU1MY2d5eUpqeTJ5WUJTRHlVUT09

 



  • [Sphenix-software-l] no mtg/release of calo calib macros/code check in/ new digitization temporary fix, Frantz, Justin, 05/11/2022

Archive powered by MHonArc 2.6.24.

Top of Page