[d2n-analysis-talk] d2n shower calibration
posik at jlab.org
posik at jlab.org
Thu Nov 19 12:27:38 EST 2009
Hi all,
I have been working on the bigbite shower and preshower calibrations
using some scripts that I got from Kalyan. The first is an energy
reconstruction script that breaks the shower and preshower into
clusters and reconstructs the deposited energy,called
cl_reconstruct.cc. The second is called calib.cc which minimizes the
energy. In the last meeting I showed the calibration of the onepass H2
elastic runs, and had gotten a few negative calibration coefficients. So
Brad had suggested that I go and check the pedestals of the shower and
preshower. Checking the pedestals with run 1495, the pedestals agree with
the ones used, there was a slight drift ~3-10 channels on a few of them
but nothing drastic. So I updated the pedestals in the DB and reran the
calibration scripts I got the following error:
Error in <TDecompLU::DecomposeLUCrout>: matrix is singular
Error in <TDecompLU::Solve()>: Decomposition failed
TDecomLU is used for energy minimization,and when I looked at the
calibration coefficients, they made no sense ranging from 0-->10^6.After
talking to Kalyan, he said he seen this when there were not enough events
in the cl_reconst.root file and suggested to have ~100k events, but when I
looked at the cl_reconst.root file that caused the bad minimization there
were ~300k events.
Not knowing why the script was failing I reset to my original setting (the
original pedestals). And again I got the same minimization error, I then
tried running the scripts a adaq and using Kalyan's replayed root files
thinking maybe something in the my DB or analyzer changed, but again on
adaq I got the same results.
I then remembered that I had played with some cuts in the cl_reconst.cc
file used to select electrons. In the script there is a for loop that
loops over all entries and tests each entry against the following if
statement:
if((type&(1<<2))!=(1<<2) || pre_shower_energy<800 || BB.tr.n == 0 ||
fabs(BB.tr.vz)>0.20 || fabs(sqrt(PriKineBB.W2) - 0.94)> 0.05 ||
abs(E/p-1800)>500){continue} //if passed then send back to start of for loop
else continues reconstruction code
Where type= DBB.evtypebits, (trigger cut). Using the above cut seems to
make sense. But in order to get what look like sensible calibration
coefficients, what I did was removed the trigger and E/p cut and then
changed the fabs on the z-vertex and invariant mass to abs and then I get
a cl_reconst.root file with ~2M events and a set of what appear reasonable
calibration coefficients, with block 1,4,5,28 and 163 in the shower being
negative.
I think changing the fabs to abs is ok because when running the script I do:
analyzer cl_reconst.cc
and when I apply cuts that require absolute values on the analyzer command
line I use abs and the cut works as I would expect them to. As for needing
to remove the two cuts I have no idea. I am trying to narrow it down to
which of the two cuts (trigger or E/p) is causing the problem and I'm
thinking it maybe the E/p, I try to replay with all original cuts as
defined in the if statment I wrote above, but change fabs to abs on all
cuts. However when I run the script, I get a "/ divide by 0" error. I am
now checking what happens if I just leave out the E/p cut to see if this
is the issue.
So I narrowed the problem down to the cl_reconst.cc script. I have told
Kalyan about the problem, but he is busy with his BigBite asymmetries that
he needs for Friday's transversity meeting, but he said he will take a
look at it some time after Friday. I am thinking if I would get better
results if I compiled the code and then ran it?
-Thanks
Matt Posik
More information about the d2n-analysis-talk
mailing list