7 #include <FairLogger.h>
28 , fEpsilon(1.04e-12) {
42 Double_t temperature) {
45 Double_t kB = TMath::K() / TMath::Qe();
48 Double_t i20 =
fIAlpha * fluence * volume;
55 Double_t exponent = -1. * eGap / 2. / kB * (1. / temperature - 1. / 293.);
57 i20 * temperature * temperature / 85849. * TMath::Exp(exponent);
68 energy = energy * 1000.;
70 std::map<Double_t, Double_t>* table =
nullptr;
71 Int_t atype = TMath::Abs(type);
79 default: table =
nullptr;
83 if (!table)
return 0.;
86 std::map<Double_t, Double_t>::iterator it = table->upper_bound(energy);
89 if (it == table->begin()) {
95 if (it == table->end()) {
98 case 2112:
return 0.44;
break;
99 case 2212:
return 0.50;
break;
100 case 211:
return 0.38;
break;
101 case 11:
return 0.08;
break;
102 default:
return 0.00;
break;
107 Double_t e2 = (*it).first;
108 Double_t v2 = (*it).second;
110 Double_t e1 = (*it).first;
111 Double_t v1 = (*it).second;
113 Double_t
v = v1 + (v2 - v1) * (energy - e1) / (e2 - e1);
124 Double_t corr1 = 0.7 *
fNeff0 * (1. - TMath::Exp(-1. *
fNeffC * fluence));
125 Double_t corr2 =
fNeffGc * fluence;
126 Double_t nEff =
fNeff0 - corr1 - corr2;
129 Double_t vfd = TMath::Qe() * nEff *
d *
d / 2. /
fEpsilon;
176 std::map<Double_t, Double_t>& table) {
178 TString wrkdir = getenv(
"VMCWORKDIR");
179 TString fileName = wrkdir +
"/input/" + TString(file);
180 LOG(info) <<
"Reading " << fileName;
182 std::ifstream* data =
new std::ifstream(fileName.Data());
183 if (!data->is_open()) { LOG(fatal) <<
"Error when reading from file!"; }
190 while (!data->eof()) {
199 std::map<Double_t, Double_t>::iterator it1 = table.begin();
200 std::map<Double_t, Double_t>::iterator it2 = table.end();
203 LOG(info) << nEntries <<
" values read; energy range " << (*it1).first
204 <<
" to " << (*it2).first <<
" MeV; map size " << table.size();