27 { -180., -150., -120., -90., -60., -30., 0., 30., 70.};
29 {
"M180",
"M150",
"M120",
"M90",
"M60",
"M30",
"0",
"30",
"70"};
44 const ToolHandle<ISiliconConditionsTool>& siConditionsTool,
45 CLHEP::HepRandomEngine* rndmEngine,
46 const EventContext& ctx)
const {
47 std::lock_guard<std::mutex> lock(
m_mutex);
51 if (p_data)
return p_data;
53 ATH_MSG_DEBUG(
"--- Induced Charged Model Paramter (Begin) --------");
55 HepGeom::Point3D<double> localpos(0., 0., 0.);
57 double point[3] = {globalpos.x(), globalpos.y(), globalpos.z()};
58 double field[3] = {0., 0., 0.};
65 std::unique_ptr<SCT_InducedChargeModelData>
data =
66 std::make_unique<SCT_InducedChargeModelData>(vdepl,
81 ATH_MSG_DEBUG(
" EFieldModel 0 (Flat Diode Model), 1 (FEM solusions) 2 (uniform E)\t"<<
data->m_EFieldModel);
94 ATH_MSG_DEBUG(
"--- Induced Charged Model Paramter (End) ---------");
106 const double x0,
const double y0,
107 double* Q_m2,
double* Q_m1,
double* Q_00,
double* Q_p1,
double* Q_p2,
109 const ToolHandle<ISiPropertiesTool>& siPropertiesTool,
110 const EventContext& ctx)
const {
123 bool isInBulk =
true;
124 double t_current = 0.;
131 if (!isInBulk)
break;
152 y += diffusion * CLHEP::RandGaussZiggurat::shoot(
data.m_rndmEngine, 0.0, 1.0);
153 x += diffusion * CLHEP::RandGaussZiggurat::shoot(
data.m_rndmEngine, 0.0, 1.0);
170 double dq = qnew - qstrip[jj];
176 case -2: Q_m2[jt] +=
dq;
break;
177 case -1: Q_m1[jt] +=
dq;
break;
178 case 0: Q_00[jt] +=
dq;
break;
179 case +1: Q_p1[jt] +=
dq;
break;
180 case +2: Q_p2[jt] +=
dq;
break;
192 const double x0,
const double y0,
193 double* Q_m2,
double* Q_m1,
double* Q_00,
double* Q_p1,
double* Q_p2,
195 const ToolHandle<ISiPropertiesTool>& siPropertiesTool,
196 const EventContext& ctx)
const {
202 Q_m2, Q_m1, Q_00, Q_p1, Q_p2,
212 const double x0,
const double y0,
213 double* Q_m2,
double* Q_m1,
double* Q_00,
double* Q_p1,
double* Q_p2,
215 const ToolHandle<ISiPropertiesTool>& siPropertiesTool,
216 const EventContext& ctx)
const {
222 Q_m2, Q_m1, Q_00, Q_p1, Q_p2,
233 const double x,
const double y,
double& vx,
double& vy,
double& D,
235 const ToolHandle<ISiPropertiesTool>& siPropertiesTool,
236 const EventContext& ctx)
const {
245 const double E = std::sqrt(Ex*Ex+Ey*Ey);
250 const double v =
mu *
E;
252 siPropertiesTool->getSiProperties(hashId, ctx).calcElectronHallFactor(
data.m_T) :
253 siPropertiesTool->getSiProperties(hashId, ctx).calcHoleHallFactor(
data.m_T));
255 const double tanLA =
data.m_element->design().readoutSide()
257 *
data.m_element->hitDepthDirection()
258 *
data.m_element->hitPhiDirection()
259 * (
data.m_element->normal().cross(
data.m_magneticField)).
dot(
data.m_element->phiAxis())
262 const double secLA = std::sqrt(1.+tanLA*tanLA);
263 const double cosLA = 1./secLA;
264 const double sinLA = tanLA/secLA;
265 vy =
v * (Ey*cosLA - Ex*sinLA)/
E;
266 vx =
v * (Ex*cosLA + Ey*sinLA)/
E;
277 const int istrip,
const double x,
const double y)
const
285 const double deltax = 0.0005, deltay = 0.00025;
289 double dx = std::abs(
x-xc);
290 int ix =
static_cast<int>(
dx / deltax);
292 int iy =
static_cast<int>(
y / deltay);
293 double fx = (
dx - ix*deltax) / deltax;
294 double fy = (
y - iy*deltay) / deltay;
309 const double x,
const double y,
double& Ex,
double& Ey)
const {
318 const double deltay=0.00025, deltax=0.00025;
325 int iy =
static_cast<int>(
y/deltay);
326 double fy = (
y-iy*deltay) / deltay;
332 int ix =
static_cast<int>(xxx/deltax);
333 double fx = (xxx - ix*deltax) / deltax;
337 double Ex00 = 0., Ex10 = 0., Ex01 = 0., Ex11 = 0.;
338 double Ey00 = 0., Ey10 = 0., Ey01 = 0., Ey11 = 0.;
341 Ex00 =
data.m_ExValue[ix][iy]; Ex10 =
data.m_ExValue[ix1][iy];
342 Ex01 =
data.m_ExValue[ix][iy1]; Ex11 =
data.m_ExValue[ix1][iy1];
343 Ey00 =
data.m_EyValue[ix][iy]; Ey10 =
data.m_EyValue[ix1][iy];
344 Ey01 =
data.m_EyValue[ix][iy1]; Ey11 =
data.m_EyValue[ix1][iy1];
347 Ex = Ex00*(1.-fx)*(1.-fy) + Ex10*fx*(1.-fy)
348 + Ex01*(1.-fx)* fy + Ex11*fx* fy;
349 if (xx > xhalfpitch) Ex = -Ex;
350 Ey = Ey00*(1.-fx)*(1.-fy) + Ey10*fx*(1.-fy)
351 + Ey01*(1.-fx)* fy + Ey11*fx* fy;
355 if (
m_bulk_depth - y < data.m_depletion_depth && data.m_depletion_depth >0.) {
356 Ey =
data.m_VB /
data.m_depletion_depth;
363 if (
data.m_VB > std::abs(
data.m_VD)) {
366 if (
m_bulk_depth - y < data.m_depletion_depth && data.m_depletion_depth >0.) {
385 for (iVFD=0; iVFD<
s_VFD0.size()-1; iVFD++) {
387 if (dVFD2 >= 0.)
break;
406 TH2F* h_Potential_FDM =
static_cast<TH2F*
>(
hfile->Get(
"Potential_FDM"));
407 TH2F* h_Potential_FEM =
static_cast<TH2F*
>(
hfile->Get(
"Potential_FEM"));
422 h_Potential_FDM->Delete();
423 h_Potential_FEM->Delete();
434 m_ExValue[
i][ix][iy] = h_Ex->GetBinContent(ix+1, iy+1);
435 m_EyValue[
i][ix][iy] = h_Ey->GetBinContent(ix+1, iy+1);
443 TH2F* h_ExHV =
static_cast<TH2F*
>(
hfile->Get(
"Ex_FEM_0_100"));
444 TH2F* h_EyHV =
static_cast<TH2F*
>(
hfile->Get(
"Ey_FEM_0_100"));
447 m_ExValue[
i][ix][iy] = h_ExHV->GetBinContent(ix+1, iy+1);
448 m_EyValue[
i][ix][iy] = h_EyHV->GetBinContent(ix+1, iy+1);
463 ATH_MSG_INFO(
"Changed to Flat Diode Model since deplettion volage is out of range. ("
469 const float dVFD2 =
s_VFD0[iVFD+1] -
data.m_VD;
471 const float scalingFactor =
data.m_VB / 100.;
473 const size_t iHV =
s_VFD0.size();
481 data.m_ExValue[ix][iy] = (Ex1*dVFD2+Ex2*dVFD1)/(dVFD1+dVFD2);
482 data.m_ExValue[ix][iy] += ExHV*scalingFactor;
487 data.m_EyValue[ix][iy] = (Ey1*dVFD2+Ey2*dVFD1)/(dVFD1+dVFD2);
488 data.m_EyValue[ix][iy] += EyHV*scalingFactor;