#include <BesTofGeoParameter.hh>
Public Member Functions | |
G4double | GetAlThickness () |
G4double | GetAlThickness () |
G4double | GetAtten (int i) |
G4double | GetAtten (int i) |
G4double | GetAttenEc () |
G4double | GetAttenEc () |
G4double | GetBr1L () |
G4double | GetBr1L () |
G4double | GetBr1R1 () |
G4double | GetBr1R1 () |
G4double | GetBr1TrapH () |
G4double | GetBr1TrapH () |
G4double | GetBr1TrapW1 () |
G4double | GetBr1TrapW1 () |
G4double | GetBr1TrapW2 () |
G4double | GetBr1TrapW2 () |
G4double | GetBr2L () |
G4double | GetBr2L () |
G4double | GetBr2R1 () |
G4double | GetBr2R1 () |
G4double | GetBr2TrapH () |
G4double | GetBr2TrapH () |
G4double | GetBr2TrapW1 () |
G4double | GetBr2TrapW1 () |
G4double | GetBr2TrapW2 () |
G4double | GetBr2TrapW2 () |
G4double | GetBrEPMTgain (int scinNb) |
G4double | GetBrEPMTgain (int scinNb) |
G4double | GetBrERiseTime (int scinNb) |
G4double | GetBrERiseTime (int scinNb) |
G4double | GetBrWPMTgain (int scinNb) |
G4double | GetBrWPMTgain (int scinNb) |
G4double | GetBrWRiseTime (int scinNb) |
G4double | GetBrWRiseTime (int scinNb) |
G4double | GetBucketDBr () |
G4double | GetBucketDBr () |
G4double | GetBucketDEc () |
G4double | GetBucketDEc () |
G4double | GetBucketLBr () |
G4double | GetBucketLBr () |
G4double | GetBucketLEc () |
G4double | GetBucketLEc () |
G4double | GetBucketPosR () |
G4double | GetBucketPosR () |
G4double | GetCe () |
G4double | GetCE () |
G4double | GetCe () |
G4double | GetCE () |
G4double | GetCeEc () |
G4double | GetCEEc () |
G4double | GetCeEc () |
G4double | GetCEEc () |
G4double | GetCpe2pmt () |
G4double | GetCpe2pmt () |
G4double | GetCpe2pmtEc () |
G4double | GetCpe2pmtEc () |
G4double | GetEcL () |
G4double | GetEcL () |
G4double | GetEcR1 () |
G4double | GetEcR1 () |
G4double | GetEcR2 () |
G4double | GetEcR2 () |
G4double | GetEcTrapH () |
G4double | GetEcTrapH () |
G4double | GetEcTrapH1 () |
G4double | GetEcTrapH1 () |
G4double | GetEcTrapW1 () |
G4double | GetEcTrapW1 () |
G4double | GetEcTrapW2 () |
G4double | GetEcTrapW2 () |
G4double | GetHLthresh () |
G4double | GetHLthresh () |
G4double | GetHLthreshEc () |
G4double | GetHLthreshEc () |
G4double | GetLLthresh () |
G4double | GetLLthresh () |
G4double | GetLLthreshEc () |
G4double | GetLLthreshEc () |
G4double | GetNoiseSigma () |
G4double | GetNoiseSigma () |
G4double | GetNoiseSigmaEc () |
G4double | GetNoiseSigmaEc () |
G4int | GetnScinBr () |
G4int | GetnScinBr () |
G4int | GetnScinEc () |
G4int | GetnScinEc () |
G4double | GetPeCorFac () |
G4double | GetPeCorFac () |
G4double | GetPeCorFacEc () |
G4double | GetPeCorFacEc () |
G4double | GetPhNConst () |
G4double | GetPhNConst () |
G4double | GetPhNConstEc () |
G4double | GetPhNConstEc () |
G4double | GetPMTgain () |
G4double | GetPMTgain () |
G4double | GetPMTgainEc () |
G4double | GetPMTgainEc () |
G4double | GetPreGain () |
G4double | GetPreGain () |
G4double | GetPreGainEc () |
G4double | GetPreGainEc () |
G4double | GetPVFThickness () |
G4double | GetPVFThickness () |
G4double | GetQE () |
G4double | GetQE () |
G4double | GetQEEc () |
G4double | GetQEEc () |
G4double | GetRAngle () |
G4double | GetRAngle () |
G4double | GetRAngleEc () |
G4double | GetRAngleEc () |
G4double | GetRefIndex () |
G4double | GetRefIndex () |
G4double | GetRefIndexEc () |
G4double | GetRefIndexEc () |
G4double | GetRiseTime () |
G4double | GetRiseTime () |
G4double | GetRiseTimeEc () |
G4double | GetRiseTimeEc () |
G4double | GetTau1 () |
G4double | GetTau1 () |
G4double | GetTau1Ec () |
G4double | GetTau1Ec () |
G4double | GetTau2 () |
G4double | GetTau2 () |
G4double | GetTau2Ec () |
G4double | GetTau2Ec () |
G4double | GetTau3 () |
G4double | GetTau3 () |
G4double | GetTau3Ec () |
G4double | GetTau3Ec () |
G4double | GetTauRatio () |
G4double | GetTauRatio () |
G4double | GetTauRatioEc () |
G4double | GetTauRatioEc () |
G4double | GetTTSmean () |
G4double | GetTTSmean () |
G4double | GetTTSmeanEc () |
G4double | GetTTSmeanEc () |
G4double | GetTTSsigma () |
G4double | GetTTSsigma () |
G4double | GetTTSsigmaEc () |
G4double | GetTTSsigmaEc () |
G4double | GetzPosEastEc () |
G4double | GetzPosEastEc () |
G4double | GetzPosWestEc () |
G4double | GetzPosWestEc () |
Static Public Member Functions | |
BesTofGeoParameter * | GetInstance () |
BesTofGeoParameter * | GetInstance () |
Protected Member Functions | |
BesTofGeoParameter () | |
BesTofGeoParameter () | |
~BesTofGeoParameter () | |
~BesTofGeoParameter () | |
Private Member Functions | |
void | ReadBrData () |
void | ReadBrData () |
void | ReadData () |
void | ReadData () |
Private Attributes | |
G4double | AlThickness |
G4double | br1L |
G4double | br1R1 |
G4double | br1TrapH |
G4double | br1TrapW1 |
G4double | br1TrapW2 |
G4double | br2L |
G4double | br2R1 |
G4double | br2TrapH |
G4double | br2TrapW1 |
G4double | br2TrapW2 |
G4double | bucketDBr |
G4double | bucketDEc |
G4double | bucketLBr |
G4double | bucketLEc |
G4double | bucketPosR |
G4double | ecL |
G4double | ecR1 |
G4double | ecR2 |
G4double | ecTrapH |
G4double | ecTrapH1 |
G4double | ecTrapW1 |
G4double | ecTrapW2 |
G4double | m_atten [176] |
G4double | m_attenEc |
G4double | m_BrEPMTgain [176] |
G4double | m_BrERiseTime [176] |
G4double | m_BrWPMTgain [176] |
G4double | m_BrWRiseTime [176] |
G4double | m_Ce |
G4double | m_CE |
G4double | m_CeEc |
G4double | m_CEEc |
G4double | m_Cpe2pmt |
G4double | m_Cpe2pmtEc |
G4String | m_dataPath |
G4double | m_HLthresh |
G4double | m_HLthreshEc |
G4double | m_LLthresh |
G4double | m_LLthreshEc |
G4double | m_noiseSigma |
G4double | m_noiseSigmaEc |
G4double | m_peCorFac |
G4double | m_peCorFacEc |
G4double | m_phNConst |
G4double | m_phNConstEc |
G4double | m_PMTgain |
G4double | m_PMTgainEc |
G4double | m_preGain |
G4double | m_preGainEc |
G4double | m_QE |
G4double | m_QEEc |
G4double | m_rAngle |
G4double | m_rAngleEc |
G4double | m_refIndex |
G4double | m_refIndexEc |
G4double | m_riseTime |
G4double | m_riseTimeEc |
G4double | m_tau1 |
G4double | m_tau1Ec |
G4double | m_tau2 |
G4double | m_tau2Ec |
G4double | m_tau3 |
G4double | m_tau3Ec |
G4double | m_tauRatio |
G4double | m_tauRatioEc |
G4double | m_ttsMean |
G4double | m_ttsMeanEc |
G4double | m_ttsSigma |
G4double | m_ttsSigmaEc |
G4int | nScinBr |
G4int | nScinEc |
G4double | PVFThickness |
G4double | zPosEastEc |
G4double | zPosWestEc |
Static Private Attributes | |
BesTofGeoParameter * | m_instance |
BesTofGeoParameter * | m_instance = 0 |
|
00028 { 00029 m_dataPath = getenv("TOFSIMROOT"); 00030 if (!m_dataPath){ 00031 G4Exception("BOOST environment not set!"); 00032 } 00033 //fot test 00034 ReadData(); 00035 ReadBrData(); 00036 }
|
|
00039 { 00040 }
|
|
|
|
|
|
00032 {return AlThickness;}
|
|
00032 {return AlThickness;}
|
|
00071 {return m_atten[i];}
|
|
00071 {return m_atten[i];}
|
|
00094 {return m_attenEc;}
|
|
00094 {return m_attenEc;}
|
|
00027 {return br1L;}
|
|
00027 {return br1L;}
|
|
00031 {return br1R1;}
|
|
00031 {return br1R1;}
|
|
00030 {return br1TrapH;}
|
|
00030 {return br1TrapH;}
|
|
00028 {return br1TrapW1;}
|
|
00028 {return br1TrapW1;}
|
|
00029 {return br1TrapW2;}
|
|
00029 {return br1TrapW2;}
|
|
00035 {return br2L;}
|
|
00035 {return br2L;}
|
|
00039 {return br2R1;}
|
|
00039 {return br2R1;}
|
|
00038 {return br2TrapH;}
|
|
00038 {return br2TrapH;}
|
|
00036 {return br2TrapW1;}
|
|
00036 {return br2TrapW1;}
|
|
00037 {return br2TrapW2;}
|
|
00037 {return br2TrapW2;}
|
|
00107 { return m_BrEPMTgain[scinNb]; }
|
|
00107 { return m_BrEPMTgain[scinNb]; }
|
|
00108 { return m_BrERiseTime[scinNb];}
|
|
00108 { return m_BrERiseTime[scinNb];}
|
|
00109 { return m_BrWPMTgain[scinNb]; }
|
|
00109 { return m_BrWPMTgain[scinNb]; }
|
|
00110 { return m_BrWRiseTime[scinNb];}
|
|
00110 { return m_BrWRiseTime[scinNb];}
|
|
00041 {return bucketDBr;}
|
|
00041 {return bucketDBr;}
|
|
00056 {return bucketDEc;}
|
|
00056 {return bucketDEc;}
|
|
00042 {return bucketLBr;}
|
|
00042 {return bucketLBr;}
|
|
00057 {return bucketLEc;}
|
|
00057 {return bucketLEc;}
|
|
00058 {return bucketPosR;}
|
|
00058 {return bucketPosR;}
|
|
00076 {return m_Ce;}
|
|
00069 {return m_CE;}
|
|
00076 {return m_Ce;}
|
|
00069 {return m_CE;}
|
|
00099 {return m_CeEc;}
|
|
00092 {return m_CEEc;}
|
|
00099 {return m_CeEc;}
|
|
00092 {return m_CEEc;}
|
|
00066 {return m_Cpe2pmt;}
|
|
00066 {return m_Cpe2pmt;}
|
|
00089 {return m_Cpe2pmtEc;}
|
|
00089 {return m_Cpe2pmtEc;}
|
|
00045 {return ecL;}
|
|
00045 {return ecL;}
|
|
00052 {return ecR1;}
|
|
00052 {return ecR1;}
|
|
00053 {return ecR2;}
|
|
00053 {return ecR2;}
|
|
00048 {return ecTrapH;}
|
|
00048 {return ecTrapH;}
|
|
00049 {return ecTrapH1;}
|
|
00049 {return ecTrapH1;}
|
|
00046 {return ecTrapW1;}
|
|
00046 {return ecTrapW1;}
|
|
00047 {return ecTrapW2;}
|
|
00047 {return ecTrapW2;}
|
|
00079 {return m_HLthresh;}
|
|
00079 {return m_HLthresh;}
|
|
00102 {return m_HLthreshEc;}
|
|
00102 {return m_HLthreshEc;}
|
|
|
|
00020 { 00021 if (m_instance == 0){ 00022 m_instance = new BesTofGeoParameter; 00023 } 00024 return m_instance; 00025 }
|
|
00078 {return m_LLthresh;}
|
|
00078 {return m_LLthresh;}
|
|
00101 {return m_LLthreshEc;}
|
|
00101 {return m_LLthreshEc;}
|
|
00081 {return m_noiseSigma;}
|
|
00081 {return m_noiseSigma;}
|
|
00104 {return m_noiseSigmaEc;}
|
|
00104 {return m_noiseSigmaEc;}
|
|
00026 {return nScinBr;}
|
|
00026 {return nScinBr;}
|
|
00044 {return nScinEc;}
|
|
00044 {return nScinEc;}
|
|
00070 {return m_peCorFac;}
|
|
00070 {return m_peCorFac;}
|
|
00093 {return m_peCorFacEc;}
|
|
00093 {return m_peCorFacEc;}
|
|
00065 {return m_phNConst;}
|
|
00065 {return m_phNConst;}
|
|
00088 {return m_phNConstEc;}
|
|
00088 {return m_phNConstEc;}
|
|
00075 {return m_PMTgain;}
|
|
00075 {return m_PMTgain;}
|
|
00098 {return m_PMTgainEc;}
|
|
00098 {return m_PMTgainEc;}
|
|
00080 {return m_preGain;}
|
|
00080 {return m_preGain;}
|
|
00103 {return m_preGainEc;}
|
|
00103 {return m_preGainEc;}
|
|
00033 {return PVFThickness;}
|
|
00033 {return PVFThickness;}
|
|
00068 {return m_QE;}
|
|
00068 {return m_QE;}
|
|
00091 {return m_QEEc;}
|
|
00091 {return m_QEEc;}
|
|
00067 {return m_rAngle;}
|
|
00067 {return m_rAngle;}
|
|
00090 {return m_rAngleEc;}
|
|
00090 {return m_rAngleEc;}
|
|
00064 {return m_refIndex;}
|
|
00064 {return m_refIndex;}
|
|
00087 {return m_refIndexEc;}
|
|
00087 {return m_refIndexEc;}
|
|
00077 {return m_riseTime;}
|
|
00077 {return m_riseTime;}
|
|
00100 {return m_riseTimeEc;}
|
|
00100 {return m_riseTimeEc;}
|
|
00060 {return m_tau1;}
|
|
00060 {return m_tau1;}
|
|
00083 {return m_tau1Ec;}
|
|
00083 {return m_tau1Ec;}
|
|
00061 {return m_tau2;}
|
|
00061 {return m_tau2;}
|
|
00084 {return m_tau2Ec;}
|
|
00084 {return m_tau2Ec;}
|
|
00062 {return m_tau3;}
|
|
00062 {return m_tau3;}
|
|
00085 {return m_tau3Ec;}
|
|
00085 {return m_tau3Ec;}
|
|
00063 {return m_tauRatio;}
|
|
00063 {return m_tauRatio;}
|
|
00086 {return m_tauRatioEc;}
|
|
00086 {return m_tauRatioEc;}
|
|
00073 {return m_ttsMean;}
|
|
00073 {return m_ttsMean;}
|
|
00096 {return m_ttsMeanEc;}
|
|
00096 {return m_ttsMeanEc;}
|
|
00074 {return m_ttsSigma;}
|
|
00074 {return m_ttsSigma;}
|
|
00097 {return m_ttsSigmaEc;}
|
|
00097 {return m_ttsSigmaEc;}
|
|
00050 {return zPosEastEc;}
|
|
00050 {return zPosEastEc;}
|
|
00051 {return zPosWestEc;}
|
|
00051 {return zPosWestEc;}
|
|
|
|
00042 { 00043 // read file 00044 const G4String pmtDataPath = m_dataPath + "/dat/TofBr.txt"; 00045 00046 std::ifstream fin(pmtDataPath); 00047 if (!fin) { 00048 std::cerr << "cannot open " << pmtDataPath << " for initialization."; 00049 exit(-1); 00050 } 00051 00052 using std::string; 00053 using std::vector; 00054 string tempString; 00055 string::size_type pre_position = 0; 00056 string::size_type post_position = 0; 00057 vector<string> stringVector; 00058 while (getline(fin, tempString, '\n')){ 00059 00060 // remove comments 00061 pre_position = tempString.find_first_of("#"); 00062 if (pre_position != string::npos){ // there is no "#" in string 00063 tempString.erase(tempString.begin() + pre_position, tempString.end()); 00064 } 00065 00066 // format string 00067 pre_position = 0; 00068 post_position = 0; 00069 int size; 00070 while (tempString.find_first_of(" ", pre_position) != string::npos){ 00071 pre_position = tempString.find_first_of(" ", pre_position); 00072 post_position = tempString.find_first_not_of(" ", pre_position); 00073 size = post_position - pre_position; 00074 tempString.replace(pre_position, size, " "); 00075 pre_position = post_position - size + 1; 00076 } 00077 00078 // insert into string vector 00079 if (tempString.size() > 10){ 00080 stringVector.push_back(tempString); 00081 } 00082 } 00083 00084 // for tests, read from string, write to variables 00085 int scinNb; 00086 double tempEPMTgain; 00087 double tempERiseTime; 00088 double tempWPMTgain; 00089 double tempWRiseTime; 00090 double tempAtten; 00091 vector<string>::iterator it = stringVector.begin(); 00092 for (it; it != stringVector.end(); it++){ 00093 // string 2 buffer, buffer 2 temp Variables 00094 std::istrstream buff((*it).c_str(), strlen((*it).c_str())); 00095 buff >> scinNb >> tempEPMTgain >> tempERiseTime >> tempWPMTgain >> tempWRiseTime >> tempAtten; 00096 00097 m_BrEPMTgain[scinNb] = tempEPMTgain; 00098 m_BrERiseTime[scinNb] = tempERiseTime; 00099 m_BrWPMTgain[scinNb] = tempWPMTgain; 00100 m_BrWRiseTime[scinNb] = tempWRiseTime; 00101 m_atten[scinNb] = tempAtten; 00102 00103 } 00104 00105 00106 fin.close(); 00107 }
|
|
|
|
00110 { 00111 //G4String GeometryPath = ReadBoostRoot::GetBoostRoot(); 00112 const G4String GeometryPath = m_dataPath + "/dat/BesTof.txt"; 00113 00114 std::ifstream fin; 00115 fin.open(GeometryPath); 00116 00117 const int maxCharOfOneLine=255; 00118 char temp[maxCharOfOneLine],*p; 00119 int lineNo=0,inputNo=0; 00120 while (fin.peek()!=EOF) 00121 { 00122 fin.getline(temp,maxCharOfOneLine); 00123 p=temp; 00124 lineNo++; 00125 while (*p!='\0') 00126 { 00127 if (*p=='#') 00128 { 00129 *p='\0'; //delete the comments. 00130 break; 00131 } 00132 p++; 00133 } 00134 p=temp; //reset the pointer to the beginning of the string. 00135 while (*p==' '||*p=='\t')p++; 00136 if (*p=='\0')continue; 00137 inputNo++; 00138 switch (inputNo) 00139 { 00140 case 1: 00141 std::istrstream(p)>>nScinBr>>br1L>>br1TrapW1>>br1TrapW2>>br1TrapH>>br1R1>>AlThickness>>PVFThickness; 00142 break; 00143 case 2: 00144 std::istrstream(p)>>br2L>>br2TrapW1>>br2TrapW2>>br2TrapH>>br2R1; 00145 break; 00146 case 3: 00147 std::istrstream(p)>>bucketDBr>>bucketLBr; 00148 break; 00149 case 4: 00150 std::istrstream(p)>>nScinEc>>ecL>>ecTrapW1>>ecTrapW2>>ecTrapH>>ecTrapH1 00151 >>zPosEastEc>>zPosWestEc>>ecR1>>ecR2; 00152 break; 00153 case 5: 00154 std::istrstream(p)>>bucketDEc>>bucketLEc>>bucketPosR; 00155 break; 00156 case 6: 00157 std::istrstream(p)>>m_tau1>>m_tau2>>m_tau3>>m_tauRatio>>m_refIndex>>m_phNConst>>m_Cpe2pmt>>m_rAngle>>m_QE>>m_CE>>m_peCorFac; 00158 case 7: 00159 std::istrstream(p)>>m_ttsMean>>m_ttsSigma>>m_PMTgain>>m_Ce>>m_riseTime>>m_LLthresh>>m_HLthresh>>m_preGain>>m_noiseSigma; 00160 case 8: 00161 std::istrstream(p)>>m_tau1Ec>>m_tau2Ec>>m_tau3Ec>>m_tauRatioEc>>m_refIndexEc>>m_phNConstEc>>m_Cpe2pmtEc>>m_rAngleEc>>m_QEEc>>m_CEEc>>m_peCorFacEc>>m_attenEc; 00162 case 9: 00163 std::istrstream(p)>>m_ttsMeanEc>>m_ttsSigmaEc>>m_PMTgainEc>>m_CeEc>>m_riseTimeEc>>m_LLthreshEc>>m_HLthreshEc>>m_preGainEc>>m_noiseSigmaEc; 00164 } 00165 } 00166 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|