detector_driver Class Reference

detector_driver controls event processing More...

#include <detector_driver.h>

Collaboration diagram for detector_driver:

Collaboration graph

List of all members.

Public Member Functions

int process_event (rawevent &, string &)
 controlls event processing
int threshandcal (int &, chan_event *, detector_summary *)
 threshold check and calibrate each channel.
int init (rawevent &, vector< string > &)
int plotraw (chan_event *)
int plotcal (chan_event *)
vector< string > get_known_detectors ()
void set_used_detectors (vector< string > a)
 detector_driver ()
void readcal ()

Public Attributes

vector< calibrationcal
detector_summary det_s
vector< detector_summary * > temppoint
vector< int > temppointvalid

Private Attributes

vector< string > known_detectors
vector< string > used_detectors
map< string, detector_summarydet_sum
map< string, detector_summary > * pdet_sum
map< string, detector_summary >
vector< string >::iterator iud

Detailed Description

detector_driver 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 (if the appropriate DAMM spectra have been created in the drrsub.f file), and any experiment specific processing required.

Constructor & Destructor Documentation

detector_driver::detector_driver (  ) 

detector driver constructor

Currently does nothing

Member Function Documentation

int detector_driver::process_event ( rawevent revt,
string &  mode 

controlls event processing

The process_event() function is called from the Scan_List() function in pixie_std.cpp after an event has been constructed. This function is passed a pointer to the rawevent and the mode that the analysis is currently in (the options are either "scan" or "standaloneroot"). The individual channels in the event are threshold checked and their energies calibrated. 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.

int detector_driver::threshandcal ( int &  i,
chan_event chan1,
detector_summary det_s 

threshold check and calibrate each channel.

Check the threshholds and calibrate the energy for each channel using the calibrations contained in the calibration vector filled during the readscan() function.

int detector_driver::init ( rawevent revt,
vector< string > &  used 

Called from pixie_std.cpp during initialization. The rawevent object and the list of detectors used in this analysis are passed into this function. The calibration file cal.txt using the function readcal() and checked to make sure that all channels have a calibration. Additionally the temppointvalid and temppoint vectors are created.

int detector_driver::plotraw ( chan_event chan2  ) 

Plot the raw energies of each channel into the damm spectrum number that was given in the map.txt file.

int detector_driver::plotcal ( chan_event chan2  ) 

Plot the calibrated energies of each channel into the damm spectrum number+1000 that was given in the map.txt file.

vector< string > detector_driver::get_known_detectors (  ) 

Retrieves a vector containing all detector types for which an analysis routine has been defined making it possible to declare this detector type in the map.txt file. The currently known detector types are dssd_front, dssd_back, ge, timeclass, si, position, ifront_dssd, scint, and mcp.

void detector_driver::set_used_detectors ( vector< string >  a  )  [inline]

Receives a vector containing the list of detector types that are used in the current analysis and copies it into the detector_driver.

void detector_driver::readcal (  ) 

Read in the calibration for each channel according to the data in the cal.txt file. Reorder the calibrations to match the order in map.txt.

Member Data Documentation

vector<string> detector_driver::known_detectors [private]

list of valid detectors that can be used as detector types

vector<string> detector_driver::used_detectors [private]

list of detector type used in the current analysis

detector summaries

map<string,detector_summary>::iterator detector_driver::ids [private]

iterator for looping over map of detector summaries

vector<string>::iterator detector_driver::iud [private]

variable for looping over vector of detector types used in this analysis

the calibration vector

vector used for quick acess of detector_summary information for a given detector type

check this vector to ensure that the reference used in temppoint is actually valid (should have a value of 1).

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

Generated on Wed May 14 10:07:06 2008 for pixie16 by  doxygen 1.5.5