alcap-org / AlcapDAQ

Alcap DAQ
alcap-org.github.io
8 stars 0 forks source link

R13 standardise xray analysis #269

Closed AndrewEdmonds11 closed 9 years ago

AndrewEdmonds11 commented 9 years ago

Hi Everyone

So I've rewritten the GeSpectrum module to now use TMEs. It only produces one histogram of the energy of the germanium pulse against the time difference to the central muon (which is pile-up protected). The histogram axis limits and bin widths can be defined in the config file, I'm not sure whether it's worth making pile-up protection configurable.

The histogram that this module produces is then used by the new scripts/CountXRays.C, since we need to hadd many of these histograms together. The main function to use in this file is CountXRays(). You have to pass it the location of the hadded output file and the time cut that you want to use. In addition, you can add a rebin factor, fit range and the target material. By default, these are set so that they are suitable for an aluminium target.

The idea behind passing the target material is so that we can define the X-ray we are interested in at run time (in FillXRayInfo()). Currently, I've only defined the Al 2p-1s X-ray but it should be easy to add others when we need to.

The final function in this script is GetAreaUnderPeak(), which performs the fit and plots it in a canvas. It will always generate a pdf of a linear background and a Gaussian near the X-ray peak and, for the Al 2p-1s X-ray only, it includes the second Gaussian for our background peak.

Finally, CountXRays() then takes the area under the peak and calculates the number of stopped muons using the intensity and efficiency of the X-ray, as well as the detector effects.

I've tested all this on Al100 (Nam's subset), Al100 (full dataset) and Al50 (full dataset) and I get consistent numbers of stopped muons as we saw before (I will post the details in the elog).

Anyway, I will leave this pull request open until early next week for people to give any comments/suggestions/improvements :)

Cheers Andy

PS There's also one change to already existing code:

AndrewEdmonds11 commented 9 years ago

Ok, I'll merge this into R13 now. If we find this is useful for R15a/R15b, then I don't know what the best way to get this onto those branches would be. We can cross that bridge if we come to it...