ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
SensorSim3DTool Class Reference

#include <SensorSim3DTool.h>

Inheritance diagram for SensorSim3DTool:
Collaboration diagram for SensorSim3DTool:

Public Types

enum  RadiationDamageSimulationType { NO_RADIATION_DAMAGE = 0, RAMO_POTENTIAL = 1, TEMPLATE_CORRECTION = 2 }
 

Public Member Functions

 SensorSim3DTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual ~SensorSim3DTool ()
 
virtual StatusCode induceCharge (const TimedHitPtr< SiHit > &phit, SiChargedDiodeCollection &chargedDiodes, const InDetDD::SiDetectorElement &Module, const InDetDD::PixelModuleDesign &p_design, std::vector< std::pair< double, double > > &trfHitRecord, std::vector< double > &initialConditions, CLHEP::HepRandomEngine *rndmEngine, const EventContext &ctx) override
 
StatusCode readProbMap (const std::string &)
 
StatusCode printProbMap (const std::string &) const
 
double getMobility (double electricField, bool isHoleBit)
 
std::vector< double > getDriftTime (bool isHoleBit, size_t number, CLHEP::HepRandomEngine *rndmEngine)
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

ToolHandle< ISiPropertiesToolm_siPropertiesTool
 
SG::ReadCondHandleKey< PixelModuleDatam_moduleDataKey
 
Gaudi::Property< int > m_radiationDamageSimulationType
 
Gaudi::Property< std::string > m_templateCorrectionRootFile
 
Gaudi::Property< std::vector< std::string > > m_lorentzAngleCorrectionHistos
 
Gaudi::Property< std::vector< std::string > > m_chargeCorrectionHistos
 
Gaudi::Property< std::vector< std::string > > m_distanceCorrectionHistos
 
SG::ReadCondHandleKey< PixelRadiationDamageFluenceMapDatam_fluenceDataKey
 
Gaudi::Property< bool > m_digitizeITk3Das3D
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

 SensorSim3DTool ()
 
double getProbMapEntry (const InDetDD::PixelReadoutTechnology &, int, int) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

std::multimap< std::pair< int, int >, double > m_probMapFEI4
 
std::multimap< std::pair< int, int >, double > m_probMapFEI3
 
Gaudi::Property< std::string > m_cc_prob_file_fei3
 
Gaudi::Property< std::string > m_cc_prob_file_fei4
 
Gaudi::Property< int > m_numberOfSteps
 
Gaudi::Property< bool > m_doChunkCorrection
 
Gaudi::Property< double > m_trappingTimeElectrons
 
Gaudi::Property< double > m_trappingTimeHoles
 
Gaudi::Property< double > m_temperature
 
ToolHandle< RadDamageUtilm_radDamageUtil
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 36 of file SensorSim3DTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ RadiationDamageSimulationType

Enumerator
NO_RADIATION_DAMAGE 
RAMO_POTENTIAL 
TEMPLATE_CORRECTION 

Definition at line 41 of file SensorSimTool.h.

41  {
43  RAMO_POTENTIAL = 1,
45  };

Constructor & Destructor Documentation

◆ SensorSim3DTool() [1/2]

SensorSim3DTool::SensorSim3DTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 30 of file SensorSim3DTool.cxx.

30  :
32 }

◆ ~SensorSim3DTool()

SensorSim3DTool::~SensorSim3DTool ( )
virtualdefault

◆ SensorSim3DTool() [2/2]

SensorSim3DTool::SensorSim3DTool ( )
private

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode SensorSim3DTool::finalize ( )
overridevirtual

Reimplemented from SensorSimTool.

Definition at line 54 of file SensorSim3DTool.cxx.

54  {
55  ATH_MSG_DEBUG("SensorSim3DTool::finalize()");
56  return StatusCode::SUCCESS;
57 }

◆ getDriftTime()

std::vector< double > SensorSim3DTool::getDriftTime ( bool  isHoleBit,
size_t  number,
CLHEP::HepRandomEngine *  rndmEngine 
)

Definition at line 708 of file SensorSim3DTool.cxx.

710 {
711  std::vector<double> rand (n, 0.);
712  std::vector<double> result (n, 0.);
713  CLHEP::RandFlat::shootArray(rndmEngine, n, rand.data(), 0., 1.);
714  for(size_t i = 0; i < n; i++) {
715  if (isHoleBit) {
716  result[i]= (-1.) * m_trappingTimeHoles * logf(rand[i]); // ns
717  } else {
718  result[i] = (-1.) * m_trappingTimeElectrons * logf(rand[i]); // ns
719  }
720  }
721  return result;
722 }

◆ getMobility()

double SensorSim3DTool::getMobility ( double  electricField,
bool  isHoleBit 
)

Definition at line 682 of file SensorSim3DTool.cxx.

682  {
683  //Not exactly the same as the getMobility function in RadDamageUtil, since we don't have a Hall effect for 3D sensors
684  // (B and E are parallel)
685  //Maybe good to do something about this in the future
686 
687  double vsat = 0;
688  double ecrit = 0;
689  double beta = 0;
690 
691  //These parameterizations come from C. Jacoboni et al., Solid-State Electronics 20 (1977) 77-89. (see also
692  // https://cds.cern.ch/record/684187/files/indet-2001-004.pdf).
693 
694  if (isHoleBit) {
695  vsat = 1.62 * std::pow(m_temperature, -0.52); // mm/ns
696  ecrit = 1.24E-7 * std::pow(m_temperature, 1.68); // MV/mm
697  beta = 0.46 * std::pow(m_temperature, 0.17);
698  } else {
699  vsat = 15.3 * std::pow(m_temperature, -0.87); // mm/ns
700  ecrit = 1.01E-7 * std::pow(m_temperature, 1.55); // MV/mm
701  beta = 2.57E-2 * std::pow(m_temperature, 0.66);
702  }
703 
704  double mobility = (vsat / ecrit) / std::pow(1 + std::pow((electricField / ecrit), beta), (1 / beta));
705  return mobility; // mm^2/(MV*ns)
706 }

◆ getProbMapEntry()

double SensorSim3DTool::getProbMapEntry ( const InDetDD::PixelReadoutTechnology readout,
int  binx,
int  biny 
) const
private

Definition at line 666 of file SensorSim3DTool.cxx.

666  {
667  std::pair<int, int> doublekey(binx, biny);
668  double echarge;
669  if (readout == InDetDD::PixelReadoutTechnology::FEI4) {
670  std::multimap<std::pair<int, int>, double>::const_iterator iter = m_probMapFEI4.find(doublekey);
671  echarge = iter->second;
672  } else if (readout == InDetDD::PixelReadoutTechnology::FEI3) {
673  std::multimap<std::pair<int, int>, double>::const_iterator iter = m_probMapFEI3.find(doublekey);
674  echarge = iter->second;
675  } else {
676  ATH_MSG_ERROR("No Map Entry available for the requested readout");
677  echarge = -1.;
678  }
679  return echarge;
680 }

◆ induceCharge()

StatusCode SensorSim3DTool::induceCharge ( const TimedHitPtr< SiHit > &  phit,
SiChargedDiodeCollection chargedDiodes,
const InDetDD::SiDetectorElement Module,
const InDetDD::PixelModuleDesign p_design,
std::vector< std::pair< double, double > > &  trfHitRecord,
std::vector< double > &  initialConditions,
CLHEP::HepRandomEngine *  rndmEngine,
const EventContext &  ctx 
)
overridevirtual

Implements SensorSimTool.

Definition at line 62 of file SensorSim3DTool.cxx.

69  {
70 
72  if (m_digitizeITk3Das3D) {
73  if (!p_design.is3D()) {
74  return StatusCode::SUCCESS;
75  }
76 
77  // for now skip pixel luminosity rings
78  if (Module.isPLR()) {
79  return StatusCode::SUCCESS;
80  }
81  } else {
82  return StatusCode::SUCCESS;
83  }
84  } else {
85  if (!Module.isBarrel()) {
86  return StatusCode::SUCCESS;
87  }
89  return StatusCode::SUCCESS;
90  }
91  if (p_design.numberOfCircuits() > 1) {
92  return StatusCode::SUCCESS;
93  }
94  }
95 
96  ATH_MSG_DEBUG("Applying SensorSim3D charge processor");
97  if (initialConditions.size() != 8) {
98  ATH_MSG_ERROR("Starting coordinates were not filled correctly in EnergyDepositionSvc.");
99  return StatusCode::FAILURE;
100  }
101 
102  double eta_0 = initialConditions[0];
103  double phi_0 = initialConditions[1];
104  double depth_0 = initialConditions[2];
105  double dEta = initialConditions[3];
106  double dPhi = initialConditions[4];
107  double dDepth = initialConditions[5];
108  double ncharges = initialConditions[6];
109  double iTotalLength = initialConditions[7];
110  ncharges = 50;
111 
112  ATH_MSG_VERBOSE("Applying 3D sensor simulation.");
113  double sensorThickness = Module.design().thickness();
114  const InDet::SiliconProperties& siProperties = m_siPropertiesTool->getSiProperties(Module.identifyHash(), ctx);
115  double eleholePairEnergy = siProperties.electronHolePairsPerEnergy();
116 
117 
118  // Charge Collection Probability Map bin size
119  const double x_bin_size = 0.001;
120  const double y_bin_size = 0.001;
121 
122  // determine which readout is used
123  // FEI4 : 50 X 250 microns
124  double pixel_size_x = Module.width() / p_design.rows();
125  double pixel_size_y = Module.length() / p_design.columns();
126  double module_size_x = Module.width();
127  double module_size_y = Module.length();
128 
129  const HepMcParticleLink particleLink = HepMcParticleLink::getRedirectedLink(phit->particleLink(), phit.eventId(), ctx); // This link should now correctly resolve to the TruthEvent McEventCollection in the main StoreGateSvc.
130  const double pHitTime = hitTime(phit);
131 
132  if (m_radiationDamageSimulationType != RadiationDamageSimulationType::NO_RADIATION_DAMAGE) {
133  const bool doChunkCorrection = m_doChunkCorrection.value();
134  //**************************************//
135  //*** Now diffuse charges to surface *** //
136  //**************************************//
137  //Calculate trapping times based on fluence (already includes check for fluence=0)
139  const PixelRadiationDamageFluenceMapData *fluenceData = *fluenceDataHandle;
140 
141  std::pair < double, double > trappingTimes = m_radDamageUtil->getTrappingTimes(fluenceData->getFluenceLayer3D(0)); //0 = IBL
142  m_trappingTimeElectrons = trappingTimes.first;
143  m_trappingTimeHoles = trappingTimes.second;
144 
145  const PixelHistoConverter& ramoPotentialMap = fluenceData->getRamoPotentialMap3D(0);
146  const PixelHistoConverter& eFieldMap = fluenceData->getEFieldMap3D(0);
147  const PixelHistoConverter& xPositionMap_e = fluenceData->getXPositionMap3D_e(0);
148  const PixelHistoConverter& xPositionMap_h = fluenceData->getXPositionMap3D_h(0);
149  const PixelHistoConverter& yPositionMap_e = fluenceData->getYPositionMap3D_e(0);
150  const PixelHistoConverter& yPositionMap_h = fluenceData->getYPositionMap3D_h(0);
151  const PixelHistoConverter& timeMap_e = fluenceData->getTimeMap3D_e(0);
152  const PixelHistoConverter& timeMap_h = fluenceData->getTimeMap3D_h(0);
153  const PixelHistoConverter& avgChargeMap_e = fluenceData->getAvgChargeMap3D_e();
154  const PixelHistoConverter& avgChargeMap_h = fluenceData->getAvgChargeMap3D_h();
155 
156  //Parameters which will be smeared by a random value for each charge propagated,
157  //recomputed for every trfHitRecord but initialized only once
158  std::vector<double> DtElectron (ncharges, 0.);
159  std::vector<double> DtHole (ncharges, 0.);
160  std::vector<double> rdifElectron (ncharges, 0.);
161  std::vector<double> rdifHole (ncharges, 0.);
162 
163  for (auto & iHitRecord : trfHitRecord) {
164  double eta_i = eta_0;
165  double phi_i = phi_0;
166  double depth_i = depth_0;
167 
168  if (iTotalLength) {
169  eta_i += 1.0 * iHitRecord.first / iTotalLength * dEta;
170  phi_i += 1.0 * iHitRecord.first / iTotalLength * dPhi;
171  depth_i += 1.0 * iHitRecord.first / iTotalLength * dDepth;
172  }
173 
174  const double energy_per_step = 1.0 * iHitRecord.second / 1.E+6 / ncharges; //in MeV
175  ATH_MSG_DEBUG("es_current: " << energy_per_step << " split between " << ncharges << " charges");
176 
177  double dist_electrode = 0.5 * sensorThickness - Module.design().readoutSide() * depth_i;
178  if (dist_electrode < 0) dist_electrode = 0;
179 
180  CLHEP::Hep3Vector chargepos;
181  chargepos.setX(phi_i);
182  chargepos.setY(eta_i);
183  chargepos.setZ(dist_electrode);
184 
185  bool coord = Module.isModuleFrame();
186 
188  "ismoduleframe " << coord << " -- startPosition (x,y,z) = " << chargepos.x() << ", " << chargepos.y() << ", " <<
189  chargepos.z());
190 
191  // -- change origin of coordinates to the left bottom of module
192  double x_new = chargepos.x() + 0.5*module_size_x;
193  double y_new = chargepos.y() + 0.5*module_size_y;
194 
195  // -- change from module frame to pixel frame
196  int nPixX = int(x_new / pixel_size_x);
197  int nPixY = int(y_new / pixel_size_y);
198  ATH_MSG_DEBUG(" -- nPixX = " << nPixX << " nPixY = " << nPixY);
199 
200  //position relative to the bottom left corner of the pixel
201  double x_pix = x_new - pixel_size_x * (nPixX);
202  double y_pix = y_new - pixel_size_y * (nPixY);
203  // -- change origin of coordinates to the center of the pixel
204  double x_pix_center = x_pix - pixel_size_x / 2;
205  double y_pix_center = y_pix - pixel_size_y / 2;
206  ATH_MSG_DEBUG(" -- current hit position w.r.t. pixel corner = " << x_pix << " " << y_pix);
207  ATH_MSG_DEBUG(" -- current hit position w.r.t. pixel center = " << x_pix_center << " " << y_pix_center);
208 
209  //only process hits which are not on the electrodes (E-field zero)
210  //all the maps have 250 as the x value, so need to invert x and y whenever reading maps
211  double efield = eFieldMap.getContent(eFieldMap.getBinX(1e3*y_pix),eFieldMap.getBinY(1e3*x_pix))*1.0E-7; //return efield in MV/mm (for mobility calculation)
212 
213  if (efield == 0) {
214  ATH_MSG_DEBUG("Skipping since efield = 0 for x_pix = " << x_pix << " y_pix = " << y_pix);
215  continue;
216  }
217 
218  const double mobilityElectron = getMobility(efield, false);
219  const double mobilityHole = getMobility(efield, true);
220  auto driftTimeElectron = getDriftTime(false, ncharges, rndmEngine);
221  auto driftTimeHole = getDriftTime(true, ncharges, rndmEngine);
222  //Need to determine how many elementary charges this charge chunk represents.
223  double chunk_size = energy_per_step * eleholePairEnergy; //number of electrons/holes
224  //set minimum limit to prevent dividing into smaller subcharges than one fundamental charge
225  if (chunk_size < 1) chunk_size = 1;
226  const double kappa = 1. / std::sqrt(chunk_size);
227 
228  const double timeToElectrodeElectron = timeMap_e.getContent(timeMap_e.getBinX(1e3*y_pix), timeMap_e.getBinY(1e3*x_pix));
229  const double timeToElectrodeHole = timeMap_h.getContent(timeMap_h.getBinX(1e3*y_pix), timeMap_h.getBinY(1e3*x_pix));
230 
231  /* Diffusion via the Einstein relation
232  D = mu * kB * T / q
233  D = (mu / mm^2/MV*ns) * (T/273 K) * 0.024 microns^2 / ns */
234  const auto prefactor_e = mobilityElectron*0.024*m_temperature / 273.;
235  const auto prefactor_h = mobilityHole*0.024*m_temperature / 273.;
236  //Apply diffusion. rdif is the max. diffusion
237  for(size_t i = 0; i < ncharges; ++i) {
238  DtElectron[i] = prefactor_e * std::min(driftTimeElectron[i], timeToElectrodeElectron);
239  DtHole[i] = prefactor_h * std::min(driftTimeHole[i], timeToElectrodeHole);
240  rdifElectron[i] = 1e-3*std::sqrt(DtElectron[i]); //in mm
241  rdifHole[i] = 1e-3*std::sqrt(DtHole[i]); //in mm
242  }
243 
244  const float average_chargeElectron = avgChargeMap_e.getContent(avgChargeMap_e.getBinY(1e3*y_pix), avgChargeMap_e.getBinX(1e3*x_pix));
245  const float average_chargeHole = avgChargeMap_h.getContent(avgChargeMap_h.getBinY(1e3*y_pix), avgChargeMap_h.getBinX(1e3*x_pix));
246 
247  //We're sticking to the "old" convention here where there was a loop over -1/0/1 for both directions
248  //(x/y) to the neighbouring pixels. We call them (p)lus, (z)ero, (m)inus in either i- or j- direction
249  //hence giving us plus-in-i or pi or zero-in-j or zj etc.
250  //i is in direction of x, whereas j is into the y direction, this code is ugly, but given that we don't have very few branching conditions
251  //it's pretty fast
252 
253  //This was: ramoPotentialMap.getBinY(1000*(x_pix + pixel_size_x * 3 - i * pixel_size_x)
254  const std::size_t ramo_init_bin_y_pi = ramoPotentialMap.getBinY(1000*(x_pix + pixel_size_x * 2));
255  const std::size_t ramo_init_bin_y_zi = ramoPotentialMap.getBinY(1000*(x_pix + pixel_size_x * 3));
256  const std::size_t ramo_init_bin_y_mi = ramoPotentialMap.getBinY(1000*(x_pix + pixel_size_x * 4));
257 
258  //This was: ramoPotentialMap.getBinX(1000*(y_pix + 0.5*pixel_size_y - j * pixel_size_y)
259  const std::size_t ramo_init_bin_x_pj = ramoPotentialMap.getBinX(1000*(y_pix - 0.5*pixel_size_y));
260  const std::size_t ramo_init_bin_x_zj = ramoPotentialMap.getBinX(1000*(y_pix + 0.5*pixel_size_y));
261  const std::size_t ramo_init_bin_x_mj = ramoPotentialMap.getBinX(1000*(y_pix + 1.5*pixel_size_y));
262 
263  //For some reason the x- and y-indices for some values are swapped, this is extremely confusing
264  float ramoInit_pipj = ramoPotentialMap.getContent(ramo_init_bin_x_pj, ramo_init_bin_y_pi);
265  float ramoInit_pizj = ramoPotentialMap.getContent(ramo_init_bin_x_zj, ramo_init_bin_y_pi);
266  float ramoInit_pimj = ramoPotentialMap.getContent(ramo_init_bin_x_mj, ramo_init_bin_y_pi);
267  float ramoInit_zipj = ramoPotentialMap.getContent(ramo_init_bin_x_pj, ramo_init_bin_y_zi);
268  float ramoInit_zizj = ramoPotentialMap.getContent(ramo_init_bin_x_zj, ramo_init_bin_y_zi);
269  float ramoInit_zimj = ramoPotentialMap.getContent(ramo_init_bin_x_mj, ramo_init_bin_y_zi);
270  float ramoInit_mipj = ramoPotentialMap.getContent(ramo_init_bin_x_pj, ramo_init_bin_y_mi);
271  float ramoInit_mizj = ramoPotentialMap.getContent(ramo_init_bin_x_zj, ramo_init_bin_y_mi);
272  float ramoInit_mimj = ramoPotentialMap.getContent(ramo_init_bin_x_mj, ramo_init_bin_y_mi);
273 
274  const auto hit_time = hitTime(phit);
275 
276  //Loop over charge-carrier pairs, we're looping over electrons and holes at the same time
277  for (int j = 0; j < ncharges; j++) {
278  // In case the charge moves into a neighboring pixel
279  int extraNPixXElectron = nPixX;
280  int extraNPixYElectron = nPixY;
281  int extraNPixXHole = nPixX;
282  int extraNPixYHole = nPixY;
283 
284  //Apply drift due to diffusion
285  std::array<double, 4> randomNumbers{};
286  CLHEP::RandGaussZiggurat::shootArray(rndmEngine, 4, randomNumbers.data());
287 
288  double xposDiffElectron = x_pix + rdifElectron[j] * randomNumbers[0];
289  double yposDiffElectron = y_pix + rdifElectron[j] * randomNumbers[1];
290  double xposDiffHole = x_pix + rdifHole[j] * randomNumbers[2];
291  double yposDiffHole = y_pix + rdifHole[j] * randomNumbers[3];
292 
293  // Account for drifting into another pixel
294  while (xposDiffElectron > pixel_size_x) {
295  extraNPixXElectron++; // increments or decrements pixel count in x
296  xposDiffElectron -= pixel_size_x; // moves xpos coordinate 1 pixel over in x
297  }
298  while (xposDiffElectron < 0) {
299  extraNPixXElectron--;
300  xposDiffElectron += pixel_size_x;
301  }
302  while (yposDiffElectron > pixel_size_y) {
303  extraNPixYElectron++; // increments or decrements pixel count in y
304  yposDiffElectron -= pixel_size_y; // moves xpos coordinate 1 pixel over in y
305  }
306  while (yposDiffElectron < 0) {
307  extraNPixYElectron--;
308  yposDiffElectron += pixel_size_y;
309  }
310 
311  //And drifting for for holes
312  while (xposDiffHole > pixel_size_x) {
313  extraNPixXHole++;
314  xposDiffHole -= pixel_size_x;
315  }
316  while (xposDiffHole < 0) {
317  extraNPixXHole--;
318  xposDiffHole += pixel_size_x;
319  }
320  while (yposDiffHole > pixel_size_y) {
321  extraNPixYHole++;
322  yposDiffHole -= pixel_size_y;
323  }
324  while (yposDiffHole < 0) {
325  extraNPixYHole--;
326  yposDiffHole += pixel_size_y;
327  }
328  auto xposFinalElectron = yPositionMap_e.getContent(
329  yPositionMap_e.getBinX(1e3*yposDiffElectron),
330  yPositionMap_e.getBinY(1e3*xposDiffElectron),
331  yPositionMap_e.getBinZ(std::min(driftTimeElectron[j],timeToElectrodeElectron))
332  ) * 1e-3; //[mm]
333  auto yposFinalElectron = xPositionMap_e.getContent(
334  xPositionMap_e.getBinX(1e3*yposDiffElectron),
335  xPositionMap_e.getBinY(1e3*xposDiffElectron),
336  xPositionMap_e.getBinZ(std::min(driftTimeElectron[j],timeToElectrodeElectron))
337  ) * 1e-3; //[mm]
338 
339  auto xposFinalHole = yPositionMap_h.getContent(
340  yPositionMap_h.getBinX(1e3*yposDiffHole),
341  yPositionMap_h.getBinY(1e3*xposDiffHole),
342  yPositionMap_h.getBinZ(std::min(driftTimeHole[j],timeToElectrodeHole))
343  ) * 1e-3; //[mm]
344  auto yposFinalHole = xPositionMap_h.getContent(
345  xPositionMap_h.getBinX(1e3*yposDiffHole),
346  xPositionMap_h.getBinY(1e3*xposDiffHole),
347  xPositionMap_h.getBinZ(std::min(driftTimeHole[j],timeToElectrodeHole))
348  ) * 1e-3; //[mm]
349 
350  // -- Calculate signal in current pixel and in the neighboring ones
351  //This was: ramoPotentialMap.getBinY(1000*(xposFinal + pixel_size_x * 3 - i * pixel_size_x)
352  const std::size_t ramo_final_bin_y_pi_electrons = ramoPotentialMap.getBinY(1000*(xposFinalElectron + pixel_size_x * 2));
353  const std::size_t ramo_final_bin_y_pi_holes = ramoPotentialMap.getBinY(1000*(xposFinalHole + pixel_size_x * 2));
354  const std::size_t ramo_final_bin_y_zi_electrons = ramoPotentialMap.getBinY(1000*(xposFinalElectron + pixel_size_x * 3));
355  const std::size_t ramo_final_bin_y_zi_holes = ramoPotentialMap.getBinY(1000*(xposFinalHole + pixel_size_x * 3));
356  const std::size_t ramo_final_bin_y_mi_electrons = ramoPotentialMap.getBinY(1000*(xposFinalElectron + pixel_size_x * 4));
357  const std::size_t ramo_final_bin_y_mi_holes = ramoPotentialMap.getBinY(1000*(xposFinalHole + pixel_size_x * 4));
358  //This was: ramoPotentialMap.getBinX(1000*(yposFinal + 0.5*pixel_size_y - j * pixel_size_y)
359  const std::size_t ramo_final_bin_x_pj_electrons = ramoPotentialMap.getBinX(1000*(yposFinalElectron - 0.5*pixel_size_y));
360  const std::size_t ramo_final_bin_x_pj_holes = ramoPotentialMap.getBinX(1000*(yposFinalHole - 0.5*pixel_size_y));
361  const std::size_t ramo_final_bin_x_zj_electrons = ramoPotentialMap.getBinX(1000*(yposFinalElectron + 0.5*pixel_size_y));
362  const std::size_t ramo_final_bin_x_zj_holes = ramoPotentialMap.getBinX(1000*(yposFinalHole + 0.5*pixel_size_y));
363  const std::size_t ramo_final_bin_x_mj_electrons = ramoPotentialMap.getBinX(1000*(yposFinalElectron + 1.5*pixel_size_y));
364  const std::size_t ramo_final_bin_x_mj_holes = ramoPotentialMap.getBinX(1000*(yposFinalHole + 1.5*pixel_size_y));
365 
366  float ramoFinal_pipj_electrons = ramoPotentialMap.getContent(ramo_final_bin_x_pj_electrons, ramo_final_bin_y_pi_electrons);
367  float ramoFinal_pizj_electrons = ramoPotentialMap.getContent(ramo_final_bin_x_zj_electrons, ramo_final_bin_y_pi_electrons);
368  float ramoFinal_pimj_electrons = ramoPotentialMap.getContent(ramo_final_bin_x_mj_electrons, ramo_final_bin_y_pi_electrons);
369  float ramoFinal_zipj_electrons = ramoPotentialMap.getContent(ramo_final_bin_x_pj_electrons, ramo_final_bin_y_zi_electrons);
370  float ramoFinal_zizj_electrons = ramoPotentialMap.getContent(ramo_final_bin_x_zj_electrons, ramo_final_bin_y_zi_electrons);
371  float ramoFinal_zimj_electrons = ramoPotentialMap.getContent(ramo_final_bin_x_mj_electrons, ramo_final_bin_y_zi_electrons);
372  float ramoFinal_mipj_electrons = ramoPotentialMap.getContent(ramo_final_bin_x_pj_electrons, ramo_final_bin_y_mi_electrons);
373  float ramoFinal_mizj_electrons = ramoPotentialMap.getContent(ramo_final_bin_x_zj_electrons, ramo_final_bin_y_mi_electrons);
374  float ramoFinal_mimj_electrons = ramoPotentialMap.getContent(ramo_final_bin_x_mj_electrons, ramo_final_bin_y_mi_electrons);
375 
376  float ramoFinal_pipj_holes = ramoPotentialMap.getContent(ramo_final_bin_x_pj_holes, ramo_final_bin_y_pi_holes);
377  float ramoFinal_pizj_holes = ramoPotentialMap.getContent(ramo_final_bin_x_zj_holes, ramo_final_bin_y_pi_holes);
378  float ramoFinal_pimj_holes = ramoPotentialMap.getContent(ramo_final_bin_x_mj_holes, ramo_final_bin_y_pi_holes);
379  float ramoFinal_zipj_holes = ramoPotentialMap.getContent(ramo_final_bin_x_pj_holes, ramo_final_bin_y_zi_holes);
380  float ramoFinal_zizj_holes = ramoPotentialMap.getContent(ramo_final_bin_x_zj_holes, ramo_final_bin_y_zi_holes);
381  float ramoFinal_zimj_holes = ramoPotentialMap.getContent(ramo_final_bin_x_mj_holes, ramo_final_bin_y_zi_holes);
382  float ramoFinal_mipj_holes = ramoPotentialMap.getContent(ramo_final_bin_x_pj_holes, ramo_final_bin_y_mi_holes);
383  float ramoFinal_mizj_holes = ramoPotentialMap.getContent(ramo_final_bin_x_zj_holes, ramo_final_bin_y_mi_holes);
384  float ramoFinal_mimj_holes = ramoPotentialMap.getContent(ramo_final_bin_x_mj_holes, ramo_final_bin_y_mi_holes);
385 
386  // Record deposit
387  double eHitRamo_pipj_electrons = energy_per_step * (ramoFinal_pipj_electrons - ramoInit_pipj);
388  double eHitRamo_pipj_holes = -1. * energy_per_step * (ramoFinal_pipj_holes - ramoInit_pipj);
389  double eHitRamo_pizj_electrons = energy_per_step * (ramoFinal_pizj_electrons - ramoInit_pizj);
390  double eHitRamo_pizj_holes = -1. * energy_per_step * (ramoFinal_pizj_holes - ramoInit_pizj);
391  double eHitRamo_pimj_electrons = energy_per_step * (ramoFinal_pimj_electrons - ramoInit_pimj);
392  double eHitRamo_pimj_holes = -1. * energy_per_step * (ramoFinal_pimj_holes - ramoInit_pimj);
393  double eHitRamo_zipj_electrons = energy_per_step * (ramoFinal_zipj_electrons - ramoInit_zipj);
394  double eHitRamo_zipj_holes = -1. * energy_per_step * (ramoFinal_zipj_holes - ramoInit_zipj);
395  double eHitRamo_zizj_electrons = energy_per_step * (ramoFinal_zizj_electrons - ramoInit_zizj);
396  double eHitRamo_zizj_holes = -1. * energy_per_step * (ramoFinal_zizj_holes - ramoInit_zizj);
397  double eHitRamo_zimj_electrons = energy_per_step * (ramoFinal_zimj_electrons - ramoInit_zimj);
398  double eHitRamo_zimj_holes = -1. * energy_per_step * (ramoFinal_zimj_holes - ramoInit_zimj);
399  double eHitRamo_mipj_electrons = energy_per_step * (ramoFinal_mipj_electrons - ramoInit_mipj);
400  double eHitRamo_mipj_holes = -1. * energy_per_step * (ramoFinal_mipj_holes - ramoInit_mipj);
401  double eHitRamo_mizj_electrons = energy_per_step * (ramoFinal_mizj_electrons - ramoInit_mizj);
402  double eHitRamo_mizj_holes = -1. * energy_per_step * (ramoFinal_mizj_holes - ramoInit_mizj);
403  double eHitRamo_mimj_electrons = energy_per_step * (ramoFinal_mimj_electrons - ramoInit_mimj);
404  double eHitRamo_mimj_holes = -1. * energy_per_step * (ramoFinal_mimj_holes - ramoInit_mimj);
405 
406  if(doChunkCorrection) {
407  eHitRamo_pipj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_pipj_electrons - energy_per_step * average_chargeElectron);
408  eHitRamo_pipj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_pipj_holes - energy_per_step * average_chargeHole);
409  eHitRamo_pizj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_pizj_electrons - energy_per_step * average_chargeElectron);
410  eHitRamo_pizj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_pizj_holes - energy_per_step * average_chargeHole);
411  eHitRamo_pimj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_pimj_electrons - energy_per_step * average_chargeElectron);
412  eHitRamo_pimj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_pimj_holes - energy_per_step * average_chargeHole);
413  eHitRamo_zipj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_zipj_electrons - energy_per_step * average_chargeElectron);
414  eHitRamo_zipj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_zipj_holes - energy_per_step * average_chargeHole);
415  eHitRamo_zizj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_zizj_electrons - energy_per_step * average_chargeElectron);
416  eHitRamo_zizj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_zizj_holes - energy_per_step * average_chargeHole);
417  eHitRamo_zimj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_zimj_electrons - energy_per_step * average_chargeElectron);
418  eHitRamo_pimj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_pimj_holes - energy_per_step * average_chargeHole);
419  eHitRamo_mipj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_mipj_electrons - energy_per_step * average_chargeElectron);
420  eHitRamo_mipj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_mipj_holes - energy_per_step * average_chargeHole);
421  eHitRamo_mizj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_mizj_electrons - energy_per_step * average_chargeElectron);
422  eHitRamo_mizj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_mizj_holes - energy_per_step * average_chargeHole);
423  eHitRamo_mimj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_mimj_electrons - energy_per_step * average_chargeElectron);
424  eHitRamo_mimj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_mimj_holes - energy_per_step * average_chargeHole);
425  }
426 
427  // -- pixel coordinates --> module coordinates
428  //This was: double x_mod = x_pix + pixel_size_x * extraNPixX - 0.5*module_size_x + i*pixel_size_x;
429  //This was: double y_mod = y_pix + pixel_size_y * extraNPixY - 0.5*module_size_y + j*pixel_size_y;
430  double x_mod_pi_electrons = x_pix + pixel_size_x * extraNPixXElectron - 0.5*module_size_x + pixel_size_x;
431  double y_mod_pj_electrons = y_pix + pixel_size_y * extraNPixYElectron - 0.5*module_size_y + pixel_size_y;
432  double x_mod_pi_holes = x_pix + pixel_size_x * extraNPixXHole - 0.5*module_size_x + pixel_size_x;
433  double y_mod_pj_holes = y_pix + pixel_size_y * extraNPixYHole - 0.5*module_size_y + pixel_size_y;
434  double x_mod_zi_electrons = x_pix + pixel_size_x * extraNPixXElectron - 0.5*module_size_x;
435  double y_mod_zj_electrons = y_pix + pixel_size_y * extraNPixYElectron - 0.5*module_size_y;
436  double x_mod_zi_holes = x_pix + pixel_size_x * extraNPixXHole - 0.5*module_size_x;
437  double y_mod_zj_holes = y_pix + pixel_size_y * extraNPixYHole - 0.5*module_size_y;
438  double x_mod_mi_electrons = x_pix + pixel_size_x * extraNPixXElectron - 0.5*module_size_x - pixel_size_x;
439  double y_mod_mj_electrons = y_pix + pixel_size_y * extraNPixYElectron - 0.5*module_size_y - pixel_size_y;
440  double x_mod_mi_holes = x_pix + pixel_size_x * extraNPixXHole - 0.5*module_size_x - pixel_size_x;
441  double y_mod_mj_holes = y_pix + pixel_size_y * extraNPixYHole - 0.5*module_size_y - pixel_size_y;
442 
443  //This was: const SiLocalPosition& chargePos = Module.hitLocalToLocal(y_mod, x_mod) (for whatever reason half the maps x/y are inverted...)
444  const SiLocalPosition& chargePos_pipj_electrons = Module.hitLocalToLocal(y_mod_pj_electrons, x_mod_pi_electrons);
445  const SiLocalPosition& chargePos_pizj_electrons = Module.hitLocalToLocal(y_mod_zj_electrons, x_mod_pi_electrons);
446  const SiLocalPosition& chargePos_pimj_electrons = Module.hitLocalToLocal(y_mod_mj_electrons, x_mod_pi_electrons);
447  const SiLocalPosition& chargePos_zipj_electrons = Module.hitLocalToLocal(y_mod_pj_electrons, x_mod_zi_electrons);
448  const SiLocalPosition& chargePos_zizj_electrons = Module.hitLocalToLocal(y_mod_zj_electrons, x_mod_zi_electrons);
449  const SiLocalPosition& chargePos_zimj_electrons = Module.hitLocalToLocal(y_mod_mj_electrons, x_mod_zi_electrons);
450  const SiLocalPosition& chargePos_mipj_electrons = Module.hitLocalToLocal(y_mod_pj_electrons, x_mod_mi_electrons);
451  const SiLocalPosition& chargePos_mizj_electrons = Module.hitLocalToLocal(y_mod_zj_electrons, x_mod_mi_electrons);
452  const SiLocalPosition& chargePos_mimj_electrons = Module.hitLocalToLocal(y_mod_mj_electrons, x_mod_mi_electrons);
453 
454  const SiLocalPosition& chargePos_pipj_holes = Module.hitLocalToLocal(y_mod_pj_holes, x_mod_pi_holes);
455  const SiLocalPosition& chargePos_pizj_holes = Module.hitLocalToLocal(y_mod_zj_holes, x_mod_pi_holes);
456  const SiLocalPosition& chargePos_pimj_holes = Module.hitLocalToLocal(y_mod_mj_holes, x_mod_pi_holes);
457  const SiLocalPosition& chargePos_zipj_holes = Module.hitLocalToLocal(y_mod_pj_holes, x_mod_zi_holes);
458  const SiLocalPosition& chargePos_zizj_holes = Module.hitLocalToLocal(y_mod_zj_holes, x_mod_zi_holes);
459  const SiLocalPosition& chargePos_zimj_holes = Module.hitLocalToLocal(y_mod_mj_holes, x_mod_zi_holes);
460  const SiLocalPosition& chargePos_mipj_holes = Module.hitLocalToLocal(y_mod_pj_holes, x_mod_mi_holes);
461  const SiLocalPosition& chargePos_mizj_holes = Module.hitLocalToLocal(y_mod_zj_holes, x_mod_mi_holes);
462  const SiLocalPosition& chargePos_mimj_holes = Module.hitLocalToLocal(y_mod_mj_holes, x_mod_mi_holes);
463 
464  //This was: const SiSurfaceCharge scharge(chargePos, SiCharge(eHitRamo*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
465  const SiSurfaceCharge scharge_pipj_electrons(chargePos_pipj_electrons, SiCharge(eHitRamo_pipj_electrons*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
466  const SiSurfaceCharge scharge_pizj_electrons(chargePos_pizj_electrons, SiCharge(eHitRamo_pizj_electrons*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
467  const SiSurfaceCharge scharge_pimj_electrons(chargePos_pimj_electrons, SiCharge(eHitRamo_pimj_electrons*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
468  const SiSurfaceCharge scharge_zipj_electrons(chargePos_zipj_electrons, SiCharge(eHitRamo_zipj_electrons*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
469  const SiSurfaceCharge scharge_zizj_electrons(chargePos_zizj_electrons, SiCharge(eHitRamo_zizj_electrons*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
470  const SiSurfaceCharge scharge_zimj_electrons(chargePos_zimj_electrons, SiCharge(eHitRamo_zimj_electrons*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
471  const SiSurfaceCharge scharge_mipj_electrons(chargePos_mipj_electrons, SiCharge(eHitRamo_mipj_electrons*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
472  const SiSurfaceCharge scharge_mizj_electrons(chargePos_mizj_electrons, SiCharge(eHitRamo_mizj_electrons*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
473  const SiSurfaceCharge scharge_mimj_electrons(chargePos_mimj_electrons, SiCharge(eHitRamo_mimj_electrons*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
474 
475  const SiSurfaceCharge scharge_pipj_holes(chargePos_pipj_holes, SiCharge(eHitRamo_pipj_holes*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
476  const SiSurfaceCharge scharge_pizj_holes(chargePos_pizj_holes, SiCharge(eHitRamo_pizj_holes*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
477  const SiSurfaceCharge scharge_pimj_holes(chargePos_pimj_holes, SiCharge(eHitRamo_pimj_holes*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
478  const SiSurfaceCharge scharge_zipj_holes(chargePos_zipj_holes, SiCharge(eHitRamo_zipj_holes*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
479  const SiSurfaceCharge scharge_zizj_holes(chargePos_zizj_holes, SiCharge(eHitRamo_zizj_holes*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
480  const SiSurfaceCharge scharge_zimj_holes(chargePos_zimj_holes, SiCharge(eHitRamo_zimj_holes*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
481  const SiSurfaceCharge scharge_mipj_holes(chargePos_mipj_holes, SiCharge(eHitRamo_mipj_holes*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
482  const SiSurfaceCharge scharge_mizj_holes(chargePos_mizj_holes, SiCharge(eHitRamo_mizj_holes*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
483  const SiSurfaceCharge scharge_mimj_holes(chargePos_mimj_holes, SiCharge(eHitRamo_mimj_holes*eleholePairEnergy, hit_time, SiCharge::track, particleLink));
484 
485  auto addCharge = [&Module, &chargedDiodes](SiSurfaceCharge const & scharge) {
486  const SiCellId& diode = Module.cellIdOfPosition(scharge.position());
487  if (diode.isValid()) {
488  const SiCharge& charge = scharge.charge();
489  chargedDiodes.add(diode, charge);
490  }
491  };
492 
493  addCharge(scharge_pipj_electrons);
494  addCharge(scharge_pizj_electrons);
495  addCharge(scharge_pimj_electrons);
496  addCharge(scharge_zipj_electrons);
497  addCharge(scharge_zizj_electrons);
498  addCharge(scharge_zimj_electrons);
499  addCharge(scharge_mipj_electrons);
500  addCharge(scharge_mizj_electrons);
501  addCharge(scharge_mimj_electrons);
502  addCharge(scharge_pipj_holes);
503  addCharge(scharge_pizj_holes);
504  addCharge(scharge_pimj_holes);
505  addCharge(scharge_zipj_holes);
506  addCharge(scharge_zizj_holes);
507  addCharge(scharge_zimj_holes);
508  addCharge(scharge_mipj_holes);
509  addCharge(scharge_mizj_holes);
510  addCharge(scharge_mimj_holes);
511  }
512  }
513  } else {
514  //**************************************//
515  //*** Now diffuse charges to surface *** //
516  //**************************************//
517  for (auto iHitRecord : trfHitRecord) {
518  double eta_i = eta_0;
519  double phi_i = phi_0;
520  double depth_i = depth_0;
521 
522  if (iTotalLength) {
523  eta_i += 1.0 * iHitRecord.first / iTotalLength * dEta;
524  phi_i += 1.0 * iHitRecord.first / iTotalLength * dPhi;
525  depth_i += 1.0 * iHitRecord.first / iTotalLength * dDepth;
526  }
527 
528  double es_current = 1.0 * iHitRecord.second / 1.E+6;
529 
530  double dist_electrode = 0.5 * sensorThickness - Module.design().readoutSide() * depth_i;
531  if (dist_electrode < 0) dist_electrode = 0;
532 
533  CLHEP::Hep3Vector chargepos;
534  chargepos.setX(phi_i);
535  chargepos.setY(eta_i);
536  chargepos.setZ(dist_electrode);
537 
538  bool coord = Module.isModuleFrame();
539 
541  "ismoduleframe " << coord << " -- startPosition (x,y,z) = " << chargepos.x() << ", " << chargepos.y() << ", " <<
542  chargepos.z());
543 
544  // -- change origin of coordinates to the left bottom of module
545  double x_new = chargepos.x() + 0.5*module_size_x;
546  double y_new = chargepos.y() + 0.5*module_size_y;
547 
548  // -- change from module frame to pixel frame
549  int nPixX = int(x_new / pixel_size_x);
550  int nPixY = int(y_new / pixel_size_y);
551  ATH_MSG_DEBUG(" -- nPixX = " << nPixX << " nPixY = " << nPixY);
552  double x_pix = x_new - pixel_size_x * (nPixX);
553  double y_pix = y_new - pixel_size_y * (nPixY);
554  // -- change origin of coordinates to the center of the pixel
555  double x_pix_center = x_pix - pixel_size_x / 2;
556  double y_pix_center = y_pix - pixel_size_y / 2;
557  ATH_MSG_DEBUG(" -- current hit position w.r.t. pixel center = " << x_pix_center << " " << y_pix_center);
558 
559  double x_neighbor;
560  double y_neighbor;
561  CLHEP::Hep3Vector pos_neighbor;
562  // -- Calculate signal in current pixel and in the neighboring ones
563  // -- loop in the x-coordinate
564  for (int i = -1; i <= 1; i++) {
565  x_neighbor = x_pix_center - i * pixel_size_x;
566  // -- loop in the y-coordinate
567  for (int j = -1; j <= 1; j++) {
568  y_neighbor = y_pix_center - j * pixel_size_y;
569 
570  // -- check if the neighbor falls inside the charge collection prob map window
571  if ((std::abs(x_neighbor) < pixel_size_x) && (std::abs(y_neighbor) < pixel_size_y)) {
572  // -- change origin of coordinates to the bottom left of the charge
573  // collection prob map "window", i.e. shift of 1-pixel twd bottom left
574  double x_neighbor_map = x_neighbor + pixel_size_x;
575  double y_neighbor_map = y_neighbor + pixel_size_y;
576 
577  int x_bin_cc_map = x_neighbor_map / x_bin_size;
578  int y_bin_cc_map = y_neighbor_map / y_bin_size;
579 
580  // -- retrieve the charge collection probability from Svc
581  // -- swap x and y bins to match Map coord convention
582  double ccprob_neighbor = getProbMapEntry(InDetDD::PixelReadoutTechnology::FEI4, y_bin_cc_map, x_bin_cc_map);
583  if (ccprob_neighbor == -1.) return StatusCode::FAILURE;
584 
585  double ed = es_current * eleholePairEnergy * ccprob_neighbor;
586 
587  // -- pixel coordinates --> module coordinates
588  double x_mod = x_neighbor + 0.5*pixel_size_x + pixel_size_x * nPixX - 0.5*module_size_x;
589  double y_mod = y_neighbor + 0.5*pixel_size_y + pixel_size_y * nPixY - 0.5*module_size_y;
590  const SiLocalPosition& chargePos = Module.hitLocalToLocal(y_mod, x_mod);
591 
592  const SiSurfaceCharge scharge(chargePos,
593  SiCharge(ed, pHitTime, SiCharge::track, particleLink));
594  const SiCellId& diode = Module.cellIdOfPosition(scharge.position());
595  if (diode.isValid()) {
596  const SiCharge& charge = scharge.charge();
597  chargedDiodes.add(diode, charge);
598  }
599  }
600  }
601  }
602  }
603  }
604 
605  return StatusCode::SUCCESS;
606 }

◆ initialize()

StatusCode SensorSim3DTool::initialize ( )
overridevirtual

Reimplemented from SensorSimTool.

Definition at line 39 of file SensorSim3DTool.cxx.

39  {
40  ATH_MSG_DEBUG("SensorSim3DTool::initialize()");
41 
43  ATH_CHECK(m_radDamageUtil.retrieve());
44 
47 
48  return StatusCode::SUCCESS;
49 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& SensorSimTool::interfaceID ( )
inlinestaticinherited

Definition at line 52 of file SensorSimTool.h.

52 {return IID_ISensorSimTool;}

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ printProbMap()

StatusCode SensorSim3DTool::printProbMap ( const std::string &  readout) const

Definition at line 645 of file SensorSim3DTool.cxx.

645  {
646  if (readout == "FEI4") {
647  for (const auto& it : m_probMapFEI4) {
649  "read full probMap FEI4 --- bin x " << it.first.first << " bin y " << it.first.second << " prob " <<
650  it.second);
651  }
652  } else if (readout == "FEI3") {
653  for (const auto& it : m_probMapFEI3) {
655  "read full probMap FEI3 --- bin x " << it.first.first << " bin y " << it.first.second << " prob " <<
656  it.second);
657  }
658  } else {
659  ATH_MSG_ERROR("Error in printout Charge Coll Prob Maps! (readout should contain FEI3 or FEI4 strings) ");
660  return StatusCode::FAILURE;
661  }
662  return StatusCode::SUCCESS;
663 }

◆ readProbMap()

StatusCode SensorSim3DTool::readProbMap ( const std::string &  fileE)

Definition at line 609 of file SensorSim3DTool.cxx.

609  {
610  std::string line;
611  const std::string& fileName = fileE;
613  if (inputFile.empty()) {
614  ATH_MSG_ERROR("Could not open input file!!!!!");
615  return StatusCode::FAILURE;
616  }
617  ATH_MSG_DEBUG("opening file " << inputFile);
618  std::ifstream myfile(inputFile.c_str());
619  if (myfile.is_open()) {
620  ATH_MSG_DEBUG(" opened file!");
621  while (myfile.good()) {
622  while (std::getline(myfile, line)) {
623  std::istringstream sline(line);
624  int xpos, ypos;
625  double prob;
626  sline >> xpos >> ypos >> prob;
627  if (fileName.find("FEI4") != std::string::npos) {
628  m_probMapFEI4.insert(std::make_pair(std::make_pair(xpos, ypos), prob));
629  ATH_MSG_DEBUG("FEI4 inside xpos " << xpos << " ypos " << ypos << " prob " << prob);
630  } else if (fileName.find("FEI3") != std::string::npos) {
631  m_probMapFEI3.insert(std::make_pair(std::make_pair(xpos, ypos), prob));
632  ATH_MSG_DEBUG("FEI3 inside xpos " << xpos << " ypos " << ypos << " prob " << prob);
633  } else {
634  ATH_MSG_ERROR("Please check name of Charge Coll Prob Maps! (should contain FEI3 or FEI4) ");
635  return StatusCode::FAILURE;
636  }
637  }
638  }
639  myfile.close();
640  }
641  return StatusCode::SUCCESS;
642 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_cc_prob_file_fei3

Gaudi::Property<std::string> SensorSim3DTool::m_cc_prob_file_fei3
private
Initial value:
{
this, "CCProbMapFileFEI3", "PixelDigitization/3DFEI3-3E-problist-1um_v1.txt",
"Input probability file for 3D FEI3 sensor."
}

Definition at line 70 of file SensorSim3DTool.h.

◆ m_cc_prob_file_fei4

Gaudi::Property<std::string> SensorSim3DTool::m_cc_prob_file_fei4
private
Initial value:
{
this, "CCProbMapFileFEI4", "PixelDigitization/3DFEI4-2E-problist-1um_v0.txt",
"Input probability file for 3D FEI4 sensor."
}

Definition at line 76 of file SensorSim3DTool.h.

◆ m_chargeCorrectionHistos

Gaudi::Property<std::vector<std::string> > SensorSimTool::m_chargeCorrectionHistos
protectedinherited
Initial value:
{
this, "ChargeCorrectionHistos", {
"cce",
"cce",
"cce",
"cce"
},
"Paths to the histograms inside the ROOT file for radiation damage charge correction"
}

Definition at line 108 of file SensorSimTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_digitizeITk3Das3D

Gaudi::Property<bool> SensorSimTool::m_digitizeITk3Das3D
protectedinherited
Initial value:
{
this, "DigitizeITk3Das3D", false,
"Flag to tell the code if the 3D sensors for ITK should be treated as 3D or as planar sensors for digitization"
}

Definition at line 136 of file SensorSimTool.h.

◆ m_distanceCorrectionHistos

Gaudi::Property<std::vector<std::string> > SensorSimTool::m_distanceCorrectionHistos
protectedinherited
Initial value:
{
this, "DistanceCorrectionHistos", {
"dz",
"dz",
"dz",
"dz"
},
"Paths to the histograms inside the ROOT file for radiation damage distance correction"
}

Definition at line 119 of file SensorSimTool.h.

◆ m_doChunkCorrection

Gaudi::Property<bool> SensorSim3DTool::m_doChunkCorrection
private
Initial value:
{
this, "doChunkCorrection", false, "doChunkCorrection bool: should be flag"
}

Definition at line 87 of file SensorSim3DTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fluenceDataKey

SG::ReadCondHandleKey<PixelRadiationDamageFluenceMapData> SensorSimTool::m_fluenceDataKey
protectedinherited
Initial value:
{
this, "PixelRadiationDamageFluenceMapData", "PixelRadiationDamageFluenceMapData", "Pixel fluence map data for radiation damage"
}

Definition at line 130 of file SensorSimTool.h.

◆ m_lorentzAngleCorrectionHistos

Gaudi::Property<std::vector<std::string> > SensorSimTool::m_lorentzAngleCorrectionHistos
protectedinherited
Initial value:
{
this, "LorentzAngleCorrectionHistos", {
"la",
"la",
"la",
"la"
},
"Paths to the histograms inside the ROOT file for Lorentz angle correction"
}

Definition at line 97 of file SensorSimTool.h.

◆ m_moduleDataKey

SG::ReadCondHandleKey<PixelModuleData> SensorSimTool::m_moduleDataKey
protectedinherited
Initial value:
{
this, "PixelModuleData", "PixelModuleData", "Pixel module data"
}

Definition at line 81 of file SensorSimTool.h.

◆ m_numberOfSteps

Gaudi::Property<int> SensorSim3DTool::m_numberOfSteps
private
Initial value:
{
this, "numberOfSteps", 50, "Number of steps for Pixel3D module"
}

Definition at line 82 of file SensorSim3DTool.h.

◆ m_probMapFEI3

std::multimap<std::pair<int, int>, double> SensorSim3DTool::m_probMapFEI3
private

Definition at line 68 of file SensorSim3DTool.h.

◆ m_probMapFEI4

std::multimap<std::pair<int, int>, double> SensorSim3DTool::m_probMapFEI4
private

Definition at line 67 of file SensorSim3DTool.h.

◆ m_radDamageUtil

ToolHandle<RadDamageUtil> SensorSim3DTool::m_radDamageUtil
private
Initial value:
{
this, "RadDamageUtil", "RadDamageUtil", "Rad Damage utility"
}

Definition at line 107 of file SensorSim3DTool.h.

◆ m_radiationDamageSimulationType

Gaudi::Property<int> SensorSimTool::m_radiationDamageSimulationType
protectedinherited
Initial value:
{
this, "RadiationDamageSimulationType", RadiationDamageSimulationType::NO_RADIATION_DAMAGE, "Option to simualte the effects of radiation damage"
}

Definition at line 86 of file SensorSimTool.h.

◆ m_siPropertiesTool

ToolHandle<ISiPropertiesTool> SensorSimTool::m_siPropertiesTool
protectedinherited
Initial value:
{
this, "SiPropertiesTool", "SiPropertiesTool", "Tool to retrieve SiProperties"
}

Definition at line 76 of file SensorSimTool.h.

◆ m_temperature

Gaudi::Property<double> SensorSim3DTool::m_temperature
private
Initial value:
{
this, "Temperature", 300.0, "Default temperature [K]"
}

Definition at line 102 of file SensorSim3DTool.h.

◆ m_templateCorrectionRootFile

Gaudi::Property<std::string> SensorSimTool::m_templateCorrectionRootFile
protectedinherited
Initial value:
{
this, "TemplateCorrectionROOTfile", "maps_ITk_PL_100um_100V_fl10e15.root",
"Path to the ROOT file with histograms for radiation damage template corrections"
}

Definition at line 91 of file SensorSimTool.h.

◆ m_trappingTimeElectrons

Gaudi::Property<double> SensorSim3DTool::m_trappingTimeElectrons
private
Initial value:
{
this, "trappingTimeElectrons", 0.0, "Characteristic time till electron is trapped [ns]"
}

Definition at line 92 of file SensorSim3DTool.h.

◆ m_trappingTimeHoles

Gaudi::Property<double> SensorSim3DTool::m_trappingTimeHoles
private
Initial value:
{
this, "trappingTimeHoles", 0.0, "Characteristic time till hole is trapped [ns]"
}

Definition at line 97 of file SensorSim3DTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
checkFileSG.line
line
Definition: checkFileSG.py:75
SiSurfaceCharge
Definition: SiSurfaceCharge.h:23
InDetDD::SolidStateDetectorElementBase::cellIdOfPosition
SiCellId cellIdOfPosition(const Amg::Vector2D &localPos) const
As in previous method but returns SiCellId.
Definition: SolidStateDetectorElementBase.cxx:224
get_generator_info.result
result
Definition: get_generator_info.py:21
SensorSim3DTool::getDriftTime
std::vector< double > getDriftTime(bool isHoleBit, size_t number, CLHEP::HepRandomEngine *rndmEngine)
Definition: SensorSim3DTool.cxx:708
InDetDD::DetectorDesign::thickness
double thickness() const
Method which returns thickness of the silicon wafer.
Definition: DetectorDesign.h:271
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
PixelHistoConverter::getBinY
std::size_t getBinY(Args &&...args) const
Definition: PixelHistoConverter.h:79
SensorSim3DTool::m_temperature
Gaudi::Property< double > m_temperature
Definition: SensorSim3DTool.h:103
InDetDD::PixelModuleDesign::columns
int columns() const
Number of cell columns per module:
Definition: PixelModuleDesign.h:322
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
SensorSim3DTool::m_probMapFEI3
std::multimap< std::pair< int, int >, double > m_probMapFEI3
Definition: SensorSim3DTool.h:68
SensorSimTool::m_radiationDamageSimulationType
Gaudi::Property< int > m_radiationDamageSimulationType
Definition: SensorSimTool.h:87
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
SensorSim3DTool::readProbMap
StatusCode readProbMap(const std::string &)
Definition: SensorSim3DTool.cxx:609
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
InDetDD::PixelModuleDesign::rows
int rows() const
Number of cell rows per module:
Definition: PixelModuleDesign.h:327
SiCharge::track
@ track
Definition: SiCharge.h:28
InDetDD::SiCellId::isValid
bool isValid() const
Test if its in a valid state.
Definition: SiCellId.h:136
skel.it
it
Definition: skel.GENtoEVGEN.py:423
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
SensorSim3DTool::m_cc_prob_file_fei3
Gaudi::Property< std::string > m_cc_prob_file_fei3
Definition: SensorSim3DTool.h:71
InDetDD::DetectorDesign::readoutSide
int readoutSide() const
ReadoutSide.
Definition: DetectorDesign.h:291
InDetDD::PixelReadoutTechnology::FEI3
@ FEI3
SiCharge
Definition: SiCharge.h:25
PixelRadiationDamageFluenceMapData::getTimeMap3D_e
const PixelHistoConverter & getTimeMap3D_e(int layer) const
Definition: PixelRadiationDamageFluenceMapData.cxx:65
SensorSimTool::RAMO_POTENTIAL
@ RAMO_POTENTIAL
Definition: SensorSimTool.h:43
SensorSimTool::m_fluenceDataKey
SG::ReadCondHandleKey< PixelRadiationDamageFluenceMapData > m_fluenceDataKey
Definition: SensorSimTool.h:131
PixelRadiationDamageFluenceMapData::getEFieldMap3D
const PixelHistoConverter & getEFieldMap3D(int layer) const
Definition: PixelRadiationDamageFluenceMapData.cxx:60
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
covarianceTool.prob
prob
Definition: covarianceTool.py:678
SensorSim3DTool::m_probMapFEI4
std::multimap< std::pair< int, int >, double > m_probMapFEI4
Definition: SensorSim3DTool.h:67
SensorSimTool::m_siPropertiesTool
ToolHandle< ISiPropertiesTool > m_siPropertiesTool
Definition: SensorSimTool.h:77
InDetDD::SolidStateDetectorElementBase::identifyHash
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
InDetDD::PixelReadoutTechnology::RD53
@ RD53
SensorSim3DTool::m_trappingTimeElectrons
Gaudi::Property< double > m_trappingTimeElectrons
Definition: SensorSim3DTool.h:93
InDetDD::SiLocalPosition
Definition: SiLocalPosition.h:31
PixelHistoConverter::getBinZ
std::size_t getBinZ(Args &&...args) const
Definition: PixelHistoConverter.h:84
SensorSimTool::initialize
virtual StatusCode initialize()
Definition: SensorSimTool.h:54
PixelRadiationDamageFluenceMapData::getYPositionMap3D_e
const PixelHistoConverter & getYPositionMap3D_e(int layer) const
Definition: PixelRadiationDamageFluenceMapData.cxx:63
SensorSimTool::NO_RADIATION_DAMAGE
@ NO_RADIATION_DAMAGE
Definition: SensorSimTool.h:42
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
LArG4FSStartPointFilter.rand
rand
Definition: LArG4FSStartPointFilter.py:80
PixelHistoConverter
Definition: PixelHistoConverter.h:25
InDetDD::SiDetectorElement::isModuleFrame
bool isModuleFrame() const
Check if the element and module frame are the same.
Definition: SiDetectorElement.cxx:212
CaloCondBlobAlgs_fillNoiseFromASCII.inputFile
string inputFile
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:17
PixelRadiationDamageFluenceMapData
Definition: PixelRadiationDamageFluenceMapData.h:25
lumiFormat.i
int i
Definition: lumiFormat.py:92
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:530
InDetDD::PixelModuleDesign::numberOfCircuits
int numberOfCircuits() const
Total number of circuits:
Definition: PixelModuleDesign.h:297
InDetDD::SolidStateDetectorElementBase::width
double width() const
Methods from design (inline)
test_pyathena.parent
parent
Definition: test_pyathena.py:15
SensorSim3DTool::m_trappingTimeHoles
Gaudi::Property< double > m_trappingTimeHoles
Definition: SensorSim3DTool.h:98
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
InDetDD::SolidStateDetectorElementBase::hitLocalToLocal
Amg::Vector2D hitLocalToLocal(double xEta, double xPhi) const
Simulation/Hit local frame to reconstruction local frame.
Definition: SolidStateDetectorElementBase.cxx:95
min
#define min(a, b)
Definition: cfImp.cxx:40
SensorSim3DTool::m_radDamageUtil
ToolHandle< RadDamageUtil > m_radDamageUtil
Definition: SensorSim3DTool.h:108
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
PixelRadiationDamageFluenceMapData::getFluenceLayer3D
double getFluenceLayer3D(int layer) const
Definition: PixelRadiationDamageFluenceMapData.cxx:46
PixelRadiationDamageFluenceMapData::getXPositionMap3D_h
const PixelHistoConverter & getXPositionMap3D_h(int layer) const
Definition: PixelRadiationDamageFluenceMapData.cxx:62
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
SensorSimTool::TEMPLATE_CORRECTION
@ TEMPLATE_CORRECTION
Definition: SensorSimTool.h:44
charge
double charge(const T &p)
Definition: AtlasPID.h:494
SensorSimTool::SensorSimTool
SensorSimTool()
InDetDD::PixelReadoutTechnology::FEI4
@ FEI4
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
InDet::SiliconProperties
Definition: SiliconProperties.h:24
PixelRadiationDamageFluenceMapData::getTimeMap3D_h
const PixelHistoConverter & getTimeMap3D_h(int layer) const
Definition: PixelRadiationDamageFluenceMapData.cxx:66
PixelRadiationDamageFluenceMapData::getYPositionMap3D_h
const PixelHistoConverter & getYPositionMap3D_h(int layer) const
Definition: PixelRadiationDamageFluenceMapData.cxx:64
InDetDD::PixelModuleDesign::getReadoutTechnology
PixelReadoutTechnology getReadoutTechnology() const
Definition: PixelModuleDesign.h:368
JetVoronoiDiagramHelpers::coord
double coord
Definition: JetVoronoiDiagramHelpers.h:45
SiChargedDiodeCollection::add
void add(const InDetDD::SiCellId &diode, const T &charge)
Definition: SiChargedDiodeCollection.h:299
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
InDetDD::SiCellId
Definition: SiCellId.h:29
SensorSimTool::m_digitizeITk3Das3D
Gaudi::Property< bool > m_digitizeITk3Das3D
Definition: SensorSimTool.h:137
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
PixelRadiationDamageFluenceMapData::getAvgChargeMap3D_h
const PixelHistoConverter & getAvgChargeMap3D_h() const
Definition: PixelRadiationDamageFluenceMapData.cxx:68
InDetDD::PixelModuleDesign::is3D
virtual bool is3D() const
Definition: PixelModuleDesign.h:363
h
TimedHitPtr::eventId
unsigned short eventId() const
the index of the component event in PileUpEventInfo.
Definition: TimedHitPtr.h:42
PixelRadiationDamageFluenceMapData::getAvgChargeMap3D_e
const PixelHistoConverter & getAvgChargeMap3D_e() const
Definition: PixelRadiationDamageFluenceMapData.cxx:67
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
InDet::SiliconProperties::electronHolePairsPerEnergy
double electronHolePairsPerEnergy() const
Definition: SiliconProperties.cxx:238
SensorSim3DTool::getMobility
double getMobility(double electricField, bool isHoleBit)
Definition: SensorSim3DTool.cxx:682
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
SensorSim3DTool::m_cc_prob_file_fei4
Gaudi::Property< std::string > m_cc_prob_file_fei4
Definition: SensorSim3DTool.h:77
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
SensorSim3DTool::m_doChunkCorrection
Gaudi::Property< bool > m_doChunkCorrection
Definition: SensorSim3DTool.h:88
hitTime
float hitTime(const AFP_SIDSimHit &hit)
Definition: AFP_SIDSimHit.h:39
InDetDD::SolidStateDetectorElementBase::length
double length() const
Length in eta direction (z - barrel, r - endcap)
MuonParameters::beta
@ beta
Definition: MuonParamDefs.h:144
PixelHistoConverter::getBinX
std::size_t getBinX(Args &&...args) const
Definition: PixelHistoConverter.h:74
InDetDD::SiDetectorElement::design
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
TauGNNUtils::Variables::Track::dEta
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:525
PixelRadiationDamageFluenceMapData::getRamoPotentialMap3D
const PixelHistoConverter & getRamoPotentialMap3D(int layer) const
Definition: PixelRadiationDamageFluenceMapData.cxx:59
SensorSim3DTool::getProbMapEntry
double getProbMapEntry(const InDetDD::PixelReadoutTechnology &, int, int) const
Definition: SensorSim3DTool.cxx:666
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
InDetDD::SiDetectorElement::isPLR
bool isPLR() const
PixelRadiationDamageFluenceMapData::getXPositionMap3D_e
const PixelHistoConverter & getXPositionMap3D_e(int layer) const
Definition: PixelRadiationDamageFluenceMapData.cxx:61
fitman.k
k
Definition: fitman.py:528
PixelHistoConverter::getContent
float getContent(std::size_t x) const
Definition: PixelHistoConverter.h:34