CTShower Testing - Apr. 20, 2006
Mirror of the best candidate showers page.
Previous CTShower Documentation
Current CTShower Documentation
It turns out that there were a number of reasons that v3.01 returned a
large location chisq:
- All 1000 sites were being included individually, instead of averaged.
(This is expected behaviour since v3.01 treats the 1000s as individual sites.)
- "Fake hit sites" were not included in the shower object. This was a problem
which also affected the likelihood fit, not just the chisq values. This has been
fixed using the same method as in GenerateFitShower - after looping through the
sites in the "shower" object, the code loops through all sites in gChicosArray
and adds any not already there.
(See previous
GenerateFitShower_Shawn() and the
revised
GenerateFitShower_Shawn().)
- For sites included in the shower, chisq values differed because of the way the
shower object holds the hits and triggers.
- Brant's fitshower holds only the average time and intensity at a given site.
- Shawn's fitshower holds each hit individually. The fcnChisqAngle and fcnChisqCore
functions were expecting only one average hit at each site and were only looking at
the first hit when used with Shawn's fitshower. These were the only functions
where this confusion was happening, because the function calls whichever shower
object is currently being used in the fit. All other functions that use the fit object
call Brant's fitshower directly (it is not deleted) rather than gMinuit->GetObjectFit().
(One exception is the function "PrintResiduals()" in CTShowerReconstructor, but
this function is not referred to by anything.) This can be fixed by setting Brant's
fitshower as the fit object before looking up the chisqs or by hardcoding
the chisq functions to use Brant's fitshower only.
Other notes:
-
Along the way I also found a bug in the function SiteShowerParameters(). The area of the 1000 array was being set
to the area of 1001A and the thickness was being set to the area of 1001B. For non-1000
sites, the area was set to the sum of the areas of the A and B detectors, and the
thickness was set to the thickness of the A detector only. I changed this so that
the area was the sum of area A and area B and the thickness was the weighted average
of the thickness of A and the thickness of B. This still leaves the problem that
the area and thickness of the 1000 array is only being determined by the parameters
of 1001. This does not affect anything since the area returned by this function doesn't
get used anywhere. I looked through the code but didn't find any other places where
the area of 1001 was being looked up using the fitshower object.
-
There is a difference in the way that the intensity is stored between Brant's fitshower
and fitshower_Shawn. In Brant's fitshower, the intensity and time are averages over
all the hits, *and* the intensity has been divided by the area of the site, so it is
MIP/m^2. In fitshower_Shawn, only the raw intensities (in MIP) are stored in each hit,
so it has to be divided by the area in order to get a particle density. Thus, the
function GetInten() returns the intensity in different units depending on which shower
object contains the site being looked at. As a result,
the function SiteShowerParameters()
does not work with fitshower_Shawn. This function is only called by ShowerFitFunction(),
which, except for the chisq functions, was always being used with Brant's fitshower
anyway.