ATLAS Offline Software
SensorSim3DTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
12 #ifndef PIXELDIGITIZATION_SensorSim3DTool_H
13 #define PIXELDIGITIZATION_SensorSim3DTool_H
14 
16 #include "SensorSimTool.h"
17 
18 #include "GaudiKernel/ToolHandle.h"
19 #include "RadDamageUtil.h"
21 #include "PixelReadoutDefinitions/PixelReadoutDefinitions.h" //PixelReadoutTechnology enum class
22 #include <vector>
23 #include <map> //std::multimap, and std::pair
24 
25 namespace InDetDD{
26  class SiDetectorElement;
27  class PixelModuleDesign;
28 }
29 
30 namespace CLHEP{
31  class HepRandomEngine;
32 }
33 
34 class EventContext;
35 
37 public:
38  SensorSim3DTool(const std::string& type, const std::string& name, const IInterface* parent);
39  virtual StatusCode initialize() override;
40  virtual StatusCode finalize() override;
41  virtual ~SensorSim3DTool();
42 
43  virtual StatusCode induceCharge(const TimedHitPtr<SiHit>& phit,
44  SiChargedDiodeCollection& chargedDiodes,
45  const InDetDD::SiDetectorElement& Module,
46  const InDetDD::PixelModuleDesign& p_design,
47  std::vector< std::pair<double, double> >& trfHitRecord,
48  std::vector<double>& initialConditions,
49  CLHEP::HepRandomEngine* rndmEngine,
50  const EventContext &ctx) override;
51 
52 
53  // 3D sensor simulation using probability density map (used in RUN-2 (no radiation damage)
54  StatusCode readProbMap(const std::string&);
55  StatusCode printProbMap(const std::string&) const;
56 
57  double getMobility(double electricField, bool isHoleBit);
58  std::vector<double> getDriftTime(bool isHoleBit, size_t number,
59  CLHEP::HepRandomEngine* rndmEngine);
60 
61 private:
63 
64  double getProbMapEntry(const InDetDD::PixelReadoutTechnology &, int, int) const;
65 
66  // 3D sensor simulation using probability density map (used in RUN-2 (no radiation damage)
67  std::multimap<std::pair<int, int>, double> m_probMapFEI4;
68  std::multimap<std::pair<int, int>, double> m_probMapFEI3;
69 
70  std::vector<PixelHistoConverter> m_chargeCorrection;
71 
72  Gaudi::Property<std::string> m_cc_prob_file_fei3
73  {
74  this, "CCProbMapFileFEI3", "PixelDigitization/3DFEI3-3E-problist-1um_v1.txt",
75  "Input probability file for 3D FEI3 sensor."
76  };
77 
78  Gaudi::Property<std::string> m_cc_prob_file_fei4
79  {
80  this, "CCProbMapFileFEI4", "PixelDigitization/3DFEI4-2E-problist-1um_v0.txt",
81  "Input probability file for 3D FEI4 sensor."
82  };
83 
84  Gaudi::Property<int> m_numberOfSteps
85  {
86  this, "numberOfSteps", 50, "Number of steps for Pixel3D module"
87  };
88 
89  Gaudi::Property<bool> m_doChunkCorrection
90  {
91  this, "doChunkCorrection", false, "doChunkCorrection bool: should be flag"
92  };
93 
94  Gaudi::Property<double> m_trappingTimeElectrons
95  {
96  this, "trappingTimeElectrons", 0.0, "Characteristic time till electron is trapped [ns]"
97  };
98 
99  Gaudi::Property<double> m_trappingTimeHoles
100  {
101  this, "trappingTimeHoles", 0.0, "Characteristic time till hole is trapped [ns]"
102  };
103 
104  Gaudi::Property<double> m_temperature
105  {
106  this, "Temperature", 300.0, "Default temperature [K]"
107  };
108 
109  ToolHandle<RadDamageUtil> m_radDamageUtil
110  {
111  this, "RadDamageUtil", "RadDamageUtil", "Rad Damage utility"
112  };
113 
114 };
115 
116 #endif // PIXELDIGITIZATION_SensorSim3DTool_H
SensorSim3DTool::induceCharge
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
Definition: SensorSim3DTool.cxx:98
InDetDD::PixelReadoutTechnology
PixelReadoutTechnology
Definition: PixelReadoutDefinitions.h:34
SensorSim3DTool::getDriftTime
std::vector< double > getDriftTime(bool isHoleBit, size_t number, CLHEP::HepRandomEngine *rndmEngine)
Definition: SensorSim3DTool.cxx:812
InDetDD::PixelModuleDesign
Definition: PixelModuleDesign.h:48
SensorSimTool.h
SensorSim3DTool::m_temperature
Gaudi::Property< double > m_temperature
Definition: SensorSim3DTool.h:105
SensorSim3DTool::m_probMapFEI3
std::multimap< std::pair< int, int >, double > m_probMapFEI3
Definition: SensorSim3DTool.h:68
SensorSim3DTool::finalize
virtual StatusCode finalize() override
Definition: SensorSim3DTool.cxx:90
SensorSim3DTool::readProbMap
StatusCode readProbMap(const std::string &)
Definition: SensorSim3DTool.cxx:713
SensorSim3DTool::m_numberOfSteps
Gaudi::Property< int > m_numberOfSteps
Definition: SensorSim3DTool.h:85
SensorSim3DTool::initialize
virtual StatusCode initialize() override
Definition: SensorSim3DTool.cxx:42
SensorSim3DTool::m_cc_prob_file_fei3
Gaudi::Property< std::string > m_cc_prob_file_fei3
Definition: SensorSim3DTool.h:73
TimedHitPtr< SiHit >
SensorSim3DTool::~SensorSim3DTool
virtual ~SensorSim3DTool()
SensorSim3DTool::m_probMapFEI4
std::multimap< std::pair< int, int >, double > m_probMapFEI4
Definition: SensorSim3DTool.h:67
SensorSim3DTool::m_trappingTimeElectrons
Gaudi::Property< double > m_trappingTimeElectrons
Definition: SensorSim3DTool.h:95
PixelHistoConverter.h
SiChargedDiodeCollection
Definition: SiChargedDiodeCollection.h:109
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CLHEP
STD'S.
Definition: IAtRndmGenSvc.h:19
AthAlgTool.h
SensorSim3DTool::SensorSim3DTool
SensorSim3DTool()
test_pyathena.parent
parent
Definition: test_pyathena.py:15
SensorSim3DTool::m_trappingTimeHoles
Gaudi::Property< double > m_trappingTimeHoles
Definition: SensorSim3DTool.h:100
SensorSim3DTool
Definition: SensorSim3DTool.h:36
SensorSim3DTool::printProbMap
StatusCode printProbMap(const std::string &) const
Definition: SensorSim3DTool.cxx:749
SensorSim3DTool::m_radDamageUtil
ToolHandle< RadDamageUtil > m_radDamageUtil
Definition: SensorSim3DTool.h:110
SensorSim3DTool::m_chargeCorrection
std::vector< PixelHistoConverter > m_chargeCorrection
Definition: SensorSim3DTool.h:70
python.selection.number
number
Definition: selection.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
PixelReadoutDefinitions.h
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SensorSim3DTool::getMobility
double getMobility(double electricField, bool isHoleBit)
Definition: SensorSim3DTool.cxx:786
SensorSim3DTool::m_cc_prob_file_fei4
Gaudi::Property< std::string > m_cc_prob_file_fei4
Definition: SensorSim3DTool.h:79
SensorSimTool
Definition: SensorSimTool.h:38
SensorSim3DTool::m_doChunkCorrection
Gaudi::Property< bool > m_doChunkCorrection
Definition: SensorSim3DTool.h:90
SensorSim3DTool::getProbMapEntry
double getProbMapEntry(const InDetDD::PixelReadoutTechnology &, int, int) const
Definition: SensorSim3DTool.cxx:770
RadDamageUtil.h