22 #ifndef STFMSDBMAKER_H
23 #define STFMSDBMAKER_H
28 #include "StThreeVectorF.hh"
30 struct fmsDetectorPosition_st;
31 struct fmsChannelGeometry_st;
33 struct fmsPatchPanelMap_st;
36 struct fmsGainCorrection_st;
43 virtual Int_t
InitRun(Int_t runNumber);
46 virtual void Clear(
const Char_t *opt);
64 Int_t
type(Int_t detectorId);
65 Int_t
nRow(Int_t detectorId);
66 Int_t
nColumn(Int_t detectorId);
76 StThreeVectorF
getStarXYZ(Int_t detectorId,Float_t FmsX, Float_t FmsY);
77 Float_t
getPhi(Int_t detectorId,Float_t FmsX, Float_t FmsY);
78 Float_t
getEta(Int_t detectorId,Float_t FmsX, Float_t FmsY, Float_t Vertex);
82 void getMap(Int_t detectorId, Int_t ch, Int_t* qtCrate, Int_t* qtSlot, Int_t* qtChannel);
83 void getReverseMap(Int_t qtCrate, Int_t qtSlot, Int_t qtChannel, Int_t* detectorId, Int_t* ch);
94 Float_t
getGain(Int_t detectorId, Int_t ch);
100 void dumpFmsMap (
const Char_t* filename=
"dumpFmsMap.txt");
102 void dumpFmsQTMap (
const Char_t* filename=
"dumpFmsQTMap.txt");
103 void dumpFmsGain (
const Char_t* filename=
"dumpFmsGain.txt");
137 virtual const Char_t *
GetCVS()
const {
static const Char_t cvs[]=
"Tag $Name:"__DATE__
" "__TIME__ ;
return cvs;}
StFmsDbMaker(const Char_t *name="fmsDb")
void getReverseMap(Int_t qtCrate, Int_t qtSlot, Int_t qtChannel, Int_t *detectorId, Int_t *ch)
virtual void Clear(const Char_t *opt)
Int_t mReverseMapDetectorId[mMaxCrate][mMaxSlot][mMaxCh]
Int_t mMaxModule
patch panel map
Int_t nColumn(Int_t detectorId)
number of rows
virtual Int_t InitRun(Int_t runNumber)
fmsDetectorPosition_st * DetectorPosition()
getting the whole table
void dumpFmsGain(const Char_t *filename="dumpFmsGain.txt")
fmsGainCorrection_st ** mmGainCorrection
gain correction table
void dumpFmsMap(const Char_t *filename="dumpFmsMap.txt")
Int_t maxChannel(Int_t detectorId)
number of column
Int_t maxGainCorrection()
fmsGainCorrection_st * mGainCorrection
StThreeVectorF getDetectorOffset(Int_t detectorId)
get the channel number
Int_t maxNS()
fmsQTMap related
Int_t getChannelNumber(Int_t detectorId, Int_t row, Int_t column)
get the column number for the channel
Int_t detectorId(Int_t ew, Int_t ns, Int_t type)
maximum value of detector Id
Int_t getColumnNumber(Int_t detectorId, Int_t ch)
get the row number for the channel
Float_t getGainCorrection(Int_t detectorId, Int_t ch)
get the gain for the channel
Int_t maxGain()
fmsGain/GainCorrection related
void setDebug(Int_t debug)
debug mode, 0 for minimal message, >0 for more debug messages
Int_t type(Int_t detectorId)
north or south side
void dumpFmsGainCorrection(const Char_t *filename="dumpFmsGainCorrection.txt")
fmsPatchPanelMap_st * mPatchPanelMap
fmsMap_st * mMap
position (in STAR frame) of each detector
Int_t maxModule()
fmsPatchPanelMap related
void dumpFmsPatchPanelMap(const Char_t *filename="dumpFmsPatchPanelMap.txt")
fmsMap_st ** mmMap
detector map
fmsChannelGeometry_st * ChannelGeometry()
getting the whole table
R__EXTERN StFmsDbMaker * gStFmsDbMaker
Global pointners:
fmsDetectorPosition_st * mDetectorPosition
max detector Id
fmsChannelGeometry_st * mChannelGeometry
>0 dump tables to text files
fmsPatchPanelMap_st * PatchPanelMap()
fmsGainCorrection_st * GainCorrection()
Int_t getRowNumber(Int_t detectorId, Int_t ch)
maximum number of channels
Float_t getYWidth(Int_t detectorId)
get the X width of the cell
fmsGain_st ** mmGain
gain table
Float_t getEta(Int_t detectorId, Float_t FmsX, Float_t FmsY, Float_t Vertex)
get the STAR frame phi angle
Int_t mReverseMapChannel[mMaxCrate][mMaxSlot][mMaxCh]
Int_t nRow(Int_t detectorId)
type of the detector
Float_t getPhi(Int_t detectorId, Float_t FmsX, Float_t FmsY)
get the STAR frame coordinates
Float_t getGain(Int_t detectorId, Int_t ch)
void dumpFmsChannelGeometry(const Char_t *filename="dumpFmsChannelGeometry.txt")
get the gain correction for the channel
Int_t maxMap()
get the STAR frame pseudo rapidity assuming vertex is at (0,0,0)
void dumpFmsDetectorPosition(const Char_t *filename="dumpFmsDetectorPosition.txt")
void dumpFmsQTMap(const Char_t *filename="dumpFmsQTMap.txt")
Int_t northSouth(Int_t detectorId)
east or west to the STAR IP
virtual const Char_t * GetCVS() const
Int_t eastWest(Int_t detectorId)
convert to detector Id
Int_t maxDetectorId()
Utility functions related to FMS ChannelGeometry.
void getMap(Int_t detectorId, Int_t ch, Int_t *qtCrate, Int_t *qtSlot, Int_t *qtChannel)
Int_t mMaxDetectorId
channel configuration for each detector
Float_t getXWidth(Int_t detectorId)
get the offset of the detector
StThreeVectorF getStarXYZ(Int_t detectorId, Float_t FmsX, Float_t FmsY)
get the Y width of the cell