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

TDsssdDetector Class Reference

#include <TDsssdDetector.h>

Inheritance diagram for TDsssdDetector:

[legend]
Collaboration diagram for TDsssdDetector:
[legend]
List of all members.

Detailed Description

Heavy-ion DSSSD detector class.

This is the "Double-Sided Silicon-Strip Detector" or DSSSD detector class. It uses a THiCalibration. Dragon's DSSSD has 32 channels.

Author:
JEP.
Version:
1.2.
Date:
April 2004.

Definition at line 18 of file TDsssdDetector.h.

Public Member Functions

 TDsssdDetector (const Char_t *="", UInt_t=32, Float_t=3, Float_t=0.1)
virtual ~TDsssdDetector ()
virtual void Print (const Char_t *="") const
virtual void SetSignals (const TSubEvent &)
virtual void FindHits (vector< THit > *) const
void GetStripsXY (vector< UShort_t > &, vector< UShort_t > &) const
TVector3 GetPosition (UShort_t, UShort_t) const
Float_t GetStripWidth () const
Float_t GetStripSpacing () const
Bool_t PlotAdcTdcHitPattern (TH2F *=0, const TCutG *=0, Bool_t=1) const
Bool_t PlotAdcHitPattern (TH2F *=0, const TCutG *=0, Bool_t=1) const
Bool_t PlotFrontEvT (TH2F *=0, Float_t=0, const TCutG *=0, Bool_t=1) const
void PlotAdcNAdcPEnergyP (TH3F *) const
virtual void Clear (const Char_t *="")
virtual void PrintData () const
virtual void Calibrate ()
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
void SetCalibration (const Char_t *=0)
void SetDatabase (const Char_t *)
virtual const Char_t * GetName () 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< UShort_t > * > fAdcs
vector< const TDataItem< UShort_t > * > fTdcs
THiCalibration fCalib
vector< const TDataItem< Float_t > * > fEnergies
vector< const TDataItem< Float_t > * > fTimes
TVector3 fCoordinates
Bool_t fHit

Private Attributes

Float_t fStripWidth
Float_t fStripSpacing


Constructor & Destructor Documentation

TDsssdDetector const Char_t *  name = "",
UInt_t  channels = 32,
Float_t  stripWidth = 3,
Float_t  stripSpacing = 0.1
 

Default constructor, setting number of channels to channels and using the character string name to set the detector name. By default, THiDetector::SetCalibration() will use name to try and find a MySQL calibration table with a matching name.

Parameters:
[in] name The name of the detector.
[in] channels The number of channels this detector has.
[in] stripWidth The width of the detector strips.
[in] stripSpacing The spacing between the strips.

Definition at line 24 of file TDsssdDetector.cxx.

~TDsssdDetector  )  [virtual]
 

Default destructor.

Definition at line 40 of file TDsssdDetector.cxx.


Member Function Documentation

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

Print data held in this class. This calls THiCalibration::Print().

Parameters:
[in] option If the option is 'a' then PrintData is called automatically and the ADC, TDC, energy and time data are also printed.

Reimplemented from THiDetector.

Definition at line 46 of file TDsssdDetector.cxx.

References THiDetector::Print().

Here is the call graph for this function:

void SetSignals const TSubEvent subEvent  )  [virtual]
 

Set the data in a detector correctly by determing which channels in the data actually belong to the detector. This sets the ADCs and TDCs. Each channel is tested by passing the relevant data to the relevant calibration e.g. the ADC data is passed to the ADC calibration.

Parameters:
[in] subEvent The subevent containing ADC and TDC data from the hardware.

Reimplemented from THiDetector.

Definition at line 58 of file TDsssdDetector.cxx.

References THiCalibration::GetAdc(), TSubEvent::GetAdcs(), THiCalibration::GetTdc(), TSubEvent::GetTdcs(), and TCalibration::TestChannel().

Here is the call graph for this function:

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

Method to rebuild the heavy-ion particles that have hit the detector from the energy and time data.

Parameters:
[in] hits The vector to which the heavy-ion hits should be added.
Note:
This method runs through the front channels, setting the detector name and energy of the hit. It sets the time if it can find one corresponding to the same front strip and will set the hit position by taking a back strip. If there is more than 1 hit the front and back strips are paired according to energy.

Reimplemented from TDetector.

Definition at line 82 of file TDsssdDetector.cxx.

References TDetector::GetChannels(), TDetector::GetName(), GetPosition(), THit::SetDetector(), THit::SetEnergy(), THit::SetPosition(), and THit::SetTime().

Here is the call graph for this function:

void GetStripsXY vector< UShort_t > &  stripsX,
vector< UShort_t > &  stripsY
const
 

For every hit in the front strips of a DSSSD detector, return the channel of the p+ strip that was hit and the channel of every n+ strip that also registered a hit.

Parameters:
[out] stripsX An array of the strips that fired on the X channels.
[out] stripsY An array of the strips that fired on the Y channels.

Definition at line 135 of file TDsssdDetector.cxx.

References TDetector::GetChannels().

Here is the call graph for this function:

TVector3 GetPosition UShort_t  stripF,
UShort_t  stripB
const
 

Gets the XYZ position for any front and back strip pair.

Parameters:
[in] stripF The number of the front strip.
[in] stripB The number of the back strip.
Returns:
The position as a vector.
Note:
From Chris Wrede's thesis: front strips are vertical and give x-position, back strips are horizontal and give y-position.

Definition at line 154 of file TDsssdDetector.cxx.

References fStripWidth, and TDetector::GetChannels().

Here is the call graph for this function:

Float_t GetStripWidth  )  const [inline]
 

Get the strip width.

Returns:
The detector strip width as a float.

Definition at line 44 of file TDsssdDetector.h.

Float_t GetStripSpacing  )  const [inline]
 

Get the strip width.

Returns:
The detector strip width as a float.

Definition at line 52 of file TDsssdDetector.h.

Bool_t PlotAdcTdcHitPattern TH2F *  hist = 0,
const TCutG *  cut = 0,
Bool_t  option = 1
const
 

Plots a two-dimensional hit pattern of ADC vs TDC to give a pseudo hit pattern.

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.
Note:
Because of the way the DAQ is setup this may not give exactly what you expect, but the pixelisation is a very good approximation.

Definition at line 175 of file TDsssdDetector.cxx.

References THiCalibration::GetAdc(), TCalibration::GetHistogramMap(), and THiCalibration::GetTdc().

Here is the call graph for this function:

Bool_t PlotAdcHitPattern TH2F *  hist = 0,
const TCutG *  cut = 0,
Bool_t  option = 1
const
 

Plots a two-dimensional hit pattern of p-ADC vs n-ADC to give a x-y hit pattern.

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.
Note:
The front strip events (p-type) are considered to be the real events, and for each of these, all associated back strip hits are plotted against them.

Definition at line 204 of file TDsssdDetector.cxx.

References THiCalibration::GetAdc(), TDetector::GetChannels(), and TCalibration::GetHistogramMap().

Here is the call graph for this function:

Bool_t PlotFrontEvT TH2F *  hist = 0,
Float_t  time = 0,
const TCutG *  cut = 0,
Bool_t  option = 1
const
 

Plot energy versus time for the front strips of a DSSSD detector. This assumes that there are equal number of front and back strips, and that the front strips are the first half of all channels.

Parameters:
[in] hist The histogram to plot in.
[in] time The time to plot the energy against.
[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.

Definition at line 238 of file TDsssdDetector.cxx.

References TDetector::GetChannels().

Here is the call graph for this function:

void PlotAdcNAdcPEnergyP TH3F *  hist  )  const
 

Plots a three-dimensional hit-pattern of p-Adc energy versus p- and n- channels for the DSSSD detector.

Parameters:
[in] hist The histogram to plot in.

Definition at line 266 of file TDsssdDetector.cxx.

References THiCalibration::GetAdc(), TDetector::GetChannels(), and TCalibration::GetHistogramMap().

Here is the call graph for this function:

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

Clear all the data held in this class.

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

Reimplemented from TDetector.

Definition at line 71 of file THiDetector.cxx.

References TDetector::Clear(), THiDetector::fAdcs, and THiDetector::fTdcs.

Here is the call graph for this function:

void PrintData  )  const [virtual, inherited]
 

Print all the data held in this class.

Implements TDetector.

Definition at line 95 of file THiDetector.cxx.

References THiDetector::fAdcs, THiDetector::fTdcs, and THiCalibration::Print().

Here is the call graph for this function:

void Calibrate  )  [virtual, inherited]
 

Calibrate the energy and time signals.

Implements TDetector.

Definition at line 125 of file THiDetector.cxx.

References TCalibration::Calibrate(), THiDetector::fAdcs, THiDetector::fCalib, THiDetector::fTdcs, THiCalibration::GetAdc(), and THiCalibration::GetTdc().

Here is the call graph for this function:

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

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 from TDetector.

Definition at line 134 of file THiDetector.cxx.

References THiDetector::fCalib, THiCalibration::GetAdc(), and TCalibration::GetHistogramMap().

Here is the call graph for this function:

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

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 from TDetector.

Definition at line 159 of file THiDetector.cxx.

References THiDetector::fCalib, TCalibration::GetHistogramMap(), and THiCalibration::GetTdc().

Here is the call graph for this function:

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

Plot energy versus time for a heavy-ion 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 to plot the energy against.
[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 from TDetector.

Reimplemented in TIcDetector.

Definition at line 184 of file THiDetector.cxx.

void SetCalibration const Char_t *  detectorName = 0  )  [inline, inherited]
 

Instructs the THiCalibration to get its information from the database. If no name is given, simply the detector name is used. This method enables the calibration to be changed by just using a different table name. For example, for default:

      TBgoDetector *bgo = new TBgoDetector("BGO12", 1);
      bgo->SetCalibration();
      bgo->Print();
Or, using the calibration table for a different BGO:
      TBgoDetector *bgo = new TBgoDetector("BGO12", 1);
      bgo->SetCalibration("BGO13");
      bgo->Print();
Parameters:
[in] detectorName The name of the detector in the database.

Definition at line 53 of file THiDetector.h.

References THiDetector::fCalib, THiCalibration::FindCalibration(), and TDetector::GetName().

Here is the call graph for this function:

void SetDatabase const Char_t *  database  )  [inline, inherited]
 

Set the database from where the calibration data is accessed. Just a wrapper to the correct THiCalibration call.

Parameters:
[in] database The name of the database, for example "mysql://localhost:3306/dragon".

Definition at line 76 of file THiDetector.h.

References THiDetector::fCalib, and THiCalibration::SetDatabase().

Here is the call graph for this function:

const Char_t * GetName  )  const [inline, virtual, inherited]
 

Get the detector name.

Returns:
The detector name as a character string.

Definition at line 113 of file TDetector.h.

References TDetector::fName.

Float_t GetMaxEnergy  )  const [inherited]
 

Gets the maximum energy that was in the detector.

Returns:
The maximum value in fEnergies.

Definition at line 188 of file TDetector.cxx.

References TDetector::fEnergies.

void SetName const Char_t *  name  )  [inline, inherited]
 

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 TDetector::fName.

void SetChannels UInt_t  channels  )  [inline, inherited]
 

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 TDetector::fChannels.

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

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 TDetector::fCoordinates.

UInt_t GetChannels  )  const [inline, inherited]
 

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, inherited]
 

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, inherited]
 

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, inherited]
 

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, inherited]
 

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 TDetector::fHit.

Bool_t IsHit  )  const [inline, inherited]
 

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, inherited]
 

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

Float_t fStripWidth [private]
 

The strip width of each strip in the dsssd.

Definition at line 38 of file TDsssdDetector.h.

Float_t fStripSpacing [private]
 

The spacing between each strip in the dsssd.

Definition at line 41 of file TDsssdDetector.h.

vector<const TDataItem<UShort_t> *> fAdcs [protected, inherited]
 

Data from the heavy-ion ADCs is stored in here. This is contained in a vector due to considerations of speed and ability to manipulate the data within the raw data array.

Definition at line 42 of file THiDetector.h.

vector<const TDataItem<UShort_t> *> fTdcs [protected, inherited]
 

Data from the heavy-ion TDCs is stored in here. This is contained in a vector due to considerations of speed and ability to manipulate the data within the raw data array.

Definition at line 47 of file THiDetector.h.

THiCalibration fCalib [protected, inherited]
 

The heavy-ion electronics calibration.

Definition at line 50 of file THiDetector.h.

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

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, inherited]
 

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, inherited]
 

The detector coordinates.

Definition at line 70 of file TDetector.h.

Bool_t fHit [protected, inherited]
 

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

Definition at line 73 of file TDetector.h.


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