DetectorDriver controls event processing.
More...
#include <DetectorDriver.hpp>
DetectorDriver controls event processing.
This class controls the processing of each event and includes the calibration of all raw energies, the plotting of raw and calibrated energies, and any experiment specific processing requirements
virtual DetectorDriver::~DetectorDriver |
( |
| ) |
|
|
virtual |
Default Destructor - Not called due to singleton nature
DetectorDriver::DetectorDriver |
( |
| ) |
|
|
private |
Constructor that initializes the various processors and analyzers.
void DetectorDriver::CorrelateClock |
( |
double |
d, |
|
|
time_t |
t |
|
) |
| |
|
inline |
Correlates the pixie clock to the wall clock
- Parameters
-
[in] | d | : the pixie time to correlate |
[in] | t | : the wall time to correlate |
virtual void DetectorDriver::DeclareHistogram1D |
( |
int |
dammId, |
|
|
int |
xSize, |
|
|
const char * |
title |
|
) |
| |
|
inlineprivatevirtual |
Declares a 1D histogram calls the C++ wrapper for DAMM
- Parameters
-
[in] | dammId | : The histogram number to define |
[in] | xSize | : The range of the x-axis |
[in] | title | : The title for the histogram |
virtual void DetectorDriver::DeclareHistogram2D |
( |
int |
dammId, |
|
|
int |
xSize, |
|
|
int |
ySize, |
|
|
const char * |
title |
|
) |
| |
|
inlineprivatevirtual |
Declares a 2D histogram calls the C++ wrapper for DAMM.
- Parameters
-
[in] | dammId | : The histogram number to define |
[in] | xSize | : The range of the x-axis |
[in] | ySize | : The range of the y-axis |
[in] | title | : The title of the histogram |
void DetectorDriver::DeclarePlots |
( |
| ) |
|
Declares the raw plots that are used, and loops over all the declare plots methods in all of the analyzers and processors.
- Returns
- Instance is created upon first call
const std::vector<EventProcessor *>& DetectorDriver::GetProcessors |
( |
void |
| ) |
const |
|
inline |
- Returns
- the list of the Event Processors in the analysis
std::vector<EventProcessor *> DetectorDriver::GetProcessors |
( |
const std::string & |
type | ) |
const |
- Returns
- The requested event processor
- Parameters
-
[in] | type | : the name of the processor to return |
const std::set<std::string>& DetectorDriver::GetUsedDetectors |
( |
void |
| ) |
const |
- Returns
- the set of detectors used in the analysis
time_t DetectorDriver::GetWallTime |
( |
double |
d | ) |
const |
|
inline |
- Returns
- The wall time
- Parameters
-
[in] | d | : the pixie time to convert to wall time |
int DetectorDriver::Init |
( |
RawEvent & |
rawev | ) |
|
Called from PixieStd.cpp during initialization. The calibration file Config.xml is read using the function ReadCal() and checked to make sure that all channels have a calibration.
- Parameters
-
[in] | rawev | : the raw event to initialize with |
- Returns
- an unused integer maybe change to void
void DetectorDriver::LoadProcessors |
( |
Messenger & |
m | ) |
|
|
private |
Load the processors from the XML file
- Parameters
-
[in] | m | : the messenger to pass the loading messages through |
virtual void DetectorDriver::plot |
( |
int |
dammId, |
|
|
double |
val1, |
|
|
double |
val2 = -1 , |
|
|
double |
val3 = -1 , |
|
|
const char * |
name = "h" |
|
) |
| |
|
inlinevirtual |
Plots into histogram defined by dammId.
- Parameters
-
[in] | dammId | : The histogram number to define |
[in] | val1 | : the x value |
[in] | val2 | : the y value |
[in] | val3 | : the z value |
[in] | name | : the name of the histogram |
int DetectorDriver::PlotCal |
( |
const ChanEvent * |
| ) |
|
Plot the calibrated energies of each channel into the damm spectrum number assigned to it in the map file with an offset as defined in DammPlotIds.hpp
- Returns
- an unused integer maybe use void
int DetectorDriver::PlotRaw |
( |
const ChanEvent * |
| ) |
|
Plot the raw energies of each channel into the damm spectrum number assigned to it in the map file with an offset as defined in DammPlotIds.hpp
- Parameters
-
[in] | chan | : the channel to plot |
- Returns
- an unused integer maybe use void
int DetectorDriver::ProcessEvent |
( |
RawEvent & |
rawev | ) |
|
Control of the event processing.
The ProcessEvent() function is called from ScanList() in PixieStd.cpp after an event has been constructed. This function is passed the mode the analysis is currently in (the options are either "scan" or "standaloneroot"). The function checks the thresholds for the individual channels in the event and calibrates their energies. The raw and calibrated energies are plotted if the appropriate DAMM spectra have been created. Then experiment specific processing is performed. Currently, both RMS and MTC processing is available. After all processing has occured, appropriate plotting routines are called.
- Parameters
-
[in] | rawev | : the raw event to process |
- Returns
- An unused integer, maybe change to void
void DetectorDriver::ReadCalXml |
( |
| ) |
|
|
private |
Read in the Calibration parameters from the Config.xml
void DetectorDriver::ReadWalkXml |
( |
| ) |
|
|
private |
Read in the Walk correction parameters from the Config.xml
void DetectorDriver::SanityCheck |
( |
void |
| ) |
const |
|
inline |
Use Exceptions to throw an exception here if sanity check was not succesful
Check threshold and calibrate each channel. Check the thresholds and calibrate the energy for each channel using the calibrations contained in the calibration vector filled during ReadCal()
- Parameters
-
[in] | chan | : the channel to do the calibration on |
[in] | rawev | : the raw event to write the information into |
- Returns
- an unused integer (maybe change to void)
std::set<std::string> DetectorDriver::knownDetectors |
|
private |
list of valid detectors that can be used as detector types
std::pair<double, time_t> DetectorDriver::pixieToWallClock |
|
private |
rough estimate of pixie to wall clock
object which analyzes traces of channels to extract energy and time information
vector of processors to handle each event
The documentation for this class was generated from the following file: