|
ATLAS Offline Software
|
#include <StripSurfaceChargesGenerator.h>
|
virtual void | setFixedTime (float fixedTime) override |
|
virtual void | process (const InDetDD::SiDetectorElement *element, const TimedHitPtr< SiHit > &phit, ISiSurfaceChargesInserter &inserter, CLHEP::HepRandomEngine *rndmEngine, const EventContext &ctx) override |
| create a list of surface charges from a hit More...
|
|
void | processSiHit (const InDetDD::SiDetectorElement *element, const SiHit &phit, ISiSurfaceChargesInserter &inserter, float eventTime, unsigned short eventID, CLHEP::HepRandomEngine *rndmEngine, const EventContext &ctx) const |
|
float | driftTime (float zhit, const InDetDD::SiDetectorElement *element, const EventContext &ctx) const |
| calculate drift time perpandicular to the surface for a charge at distance zhit from mid gap More...
|
|
float | diffusionSigma (float zhit, const InDetDD::SiDetectorElement *element, const EventContext &ctx) const |
| calculate diffusion sigma from a gaussian dist scattered charge More...
|
|
float | surfaceDriftTime (float ysurf) const |
| Calculate of the surface drift time. More...
|
|
float | maxDriftTime (const InDetDD::SiDetectorElement *element, const EventContext &ctx) const |
| max drift charge equivalent to the detector thickness More...
|
|
float | maxDiffusionSigma (const InDetDD::SiDetectorElement *element, const EventContext &ctx) const |
| max sigma diffusion More...
|
|
bool | chargeIsTrapped (double spess, const InDetDD::SiDetectorElement *element, double &trap_pos, double &drift_time) const |
|
Hists & | getHists () const |
|
|
IntegerProperty | m_numberOfCharges {this, "NumberOfCharges", 1, "number of charges"} |
|
FloatProperty | m_smallStepLength {this, "SmallStepLength", 5 * CLHEP::micrometer, "max internal step along the larger G4 step"} |
|
FloatProperty | m_tSurfaceDrift {this, "SurfaceDriftTime", 10 * CLHEP::ns, "max surface drift time"} |
| related to the surface drift More...
|
|
FloatProperty | m_tfix {this, "FixedTime", -999., "fixed time"} |
|
FloatProperty | m_tsubtract {this, "SubtractTime", -999., "subtract drift time from mid gap"} |
|
BooleanProperty | m_useSiCondDB {this, "UseSiCondDB", true, "Usage of SiConditions DB values can be disabled to use setable ones"} |
|
FloatProperty | m_vdepl {this, "DepletionVoltage", 70., "depletion voltage, default 70V"} |
|
FloatProperty | m_vbias {this, "BiasVoltage", 150., "bias voltage, default 150V"} |
|
BooleanProperty | m_doTrapping {this, "doTrapping", false, "Flag to set Charge Trapping"} |
|
BooleanProperty | m_doHistoTrap {this, "doHistoTrap", false, "Histogram the charge trapping effect"} |
|
BooleanProperty | m_doRamo {this, "doRamo", false, "Ramo Potential for charge trapping effect"} |
|
BooleanProperty | m_isOverlay {this, "isOverlay", false, "flag for overlay"} |
|
BooleanProperty | m_doInducedChargeModel {this, "doInducedChargeModel", false, "Flag for Induced Charge Model"} |
|
ToolHandle< ISiPropertiesTool > | m_siPropertiesTool {this, "SiPropertiesTool", "StripSiPropertiesTool", "Tool to retrieve SCT silicon properties"} |
|
ToolHandle< ISCT_RadDamageSummaryTool > | m_radDamageTool {this, "RadDamageSummaryTool", "StripRadDamageSummaryTool", "Tool to retrieve SCT radiation damages"} |
|
ToolHandle< ISiliconConditionsTool > | m_siConditionsTool {this, "SiConditionsTool", "StripSiliconConditionsTool", "Tool to retrieve SCT silicon information"} |
|
ToolHandle< ISiLorentzAngleTool > | m_lorentzAngleTool {this, "LorentzAngleTool", "SiLorentzAngleTool/ITkStripLorentzAngleTool", "Tool to retreive Lorentz angle"} |
|
ServiceHandle< ITHistSvc > | m_thistSvc {this, "THistSvc", "THistSvc"} |
|
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > | m_fieldCacheCondObjInputKey |
|
float | m_tHalfwayDrift {0.} |
| Surface drift time. More...
|
|
float | m_distInterStrip {1.0} |
| Inter strip distance normalized to 1. More...
|
|
float | m_distHalfInterStrip {0.} |
| Half way distance inter strip. More...
|
|
bool | m_SurfaceDriftFlag {false} |
| surface drift ON/OFF More...
|
|
std::unique_ptr< Hists > | m_h |
|
std::unique_ptr< InducedChargeModel > | m_InducedChargeModel |
|
◆ StripSurfaceChargesGenerator()
ITk::StripSurfaceChargesGenerator::StripSurfaceChargesGenerator |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~StripSurfaceChargesGenerator()
virtual ITk::StripSurfaceChargesGenerator::~StripSurfaceChargesGenerator |
( |
| ) |
|
|
virtualdefault |
◆ chargeIsTrapped()
bool ITk::StripSurfaceChargesGenerator::chargeIsTrapped |
( |
double |
spess, |
|
|
const InDetDD::SiDetectorElement * |
element, |
|
|
double & |
trap_pos, |
|
|
double & |
drift_time |
|
) |
| const |
|
private |
Definition at line 622 of file StripSurfaceChargesGenerator.cxx.
626 if (element==
nullptr) {
627 ATH_MSG_ERROR(
"StripSurfaceChargesGenerator::chargeIsTrapped element is nullptr");
630 bool isTrapped{
false};
633 const double electric_field{condData.getElectricField()};
637 const double mobChar{condData.getHoleDriftMobility()};
638 h.m_h_efieldz->Fill(spess, electric_field);
639 h.m_h_efield->Fill(electric_field);
640 h.m_h_mob_Char->Fill(electric_field, mobChar);
641 h.m_h_vel->Fill(electric_field, electric_field * mobChar);
643 const double t_electrode{condData.getTimeToElectrode()};
644 drift_time = condData.getTrappingTime();
645 const double z_trap{condData.getTrappingPositionZ()};
646 trap_pos = spess - z_trap;
649 h.m_h_drift_time->Fill(drift_time);
650 h.m_h_t_electrode->Fill(t_electrode);
651 h.m_h_drift_electrode->Fill(drift_time, t_electrode);
652 h.m_h_ztrap_tot->Fill(z_trap);
656 if (drift_time < t_electrode) {
658 ATH_MSG_INFO(
"drift_time: " << drift_time <<
" t_electrode: " << t_electrode <<
" spess " << spess);
662 h.m_h_ztrap->Fill(z_trap);
663 h.m_h_trap_drift_t->Fill(drift_time);
664 h.m_h_drift1->Fill(spess, drift_time / t_electrode);
665 h.m_h_gen->Fill(spess, drift_time);
666 h.m_h_gen1->Fill(spess, z_trap);
667 h.m_h_gen2->Fill(spess, z_trap / drift_time * t_electrode);
668 h.m_h_velocity_trap->Fill(electric_field, z_trap / drift_time);
669 h.m_h_mobility_trap->Fill(electric_field, z_trap / drift_time / electric_field);
670 h.m_h_trap_pos->Fill(trap_pos);
675 const double z_trap{condData.getTrappingPositionZ()};
677 h.m_h_no_ztrap->Fill(z_trap);
678 h.m_h_notrap_drift_t->Fill(drift_time);
◆ diffusionSigma()
calculate diffusion sigma from a gaussian dist scattered charge
Definition at line 242 of file StripSurfaceChargesGenerator.cxx.
243 if (element==
nullptr) {
244 ATH_MSG_ERROR(
"StripSurfaceChargesGenerator::diffusionSigma element is nullptr");
251 const float sigma{
static_cast<float>(std::sqrt(2. *
m_siPropertiesTool->getSiProperties(hashId, ctx).holeDiffusionConstant() *
t))};
◆ driftTime()
calculate drift time perpandicular to the surface for a charge at distance zhit from mid gap
Definition at line 193 of file StripSurfaceChargesGenerator.cxx.
194 if (element==
nullptr) {
195 ATH_MSG_ERROR(
"StripSurfaceChargesGenerator::process element is nullptr");
199 if (design==
nullptr) {
200 ATH_MSG_ERROR(
"StripSurfaceChargesGenerator::process can not get " << design);
203 const double thickness{design->thickness()};
206 if ((zhit < 0.0) or (zhit > thickness)) {
211 float depletionVoltage{0.};
212 float biasVoltage{0.};
221 const float denominator{
static_cast<float>(depletionVoltage + biasVoltage - (2.0 * zhit * depletionVoltage / thickness))};
223 if (biasVoltage >= depletionVoltage) {
225 ATH_MSG_ERROR(
"driftTime: negative argument X for log(X) " << zhit);
235 t_drift *= thickness * thickness / (2.0 *
m_siPropertiesTool->getSiProperties(hashId, ctx).holeDriftMobility() * depletionVoltage);
◆ finalize()
StatusCode ITk::StripSurfaceChargesGenerator::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getHists()
◆ initialize()
StatusCode ITk::StripSurfaceChargesGenerator::initialize |
( |
| ) |
|
|
overridevirtual |
AlgTool initialize.
Definition at line 49 of file StripSurfaceChargesGenerator.cxx.
69 ATH_MSG_FATAL(
"Filling histograms not supported in MT jobs.");
70 return StatusCode::FAILURE;
75 m_h = std::make_unique<Hists>();
82 const SCT_ID* sct_id{
nullptr};
94 ATH_MSG_INFO(
"\tsurface drift still not on, wrong params");
99 ATH_MSG_FATAL(
"\tCannot set both FixedTime and SubtractTime options!");
100 ATH_MSG_INFO(
"\tMake sure the two flags are not set simultaneously in jo");
101 return StatusCode::FAILURE;
106 return StatusCode::SUCCESS;
◆ maxDiffusionSigma()
◆ maxDriftTime()
◆ process()
◆ processSiHit()
Definition at line 326 of file StripSurfaceChargesGenerator.cxx.
335 if (initialDesign==
nullptr) {
336 ATH_MSG_ERROR(
"StripSurfaceChargesGenerator::process can not get " << initialDesign);
346 if(motherDesign!=
nullptr){
348 design = motherDesign;
351 ATH_MSG_DEBUG(
"No Mother Design - Using Design from DetElement directly!");
352 design = initialDesign;
355 const double thickness{design->
thickness()};
363 float timeOfFlight{p_eventTime +
hitTime(phit)};
381 const float cEta{
static_cast<float>(endPos[
SiHit::xEta]) - xEta};
382 const float cPhi{
static_cast<float>(endPos[
SiHit::xPhi]) - xPhi};
383 const float cDep{
static_cast<float>(endPos[
SiHit::xDep]) - xDep};
387 const float largeStep{std::sqrt(cEta*cEta + cPhi*cPhi + cDep*cDep)};
391 const float q1{
static_cast<float>(
e1 *
m_siPropertiesTool->getSiProperties(hashId, ctx).electronHolePairsPerEnergy())};
427 const float stepX{cX / numberOfSteps};
428 const float stepY{cY / numberOfSteps};
429 const float stepZ{cZ / numberOfSteps};
446 for (
int istep{0}; istep < numberOfSteps; ++istep) {
448 float z1{zhit + stepZ * dstep};
452 float zReadout{
static_cast<float>(0.5 * thickness - design->
readoutSide() * z1)};
453 const double spess{zReadout};
457 h.m_h_depD->Fill(z1);
458 h.m_h_spess->Fill(spess);
461 float t_drift{
driftTime(zReadout, element, ctx)};
462 if (t_drift>-2.0000002 and t_drift<-1.9999998) {
463 ATH_MSG_DEBUG(
"Checking for rounding errors in compression");
464 if ((std::abs(z1) - 0.5 * thickness) < 0.000010) {
465 ATH_MSG_DEBUG(
"Rounding error found attempting to correct it. z1 = " << std::fixed << std::setprecision(8) << z1);
467 z1 = 0.0000005 - 0.5 * thickness;
470 z1 = 0.5 * thickness - 0.0000005;
473 zReadout = 0.5 * thickness - design->
readoutSide() * z1;
474 t_drift =
driftTime(zReadout, element, ctx);
475 if (t_drift>-2.0000002 and t_drift<-1.9999998) {
478 ATH_MSG_DEBUG(
"Correction Successful! z1 = " << std::fixed << std::setprecision(8) << z1 <<
", zReadout = " << zReadout <<
", t_drift = " << t_drift);
481 ATH_MSG_DEBUG(
"No rounding error found. Making no correction.");
485 const float x1{xhit + stepX * dstep};
486 float y1{yhit + stepY * dstep};
491 y1 += tanLorentz * zReadout;
495 const float rx{CLHEP::RandGaussZiggurat::shoot(rndmEngine)};
497 const float ry{CLHEP::RandGaussZiggurat::shoot(rndmEngine)};
498 const float yd{
y1 +
sigma * ry};
501 const double stripPitch{0.080};
502 double dstrip{
y1 / stripPitch};
504 dstrip = dstrip - std::trunc(dstrip);
506 dstrip = dstrip - std::trunc(dstrip) + 1;
510 double y0{dstrip * stripPitch};
511 double z0{thickness - zReadout};
517 h.m_h_zhit->Fill(zhit);
519 double trap_pos{-999999.}, drift_time{-999999.};
524 double Q_m2{0.}, Q_m1{0.}, Q_00{0.}, Q_p1{0.}, Q_p2{0.};
526 dstrip =
y1 / stripPitch;
532 dstrip -=
static_cast<double>(
static_cast<int>(dstrip));
534 dstrip -=
static_cast<double>(
static_cast<int>(dstrip)) + 1;
538 double yfin{dstrip * stripPitch};
539 double zfin{thickness - trap_pos};
541 m_radDamageTool->holeTransport(y0,
z0, yfin, zfin, Q_m2, Q_m1, Q_00, Q_p1, Q_p2);
543 const double ystrip{yd +
strip * stripPitch};
547 if (strip == -2)
charge = Q_m2;
548 else if (strip == -1)
charge = Q_m1;
549 else if (strip == 0)
charge = Q_00;
550 else if (strip == 1)
charge = Q_p1;
551 else if (strip == 2)
charge = Q_p2;
552 const double time{drift_time};
573 const double mm2cm = 0.1;
577 Q_m2, Q_m1, Q_00, Q_p1, Q_p2,
582 Q_m2, Q_m1, Q_00, Q_p1, Q_p2,
587 if (Q_00[
it] == 0.0)
continue;
588 double ICM_time{(
it+0.5)*0.5 + timeOfFlight};
590 Q_m2[
it], Q_m1[
it], Q_00[
it], Q_p1[
it], Q_p2[
it]
593 double ystrip{
y1 +
strip * stripPitch};
598 ICM_time, hitproc, trklink)));
608 const float totaltime{(
m_tfix > -998.) ?
m_tfix.value() : t_drift + timeOfFlight + t_surf};
611 ATH_MSG_VERBOSE(std::fixed << std::setprecision(8) <<
"Local position (phi, eta, depth): ("
612 << position.xPhi() <<
", " << position.xEta() <<
", " << position.xDepth()
613 <<
") of the element is out of active area, charge = " << q1);
◆ setFixedTime()
virtual void ITk::StripSurfaceChargesGenerator::setFixedTime |
( |
float |
fixedTime | ) |
|
|
inlineoverrideprivatevirtual |
◆ surfaceDriftTime()
float ITk::StripSurfaceChargesGenerator::surfaceDriftTime |
( |
float |
ysurf | ) |
const |
|
private |
◆ m_distHalfInterStrip
float ITk::StripSurfaceChargesGenerator::m_distHalfInterStrip {0.} |
|
private |
◆ m_distInterStrip
float ITk::StripSurfaceChargesGenerator::m_distInterStrip {1.0} |
|
private |
◆ m_doHistoTrap
BooleanProperty ITk::StripSurfaceChargesGenerator::m_doHistoTrap {this, "doHistoTrap", false, "Histogram the charge trapping effect"} |
|
private |
◆ m_doInducedChargeModel
BooleanProperty ITk::StripSurfaceChargesGenerator::m_doInducedChargeModel {this, "doInducedChargeModel", false, "Flag for Induced Charge Model"} |
|
private |
◆ m_doRamo
BooleanProperty ITk::StripSurfaceChargesGenerator::m_doRamo {this, "doRamo", false, "Ramo Potential for charge trapping effect"} |
|
private |
◆ m_doTrapping
BooleanProperty ITk::StripSurfaceChargesGenerator::m_doTrapping {this, "doTrapping", false, "Flag to set Charge Trapping"} |
|
private |
◆ m_fieldCacheCondObjInputKey
Initial value:{
this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"}
Definition at line 130 of file StripSurfaceChargesGenerator.h.
◆ m_h
std::unique_ptr<Hists> ITk::StripSurfaceChargesGenerator::m_h |
|
private |
◆ m_InducedChargeModel
std::unique_ptr<InducedChargeModel> ITk::StripSurfaceChargesGenerator::m_InducedChargeModel |
|
private |
◆ m_isOverlay
BooleanProperty ITk::StripSurfaceChargesGenerator::m_isOverlay {this, "isOverlay", false, "flag for overlay"} |
|
private |
◆ m_lorentzAngleTool
◆ m_numberOfCharges
IntegerProperty ITk::StripSurfaceChargesGenerator::m_numberOfCharges {this, "NumberOfCharges", 1, "number of charges"} |
|
private |
◆ m_radDamageTool
ToolHandle<ISCT_RadDamageSummaryTool> ITk::StripSurfaceChargesGenerator::m_radDamageTool {this, "RadDamageSummaryTool", "StripRadDamageSummaryTool", "Tool to retrieve SCT radiation damages"} |
|
private |
◆ m_siConditionsTool
ToolHandle<ISiliconConditionsTool> ITk::StripSurfaceChargesGenerator::m_siConditionsTool {this, "SiConditionsTool", "StripSiliconConditionsTool", "Tool to retrieve SCT silicon information"} |
|
private |
◆ m_siPropertiesTool
ToolHandle<ISiPropertiesTool> ITk::StripSurfaceChargesGenerator::m_siPropertiesTool {this, "SiPropertiesTool", "StripSiPropertiesTool", "Tool to retrieve SCT silicon properties"} |
|
private |
◆ m_smallStepLength
FloatProperty ITk::StripSurfaceChargesGenerator::m_smallStepLength {this, "SmallStepLength", 5 * CLHEP::micrometer, "max internal step along the larger G4 step"} |
|
private |
◆ m_SurfaceDriftFlag
bool ITk::StripSurfaceChargesGenerator::m_SurfaceDriftFlag {false} |
|
private |
◆ m_tfix
FloatProperty ITk::StripSurfaceChargesGenerator::m_tfix {this, "FixedTime", -999., "fixed time"} |
|
private |
◆ m_tHalfwayDrift
float ITk::StripSurfaceChargesGenerator::m_tHalfwayDrift {0.} |
|
private |
◆ m_thistSvc
ServiceHandle<ITHistSvc> ITk::StripSurfaceChargesGenerator::m_thistSvc {this, "THistSvc", "THistSvc"} |
|
private |
◆ m_tsubtract
FloatProperty ITk::StripSurfaceChargesGenerator::m_tsubtract {this, "SubtractTime", -999., "subtract drift time from mid gap"} |
|
private |
◆ m_tSurfaceDrift
FloatProperty ITk::StripSurfaceChargesGenerator::m_tSurfaceDrift {this, "SurfaceDriftTime", 10 * CLHEP::ns, "max surface drift time"} |
|
private |
◆ m_useSiCondDB
BooleanProperty ITk::StripSurfaceChargesGenerator::m_useSiCondDB {this, "UseSiCondDB", true, "Usage of SiConditions DB values can be disabled to use setable ones"} |
|
private |
◆ m_vbias
FloatProperty ITk::StripSurfaceChargesGenerator::m_vbias {this, "BiasVoltage", 150., "bias voltage, default 150V"} |
|
private |
◆ m_vdepl
FloatProperty ITk::StripSurfaceChargesGenerator::m_vdepl {this, "DepletionVoltage", 70., "depletion voltage, default 70V"} |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
float m_distHalfInterStrip
Half way distance inter strip.
FloatProperty m_tsubtract
BooleanProperty m_doTrapping
Data object for SCT_ChargeTrappingTool, SCT_RadDamageSummaryTool, SCT_SurfaceChargesGenerator.
char data[hepevt_bytes_allocation_ATLAS]
double thickness() const
Method which returns thickness of the silicon wafer.
HepGeom::Point3D< double > localEndPosition() const
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
virtual const Amg::Vector3D & center() const override final
Center in global coordinates.
const SCT_ModuleSideDesign * getMother() const
virtual bool inActiveArea(const SiLocalPosition &chargePos, bool checkBondGap=true) const =0
check if the position is in active area
float driftTime(float zhit, const InDetDD::SiDetectorElement *element, const EventContext &ctx) const
calculate drift time perpandicular to the surface for a charge at distance zhit from mid gap
int readoutSide() const
ReadoutSide.
BooleanProperty m_doHistoTrap
#define ATH_MSG_VERBOSE(x)
BooleanProperty m_doInducedChargeModel
BooleanProperty m_useSiCondDB
virtual double scaledDistanceToNearestDiode(const SiLocalPosition &chargePos) const =0
give distance to the nearest diode in units of pitch, from 0.0 to 0.5, this method should be fast as ...
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
ToolHandle< ISiliconConditionsTool > m_siConditionsTool
FloatProperty m_tSurfaceDrift
related to the surface drift
float m_tHalfwayDrift
Surface drift time.
float eventTime() const
t0 offset of the bunch xing containing the hit in ns.
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
a link optimized in size for a GenParticle in a McEventCollection
float m_distInterStrip
Inter strip distance normalized to 1.
IntegerProperty m_numberOfCharges
std::unique_ptr< InducedChargeModel > m_InducedChargeModel
const HepMcParticleLink & particleLink() const
bool isValid() const
Validity check.
Amg::Vector2D hitLocalToLocal(double xEta, double xPhi) const
Simulation/Hit local frame to reconstruction local frame.
double energyLoss() const
double charge(const T &p)
BooleanProperty m_isOverlay
static HepMcParticleLink getRedirectedLink(const HepMcParticleLink &particleLink, uint32_t eventIndex, const EventContext &ctx)
Return a HepMcParticleLink pointing at the same particle, but in a different GenEvent.
StatusCode initialize(bool used=true)
ServiceHandle< ITHistSvc > m_thistSvc
FloatProperty m_smallStepLength
std::unique_ptr< Hists > m_h
def time(flags, cells_name, *args, **kw)
float diffusionSigma(float zhit, const InDetDD::SiDetectorElement *element, const EventContext &ctx) const
calculate diffusion sigma from a gaussian dist scattered charge
unsigned short eventId() const
the index of the component event in PileUpEventInfo.
#define ATH_MSG_WARNING(x)
void processSiHit(const InDetDD::SiDetectorElement *element, const SiHit &phit, ISiSurfaceChargesInserter &inserter, float eventTime, unsigned short eventID, CLHEP::HepRandomEngine *rndmEngine, const EventContext &ctx) const
bool m_SurfaceDriftFlag
surface drift ON/OFF
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
ToolHandle< ISiPropertiesTool > m_siPropertiesTool
ToolHandle< ISCT_RadDamageSummaryTool > m_radDamageTool
#define ATLAS_THREAD_SAFE
float hitTime(const AFP_SIDSimHit &hit)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
bool chargeIsTrapped(double spess, const InDetDD::SiDetectorElement *element, double &trap_pos, double &drift_time) const
float surfaceDriftTime(float ysurf) const
Calculate of the surface drift time.
HepGeom::Point3D< double > localStartPosition() const