emcTowerContentv3 Class Reference
[Tower calibration]

#include <emcTowerContentv3.h>

Inherits emcTowerContent.

Inheritance diagram for emcTowerContentv3:

Inheritance graph
[legend]
List of all members.

Detailed Description

(VERSION) emcTowerContent version 3.

Definition at line 12 of file emcTowerContentv3.h.

Public Member Functions

 emcTowerContentv3 ()
 emcTowerContentv3 (const emcTowerContentv3 &)
emcTowerContentv3operator= (const emcTowerContentv3 &)
virtual ~emcTowerContentv3 ()
emcTowerContentv3clone () const
 Make a copy of this tower.
emcTowerContentv3create () const
 Make an empty copy of this tower (i.e. copy only the type).
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.
void SetSimFrac (float simfrac)
 Set the simulated energy fraction.
float SimFrac () const
 Fraction of simulated energy (0=real tower, 1=simulated, in between for a merged, i.e.
void SetToF (float tof)
 Set the (corrected) tof.
int TAC (void) const
 TAC sample value.
int TDC (void) const
 TDC value.
float ToF (void) const
 Get the ToF value (ns).
float UncorrectedToF (void) const
 Uncorrected 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 Member Functions

void copyTo (emcTowerContentv3 &dest) const

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
float fSimFrac
float fUncorrectedTOF


Constructor & Destructor Documentation

emcTowerContentv3::emcTowerContentv3  ) 
 

Referenced by clone().

emcTowerContentv3::emcTowerContentv3 const emcTowerContentv3  ) 
 

Definition at line 18 of file emcTowerContentv3.C.

References copyTo().

emcTowerContentv3::~emcTowerContentv3  )  [virtual]
 

Definition at line 36 of file emcTowerContentv3.C.


Member Function Documentation

int emcTowerContentv3::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 26 of file emcTowerContentv3.h.

References fADC.

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

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

Reimplemented from emcTowerContent.

Definition at line 30 of file emcTowerContentv3.h.

References fAMUPost.

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

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

Reimplemented from emcTowerContent.

Definition at line 28 of file emcTowerContentv3.h.

References fAMUPre.

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

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

Reimplemented from emcTowerContent.

Definition at line 32 of file emcTowerContentv3.h.

References fAMUTAC.

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

Reimplemented from emcTowerContent.

Definition at line 34 of file emcTowerContentv3.h.

References fBeamClock.

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

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

Reimplemented from emcTowerContent.

Definition at line 51 of file emcTowerContentv3.h.

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

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

Reimplemented from emcTowerContent.

Definition at line 52 of file emcTowerContentv3.h.

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

Whether this tower can hold Gain value.

Reimplemented from emcTowerContent.

Definition at line 53 of file emcTowerContentv3.h.

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

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

Reimplemented from emcTowerContent.

Definition at line 54 of file emcTowerContentv3.h.

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

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

Reimplemented from emcTowerContent.

Definition at line 36 of file emcTowerContentv3.h.

References fChannel.

emcTowerContentv3* emcTowerContentv3::clone void   )  const [inline, virtual]
 

Make a copy of this tower.

Reimplemented from emcTowerContent.

Definition at line 23 of file emcTowerContentv3.h.

References emcTowerContentv3().

void emcTowerContentv3::copyTo emcTowerContentv3 dest  )  const [private]
 

Definition at line 42 of file emcTowerContentv3.C.

References fADC, fAMUPost, fAMUPre, fAMUTAC, fBeamClock, fChannel, fDataError, fEnergy, fErrorNeighbours, fFEM, fGain, fHasCalib, fHasDC, fHasRaw, fHG, fHGPost, fHGPre, fLG, fLGPost, fLGPre, fSimFrac, fTAC, fTDC, fTOF, fTowerID, fUncorrectedTOF, and fWarnNeighbours.

Referenced by emcTowerContentv3(), and operator=().

emcTowerContentv3* emcTowerContentv3::create void   )  const [inline, virtual]
 

Make an empty copy of this tower (i.e. copy only the type).

Reimplemented from emcTowerContent.

Definition at line 24 of file emcTowerContentv3.h.

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

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

Reimplemented from emcTowerContent.

Definition at line 38 of file emcTowerContentv3.h.

References fDataError.

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

Tower energy in GeV.

Reimplemented from emcTowerContent.

Definition at line 40 of file emcTowerContentv3.h.

References fEnergy.

unsigned int emcTowerContentv3::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 42 of file emcTowerContentv3.h.

References fErrorNeighbours.

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

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

Reimplemented from emcTowerContent.

Definition at line 44 of file emcTowerContentv3.h.

References fFEM.

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

Gain for this tower.

Reimplemented from emcTowerContent.

Definition at line 60 of file emcTowerContentv3.h.

References fGain.

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

Whether this tower has Energy and ToF available.

Reimplemented from emcTowerContent.

Definition at line 46 of file emcTowerContentv3.h.

References fHasCalib.

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

Whether this tower has ADC and TDC values available.

Reimplemented from emcTowerContent.

Definition at line 47 of file emcTowerContentv3.h.

References fHasDC.

bool emcTowerContentv3::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 48 of file emcTowerContentv3.h.

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

Whether this tower has raw samples availalble.

Reimplemented from emcTowerContent.

Definition at line 49 of file emcTowerContentv3.h.

References fHasRaw.

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

High gain value (pedestal subtracted).

Reimplemented from emcTowerContent.

Definition at line 56 of file emcTowerContentv3.h.

References fHG.

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

High gain post sample (raw).

Reimplemented from emcTowerContent.

Definition at line 57 of file emcTowerContentv3.h.

References fHGPost.

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

High gain pre sample (raw).

Reimplemented from emcTowerContent.

Definition at line 58 of file emcTowerContentv3.h.

References fHGPre.

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

From PHObject.

Reimplemented from emcTowerContent.

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

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

Reimplemented from emcTowerContent.

Definition at line 68 of file emcTowerContentv3.h.

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

Whether this tower is a simulated one.

Reimplemented from emcTowerContent.

Definition at line 66 of file emcTowerContentv3.h.

int emcTowerContentv3::isValid  )  const [virtual]
 

From PHObject.

Reimplemented from emcTowerContent.

Definition at line 82 of file emcTowerContentv3.C.

References fFEM.

bool emcTowerContentv3::isZero void   )  const [virtual]
 

Whether raw samples are compatible with an empty tower.

Reimplemented from emcTowerContent.

Definition at line 96 of file emcTowerContentv3.C.

References emcDataError::CHANNEL_DISABLED(), and fDataError.

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

Low gain (pedestal subtracted) value.

Reimplemented from emcTowerContent.

Definition at line 72 of file emcTowerContentv3.h.

References fLG.

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

Low gain post sample.

Reimplemented from emcTowerContent.

Definition at line 73 of file emcTowerContentv3.h.

References fLGPost.

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

Low gain pre sample.

Reimplemented from emcTowerContent.

Definition at line 74 of file emcTowerContentv3.h.

References fLGPre.

emcTowerContentv3 & emcTowerContentv3::operator= const emcTowerContentv3  ) 
 

Definition at line 26 of file emcTowerContentv3.C.

References copyTo().

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

Output to stream.

Reimplemented from emcTowerContent.

void emcTowerContentv3::Reset  ) 
 

Definition at line 190 of file emcTowerContentv3.C.

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

void emcTowerContentv3::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 211 of file emcTowerContentv3.C.

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

void emcTowerContentv3::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 222 of file emcTowerContentv3.C.

References fEnergy, fHasCalib, fTOF, and fUncorrectedTOF.

void emcTowerContentv3::SetDataError int  dataerror  )  [virtual]
 

Set the data Error.

Reimplemented from emcTowerContent.

Definition at line 238 of file emcTowerContentv3.C.

References fDataError.

void emcTowerContentv3::SetGain float  gain  )  [virtual]
 

Set the gain.

Reimplemented from emcTowerContent.

Definition at line 245 of file emcTowerContentv3.C.

References fGain.

void emcTowerContentv3::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 252 of file emcTowerContentv3.C.

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

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

Set the deadmap and warnmap.

Reimplemented from emcTowerContent.

Definition at line 261 of file emcTowerContentv3.C.

References fErrorNeighbours, and fWarnNeighbours.

void emcTowerContentv3::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 269 of file emcTowerContentv3.C.

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

void emcTowerContentv3::SetSimFrac float  simfrac  )  [virtual]
 

Set the simulated energy fraction.

Reimplemented from emcTowerContent.

Definition at line 287 of file emcTowerContentv3.C.

References fSimFrac.

void emcTowerContentv3::SetToF float  tof  )  [virtual]
 

Set the (corrected) tof.

Reimplemented from emcTowerContent.

Definition at line 231 of file emcTowerContentv3.C.

References fTOF.

float emcTowerContentv3::SimFrac  )  const [inline, virtual]
 

Fraction of simulated energy (0=real tower, 1=simulated, in between for a merged, i.e.

embedded, tower.

Reimplemented from emcTowerContent.

Definition at line 102 of file emcTowerContentv3.h.

References fSimFrac.

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

TAC sample value.

Reimplemented from emcTowerContent.

Definition at line 106 of file emcTowerContentv3.h.

References fTAC.

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

TDC value.

Reimplemented from emcTowerContent.

Definition at line 107 of file emcTowerContentv3.h.

References fTDC.

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

Get the ToF value (ns).

Reimplemented from emcTowerContent.

Definition at line 108 of file emcTowerContentv3.h.

References fTOF.

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

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

Reimplemented from emcTowerContent.

Definition at line 111 of file emcTowerContentv3.h.

References fTowerID.

Referenced by emcTowerContainerv3::findTower().

float emcTowerContentv3::UncorrectedToF void   )  const [inline, virtual]
 

Uncorrected ToF value (ns).

Reimplemented from emcTowerContent.

Definition at line 109 of file emcTowerContentv3.h.

References fUncorrectedTOF.

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

Warnmap (see also ErrorNeighbours()).

Reimplemented from emcTowerContent.

Definition at line 113 of file emcTowerContentv3.h.

References fWarnNeighbours.

void emcTowerContentv3::Zero void   )  [virtual]
 

Reset the raw samples.

Reimplemented from emcTowerContent.

Definition at line 294 of file emcTowerContentv3.C.

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

Referenced by Reset().


Member Data Documentation

int emcTowerContentv3::fADC [private]
 

Definition at line 136 of file emcTowerContentv3.h.

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

short emcTowerContentv3::fAMUPost [private]
 

Definition at line 142 of file emcTowerContentv3.h.

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

short emcTowerContentv3::fAMUPre [private]
 

Definition at line 141 of file emcTowerContentv3.h.

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

short emcTowerContentv3::fAMUTAC [private]
 

Definition at line 143 of file emcTowerContentv3.h.

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

int emcTowerContentv3::fBeamClock [private]
 

Definition at line 140 of file emcTowerContentv3.h.

Referenced by BeamClock(), copyTo(), and SetRaw().

int emcTowerContentv3::fChannel [private]
 

Definition at line 126 of file emcTowerContentv3.h.

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

int emcTowerContentv3::fDataError [private]
 

Definition at line 127 of file emcTowerContentv3.h.

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

float emcTowerContentv3::fEnergy [private]
 

Definition at line 144 of file emcTowerContentv3.h.

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

unsigned int emcTowerContentv3::fErrorNeighbours [private]
 

Definition at line 128 of file emcTowerContentv3.h.

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

int emcTowerContentv3::fFEM [private]
 

Definition at line 125 of file emcTowerContentv3.h.

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

float emcTowerContentv3::fGain [private]
 

Definition at line 146 of file emcTowerContentv3.h.

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

bool emcTowerContentv3::fHasCalib [private]
 

Definition at line 122 of file emcTowerContentv3.h.

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

bool emcTowerContentv3::fHasDC [private]
 

Definition at line 123 of file emcTowerContentv3.h.

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

bool emcTowerContentv3::fHasRaw [private]
 

Definition at line 124 of file emcTowerContentv3.h.

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

int emcTowerContentv3::fHG [private]
 

Definition at line 137 of file emcTowerContentv3.h.

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

int emcTowerContentv3::fHGPost [private]
 

Definition at line 130 of file emcTowerContentv3.h.

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

int emcTowerContentv3::fHGPre [private]
 

Definition at line 131 of file emcTowerContentv3.h.

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

int emcTowerContentv3::fLG [private]
 

Definition at line 138 of file emcTowerContentv3.h.

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

int emcTowerContentv3::fLGPost [private]
 

Definition at line 132 of file emcTowerContentv3.h.

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

int emcTowerContentv3::fLGPre [private]
 

Definition at line 133 of file emcTowerContentv3.h.

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

float emcTowerContentv3::fSimFrac [private]
 

Definition at line 147 of file emcTowerContentv3.h.

Referenced by copyTo(), SetSimFrac(), SimFrac(), and Zero().

int emcTowerContentv3::fTAC [private]
 

Definition at line 134 of file emcTowerContentv3.h.

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

int emcTowerContentv3::fTDC [private]
 

Definition at line 135 of file emcTowerContentv3.h.

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

float emcTowerContentv3::fTOF [private]
 

Definition at line 145 of file emcTowerContentv3.h.

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

int emcTowerContentv3::fTowerID [private]
 

Definition at line 139 of file emcTowerContentv3.h.

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

float emcTowerContentv3::fUncorrectedTOF [private]
 

Definition at line 148 of file emcTowerContentv3.h.

Referenced by copyTo(), SetCalibrated(), UncorrectedToF(), and Zero().

unsigned int emcTowerContentv3::fWarnNeighbours [private]
 

Definition at line 129 of file emcTowerContentv3.h.

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


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