MCalCoefficients Class Reference
[Modules]

Inheritance diagram for MCalCoefficients:

QModule QBaseModule

List of all members.


Detailed Description

Module to calculate calibration coefficients.

Author:
L. Kogler
Computes calibration coefficients by fitting amplitude spectrum.

Note on using calibration GUI feature

To use the calibration GUI, follow the steps below:

1. Add the line GUIFilesPrefix=[prefix] to your config file, where [prefix] is replaced by your desired file prefix. This will cause the module to produce a gui session file named "[prefix].gui"

containing histograms for any channel which failed the automatic calibration. 2. Open the file [prefix].gui in dianagui. Follow the instructions to enter information for each peak that you can identify. When you are finished, hit the "save" button, which will produce a file named "[prefix].txt".

3. Re-run your inital .cfg file. The module will read in the information saved in [prefix].txt to calibrate the channels which failed before.


Public Member Functions

 MCalCoefficients (QSequence *s)
virtual void Init ()
 Init method is called before event loop.
virtual QEventDo (QEvent *ev)
 Doit method is called for each event, getting the event as argument.
virtual void Done ()
 Done method is called after event loop.

Private Member Functions

void InitCalPeaks (std::string source)
 Initializes the set of peaks to be used for calibration.
bool AutoSeed (int channel, double resolution=-1, int iter=0, double binscale=1)
 Tries to find primary peaks in spectrum from scratch.
double NearestNeighbor (double energy)
 Finds peak nearest to energy given.
void SetGUIHistogram (int channel)
 Method to add a histogram to GUI session.

Private Attributes

std::map< int, std::vector
< double > > 
fAmplitudes
 Map holding a vector of stabilized amplitudes for each channel.
std::map< int, double > fMaxAmplitude
 Map maximum amplitude for each channel (based on heater energies).
double fMaxEnergy
 Maximum and minimum of energy range containing calibration peaks.
double fMinEnergy
std::set< int > fRuns
 List of runs in calibration set.
std::vector< QCalPeak * > fCalPeaks1
 Vector holding primary calibration peaks.
std::vector< QCalPeak * > fCalPeaks2
 Vector holding secondary calibration peaks.
TF1 * fCalFunction
 Calibration function.
double * fCalFunctionInit
 Array of inital values for calibration function fit.
std::string fTempFilename
 Name of file to store temporary data.
std::map< double, double > fChisquares
 Stores chisquare values from AutoSeed function for diagnostic purposes.
std::map< double, double > fReducedChisquares
QMatrix * fPeaksMatrix
 Matrix containing peak locations from GUI.
std::string fGUIPrefix
 Prefix to use for GUI file names.
QGuiSessionfGUISession
 GUI session.
bool fForceFits
 Force peak fits to be accepted even if they are not very good.

The documentation for this class was generated from the following files:

Generated on Tue Nov 16 10:50:01 2010 for CUORE Software by  doxygen 1.5.6