|
ATLAS Offline Software
|
#include <InducedChargeModel.h>
|
| InducedChargeModel (size_t maxHash, EFieldModel model=FEMsolutions) |
|
SCT_InducedChargeModelData * | setWaferData (const float vdepl, const float vbias, const InDetDD::SolidStateDetectorElementBase *element, const AtlasFieldCacheCondObj *fieldCondObj, const ToolHandle< ISiliconConditionsTool > &siConditionsTool, CLHEP::HepRandomEngine *rndmEngine, const EventContext &ctx) const |
|
void | setEField (SCT_InducedChargeModelData &data) const |
|
void | transport (const SCT_InducedChargeModelData &data, const bool isElectron, const double x0, const double y0, double *Q_m2, double *Q_m1, double *Q_00, double *Q_p1, double *Q_p2, const IdentifierHash hashId, const ToolHandle< ISiPropertiesTool > &siPropertiesTool, const EventContext &ctx) const |
|
void | holeTransport (const SCT_InducedChargeModelData &data, const double x0, const double y0, double *Q_m2, double *Q_m1, double *Q_00, double *Q_p1, double *Q_p2, const IdentifierHash hashId, const ToolHandle< ISiPropertiesTool > &siPropertiesTool, const EventContext &ctx) const |
|
void | electronTransport (const SCT_InducedChargeModelData &data, const double x0, const double y0, double *Q_m2, double *Q_m1, double *Q_00, double *Q_p1, double *Q_p2, const IdentifierHash hashId, const ToolHandle< ISiPropertiesTool > &siPropertiesTool, const EventContext &ctx) const |
|
bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. More...
|
|
MsgStream & | msg () const |
| The standard message stream. More...
|
|
MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. More...
|
|
void | setLevel (MSG::Level lvl) |
| Change the current logging level. More...
|
|
|
void | loadICMParameters () |
|
bool | getVxVyD (const SCT_InducedChargeModelData &data, const bool isElectron, const double x, const double y, double &vx, double &vy, double &D, const IdentifierHash hashId, const ToolHandle< ISiPropertiesTool > &siPropertiesTool, const EventContext &ctx) const |
|
double | induced (const SCT_InducedChargeModelData &data, const int istrip, const double x, const double y) const |
|
void | getEField (const SCT_InducedChargeModelData &data, const double x, const double y, double &Ex, double &Ey) const |
|
void | initMessaging () const |
| Initialize our message level and MessageSvc. More...
|
|
|
static const double | s_kB = Gaudi::Units::k_Boltzmann / Gaudi::Units::joule |
|
static const double | s_e = Gaudi::Units::e_SI |
|
static const std::vector< float > | s_VFD0 |
|
static const std::vector< std::string > | s_VFD0str |
|
Definition at line 43 of file InducedChargeModel.h.
◆ EFieldModel
◆ FEMNums
◆ InducedStrips
◆ TransportStep
◆ InducedChargeModel()
◆ electronTransport()
void InducedChargeModel::electronTransport |
( |
const SCT_InducedChargeModelData & |
data, |
|
|
const double |
x0, |
|
|
const double |
y0, |
|
|
double * |
Q_m2, |
|
|
double * |
Q_m1, |
|
|
double * |
Q_00, |
|
|
double * |
Q_p1, |
|
|
double * |
Q_p2, |
|
|
const IdentifierHash |
hashId, |
|
|
const ToolHandle< ISiPropertiesTool > & |
siPropertiesTool, |
|
|
const EventContext & |
ctx |
|
) |
| const |
◆ getEField()
Definition at line 308 of file InducedChargeModel.cxx.
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.) {
◆ getFEMIndex()
◆ getVxVyD()
Definition at line 231 of file InducedChargeModel.cxx.
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;
◆ holeTransport()
void InducedChargeModel::holeTransport |
( |
const SCT_InducedChargeModelData & |
data, |
|
|
const double |
x0, |
|
|
const double |
y0, |
|
|
double * |
Q_m2, |
|
|
double * |
Q_m1, |
|
|
double * |
Q_00, |
|
|
double * |
Q_p1, |
|
|
double * |
Q_p2, |
|
|
const IdentifierHash |
hashId, |
|
|
const ToolHandle< ISiPropertiesTool > & |
siPropertiesTool, |
|
|
const EventContext & |
ctx |
|
) |
| const |
◆ induced()
Definition at line 276 of file InducedChargeModel.cxx.
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;
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ loadICMParameters()
void InducedChargeModel::loadICMParameters |
( |
| ) |
|
|
private |
Definition at line 395 of file InducedChargeModel.cxx.
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);
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ setEField()
Definition at line 458 of file InducedChargeModel.cxx.
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;
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ setWaferData()
Definition at line 40 of file InducedChargeModel.cxx.
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) ---------");
◆ transport()
void InducedChargeModel::transport |
( |
const SCT_InducedChargeModelData & |
data, |
|
|
const bool |
isElectron, |
|
|
const double |
x0, |
|
|
const double |
y0, |
|
|
double * |
Q_m2, |
|
|
double * |
Q_m1, |
|
|
double * |
Q_00, |
|
|
double * |
Q_p1, |
|
|
double * |
Q_p2, |
|
|
const IdentifierHash |
hashId, |
|
|
const ToolHandle< ISiPropertiesTool > & |
siPropertiesTool, |
|
|
const EventContext & |
ctx |
|
) |
| const |
Definition at line 104 of file InducedChargeModel.cxx.
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;
◆ ATLAS_THREAD_SAFE
◆ m_bulk_depth
double InducedChargeModel::m_bulk_depth = 0.0285 |
|
private |
◆ m_EFieldModel
◆ m_ExValue
◆ m_EyValue
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_mutex
std::mutex InducedChargeModel::m_mutex |
|
mutableprivate |
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_PotentialValue
◆ m_strip_pitch
double InducedChargeModel::m_strip_pitch = 0.0080 |
|
private |
◆ m_transportTimeMax
◆ m_transportTimeStep
double InducedChargeModel::m_transportTimeStep = 0.50 |
|
private |
◆ m_y_origin_min
double InducedChargeModel::m_y_origin_min = 0. |
|
private |
◆ s_e
const double InducedChargeModel::s_e = Gaudi::Units::e_SI |
|
staticprivate |
◆ s_kB
const double InducedChargeModel::s_kB = Gaudi::Units::k_Boltzmann / Gaudi::Units::joule |
|
staticprivate |
◆ s_VFD0
const std::vector< float > InducedChargeModel::s_VFD0 |
|
staticprivate |
Initial value:=
{ -180., -150., -120., -90., -60., -30., 0., 30., 70.}
Definition at line 176 of file InducedChargeModel.h.
◆ s_VFD0str
const std::vector< std::string > InducedChargeModel::s_VFD0str |
|
staticprivate |
Initial value:=
{"M180", "M150", "M120", "M90", "M60", "M30", "0", "30", "70"}
Definition at line 177 of file InducedChargeModel.h.
The documentation for this class was generated from the following files:
std::atomic< MSG::Level > m_lvl
Current logging level.
char data[hepevt_bytes_allocation_ATLAS]
void getEField(const SCT_InducedChargeModelData &data, const double x, const double y, double &Ex, double &Ey) const
std::vector< std::array< std::array< double, NDepthPoints >, NEFieldPoints > > m_EyValue
static const std::vector< float > s_VFD0
void setEField(SCT_InducedChargeModelData &data) const
bool getVxVyD(const SCT_InducedChargeModelData &data, const bool isElectron, const double x, const double y, double &vx, double &vy, double &D, const IdentifierHash hashId, const ToolHandle< ISiPropertiesTool > &siPropertiesTool, const EventContext &ctx) const
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
IMessageSvc * getMessageSvc(bool quiet=false)
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
AthMessaging()
Default constructor:
void getInitializedCache(MagField::AtlasFieldCache &cache) const
get B field cache for evaluation as a function of 2-d or 3-d position.
double m_transportTimeStep
static size_t getFEMIndex(SCT_InducedChargeModelData &data)
void transport(const SCT_InducedChargeModelData &data, const bool isElectron, const double x0, const double y0, double *Q_m2, double *Q_m1, double *Q_00, double *Q_p1, double *Q_p2, const IdentifierHash hashId, const ToolHandle< ISiPropertiesTool > &siPropertiesTool, const EventContext &ctx) const
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
std::vector< std::array< std::array< double, NDepthPoints >, NEFieldPoints > > m_ExValue
def dot(G, fn, nodesToHighlight=[])
MsgStream & msg() const
The standard message stream.
EFieldModel m_EFieldModel
HepGeom::Point3D< double > globalPositionHit(const HepGeom::Point3D< double > &simulationLocalPos) const
transform a hit local position into a global position (inline):
Eigen::Matrix< double, 3, 1 > Vector3D
static const std::vector< std::string > s_VFD0str
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
double m_transportTimeMax
std::string m_nm
Message source name.
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
void getField(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field value at given position xyz[3] is in mm, bxyz[3] is in kT if deriv[9] is given,...
void initMessaging() const
Initialize our message level and MessageSvc.
double induced(const SCT_InducedChargeModelData &data, const int istrip, const double x, const double y) const
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
std::vector< std::array< std::array< double, NDepthPoints >, NRamoPoints > > m_PotentialValue