Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

TDetector Class Reference

#include <TDetector.h>

Inheritance diagram for TDetector:

[legend]
List of all members.

Detailed Description

Detector base-class.

This class is the detector base-class. This contains most of the functionality that is used by the other detector classes.

Author:
JEP, J. Chuma.
Version:
1.2.
Date:
April 2004.

Definition at line 25 of file TDetector.h.

Public Member Functions

 TDetector (const Char_t *="", UInt_t=1)
 TDetector (const TDetector &)
virtual ~TDetector ()
TDetectoroperator= (const TDetector &)
virtual void Clear (const Char_t *="")
virtual void Print (const Char_t *="") const
virtual const Char_t * GetName () const
virtual void PrintData () const =0
virtual void Calibrate ()=0
virtual Bool_t PlotEnergies (TH2F *=0, const TCutG *=0, Bool_t=1) const
virtual Bool_t PlotTimes (TH2F *=0, const TCutG *=0, Bool_t=1) const
virtual Bool_t PlotEvT (TH2F *=0, Float_t=0, const TCutG *=0, Bool_t=1) const
virtual void FindHits (vector< THit > *) const
Float_t GetMaxEnergy () const
void SetName (const Char_t *)
void SetChannels (UInt_t)
void SetCoordinates (Float_t, Float_t, Float_t)
UInt_t GetChannels () const
const TVector3 & GetCoordinates () const
const vector< const TDataItem<
Float_t > * > & 
GetEnergies () const
const vector< const TDataItem<
Float_t > * > & 
GetTimes () const
void Hit (Bool_t)
Bool_t IsHit () const
Bool_t IsName (const Char_t *) const

Protected Attributes

vector< const TDataItem< Float_t > * > fEnergies
vector< const TDataItem< Float_t > * > fTimes
TVector3 fCoordinates
Bool_t fHit

Private Attributes

UInt_t fChannels
string fName


Constructor & Destructor Documentation

TDetector const Char_t *  name = "",
UInt_t  channels = 1
 

Default constructor, setting the number of channels and using the supplied character string to set the detector name.

Parameters:
[in] name The name of the detector e.g. DSSSD0.
[in] channels The number of detector channels.

Definition at line 21 of file TDetector.cxx.

References fEnergies, and fTimes.

TDetector const TDetector rhs  ) 
 

Copy constructor. Need this because we have pointers in the member list.

Parameters:
[in] rhs The object being copied.

Definition at line 33 of file TDetector.cxx.

References fChannels, fCoordinates, fEnergies, fHit, fName, and fTimes.

~TDetector  )  [virtual]
 

Default destructor.

Definition at line 51 of file TDetector.cxx.

References Clear().

Here is the call graph for this function:


Member Function Documentation

TDetector & operator= const TDetector rhs  ) 
 

Assignment operator overload. This is needed as some of the DragonRoot classes deal with pointers.

Parameters:
[in] rhs The TDetector to be copied.
Returns:
The this pointer.

Definition at line 58 of file TDetector.cxx.

References Clear(), fChannels, fCoordinates, fEnergies, fHit, fName, and fTimes.

Here is the call graph for this function:

void Clear const Char_t *  option = ""  )  [virtual]
 

Clear all the data held in this class.

Parameters:
[in] option The option is currently unimplemented.

Reimplemented in TGrDetector, and THiDetector.

Definition at line 81 of file TDetector.cxx.

References fEnergies, fHit, and fTimes.

void Print const Char_t *  option = ""  )  const [virtual]
 

Print data held in this class.

Parameters:
[in] option The option is currently unimplemented.

Reimplemented in TBgoDetector, TDsssdDetector, TGeDetector, TGrDetector, THiDetector, TIcDetector, TMcpDetector, TNaiDetector, and TSbDetector.

Definition at line 97 of file TDetector.cxx.

References fCoordinates, and fName.

const Char_t * GetName  )  const [inline, virtual]
 

Get the detector name.

Returns:
The detector name as a character string.

Definition at line 113 of file TDetector.h.

References fName.

void PrintData  )  const [pure virtual]
 

Virtual method to print all the data held within the detector class members'.

Implemented in TGrDetector, and THiDetector.

Definition at line 113 of file TDetector.cxx.

void Calibrate  )  [pure virtual]
 

Virtual method to calibrate the detector signals properly. Usually calls to the correct calibrations will be made using TCalibration::Calibrate().

Implemented in TGrDetector, and THiDetector.

Definition at line 120 of file TDetector.cxx.

Bool_t PlotEnergies TH2F *  hist = 0,
const TCutG *  cut = 0,
Bool_t  option = 1
const [virtual]
 

Plots the calibrated ADC data (energies) in a histogram. The channel plotted is the histogram-mapped channel so that more than one detector can be plotted on one histogram.

Parameters:
[in] hist The histogram to plot in.
[in] cut The cut to use.
[in] option Whether or not the hit should be plotted if outside the cut. Set true if the hit is not in the cut and you still want to plot it in the histogram hist. Default is true.
Returns:
True if any hits are in the cut, false otherwise.

Reimplemented in TGrDetector, and THiDetector.

Definition at line 129 of file TDetector.cxx.

Bool_t PlotTimes TH2F *  hist = 0,
const TCutG *  cut = 0,
Bool_t  option = 1
const [virtual]
 

Plots the calibrated TDC signals (times) in a histogram. The channel plotted is the histogram-mapped channel so that more than one detector can be plotted on one histogram.

Parameters:
[in] hist The histogram to plot in.
[in] cut The cut to use.
[in] option Whether or not the hit should be plotted if outside the cut. Set true if the hit is not in the cut and you still want to plot it in the histogram hist. Default is true.
Returns:
True if any hits are in the cut, false otherwise.

Reimplemented in THiDetector.

Definition at line 144 of file TDetector.cxx.

Bool_t PlotEvT TH2F *  hist = 0,
Float_t  time = 0,
const TCutG *  cut = 0,
Bool_t  option = 1
const [virtual]
 

Plot energy versus time for a gamma-ray detector. The given time value can be an RF or TAC time for example. If there is more than one energy signal present the time is plotted against each.

Parameters:
[in] hist The histogram to plot in.
[in] time The time value to plot.
[in] cut The cut to use.
[in] option Whether or not the hit should be plotted if outside the cut. Set true if the hit is not in the cut and you still want to plot it in the histogram hist. Default is true.
Returns:
True if any hits are in the cut, false otherwise.

Reimplemented in THiDetector, and TIcDetector.

Definition at line 159 of file TDetector.cxx.

void FindHits vector< THit > *  hits  )  const [virtual]
 

Virtual method to rebuild the particles that have hit the detector from the energy and time data. This is implemented per detector class because, for example, a BGO will have only 1 ADC channel per particle hit, whereas an MCP detector may have 4 ADC channels per particle hit.

Parameters:
[in] hits The vector to which the hits should be added.

Reimplemented in TBgoDetector, TDsssdDetector, TGeDetector, TIcDetector, TMcpDetector, TNaiDetector, and TSbDetector.

Definition at line 177 of file TDetector.cxx.

Float_t GetMaxEnergy  )  const
 

Gets the maximum energy that was in the detector.

Returns:
The maximum value in fEnergies.

Definition at line 188 of file TDetector.cxx.

References fEnergies.

void SetName const Char_t *  name  )  [inline]
 

Set the detector name. This should match the name of the calibration table in the SQL database, otherwise the calibration will not be found.

Parameters:
[in] name The name of the detector e.g. "DSSSD0".

Definition at line 84 of file TDetector.h.

References fName.

void SetChannels UInt_t  channels  )  [inline]
 

Set the number of channels of the detector.

Parameters:
[in] channels The number of detector channels e.g. this would be 32 for a DSSSD or 1 for a BGO.

Definition at line 94 of file TDetector.h.

References fChannels.

void SetCoordinates Float_t  x,
Float_t  y,
Float_t  z
[inline]
 

Set the x,y,z position of the particle.

Parameters:
[in] x The x-position.
[in] y The y-position.
[in] z The z-position.

Definition at line 103 of file TDetector.h.

References fCoordinates.

UInt_t GetChannels  )  const [inline]
 

Get the number of detector channels.

Returns:
The detector channels as an unsigned integer (doesn't make any sense to have negative channels!).

Definition at line 121 of file TDetector.h.

const TVector3 & GetCoordinates  )  const [inline]
 

Get the coordinates of the detector.

Returns:
The coordinates in as a vector.

Definition at line 130 of file TDetector.h.

const vector< const TDataItem< Float_t > * > & GetEnergies  )  const [inline]
 

Get the energy signals belonging to this detector.

Returns:
The detector energy signals.

Definition at line 138 of file TDetector.h.

const vector< const TDataItem< Float_t > * > & GetTimes  )  const [inline]
 

Get the time signals belonging to this detector.

Returns:
The detector time signals.

Definition at line 146 of file TDetector.h.

void Hit Bool_t  status  )  [inline]
 

Set the status of the fHit parameter.

Parameters:
[in] status This should be set to 1 only if a hit has occured in the particular detector, 0 otherwise.

Definition at line 154 of file TDetector.h.

References fHit.

Bool_t IsHit  )  const [inline]
 

Get the hit status of the detector.

Returns:
True (1) if the detector is hit; false (0) otherwise.

Definition at line 163 of file TDetector.h.

Bool_t IsName const Char_t *  name  )  const [inline]
 

Check to see if the name of the detector matches name.

Returns:
True (1) if the name is the same; false (0) otherwise.

Definition at line 171 of file TDetector.h.


Member Data Documentation

vector<const TDataItem<Float_t> *> fEnergies [protected]
 

Calibrated data from the heavy-ion ADCs is stored in here i.e. this vector would be filled after a call to TDetector::Calibrate(). This data is then manipulated to build the correct energies for each particle that could have hit the detector.

Definition at line 60 of file TDetector.h.

vector<const TDataItem<Float_t> *> fTimes [protected]
 

Calibrated data from the heavy-ion TDCs is stored in here i.e. this vector would be filled after a call to TDetector::Calibrate(). This data is then manipulated to build the correct energies for each particle that could have hit the detector.

Definition at line 67 of file TDetector.h.

TVector3 fCoordinates [protected]
 

The detector coordinates.

Definition at line 70 of file TDetector.h.

Bool_t fHit [protected]
 

Boolean to keep track of whether the detector has been hit.

Definition at line 73 of file TDetector.h.

UInt_t fChannels [private]
 

The number of detector channels.

Definition at line 78 of file TDetector.h.

string fName [private]
 

The detector name.

Definition at line 81 of file TDetector.h.


The documentation for this class was generated from the following files:
Generated on Mon Jan 8 11:54:33 2007 for DragonRoot by  doxygen 1.3.9.1