emcCalibratedDataObject Class Reference
[Old calibration software]

#include <emcCalibratedDataObject.h>

List of all members.


Detailed Description

(OLD) Stores calibrated towers for whole EMCAL.

Deprecated:
It derives from PHObject so it can be written in a TTree using the PHNodeIOManager of PHOOL.
See emcTowerContainer and emcTowerContent instead.

Definition at line 22 of file emcCalibratedDataObject.h.

Public Member Functions

 emcCalibratedDataObject ()
 emcCalibratedDataObject (const emcCalibratedDataObject &obj)
emcCalibratedDataObjectoperator= (const emcCalibratedDataObject &obj)
virtual ~emcCalibratedDataObject ()
Float_t ComputeTotalEnergy ()
 RECOMPUTES the total energy.
Int_t CountHits (Float_t thres) const
 Returns number of hits with energies above threshold thres.
void DecodeKey (long key, Int_t &arm, Int_t &sector, Int_t &yrow, Int_t &zrow) const
 Returns geometrical location given the software key.
long GenerateSoftwareKey (Int_t ItemId) const
 Generate software key for a given EMCal Object (sets to -1 for non tower objects).
void Get (Int_t index, Float_t &energy, Float_t &time) const
 Get everything using internal indexing.
void Get (Int_t index, Int_t &TowerId, long &softwareKey, Int_t &errorFlag, Float_t &energy, Float_t &time) const
 Get everything using internal indexing.
void GetByTowerId (Int_t towerId, Float_t &energy, Float_t &time) const
 Get everything using tower indexing.
Int_t GetDead (Int_t index) const
 Get status of neighbouring towers.
Int_t GetDeadByTowerId (Int_t TowerId) const
 Get dead using tower index.
Int_t GetWarn (Int_t index) const
Int_t GetWarnByTowerId (Int_t TowerId) const
 Get warnings using tower index.
Float_t GetEnergy (Int_t index) const
 Get energy using internal indexing.
Float_t GetEnergyByTowerId (Int_t towerId) const
 Get energy using tower indexing.
Int_t GetIndexFromTowerId (Int_t TowerId) const
 Get internal index from TowerId.
Int_t GetItemId (Int_t index) const
 Returns the EMCal Object Identifier (same thing as TowerId), given the object number in the data map.
Int_t GetMaxSize (void) const
 Get Maximum size of the internal arrays.
void GetPointers (float *&ENERGY, float *&TOF)
 WARNING - WARNING - WARNING - This method is to be used in online monitoring processes ONLY.
void GetSectorEnergies (Float_t *e)
 Fills-up array with energies seen in individual calorimeter Sectors.
Int_t GetSize (void) const
 Returns the number of towers of this object.
void GetSMEnergies (Float_t *e)
 Get energies in individual supermodules (144 channels) Order is given by RawDataAccessor (i.e.
long GetSoftwareKey (Int_t index) const
 Gets software key for a given EMCal Object.
Float_t GetTime (Int_t index) const
 Get time using internal indexing.
Float_t GetTimeByTowerId (Int_t towerId) const
 Get time using tower indexing.
Int_t GetTowerId (Int_t index) const
 Gets TowerId for a given TOWER (locally stored).
Float_t GetTotalEnergy ()
 Returns total energy seen in the Calorimeter (precomputed while calibrating the data).
void identify (ostream &out) const
 Identify ourselves.
Bool_t IsCalibrated (TString what) const
 Tells how far the calibration has been done so far.
Bool_t IsZeroSuppressed (void) const
 Tells if this CalibratedDataObject is zero-suppressed or not.
void Reset (void)
 Reset.
void resetByIndex (int index)
 Resets to zero both Energy and Time at Index = index.
void resetByTowerId (int TowerId)
 Resets to zero both Energy and Time for Tower = TowerId.
void Set (int index, Int_t TowerId, long softwareKey, Int_t dummy=0, float energy=0., float time=0., Int_t deadNeighbours=0, Int_t warnNeighbours=0)
 Set everything for one tower.
void SetEnergyCalibratedFlag (bool energycalibrated)
 Announce that energy has been calibrated.
void SetMaxSize (Int_t thesize)
 Set the maximum allowed size for this object.
void SetTimeCalibratedFlag (bool timecalibrated)
 Announce that time has been calibrated.
void SetTotalEnergy (Float_t E)
 Set the total energy.
void SetZeroSuppressedFlag (Bool_t flag=true)
 Announce that this object is (will be) zero-suppressed.
TString Status (void)
 Give a string with the status of this object.
void Update (void)
 Update some internal values (e.g. fETotal).
Operations (merging of 2 CDOs).
emcCalibratedDataObjectoperator+= (const emcCalibratedDataObject &obj)
emcCalibratedDataObject operator+ (const emcCalibratedDataObject &obj) const

Private Member Functions

void copyTo (emcCalibratedDataObject &obj) const
bool ValidIndex (Int_t index) const

Private Attributes

Int_t fSize
 Actual size of the arrays below.
Int_t fMaxSize
 Max size of arrays.
Float_t fETotal
 Total Energy in this event.
Float_t * fEnergy
 Calibrated Energies.
Float_t * fTime
 Calibrated Times.
Int_t * fTowerId
 Tower indices (ItemId's).
Int_t * fDeadNeighbours
 Dead map.
long * fSoftwareKey
 Software keys.
Bool_t fEnergyCalibrated
 tells if data are calibrated or not
Bool_t fTimeCalibrated
 tells if data are calibrated or not
Bool_t fZeroSuppressed
 tells if data are zero suppressed or not
Bool_t fReadOnly
Int_t * fWarnNeighbours
 Warning map.
std::map< int, int > fIndexMap
 A map to get the relation between TowerId and the index of the other arrays (fEnergy, fTime, etc.

Friends

ostream & operator<< (ostream &, const emcCalibratedDataObject &)
 output on stream.


Constructor & Destructor Documentation

emcCalibratedDataObject::emcCalibratedDataObject  ) 
 

Referenced by operator+().

emcCalibratedDataObject::emcCalibratedDataObject const emcCalibratedDataObject obj  ) 
 

Definition at line 40 of file emcCalibratedDataObject.C.

References copyTo().

emcCalibratedDataObject::~emcCalibratedDataObject  )  [virtual]
 

Definition at line 104 of file emcCalibratedDataObject.C.

References fDeadNeighbours, fEnergy, fSoftwareKey, fTime, fTowerId, and fWarnNeighbours.


Member Function Documentation

Float_t emcCalibratedDataObject::ComputeTotalEnergy  ) 
 

RECOMPUTES the total energy.

Definition at line 211 of file emcCalibratedDataObject.C.

References fEnergy, fEnergyCalibrated, fETotal, and fSize.

void emcCalibratedDataObject::copyTo emcCalibratedDataObject obj  )  const [private]
 

Definition at line 62 of file emcCalibratedDataObject.C.

References fDeadNeighbours, fEnergy, fEnergyCalibrated, fMaxSize, fSize, fSoftwareKey, fTime, fTimeCalibrated, fTowerId, fWarnNeighbours, and fZeroSuppressed.

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

Int_t emcCalibratedDataObject::CountHits Float_t  thres  )  const
 

Returns number of hits with energies above threshold thres.

Definition at line 200 of file emcCalibratedDataObject.C.

References fEnergyCalibrated.

void emcCalibratedDataObject::DecodeKey long  key,
Int_t &  arm,
Int_t &  sector,
Int_t &  yrow,
Int_t &  zrow
const
 

Returns geometrical location given the software key.

Definition at line 223 of file emcCalibratedDataObject.C.

Referenced by mEmcToolsModule::GetCalibTowerTableFromCdo(), and operator<<().

long emcCalibratedDataObject::GenerateSoftwareKey Int_t  ItemId  )  const
 

Generate software key for a given EMCal Object (sets to -1 for non tower objects).

Definition at line 232 of file emcCalibratedDataObject.C.

References EmcIndexer::iPXiSiST().

Referenced by operator+=(), and Update().

void emcCalibratedDataObject::Get Int_t  index,
Int_t &  TowerId,
long &  softwareKey,
Int_t &  errorFlag,
Float_t &  energy,
Float_t &  time
const
 

Get everything using internal indexing.

Definition at line 289 of file emcCalibratedDataObject.C.

References fEnergy, fSoftwareKey, fTime, fTowerId, and ValidIndex().

void emcCalibratedDataObject::Get Int_t  index,
Float_t &  energy,
Float_t &  time
const
 

Get everything using internal indexing.

Definition at line 273 of file emcCalibratedDataObject.C.

References fEnergy, fTime, and ValidIndex().

Referenced by mEmcToolsModule::GetCalibTowerTableFromCdo().

void emcCalibratedDataObject::GetByTowerId Int_t  towerId,
Float_t &  energy,
Float_t &  time
const
 

Get everything using tower indexing.

Definition at line 310 of file emcCalibratedDataObject.C.

References fEnergy, fTime, and GetIndexFromTowerId().

Int_t emcCalibratedDataObject::GetDead Int_t  index  )  const
 

Get status of neighbouring towers.

See emcQAs.C for warning and error bit map description

Definition at line 325 of file emcCalibratedDataObject.C.

References fDeadNeighbours, and ValidIndex().

Referenced by mEmcToolsModule::GetCalibTowerTableFromCdo(), operator+=(), and operator<<().

Int_t emcCalibratedDataObject::GetDeadByTowerId Int_t  TowerId  )  const
 

Get dead using tower index.

Definition at line 347 of file emcCalibratedDataObject.C.

References fDeadNeighbours, and GetIndexFromTowerId().

Float_t emcCalibratedDataObject::GetEnergy Int_t  index  )  const
 

Get energy using internal indexing.

Definition at line 376 of file emcCalibratedDataObject.C.

References fEnergy, and ValidIndex().

Referenced by operator+=().

Float_t emcCalibratedDataObject::GetEnergyByTowerId Int_t  towerId  )  const
 

Get energy using tower indexing.

Definition at line 386 of file emcCalibratedDataObject.C.

References fEnergy, and GetIndexFromTowerId().

Int_t emcCalibratedDataObject::GetIndexFromTowerId Int_t  TowerId  )  const
 

Get internal index from TowerId.

Definition at line 400 of file emcCalibratedDataObject.C.

References fIndexMap.

Referenced by GetByTowerId(), GetDeadByTowerId(), GetEnergyByTowerId(), GetTimeByTowerId(), GetWarnByTowerId(), operator+=(), and resetByTowerId().

Int_t emcCalibratedDataObject::GetItemId Int_t  index  )  const [inline]
 

Returns the EMCal Object Identifier (same thing as TowerId), given the object number in the data map.

The Object (Item) Identifier uniquely identifies the EMCal Object sending its signal to the FEM channel stored as Item (Absolute Tower Number within PHENIX scope). Note : this tower numbering was extended to include FEM channels used to measure signals from References. The monitoring FEM's are grouped into non-existent Sector "none", absPosition>=172.

Definition at line 104 of file emcCalibratedDataObject.h.

References GetTowerId().

Int_t emcCalibratedDataObject::GetMaxSize void   )  const [inline]
 

Get Maximum size of the internal arrays.

Definition at line 110 of file emcCalibratedDataObject.h.

References fMaxSize.

Referenced by GetSMEnergies().

void emcCalibratedDataObject::GetPointers float *&  ENERGY,
float *&  TOF
 

WARNING - WARNING - WARNING - This method is to be used in online monitoring processes ONLY.

This very inelegant method is nevertheless a way of taking care of the pre-existing software (which is working).\

Definition at line 413 of file emcCalibratedDataObject.C.

References fEnergy, and fTime.

void emcCalibratedDataObject::GetSectorEnergies Float_t *  e  ) 
 

Fills-up array with energies seen in individual calorimeter Sectors.

Array e is assumed to be of size 8.

Definition at line 422 of file emcCalibratedDataObject.C.

References fEnergy, fSoftwareKey, and GetSize().

Int_t emcCalibratedDataObject::GetSize void   )  const [inline]
 

Returns the number of towers of this object.

Definition at line 128 of file emcCalibratedDataObject.h.

References fSize.

Referenced by mEmcCalibratorModule::event(), mEmcToolsModule::GetCalibTowerTableFromCdo(), GetSectorEnergies(), GetSMEnergies(), operator+=(), and operator<<().

void emcCalibratedDataObject::GetSMEnergies Float_t *  e  ) 
 

Get energies in individual supermodules (144 channels) Order is given by RawDataAccessor (i.e.

by configuration file). Array e is assumed to have the required size.

Definition at line 435 of file emcCalibratedDataObject.C.

References fEnergy, fTowerId, GetMaxSize(), GetSize(), EmcIndexer::iPXiSiST(), EmcIndexer::iSiSM144_PXSM144(), and EmcIndexer::iSiSTiSMiSMT().

long emcCalibratedDataObject::GetSoftwareKey Int_t  index  )  const
 

Gets software key for a given EMCal Object.

Definition at line 463 of file emcCalibratedDataObject.C.

References fSoftwareKey, and ValidIndex().

Referenced by mEmcToolsModule::GetCalibTowerTableFromCdo(), operator+=(), and operator<<().

Float_t emcCalibratedDataObject::GetTime Int_t  index  )  const
 

Get time using internal indexing.

Definition at line 473 of file emcCalibratedDataObject.C.

References fTime, and ValidIndex().

Referenced by operator+=().

Float_t emcCalibratedDataObject::GetTimeByTowerId Int_t  towerId  )  const
 

Get time using tower indexing.

Definition at line 483 of file emcCalibratedDataObject.C.

References fTime, and GetIndexFromTowerId().

Float_t emcCalibratedDataObject::GetTotalEnergy  )  [inline]
 

Returns total energy seen in the Calorimeter (precomputed while calibrating the data).

Definition at line 153 of file emcCalibratedDataObject.h.

References fETotal.

Int_t emcCalibratedDataObject::GetTowerId Int_t  index  )  const
 

Gets TowerId for a given TOWER (locally stored).

Definition at line 497 of file emcCalibratedDataObject.C.

References fTowerId, and ValidIndex().

Referenced by GetItemId(), operator+=(), and operator<<().

Int_t emcCalibratedDataObject::GetWarn Int_t  index  )  const
 

Definition at line 335 of file emcCalibratedDataObject.C.

References fWarnNeighbours, and ValidIndex().

Referenced by mEmcToolsModule::GetCalibTowerTableFromCdo(), operator+=(), and operator<<().

Int_t emcCalibratedDataObject::GetWarnByTowerId Int_t  TowerId  )  const
 

Get warnings using tower index.

Definition at line 361 of file emcCalibratedDataObject.C.

References fWarnNeighbours, and GetIndexFromTowerId().

void emcCalibratedDataObject::identify ostream &  out  )  const
 

Identify ourselves.

Definition at line 507 of file emcCalibratedDataObject.C.

Bool_t emcCalibratedDataObject::IsCalibrated TString  what  )  const
 

Tells how far the calibration has been done so far.

Definition at line 513 of file emcCalibratedDataObject.C.

References fEnergyCalibrated, and fTimeCalibrated.

Referenced by Status().

Bool_t emcCalibratedDataObject::IsZeroSuppressed void   )  const [inline]
 

Tells if this CalibratedDataObject is zero-suppressed or not.

Definition at line 165 of file emcCalibratedDataObject.h.

References fZeroSuppressed.

Referenced by Status().

emcCalibratedDataObject emcCalibratedDataObject::operator+ const emcCalibratedDataObject obj  )  const [inline]
 

Definition at line 42 of file emcCalibratedDataObject.h.

References emcCalibratedDataObject().

emcCalibratedDataObject & emcCalibratedDataObject::operator+= const emcCalibratedDataObject obj  ) 
 

Definition at line 117 of file emcCalibratedDataObject.C.

References fEnergy, fReadOnly, fTime, fZeroSuppressed, GenerateSoftwareKey(), GetDead(), GetEnergy(), GetIndexFromTowerId(), GetSize(), GetSoftwareKey(), GetTime(), GetTowerId(), GetWarn(), and Set().

emcCalibratedDataObject & emcCalibratedDataObject::operator= const emcCalibratedDataObject obj  ) 
 

Definition at line 47 of file emcCalibratedDataObject.C.

References copyTo(), fDeadNeighbours, fEnergy, fSoftwareKey, fTime, fTowerId, and fWarnNeighbours.

void emcCalibratedDataObject::Reset void   ) 
 

Reset.

Definition at line 647 of file emcCalibratedDataObject.C.

References fEnergyCalibrated, fIndexMap, fSize, and fTimeCalibrated.

Referenced by SetMaxSize().

void emcCalibratedDataObject::resetByIndex int  index  ) 
 

Resets to zero both Energy and Time at Index = index.

Definition at line 656 of file emcCalibratedDataObject.C.

References fEnergy, fSize, and fTime.

void emcCalibratedDataObject::resetByTowerId int  TowerId  ) 
 

Resets to zero both Energy and Time for Tower = TowerId.

Definition at line 666 of file emcCalibratedDataObject.C.

References fEnergy, fTime, and GetIndexFromTowerId().

void emcCalibratedDataObject::Set int  index,
Int_t  TowerId,
long  softwareKey,
Int_t  dummy = 0,
float  energy = 0.,
float  time = 0.,
Int_t  deadNeighbours = 0,
Int_t  warnNeighbours = 0
 

Set everything for one tower.

Referenced by operator+=().

void emcCalibratedDataObject::SetEnergyCalibratedFlag bool  energycalibrated  )  [inline]
 

Announce that energy has been calibrated.

Definition at line 184 of file emcCalibratedDataObject.h.

References fEnergyCalibrated.

void emcCalibratedDataObject::SetMaxSize Int_t  thesize  ) 
 

Set the maximum allowed size for this object.

Definition at line 623 of file emcCalibratedDataObject.C.

References fDeadNeighbours, fEnergy, fMaxSize, fSoftwareKey, fTime, fTowerId, fWarnNeighbours, and Reset().

void emcCalibratedDataObject::SetTimeCalibratedFlag bool  timecalibrated  )  [inline]
 

Announce that time has been calibrated.

Definition at line 193 of file emcCalibratedDataObject.h.

References fTimeCalibrated.

void emcCalibratedDataObject::SetTotalEnergy Float_t  E  )  [inline]
 

Set the total energy.

Definition at line 199 of file emcCalibratedDataObject.h.

References fETotal.

void emcCalibratedDataObject::SetZeroSuppressedFlag Bool_t  flag = true  )  [inline]
 

Announce that this object is (will be) zero-suppressed.

Definition at line 205 of file emcCalibratedDataObject.h.

References fZeroSuppressed.

TString emcCalibratedDataObject::Status void   ) 
 

Give a string with the status of this object.

Definition at line 676 of file emcCalibratedDataObject.C.

References IsCalibrated(), and IsZeroSuppressed().

void emcCalibratedDataObject::Update void   ) 
 

Update some internal values (e.g. fETotal).

Definition at line 814 of file emcCalibratedDataObject.C.

References fIndexMap, fSoftwareKey, fTowerId, and GenerateSoftwareKey().

Referenced by mEmcToolsModule::GetCalibTowerTableFromCdo().

bool emcCalibratedDataObject::ValidIndex Int_t  index  )  const [inline, private]
 

Definition at line 224 of file emcCalibratedDataObject.h.

References fSize.

Referenced by Get(), GetDead(), GetEnergy(), GetSoftwareKey(), GetTime(), GetTowerId(), and GetWarn().


Friends And Related Function Documentation

ostream& operator<< ostream &  out,
const emcCalibratedDataObject cdo
[friend]
 

output on stream.

Definition at line 827 of file emcCalibratedDataObject.C.


Member Data Documentation

Int_t* emcCalibratedDataObject::fDeadNeighbours [private]
 

Dead map.

Definition at line 247 of file emcCalibratedDataObject.h.

Referenced by copyTo(), GetDead(), GetDeadByTowerId(), operator=(), SetMaxSize(), and ~emcCalibratedDataObject().

Float_t* emcCalibratedDataObject::fEnergy [private]
 

Calibrated Energies.

Definition at line 241 of file emcCalibratedDataObject.h.

Referenced by ComputeTotalEnergy(), copyTo(), Get(), GetByTowerId(), GetEnergy(), GetEnergyByTowerId(), GetPointers(), GetSectorEnergies(), GetSMEnergies(), operator+=(), operator<<(), operator=(), resetByIndex(), resetByTowerId(), SetMaxSize(), and ~emcCalibratedDataObject().

Bool_t emcCalibratedDataObject::fEnergyCalibrated [private]
 

tells if data are calibrated or not

Definition at line 252 of file emcCalibratedDataObject.h.

Referenced by ComputeTotalEnergy(), copyTo(), CountHits(), IsCalibrated(), Reset(), and SetEnergyCalibratedFlag().

Float_t emcCalibratedDataObject::fETotal [private]
 

Total Energy in this event.

Definition at line 239 of file emcCalibratedDataObject.h.

Referenced by ComputeTotalEnergy(), GetTotalEnergy(), and SetTotalEnergy().

std::map<int, int> emcCalibratedDataObject::fIndexMap [private]
 

A map to get the relation between TowerId and the index of the other arrays (fEnergy, fTime, etc.

..)

Definition at line 266 of file emcCalibratedDataObject.h.

Referenced by GetIndexFromTowerId(), Reset(), and Update().

Int_t emcCalibratedDataObject::fMaxSize [private]
 

Max size of arrays.

Definition at line 237 of file emcCalibratedDataObject.h.

Referenced by copyTo(), GetMaxSize(), and SetMaxSize().

Bool_t emcCalibratedDataObject::fReadOnly [private]
 

Definition at line 258 of file emcCalibratedDataObject.h.

Referenced by operator+=().

Int_t emcCalibratedDataObject::fSize [private]
 

Actual size of the arrays below.

Definition at line 235 of file emcCalibratedDataObject.h.

Referenced by ComputeTotalEnergy(), copyTo(), GetSize(), Reset(), resetByIndex(), and ValidIndex().

long* emcCalibratedDataObject::fSoftwareKey [private]
 

Software keys.

Definition at line 249 of file emcCalibratedDataObject.h.

Referenced by copyTo(), Get(), GetSectorEnergies(), GetSoftwareKey(), operator=(), SetMaxSize(), Update(), and ~emcCalibratedDataObject().

Float_t* emcCalibratedDataObject::fTime [private]
 

Calibrated Times.

Definition at line 243 of file emcCalibratedDataObject.h.

Referenced by copyTo(), Get(), GetByTowerId(), GetPointers(), GetTime(), GetTimeByTowerId(), operator+=(), operator<<(), operator=(), resetByIndex(), resetByTowerId(), SetMaxSize(), and ~emcCalibratedDataObject().

Bool_t emcCalibratedDataObject::fTimeCalibrated [private]
 

tells if data are calibrated or not

Definition at line 254 of file emcCalibratedDataObject.h.

Referenced by copyTo(), IsCalibrated(), Reset(), and SetTimeCalibratedFlag().

Int_t* emcCalibratedDataObject::fTowerId [private]
 

Tower indices (ItemId's).

Definition at line 245 of file emcCalibratedDataObject.h.

Referenced by copyTo(), Get(), GetSMEnergies(), GetTowerId(), operator<<(), operator=(), SetMaxSize(), Update(), and ~emcCalibratedDataObject().

Int_t* emcCalibratedDataObject::fWarnNeighbours [private]
 

Warning map.

Definition at line 262 of file emcCalibratedDataObject.h.

Referenced by copyTo(), GetWarn(), GetWarnByTowerId(), operator=(), SetMaxSize(), and ~emcCalibratedDataObject().

Bool_t emcCalibratedDataObject::fZeroSuppressed [private]
 

tells if data are zero suppressed or not

Definition at line 256 of file emcCalibratedDataObject.h.

Referenced by copyTo(), IsZeroSuppressed(), operator+=(), and SetZeroSuppressedFlag().


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