emcTowerContentv2 Class Reference
[Tower calibration]

#include <emcTowerContentv2.h>

Inherits emcTowerContent.

Inheritance diagram for emcTowerContentv2:

Inheritance graph
[legend]
List of all members.

Detailed Description

(VERSION) emcTowerContent version 2.

Definition at line 12 of file emcTowerContentv2.h.

Public Member Functions

 emcTowerContentv2 ()
virtual ~emcTowerContentv2 ()
int ADC (void) const
 ADC value (i.e.
int AMUPre (void) const
 AMU cell that gave the pre sample [0-63].
int AMUPost (void) const
 AMU cell that gave the post sample [0-63].
int AMUTAC (void) const
 AMU cell that gave the tac sample [0-63].
int BeamClock (void) const
int Channel (void) const
 Tower channel number within the FEM [0-143].
int DataError (void) const
 A word indicating some error (e.g. sample too low or too high).
float Energy (void) const
 Tower energy in GeV.
unsigned int ErrorNeighbours (void) const
 A word indicating the status of the tower itself and of its neighbours (5x5).
int FEM (void) const
 FEM number of this tower [0-171 for data, >= 172 for monitoring.
bool hasCalib (void) const
 Whether this tower has Energy and ToF available.
bool hasDC (void) const
 Whether this tower has ADC and TDC values available.
bool hasGain (void) const
 Whether this tower has the gain (which was used to normalize the ADC value to take into account time evolution) available.
bool hasRaw (void) const
 Whether this tower has raw samples availalble.
bool canHaveCalib () const
 Whether this tower can hold calibrated (energy,tof) values.
bool canHaveDC () const
 Whether this tower can hold DC (ADC,TDC) values.
bool canHaveGain () const
 Whether this tower can hold Gain value.
bool canHaveRaw () const
 Whether this tower can hold raw (HGPre,HGPost,LGPre,LGPost,TAC) samples.
int HG (void) const
 High gain value (pedestal subtracted).
int HGPost (void) const
 High gain post sample (raw).
int HGPre (void) const
 High gain pre sample (raw).
float Gain (void) const
 Gain for this tower.
void identify (std::ostream &os=std::cout) const
 From PHObject.
int isValid () const
 From PHObject.
bool isSimulated (void) const
 Whether this tower is a simulated one.
bool isMerged (void) const
 Whether this tower was merged (i.e. embedded).
bool isZero (void) const
 Whether raw samples are compatible with an empty tower.
int LG (void) const
 Low gain (pedestal subtracted) value.
int LGPost (void) const
 Low gain post sample.
int LGPre (void) const
 Low gain pre sample.
void print (std::ostream &out=std::cout, int level=0) const
 Output to stream.
void Reset ()
void SetADCTDC (int adc, int tdc, int hg=0, int lg=0)
 Set the "DC" values : ADC and TDC.
void SetCalibrated (float energy, float tof)
 Set the calibrated values : energy and tof.
void SetDataError (int dataerror)
 Set the data Error.
void SetGain (float gain)
 Set the gain.
void SetID (int fem, int channel)
 Set the id of this tower, by means of the pair (fem,channel).
void SetNeighbours (unsigned int error, unsigned int warning)
 Set the deadmap and warnmap.
void SetRaw (int hgpost, int hgpre, int lgpost, int lgpre, int tac, int amupre=0, int amupost=0, int amutac=0, int beamclock=0)
 Set the raw sample values.
int TAC (void) const
 TAC sample value.
int TDC (void) const
 TDC value.
float ToF (void) const
 Get the ToF value (ns).
int TowerID (void) const
 TowerID (computed from (fem,channel) pair).
unsigned int WarnNeighbours (void) const
 Warnmap (see also ErrorNeighbours()).
void Zero (void)
 Reset the raw samples.

Private Attributes

bool fHasCalib
bool fHasDC
bool fHasRaw
int fFEM
int fChannel
int fDataError
unsigned int fErrorNeighbours
unsigned int fWarnNeighbours
int fHGPost
int fHGPre
int fLGPost
int fLGPre
int fTAC
int fTDC
int fADC
int fHG
int fLG
int fTowerID
int fBeamClock
short fAMUPre
short fAMUPost
short fAMUTAC
float fEnergy
float fTOF
float fGain


Constructor & Destructor Documentation

emcTowerContentv2::emcTowerContentv2  ) 
 

emcTowerContentv2::~emcTowerContentv2  )  [virtual]
 

Definition at line 18 of file emcTowerContentv2.C.


Member Function Documentation

int emcTowerContentv2::ADC void   )  const [inline, virtual]
 

ADC value (i.e.

pre-post-pedestals for the selected gain, either low or high).

Reimplemented from emcTowerContent.

Definition at line 21 of file emcTowerContentv2.h.

References fADC.

int emcTowerContentv2::AMUPost void   )  const [inline, virtual]
 

AMU cell that gave the post sample [0-63].

Reimplemented from emcTowerContent.

Definition at line 25 of file emcTowerContentv2.h.

References fAMUPost.

int emcTowerContentv2::AMUPre void   )  const [inline, virtual]
 

AMU cell that gave the pre sample [0-63].

Reimplemented from emcTowerContent.

Definition at line 23 of file emcTowerContentv2.h.

References fAMUPre.

int emcTowerContentv2::AMUTAC void   )  const [inline, virtual]
 

AMU cell that gave the tac sample [0-63].

Reimplemented from emcTowerContent.

Definition at line 27 of file emcTowerContentv2.h.

References fAMUTAC.

int emcTowerContentv2::BeamClock void   )  const [inline, virtual]
 

Reimplemented from emcTowerContent.

Definition at line 29 of file emcTowerContentv2.h.

References fBeamClock.

bool emcTowerContentv2::canHaveCalib  )  const [inline, virtual]
 

Whether this tower can hold calibrated (energy,tof) values.

Reimplemented from emcTowerContent.

Definition at line 46 of file emcTowerContentv2.h.

bool emcTowerContentv2::canHaveDC  )  const [inline, virtual]
 

Whether this tower can hold DC (ADC,TDC) values.

Reimplemented from emcTowerContent.

Definition at line 47 of file emcTowerContentv2.h.

bool emcTowerContentv2::canHaveGain  )  const [inline, virtual]
 

Whether this tower can hold Gain value.

Reimplemented from emcTowerContent.

Definition at line 48 of file emcTowerContentv2.h.

bool emcTowerContentv2::canHaveRaw  )  const [inline, virtual]
 

Whether this tower can hold raw (HGPre,HGPost,LGPre,LGPost,TAC) samples.

Reimplemented from emcTowerContent.

Definition at line 49 of file emcTowerContentv2.h.

int emcTowerContentv2::Channel void   )  const [inline, virtual]
 

Tower channel number within the FEM [0-143].

Reimplemented from emcTowerContent.

Definition at line 31 of file emcTowerContentv2.h.

References fChannel.

int emcTowerContentv2::DataError void   )  const [inline, virtual]
 

A word indicating some error (e.g. sample too low or too high).

Reimplemented from emcTowerContent.

Definition at line 33 of file emcTowerContentv2.h.

References fDataError.

float emcTowerContentv2::Energy void   )  const [inline, virtual]
 

Tower energy in GeV.

Reimplemented from emcTowerContent.

Definition at line 35 of file emcTowerContentv2.h.

References fEnergy.

unsigned int emcTowerContentv2::ErrorNeighbours void   )  const [inline, virtual]
 

A word indicating the status of the tower itself and of its neighbours (5x5).

See also emcBadModules class for more info.

Reimplemented from emcTowerContent.

Definition at line 37 of file emcTowerContentv2.h.

References fErrorNeighbours.

int emcTowerContentv2::FEM void   )  const [inline, virtual]
 

FEM number of this tower [0-171 for data, >= 172 for monitoring.

Reimplemented from emcTowerContent.

Definition at line 39 of file emcTowerContentv2.h.

References fFEM.

float emcTowerContentv2::Gain void   )  const [inline, virtual]
 

Gain for this tower.

Reimplemented from emcTowerContent.

Definition at line 55 of file emcTowerContentv2.h.

References fGain.

bool emcTowerContentv2::hasCalib void   )  const [inline, virtual]
 

Whether this tower has Energy and ToF available.

Reimplemented from emcTowerContent.

Definition at line 41 of file emcTowerContentv2.h.

References fHasCalib.

bool emcTowerContentv2::hasDC void   )  const [inline, virtual]
 

Whether this tower has ADC and TDC values available.

Reimplemented from emcTowerContent.

Definition at line 42 of file emcTowerContentv2.h.

References fHasDC.

bool emcTowerContentv2::hasGain void   )  const [inline, virtual]
 

Whether this tower has the gain (which was used to normalize the ADC value to take into account time evolution) available.

Reimplemented from emcTowerContent.

Definition at line 43 of file emcTowerContentv2.h.

bool emcTowerContentv2::hasRaw void   )  const [inline, virtual]
 

Whether this tower has raw samples availalble.

Reimplemented from emcTowerContent.

Definition at line 44 of file emcTowerContentv2.h.

References fHasRaw.

int emcTowerContentv2::HG void   )  const [inline, virtual]
 

High gain value (pedestal subtracted).

Reimplemented from emcTowerContent.

Definition at line 51 of file emcTowerContentv2.h.

References fHG.

int emcTowerContentv2::HGPost void   )  const [inline, virtual]
 

High gain post sample (raw).

Reimplemented from emcTowerContent.

Definition at line 52 of file emcTowerContentv2.h.

References fHGPost.

int emcTowerContentv2::HGPre void   )  const [inline, virtual]
 

High gain pre sample (raw).

Reimplemented from emcTowerContent.

Definition at line 53 of file emcTowerContentv2.h.

References fHGPre.

void emcTowerContentv2::identify std::ostream &  os = std::cout  )  const [virtual]
 

From PHObject.

Reimplemented from emcTowerContent.

bool emcTowerContentv2::isMerged void   )  const [inline, virtual]
 

Whether this tower was merged (i.e. embedded).

Reimplemented from emcTowerContent.

Definition at line 63 of file emcTowerContentv2.h.

bool emcTowerContentv2::isSimulated void   )  const [inline, virtual]
 

Whether this tower is a simulated one.

Reimplemented from emcTowerContent.

Definition at line 61 of file emcTowerContentv2.h.

int emcTowerContentv2::isValid  )  const [virtual]
 

From PHObject.

Reimplemented from emcTowerContent.

Definition at line 31 of file emcTowerContentv2.C.

References fFEM.

bool emcTowerContentv2::isZero void   )  const [virtual]
 

Whether raw samples are compatible with an empty tower.

Reimplemented from emcTowerContent.

Definition at line 45 of file emcTowerContentv2.C.

References emcDataError::CHANNEL_DISABLED(), and fDataError.

int emcTowerContentv2::LG void   )  const [inline, virtual]
 

Low gain (pedestal subtracted) value.

Reimplemented from emcTowerContent.

Definition at line 67 of file emcTowerContentv2.h.

References fLG.

int emcTowerContentv2::LGPost void   )  const [inline, virtual]
 

Low gain post sample.

Reimplemented from emcTowerContent.

Definition at line 68 of file emcTowerContentv2.h.

References fLGPost.

int emcTowerContentv2::LGPre void   )  const [inline, virtual]
 

Low gain pre sample.

Reimplemented from emcTowerContent.

Definition at line 69 of file emcTowerContentv2.h.

References fLGPre.

void emcTowerContentv2::print std::ostream &  out = std::cout,
int  level = 0
const [virtual]
 

Output to stream.

Reimplemented from emcTowerContent.

void emcTowerContentv2::Reset  ) 
 

Definition at line 139 of file emcTowerContentv2.C.

References fAMUPost, fAMUPre, fAMUTAC, fChannel, fFEM, fGain, fHasCalib, fHasDC, fHasRaw, fTowerID, and Zero().

void emcTowerContentv2::SetADCTDC int  adc,
int  tdc,
int  hg = 0,
int  lg = 0
[virtual]
 

Set the "DC" values : ADC and TDC.

Only useable if hasDC returns true.

Reimplemented from emcTowerContent.

Definition at line 160 of file emcTowerContentv2.C.

References fADC, fHasDC, fHG, fLG, and fTDC.

void emcTowerContentv2::SetCalibrated float  energy,
float  tof
[virtual]
 

Set the calibrated values : energy and tof.

Only useable if hasCalib returns true.

Reimplemented from emcTowerContent.

Definition at line 171 of file emcTowerContentv2.C.

References fEnergy, fHasCalib, and fTOF.

void emcTowerContentv2::SetDataError int  dataerror  )  [virtual]
 

Set the data Error.

Reimplemented from emcTowerContent.

Definition at line 180 of file emcTowerContentv2.C.

References fDataError.

void emcTowerContentv2::SetGain float  gain  )  [virtual]
 

Set the gain.

Reimplemented from emcTowerContent.

Definition at line 187 of file emcTowerContentv2.C.

References fGain.

void emcTowerContentv2::SetID int  fem,
int  channel
[virtual]
 

Set the id of this tower, by means of the pair (fem,channel).

Reimplemented from emcTowerContent.

Definition at line 194 of file emcTowerContentv2.C.

References fChannel, fFEM, fTowerID, and EmcIndexer::PXSM144iCH_iPX().

void emcTowerContentv2::SetNeighbours unsigned int  error,
unsigned int  warning
[virtual]
 

Set the deadmap and warnmap.

Reimplemented from emcTowerContent.

Definition at line 203 of file emcTowerContentv2.C.

References fErrorNeighbours, and fWarnNeighbours.

void emcTowerContentv2::SetRaw int  hgpost,
int  hgpre,
int  lgpost,
int  lgpre,
int  tac,
int  amupre = 0,
int  amupost = 0,
int  amutac = 0,
int  beamclock = 0
[virtual]
 

Set the raw sample values.

Only useable if hasRaw returns true.

Reimplemented from emcTowerContent.

Definition at line 211 of file emcTowerContentv2.C.

References fAMUPost, fAMUPre, fAMUTAC, fBeamClock, fHasRaw, fHGPost, fHGPre, fLGPost, fLGPre, and fTAC.

int emcTowerContentv2::TAC void   )  const [inline, virtual]
 

TAC sample value.

Reimplemented from emcTowerContent.

Definition at line 95 of file emcTowerContentv2.h.

References fTAC.

int emcTowerContentv2::TDC void   )  const [inline, virtual]
 

TDC value.

Reimplemented from emcTowerContent.

Definition at line 96 of file emcTowerContentv2.h.

References fTDC.

float emcTowerContentv2::ToF void   )  const [inline, virtual]
 

Get the ToF value (ns).

Reimplemented from emcTowerContent.

Definition at line 97 of file emcTowerContentv2.h.

References fTOF.

int emcTowerContentv2::TowerID void   )  const [inline, virtual]
 

TowerID (computed from (fem,channel) pair).

Reimplemented from emcTowerContent.

Definition at line 99 of file emcTowerContentv2.h.

References fTowerID.

Referenced by emcTowerContainerv2::findTower().

unsigned int emcTowerContentv2::WarnNeighbours void   )  const [inline, virtual]
 

Warnmap (see also ErrorNeighbours()).

Reimplemented from emcTowerContent.

Definition at line 101 of file emcTowerContentv2.h.

References fWarnNeighbours.

void emcTowerContentv2::Zero void   )  [virtual]
 

Reset the raw samples.

Reimplemented from emcTowerContent.

Definition at line 229 of file emcTowerContentv2.C.

References fADC, fDataError, fEnergy, fErrorNeighbours, fGain, fHG, fHGPost, fHGPre, fLG, fLGPost, fLGPre, fTAC, fTDC, fTOF, and fWarnNeighbours.

Referenced by Reset().


Member Data Documentation

int emcTowerContentv2::fADC [private]
 

Definition at line 121 of file emcTowerContentv2.h.

Referenced by ADC(), SetADCTDC(), and Zero().

short emcTowerContentv2::fAMUPost [private]
 

Definition at line 127 of file emcTowerContentv2.h.

Referenced by AMUPost(), Reset(), and SetRaw().

short emcTowerContentv2::fAMUPre [private]
 

Definition at line 126 of file emcTowerContentv2.h.

Referenced by AMUPre(), Reset(), and SetRaw().

short emcTowerContentv2::fAMUTAC [private]
 

Definition at line 128 of file emcTowerContentv2.h.

Referenced by AMUTAC(), Reset(), and SetRaw().

int emcTowerContentv2::fBeamClock [private]
 

Definition at line 125 of file emcTowerContentv2.h.

Referenced by BeamClock(), and SetRaw().

int emcTowerContentv2::fChannel [private]
 

Definition at line 111 of file emcTowerContentv2.h.

Referenced by Channel(), Reset(), and SetID().

int emcTowerContentv2::fDataError [private]
 

Definition at line 112 of file emcTowerContentv2.h.

Referenced by DataError(), isZero(), SetDataError(), and Zero().

float emcTowerContentv2::fEnergy [private]
 

Definition at line 129 of file emcTowerContentv2.h.

Referenced by Energy(), SetCalibrated(), and Zero().

unsigned int emcTowerContentv2::fErrorNeighbours [private]
 

Definition at line 113 of file emcTowerContentv2.h.

Referenced by ErrorNeighbours(), SetNeighbours(), and Zero().

int emcTowerContentv2::fFEM [private]
 

Definition at line 110 of file emcTowerContentv2.h.

Referenced by FEM(), isValid(), Reset(), and SetID().

float emcTowerContentv2::fGain [private]
 

Definition at line 131 of file emcTowerContentv2.h.

Referenced by Gain(), Reset(), SetGain(), and Zero().

bool emcTowerContentv2::fHasCalib [private]
 

Definition at line 107 of file emcTowerContentv2.h.

Referenced by hasCalib(), Reset(), and SetCalibrated().

bool emcTowerContentv2::fHasDC [private]
 

Definition at line 108 of file emcTowerContentv2.h.

Referenced by hasDC(), Reset(), and SetADCTDC().

bool emcTowerContentv2::fHasRaw [private]
 

Definition at line 109 of file emcTowerContentv2.h.

Referenced by hasRaw(), Reset(), and SetRaw().

int emcTowerContentv2::fHG [private]
 

Definition at line 122 of file emcTowerContentv2.h.

Referenced by HG(), SetADCTDC(), and Zero().

int emcTowerContentv2::fHGPost [private]
 

Definition at line 115 of file emcTowerContentv2.h.

Referenced by HGPost(), SetRaw(), and Zero().

int emcTowerContentv2::fHGPre [private]
 

Definition at line 116 of file emcTowerContentv2.h.

Referenced by HGPre(), SetRaw(), and Zero().

int emcTowerContentv2::fLG [private]
 

Definition at line 123 of file emcTowerContentv2.h.

Referenced by LG(), SetADCTDC(), and Zero().

int emcTowerContentv2::fLGPost [private]
 

Definition at line 117 of file emcTowerContentv2.h.

Referenced by LGPost(), SetRaw(), and Zero().

int emcTowerContentv2::fLGPre [private]
 

Definition at line 118 of file emcTowerContentv2.h.

Referenced by LGPre(), SetRaw(), and Zero().

int emcTowerContentv2::fTAC [private]
 

Definition at line 119 of file emcTowerContentv2.h.

Referenced by SetRaw(), TAC(), and Zero().

int emcTowerContentv2::fTDC [private]
 

Definition at line 120 of file emcTowerContentv2.h.

Referenced by SetADCTDC(), TDC(), and Zero().

float emcTowerContentv2::fTOF [private]
 

Definition at line 130 of file emcTowerContentv2.h.

Referenced by SetCalibrated(), ToF(), and Zero().

int emcTowerContentv2::fTowerID [private]
 

Definition at line 124 of file emcTowerContentv2.h.

Referenced by Reset(), SetID(), and TowerID().

unsigned int emcTowerContentv2::fWarnNeighbours [private]
 

Definition at line 114 of file emcTowerContentv2.h.

Referenced by SetNeighbours(), WarnNeighbours(), and Zero().


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