StFms
0.0.0
FMS software in the STAR framework
|
#include <StFmsGeometry.h>
Public Member Functions | |
StFmsGeometry () | |
~StFmsGeometry () | |
Bool_t | initialize (StFmsDbMaker *fmsDbMaker) |
Float_t | xOffset (Int_t detectorId) const |
Float_t | yOffset (Int_t detectorId) const |
Float_t | z (Int_t detectorId) const |
std::vector< Float_t > | towerWidths (Int_t detectorId) const |
const fmsDetectorPosition_st * | find (Int_t detectorId) const |
TVector3 | localToGlobalCoordinates (Double_t x, Double_t y, Int_t detectorId) const |
TVector3 | columnRowToGlobalCoordinates (Double_t column, Double_t row, Int_t detectorId) const |
Static Public Member Functions | |
static Bool_t | isNorth (Int_t detectorId) |
Private Types | |
typedef std::map< int, const fmsDetectorPosition_st * > | Table |
Private Member Functions | |
StFmsGeometry (const StFmsGeometry &) | |
StFmsGeometry & | operator= (const StFmsGeometry &) |
Private Attributes | |
Table | mPositions |
Detector ID: position information pairs. More... | |
Wrapper around FMS detector geometry database information.
Provides convenience functions to access fmsDetectorPosition_st and its members via detector ID.
Definition at line 60 of file StFmsGeometry.h.
|
private |
Definition at line 152 of file StFmsGeometry.h.
FMSCluster::StFmsGeometry::StFmsGeometry | ( | ) |
Constructor.
Definition at line 21 of file StFmsGeometry.cxx.
FMSCluster::StFmsGeometry::~StFmsGeometry | ( | ) |
Destructor.
Definition at line 23 of file StFmsGeometry.cxx.
|
private |
Disallow copy construction. If a new StFmsGeometry is desired it should be explicitly created and initialised from the database to ensure validity.
TVector3 FMSCluster::StFmsGeometry::columnRowToGlobalCoordinates | ( | Double_t | column, |
Double_t | row, | ||
Int_t | detectorId | ||
) | const |
Convert (column, row) coordinate position to global (x, y, z) in cm.
Column and row are real numbers to allow fractional row/column positions e.g. row = 2.6 means 60% of the way through the 2nd row (column and row both count from 1, not 0).
See also localToGlobalCoordinates().
Definition at line 126 of file StFmsGeometry.cxx.
const fmsDetectorPosition_st * FMSCluster::StFmsGeometry::find | ( | Int_t | detectorId | ) | const |
Return the position information of a detector.
Returns NULL if the argument is an invalid detector ID or the geometry is uninitialized.
Definition at line 92 of file StFmsGeometry.cxx.
Bool_t FMSCluster::StFmsGeometry::initialize | ( | StFmsDbMaker * | fmsDbMaker | ) |
Initialise geometry from the FMS database.
If the argument is NULL, attempt to locate an StFmsDbMaker in the current chain and use that. Return true if the geometry is initialised, false if it is not.
Definition at line 25 of file StFmsGeometry.cxx.
|
static |
Returns true if the sub-system is a north detector.
Definition at line 139 of file StFmsGeometry.cxx.
TVector3 FMSCluster::StFmsGeometry::localToGlobalCoordinates | ( | Double_t | x, |
Double_t | y, | ||
Int_t | detectorId | ||
) | const |
Convert local coordinates to global (x, y, z) coordinates in cm.
Local coordinates are defined relative to the sub-detector in question, not the STAR coordinate system e.g. x = 20 means 20cm from the edge of the detector.
Note that each detector counts "positive" from the beamline outward so e.g. x = 20 cm for a NORTH detector is -20 (modulo offets) in the global system (north is negative in STAR coordinates, while south is positive).
The z position corresponds to the front (beam-facing) plane of the detector.
Returns (0, 0, 0) for an invalid detector ID, or if StFmsGeometry is uninitialized.
Definition at line 101 of file StFmsGeometry.cxx.
|
private |
Disallow assignment. If a new StFmsGeometry is desired it should be explicitly created and initialised from the database to ensure validity.
std::vector< Float_t > FMSCluster::StFmsGeometry::towerWidths | ( | Int_t | detectorId | ) | const |
Return tower (x, y) widths in cm.
Database values fmsDetectorPosition_st::xwidth and ::ywidth.
Returns (0, 0) if the argument is an invalid detector ID or the geometry is uninitialized.
Definition at line 79 of file StFmsGeometry.cxx.
Float_t FMSCluster::StFmsGeometry::xOffset | ( | Int_t | detectorId | ) | const |
Return the x coordinate offset of a detector in cm.
Gives the database value fmsDetectorPosition_st::xoffset.
Returns 0 if the argument is an invalid detector ID or the geometry is uninitialized.
Definition at line 55 of file StFmsGeometry.cxx.
Float_t FMSCluster::StFmsGeometry::yOffset | ( | Int_t | detectorId | ) | const |
Return the y coordinate offset of a detector in cm.
Gives the database value fmsDetectorPosition_st::yoffset.
Returns 0 if the argument is an invalid detector ID or the geometry is uninitialized.
Definition at line 63 of file StFmsGeometry.cxx.
Float_t FMSCluster::StFmsGeometry::z | ( | Int_t | detectorId | ) | const |
Return the z position of a detector in cm.
Gives the database value fmsDetectorPosition_st::zoffset.
Returns 0 if the argument is an invalid detector ID or the geometry is uninitialized.
Definition at line 71 of file StFmsGeometry.cxx.
|
private |
Detector ID: position information pairs.
Definition at line 163 of file StFmsGeometry.h.