EEMC Calibration Code Error
11/29/10
The following is output to the screen when I try to run the calibration code for sector 1 and plane U in iteration 3:
[rcas6017] ~/calibrations/> root4star -b -q macros/doSmdGains.C\(1,3,0\) > & log
Abort
[rcas6017] ~/calibrations/> more log
*******************************************
* *
* W E L C O M E to R O O T *
* *
* Version 5.22/00 17 December 2008 *
* *
* You are welcome to visit our Web site *
* http://root.cern.ch *
* *
*******************************************
ROOT 5.22/00 (trunk@26997, May 28 2010, 11:40:00 on linux)
CINT/ROOT C/C++ Interpreter version 5.16.29, Jan 08, 2008
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
*** Float Point Exception is OFF ***
*** Start at Date : Mon Nov 29 16:39:37 2010
QAInfo:You are using STAR_LEVEL : dev, ROOT_LEVEL : 5.22.00 and node : rcas6017.
rcf.bnl.gov
Processing macros/doSmdGains.C(1,3,0)...
strangeArrayNames-arrayNames-__NARRAYS__ = 0
loading of shared libraries done
Info in <TCanvas::Print>: ps file mpvN01U.ps has been created
loaded libraries
Here are the gains:
cuts for 01U : adcMin=40 ,adcMax=140 minSum=50 maxRelEr=0.500000
doGainCorr() for mpvN01U, average over 12-strips pl=1
avr01U001 MPV=0.82 +/- 0.16 (19.0%)
avr01U013 MPV=0.90 +/- 0.04 (3.9%)
avr01U025 MPV=0.89 +/- 0.04 (4.1%)
avr01U037 MPV=0.95 +/- 0.03 (3.1%)
avr01U049 MPV=0.92 +/- 0.03 (3.1%)
avr01U061 MPV=0.90 +/- 0.03 (3.5%)
avr01U073 MPV=0.91 +/- 0.03 (2.8%)
avr01U085 MPV=0.93 +/- 0.03 (3.2%)
avr01U097 MPV=0.92 +/- 0.03 (3.3%)
avr01U109 MPV=0.98 +/- 0.03 (3.2%)
avr01U121 MPV=0.99 +/- 0.04 (4.4%)
avr01U133 MPV=1.00 +/- 0.03 (2.7%)
avr01U145 MPV=1.05 +/- 0.04 (3.3%)
avr01U157 MPV=1.06 +/- 0.04 (3.9%)
avr01U169 MPV=1.01 +/- 0.03 (3.0%)
avr01U181 MPV=1.06 +/- 0.05 (4.8%)
avr01U193 MPV=1.01 +/- 0.04 (3.5%)
avr01U205 MPV=1.06 +/- 0.04 (4.1%)
avr01U217 MPV=1.10 +/- 0.06 (5.5%)
avr01U229 MPV=1.14 +/- 0.10 (8.4%)
avr01U241 MPV=1.14 +/- 0.09 (7.5%)
avr01U253 MPV=0.93 +/- 0.17 (18.3%)
avr01U265 MPV=1.78 +/- 0.17 (9.5%)
Inside plTGraph, flag 0, shpFunc=pol0
flag 1, ig=1
flag 2, pl=1
plot mpvN01U
flag 3
flag 4
flag 5
flag 6
flag 7
Error in <StoreAndDrawFitFunction>: Empty funciton list- cannot store fitted function
****************************************
Minimizer is Linear
Chi2 = 84.0399
NDf = 22
Par_0 = 0.967036 +/- 0.00782767
flag 8
flag 9
flag 10
root4star: .sl53_gcc432/obj/StRoot/StEEmcPool/StEzSmdCal/SmdGains.cxx:241: void
SmdGains::plTGraph(const Char_t*, int, int): Assertion `gnCorFn' failed.
11/28/10
First thing, after logging into the BNL computers, I ensure that I'm using the STAR development version of the code:
stardev
The EEMC calibration code is In my directory:
/star/u/jschaub/calibrations
and its sub-directories. This is the version of the code that Alice checked into the CVS repository. (See her instructions for how to get the code from CVS and set up the run 9 calibration run list.) She set up the code so that it builds a directory structure:
/star/u/jschaub/calibrations/EEMC_cal/iter-#/
where # is the iteration number.
The code is set up so that iter=0 is the initial SMD iteration, in which we determine initial SMD gains by fitting dE/dx slopes. Iteration 1 uses these gains determined in iteration 0 to generate gains for the pre- and postshower layers, then iteration 2 uses gains from iterations 0 and 1 to generate gains for the towers. This all works fine.
Iteration 3 should use the gains from previous iterations to generate new SMD gains. (Then iterations 4 and 5 will re-generate gains for pre-/postshowers and towers.) I run the code from the calibrations directory I mentioned above using a shell that Alice wrote:
macros/fitSlopes.sh
which calls doSmdGains.C (also in macros/), which calls SmdGains.cxx in
/star/u/jschaub/calibrations/StRoot/StEEmcPool/StEzSmdCal/
I put a bunch of print statements into doSmdGains.C (which I've now deleted) and SmdGains.cxx (which are all still there) to determine that the error comes from the line:
gr->Fit(shpFunc);
in the function (Is "Function" the right word for C++?) plTGraph in SmdGains.cxx.
I looked up the error message on google--I thought it might be distinctive because of the word "funciton"--and found the webpage I mentioned below:
https://savannah.cern.ch/bugs/?45607
I tried to use the non-default constructor TGraphErrors(Int_t n) in the variable declaration but still received the same error message as before.
I tried to find other code that fits a TGraphErrors. My calibrations directory contains plTwCal.C, which uses a Fit call for a TGraphErrors, and this program seems to work fine. I didn't notice any differences in the setup of the TGraphErrors or the Fit call between plTwCal.C and SmdGains.cxx, so I'm confused why one works and the other doesn't.
I suspect the fix for this bug would probably be fast and simple for someone more familiar with STAR's code.
- jschaub's blog
- Login or register to post comments