BmnRoot
Loading...
Searching...
No Matches
CbmStsRadTool.cxx
Go to the documentation of this file.
1
8#include <fstream>
9#include <iostream>
10
11#include "TMath.h"
12#include "TString.h"
13
14#include "CbmStsRadTool.h"
15
16
17
18// ===== Constructor ==================================================
20 : TObject(),
21 niel_neutron(),
22 niel_proton(),
23 niel_pion(),
24 niel_electron(),
25 fIAlpha(0.),
26 fEGap0(0.),
27 fEGapAlpha(0.),
28 fEGapBeta(0.),
29 fNeff0(0.),
30 fNeffC(0.),
31 fNeffGc(0.),
32 fEpsilon(0.)
33{
34 Init();
35}
36// ========================================================================
37
38
39
40
41// ===== Destructor ===================================================
43// ========================================================================
44
45
46
47
48// ===== Get leakage current ==========================================
49Double_t CbmStsRadTool::GetLeakageCurrent(Double_t fluence,
50 Double_t volume,
51 Double_t temperature) {
52
53 // --- Boltzmann constant in ev/K
54 Double_t kB = TMath::K() / TMath::Qe();
55
56 // --- Leakage current at room temperature (293 K)
57 Double_t i20 = fIAlpha * fluence * volume;
58
59 // --- Gap energy at given temperature
60 Double_t eGap = fEGap0
61 - fEGapAlpha * temperature * temperature / ( temperature + fEGapBeta);
62
63 // --- Leakage current at given temperature
64 Double_t exponent = -1. * eGap / 2. / kB * ( 1./temperature - 1./293.);
65 Double_t iLeak = i20 * temperature * temperature / 85849.
66 * TMath::Exp(exponent);
67
68 return iLeak;
69}
70// ========================================================================
71
72
73
74
75// ===== Get NIEL factor ==============================================
76Double_t CbmStsRadTool::GetNiel(Int_t type, Double_t energy) {
77
78 // Convert energy to MeV like in table
79 energy = energy * 1000.;
80
81 map<Double_t, Double_t>* table = NULL;
82 Int_t atype = TMath::Abs(type);
83
84 // Select table according to particle type
85 switch(atype) {
86 case 2112: table = &niel_neutron; break; // neutrons
87 case 2212: table = &niel_proton; break; // protons
88 case 211: table = &niel_pion; break; // pions
89 case 11: table = &niel_electron; break; // electrons
90 default: table = NULL;
91 }
92
93 // Return zero for unknown particles
94 if ( ! table ) return 0.;
95
96 // First table entry above selected energy
97 map<Double_t, Double_t>::iterator it = table->upper_bound(energy);
98
99 // Return zero if below lower limit
100 if ( it == table->begin() ) {
101 //cout << "-I- Below table limit: " << atype << " " << energy << endl;
102 return 0.;
103 }
104
105 // Return asymptotic value if above upper limit
106 if ( it == table->end() ) {
107 //cout << "-I- Above table limit: " << atype << " " << energy << endl;
108 switch(atype) {
109 case 2112: return 0.44; break;
110 case 2212: return 0.50; break;
111 case 211: return 0.38; break;
112 case 11: return 0.08; break;
113 default: return 0.00; break;
114 }
115 }
116
117 // Interpolate within table values
118 Double_t e2 = (*it).first;
119 Double_t v2 = (*it).second;
120 it--;
121 Double_t e1 = (*it).first;
122 Double_t v1 = (*it).second;
123
124 Double_t v = v1 + (v2-v1) * (energy-e1) / (e2-e1);
125
126 return v;
127
128}
129// ========================================================================
130
131
132
133
134// ===== Get full depletion voltage ===================================
135Double_t CbmStsRadTool::GetVfd(Double_t fluence, Double_t d) {
136
137 // --- Calculate effective doping concentration at given fluence
138 Double_t corr1 = 0.7 * fNeff0
139 * ( 1. - TMath::Exp(-1. * fNeffC * fluence) );
140 Double_t corr2 = fNeffGc * fluence;
141 Double_t nEff = fNeff0 - corr1 - corr2;
142
143 // --- Calculate full depletion voltage from doping concentration
144 Double_t vfd = TMath::Qe() * nEff * d * d / 2. / fEpsilon;
145
146 return vfd;
147}
148// ========================================================================
149
150
151
152
153// ===== Private method Init ==========================================
154void CbmStsRadTool::Init() {
155
156 // --- Read NIEL tables
157 ReadData("niel_neutrons.dat", niel_neutron);
158 ReadData("niel_protons.dat", niel_proton);
159 ReadData("niel_pions.dat", niel_pion);
160 ReadData("niel_electrons.dat", niel_electron);
161
162
163 // --- Proportionality constant of leakage current and fluence
164 // --- for Silicon at room temperature
165 // --- Numerical value provided by S. Chatterji
166 fIAlpha = 4.e-17; // [A/cm]
167
168
169 // --- Constants for temperature dependence of leakage current
170 // --- Values are for Silicon
171 // --- Numerical values provided by S. Chatterji
172 fEGap0 = 1.166; // Gap energy [eV] at T = 0K
173 fEGapAlpha = 4.73e-4; // [ev/K]
174 fEGapBeta = 636.; // [K]
175
176
177 // --- Constants for effective doping concentration
178 // --- Values are for Silicon
179 // --- Numerical values provided by S. Chatterji
180 fNeff0 = 9.0e11; // Doping concentration without irradiation [cm^-3];
181 fNeffC = 2.5e-14; // [cm^2]
182 fNeffGc = 1.5e-2; // [1/cm]
183
184
185 // --- Permittivivity of Silicon
186 fEpsilon = 1.04e-12; // [F/cm]
187
188}
189// ========================================================================
190
191
192
193
194// ===== Private method ReadData ======================================
195void CbmStsRadTool::ReadData(const char* file,
196 map<Double_t, Double_t>& table) {
197
198 TString wrkdir = getenv("VMCWORKDIR");
199 TString fileName = wrkdir + "/input/" + TString(file);
200 cout << "-I- Reading " << fileName << endl;
201
202 ifstream* data = new ifstream(fileName.Data());
203 if ( ! data->is_open() ) {
204 cout << "-E- Error when reading from file!" << endl;
205 Fatal("ReadData", "Read error");
206 }
207
208 Double_t e = 0.;
209 Double_t v = 0.;
210 Int_t nEntries = 0;
211
212 *data >> e >> v;
213 while ( ! data->eof() ) {
214 table[e] = v;
215 nEntries++;
216 *data >> e >> v;
217 }
218
219 data->close();
220 delete data;
221
222 map<Double_t, Double_t>::iterator it1 = table.begin();
223 map<Double_t, Double_t>::iterator it2 = table.end();
224 it2--;
225
226 cout << "-I- " << nEntries << " values read; energy range "
227 << (*it1).first << " to " << (*it2).first << " MeV; map size "
228 << table.size() << endl;
229
230}
231// ========================================================================
const Float_t d
Z-ccordinate of the first GEM-station.
Definition BmnMwpcHit.cxx:7
__m128 v
Definition P4_F32vec4.h:1
virtual ~CbmStsRadTool()
Double_t GetVfd(Double_t fluence, Double_t d)
Double_t GetLeakageCurrent(Double_t fluence, Double_t volume, Double_t temperatur)
Double_t GetNiel(Int_t type, Double_t energy)