QTower Class Reference

List of all members.


Detailed Description

description of Cuore Tower

Author:
Sergio Di Domizio

Public Member Functions

 QTower ()
 constructor
virtual ~QTower ()
 destructor
const QGeomVectorGetPosition () const
 get the position of this tower
bool AddCrystal (int channel, const QCrystal &crystal)
 add crystal to tower
const QCrystalGetCrystal (int channel) const
 get crystal
const std::map< int, QCrystal > & GetCrystals () const
 get crystals map
QError LoadMap (const std::string &fileName)
 load detector map

Private Member Functions

QError LoadFromFile (const std::string &fileName)
 load detector map from file
QError LoadFromDb ()
 load detector map from db. Still to be implemented.

Private Attributes

std::map< int, QCrystalfCrystals
QGeomVector fPosition

Member Function Documentation

const QGeomVector& QTower::GetPosition (  )  const [inline]

get the position of this tower

Returns:
const reference to the QGeomVector containing the position of the tower
the position of a tower corresponds to the corner of crystal 1 in the top floor

References fPosition.

bool QTower::AddCrystal ( int  channel,
const QCrystal crystal 
)

add crystal to tower

Parameters:
channel channel associated to the crystal
crystal crystal to be added

const QCrystal * QTower::GetCrystal ( int  channel  )  const

get crystal

Returns:
pointer to requested crystal or NULL if cannot be found

Referenced by QPositionFilter::GetDistance(), and MCoincidenceTester::GetMinimumSumOfDistances().

QError QTower::LoadMap ( const std::string &  fileName  ) 

load detector map

Parameters:
fileName file from which the detector map will be read. It can be a standard file name or "DB". In this case the detector map is read from database.
Returns:
QError. On success the error code is set to QERR_SUCCESS. On failure it is set to a value that can be different depending On the way the detector map is being loaded (file or database). See specific methods LoadFromFile() and LoadFromDb() for further details on returned error codes.

References LoadFromDb(), and LoadFromFile().

Referenced by QPositionFilter::LoadDetectorMap(), and MCoincidenceTester::ProduceSummaryPlots().

QError QTower::LoadFromFile ( const std::string &  fileName  )  [private]

load detector map from file

Parameters:
fileName name of the file containing the detector map
Returns:
QError, with following error codes:
  • QERR_SUCCESS: load from file succeeded
  • QERR_CANNOT_OPEN_FILE: failed to open input file
  • QERR_UNDEFINED_NUMBER: error in file format
  • QERR_UNDEFINED_LG: a crystal from the same channel is already present in the tower
File format description:
The input file must be in ASCII format. Lines beginning with '#' are treated as comments and are ignored. Each non-comment line describes a different crystal. The fields of each line are the following (all of them are mandatory):

  • Channel
  • Crystal position X (mm)
  • Crystal position Y (mm)
  • Crystal position Z (mm)
  • Crystal dimension X (mm)
  • Crystal dimension Y (mm)
  • Crystal dimension Z (mm)

Positions and dimensions are in mm. The position refers to the center of the crystal. For example, a crystal with positionZ = 0 and dimensionZ=10 will have the top face at Z=-5 and the bottom face at Z=5.

Referenced by LoadMap().


Member Data Documentation

position of the tower

Referenced by GetPosition().


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

Generated on Tue Nov 16 10:50:08 2010 for CUORE Software by  doxygen 1.5.6
INFN Genova privacy policy