00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef ST_TPC_DB_SLOW_CONTROL_HH
00044 #define ST_TPC_DB_SLOW_CONTROL_HH
00045
00046 #include <Stiostream.h>
00047
00048
00049 #include "SystemOfUnits.h"
00050 #ifndef ST_NO_NAMESPACES
00051 using namespace units;
00052 #endif
00053
00054 #include "StTpcSlowControl.hh"
00055 #include "StTpcDb/StTpcDb.h"
00056
00057 class StTpcDbSlowControl : public StTpcSlowControl {
00058 public:
00059 ~StTpcDbSlowControl();
00060
00061 static StTpcSlowControl* instance();
00062 static StTpcSlowControl* instance(StTpcDb*);
00063
00064 double driftVelocity(int sector) const;
00065
00066
00067 double driftVoltage() const;
00068
00069 double innerSectorAnodeVoltage() const;
00070 double innerSectorGatingGridVoltage() const;
00071 double outerSectorAnodeVoltage() const;
00072 double outerSectorGatingGridVoltage() const;
00073
00074
00075 double hallTemperature() const;
00076 double hallPressure() const;
00077
00078
00079 double innerSectorGasGain() const;
00080 double innerSectorGasGainVzero() const;
00081 double innerSectorGasGainb() const;
00082
00083 double outerSectorGasGain() const;
00084 double outerSectorGasGainVzero() const;
00085 double outerSectorGasGainb() const;
00086
00087
00088 void print(ostream& os = cout) const;
00089
00090 private:
00091 StTpcDbSlowControl();
00092 StTpcDbSlowControl(StTpcDb*);
00093
00094 private:
00095 static StTpcSlowControl* mInstance;
00096 StTpcDb* gTpcDbPtr;
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120 };
00121
00122 inline double StTpcDbSlowControl::driftVelocity(int sector) const {return gTpcDbPtr->DriftVelocity(sector)*(centimeter/(second));}
00123
00124 inline double StTpcDbSlowControl::driftVoltage() const{return gTpcDbPtr->SlowControlSim()->driftVoltage()*volt;}
00125 inline double StTpcDbSlowControl::innerSectorAnodeVoltage() const{return gTpcDbPtr->SlowControlSim()->innerSectorAnodeVoltage()*volt;}
00126 inline double StTpcDbSlowControl::innerSectorGatingGridVoltage() const{return gTpcDbPtr->SlowControlSim()->innerSectorGatingGridV()*volt;}
00127 inline double StTpcDbSlowControl::outerSectorAnodeVoltage() const{return gTpcDbPtr->SlowControlSim()->outerSectorAnodeVoltage()*volt;}
00128 inline double StTpcDbSlowControl::outerSectorGatingGridVoltage() const{return gTpcDbPtr->SlowControlSim()->outerSectorGatingGridV()*volt;}
00129
00130 inline double StTpcDbSlowControl::hallTemperature() const{return gTpcDbPtr->SlowControlSim()->hallTemperature();}
00131 inline double StTpcDbSlowControl::hallPressure() const{return gTpcDbPtr->SlowControlSim()->hallPressure()*atmosphere;}
00132
00133 inline double StTpcDbSlowControl::innerSectorGasGain() const{return gTpcDbPtr->SlowControlSim()->innerSectorGasGain();}
00134 inline double StTpcDbSlowControl::innerSectorGasGainVzero() const{return gTpcDbPtr->SlowControlSim()->innerSectorGasGainVzero()*volt;}
00135 inline double StTpcDbSlowControl::innerSectorGasGainb() const{return gTpcDbPtr->SlowControlSim()->outerSectorGasGainb()/volt;}
00136
00137 inline double StTpcDbSlowControl::outerSectorGasGain() const{return gTpcDbPtr->SlowControlSim()->outerSectorGasGain();}
00138 inline double StTpcDbSlowControl::outerSectorGasGainVzero() const{return gTpcDbPtr->SlowControlSim()->outerSectorGasGainVzero()*volt;}
00139 inline double StTpcDbSlowControl::outerSectorGasGainb() const{return gTpcDbPtr->SlowControlSim()->outerSectorGasGainb()/volt;}
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159 #endif