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
00044
00045
00046
00047
00048
00049
00050
00051
00052 #include <Stiostream.h>
00053 #include "StMcParameterDB.h"
00054 #include "PhysicalConstants.h"
00055 #include "SystemOfUnits.h"
00056
00057 ClassImp(StMcParameterDB)
00058
00059 StMcParameterDB* StMcParameterDB::mParamDB = 0;
00060
00061 StMcParameterDB* StMcParameterDB::instance()
00062 {
00063 if (!mParamDB) mParamDB = new StMcParameterDB;
00064 return mParamDB;
00065 }
00066
00067 StMcParameterDB::StMcParameterDB()
00068 :mXCutTpc(5.*millimeter),mYCutTpc(5.*millimeter),mZCutTpc(5.*millimeter),mReqCommonHitsTpc(3),
00069 mXCutSvt(1.*millimeter),mYCutSvt(1.*millimeter),mZCutSvt(1.*millimeter),mReqCommonHitsSvt(1),
00070 mXCutSsd(1.*millimeter),mYCutSsd(1.*millimeter),mZCutSsd(1.*millimeter),mReqCommonHitsSsd(1),
00071 mRCutFtpc(3.*millimeter),mPhiCutFtpc(5.*degree),mReqCommonHitsFtpc(2)
00072 { }
00073
00074 void StMcParameterDB::setXCutTpc(float val) { mXCutTpc = val ;}
00075 void StMcParameterDB::setYCutTpc(float val) { mYCutTpc = val ;}
00076 void StMcParameterDB::setZCutTpc(float val) { mZCutTpc = val ;}
00077 void StMcParameterDB::setReqCommonHitsTpc(unsigned int val) { mReqCommonHitsTpc = val;}
00078
00079 void StMcParameterDB::setXCutSvt(float val) { mXCutSvt = val ;}
00080 void StMcParameterDB::setYCutSvt(float val) { mYCutSvt = val ;}
00081 void StMcParameterDB::setZCutSvt(float val) { mZCutSvt = val ;}
00082 void StMcParameterDB::setReqCommonHitsSvt(unsigned int val) { mReqCommonHitsSvt = val;}
00083
00084 void StMcParameterDB::setXCutSsd(float val) { mXCutSsd = val ;}
00085 void StMcParameterDB::setYCutSsd(float val) { mYCutSsd = val ;}
00086 void StMcParameterDB::setZCutSsd(float val) { mZCutSsd = val ;}
00087 void StMcParameterDB::setReqCommonHitsSsd(unsigned int val) { mReqCommonHitsSsd = val;}
00088
00089 void StMcParameterDB::setRCutFtpc(float val) { mRCutFtpc = val ;}
00090 void StMcParameterDB::setPhiCutFtpc(float val) { mPhiCutFtpc = val ;}
00091 void StMcParameterDB::setReqCommonHitsFtpc(unsigned int val) { mReqCommonHitsFtpc = val;}
00092
00093
00094 float StMcParameterDB::zCutTpc(float z) const {
00095 return (mZCutTpc/0.166657) * (0.166657+2.07482e-4*fabs(z));
00096 }
00097
00098
00099 ostream& operator<<(ostream &os, const StMcParameterDB& mcDb)
00100 {
00101 os << " TPC Cuts " << endl;
00102 os << " X Cut : " << mcDb.xCutTpc()/millimeter << " mm" << endl;
00103 os << " Y Cut : " << mcDb.yCutTpc()/millimeter << " mm" << endl;
00104 os << " Z Cut : " << mcDb.zCutTpc()/millimeter << " mm" << endl;
00105 os << " Required Hits for Associating Tracks: " << mcDb.reqCommonHitsTpc() << endl;
00106 os << " SVT Cuts " << endl;
00107 os << " X Cut : " << mcDb.xCutSvt()/millimeter << " mm" << endl;
00108 os << " Y Cut : " << mcDb.yCutSvt()/millimeter << " mm" << endl;
00109 os << " Z Cut : " << mcDb.zCutSvt()/millimeter << " mm" << endl;
00110 os << " Required Hits for Associating Tracks: " << mcDb.reqCommonHitsSvt() << endl;
00111 os << " SSD Cuts " << endl;
00112 os << " X Cut : " << mcDb.xCutSsd()/millimeter << " mm" << endl;
00113 os << " Y Cut : " << mcDb.yCutSsd()/millimeter << " mm" << endl;
00114 os << " Z Cut : " << mcDb.zCutSsd()/millimeter << " mm" << endl;
00115 os << " Required Hits for Associating Tracks: " << mcDb.reqCommonHitsSsd() << endl;
00116 os << " FTPC Cuts " << endl;
00117 os << " R Cut : " << mcDb.rCutFtpc()/millimeter << " mm" << endl;
00118 os << " Phi Cut : " << mcDb.phiCutFtpc()/degree << " degrees" << endl;
00119 os << " Required Hits for Associating Tracks: " << mcDb.reqCommonHitsFtpc() << endl;
00120
00121 return os;
00122 }