L2jet: Proposed Changes to Official Version 2009a
Updated on Fri, 2009-01-23 15:35. Originally created by pagebs on 2009-01-22 14:38.
Proposed Changes
In Function projectAdc:
- Commented out lines 818-825. These are useless print statements which were a hold over from previous diagnostic work and do not need to be included in the official code.
- I have reinstated the filling of the histograms hA[20] and hA[30] when the tower energy is above some threshold. To this end I've added line 839: 'if(low_noise_et > par_hotTwEtThr) hHot->fill(rdo);' . These histograms are then used by the function 'finishRunHisto()' to populate histograms hA[21], hA[22], hA[31], and hA[32] and to print out the hottest tower in both the barrel and endcap. The four histograms mentioned are used in the diagnostic plots P 2, 3, and 4.
- I believe Ross said that all of this functionality is in some other part of the L2 code now. If this is true, the changes in bullet point 2 can be removed. In addition, the only task function 'finishRunHisto()' appears to do is fill histos 21,22,31,and 32 as well as print out info on the hot tower. If this information is calculated elsewhere, we can probably remove this function from the Jet code all together. I leave it to Ross and others in charge to decide how to proceed.
- To re-enable the threshold condition, I reinstated the parameter 'par_hotTwEtThr' and redefined it to remove the factor 'par_energyScale' as we are no longer using raw adc's. (lines 130&131). I also declared 'par_hotTwEtThr' in the .h file. Again, if we decide that all of this can be done elsewhere, these parameters can be removed.
In Function initRunUser:
- I removed the lines which redefine the variable 'mLogFile' to point to the file 'run#.l2jet09v1.out' (lines 96-98 & 101). In previous versions, the jet code would would print its own .out file and it used the variable 'mLogFile' to open this file. Now this variable is used by L2VirtualAlgo2009 to open the file 'run#.l2jet09-algo.out' and calling it again in the jet code was causing interference. Removing the code which used mLogFile to open another .out file has cleared up the problem, now there is only one .out file which is created in L2VirtualAlgo2009.
In Function finishRunUser:
- I removed the lines which redefine the variable 'mHistFile' to point to the file 'run#.l2jet09v1.hist.bin' (lines 616-619). Removed for the same reasons as stated in the case above. Now all histograms from L2VirtualAlgo2009 and L2jetAlgo2009 go to a unified file called 'run#.l2jet09-algo.hist.bin'.
- I removed the lines which close 'mHistFile' (lines 646-649). Now the file is closed in L2VirtualAlgo2009.
- I removed the lines which close 'mLogFile' (lines 656-659). Now the file is closed in L2VirtualAlgo2009.
In Function scanEta:
- I changed the default value of 'sumMax' from 1.0 to 0.001 (line 965). This variable is part of the code which finds the energy-weighted eta position of the jet patch. The non-zero default value protects against dividing by zero if there is no energy in the calorimeter. The value of 1.0 was used because it was small compared to the adc values used in the older versions of the code. When we switched to L2VirtualAlgo2009, we started getting calibrated ET from the event stream and the value of 1.0 was often a substantial fraction of these values. Switching to 0.001 keeps the divide-by-zero protection while not significantly affecting the value of ET gotten from the event stream.
In Function weightedPhi:
- I changed the default value of 'sum' from 1.0 to 0.001 (line 1076). Rational is the same as above.
Results
Ross's official 2009 code can be found here, and the code includeing my proposed changes can be seen here.
The code which includes all of the changes I have listed above lives in /star/u/pagebs/L2Trig/run9_2008-2009/myWork/V3.1 The standard diagnostic files from a run over 500k events from the file /star/institutions/iucf/balewski/StarTrigSimuEvents/R7140046.eve.bin can be found here. The timing looks very good at ~28 mean. I am now using plot h903 from L2VirtualAlgo2009 to fill this spot, I believe that is the right plot but Ross please correct me if I am wrong.
Still To Do
- Add code to do event by event comparison to make sure that the 5x5 JP code is consistent with the old 3x3 code.
»
- pagebs's blog
- Login or register to post comments