ATLAS Offline Software
SensorSimTool.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_SensorSimTool_H
13 #define PIXELDIGITIZATION_SensorSimTool_H
14 
16 #include "GaudiKernel/ToolHandle.h"
17 #include "InDetSimEvent/SiHit.h"
18 
19 #include "HitManagement/TimedHitPtr.h" //template
23 
24 namespace InDetDD{
25  class SiDetectorElement;
26  class PixelModuleDesign;
27 }
28 
29 namespace CLHEP{
30  class HepRandomEngine;
31 }
32 
34 
35 
36 static const InterfaceID IID_ISensorSimTool("SensorSimTool", 1, 0);
37 
38 class SensorSimTool: public AthAlgTool, virtual public IAlgTool {
39 public:
40 
45  };
46 
47  SensorSimTool(const std::string& type, const std::string& name, const IInterface* parent) :
49  declareInterface<SensorSimTool>(this);
50  }
51 
52  static const InterfaceID& interfaceID() {return IID_ISensorSimTool;}
53 
54  virtual StatusCode initialize() {
56  ATH_CHECK(m_siPropertiesTool.retrieve());
58  ATH_CHECK(m_fluenceDataKey.initialize(m_radiationDamageSimulationType != RadiationDamageSimulationType::NO_RADIATION_DAMAGE && !m_fluenceDataKey.empty()));
59 
60  return StatusCode::SUCCESS;
61  }
62 
63  virtual StatusCode finalize() {return StatusCode::FAILURE;}
64  virtual ~SensorSimTool() {}
66  SiChargedDiodeCollection& chargedDiodes,
67  const InDetDD::SiDetectorElement& Module,
68  const InDetDD::PixelModuleDesign& p_design,
69  std::vector< std::pair<double, double> >& trfHitRecord,
70  std::vector<double>& initialConditions,
71  CLHEP::HepRandomEngine* rndmEngine,
72  const EventContext &ctx) = 0;
73 private:
75 protected:
76  ToolHandle<ISiPropertiesTool> m_siPropertiesTool
77  {
78  this, "SiPropertiesTool", "SiPropertiesTool", "Tool to retrieve SiProperties"
79  };
80 
82  {
83  this, "PixelModuleData", "PixelModuleData", "Pixel module data"
84  };
85 
86  Gaudi::Property<int> m_radiationDamageSimulationType
87  {
88  this, "RadiationDamageSimulationType", RadiationDamageSimulationType::NO_RADIATION_DAMAGE, "Option to simualte the effects of radiation damage"
89  };
90 
91  Gaudi::Property<std::string> m_templateCorrectionRootFile
92  {
93  this, "TemplateCorrectionROOTfile", "",
94  "Path to the ROOT file with histograms for radiation damage template corrections"
95  };
96 
97  Gaudi::Property<std::vector<std::string> > m_lorentzAngleCorrectionHistos
98  {
99  this, "LorentzAngleCorrectionHistos", {},
100  "Paths to the histograms inside the ROOT file for Lorentz angle correction"
101  };
102 
103  Gaudi::Property<std::vector<std::string> > m_chargeCorrectionHistos
104  {
105  this, "ChargeCorrectionHistos", {},
106  "Paths to the histograms inside the ROOT file for radiation damage charge correction"
107  };
108 
109  Gaudi::Property<std::vector<std::string> > m_distanceCorrectionHistos
110  {
111  this, "DistanceCorrectionHistos", {},
112  "Paths to the histograms inside the ROOT file for radiation damage distance correction"
113  };
114 
116  {
117  this, "PixelRadiationDamageFluenceMapData", "PixelRadiationDamageFluenceMapData", "Pixel fluence map data for radiation damage"
118  };
119 
120 
121  Gaudi::Property<bool> m_digitizeITk3Das3D
122  {
123  this, "DigitizeITk3Das3D", false,
124  "Flag to tell the code if the 3D sensors for ITK should be treated as 3D or as planar sensors for digitization"
125  };
126 
127 };
128 
129 #endif // PIXELDIGITIZATION_SensorSimTool_H
InDetDD::PixelModuleDesign
Definition: PixelModuleDesign.h:48
SensorSimTool::m_radiationDamageSimulationType
Gaudi::Property< int > m_radiationDamageSimulationType
Definition: SensorSimTool.h:87
SiHit.h
SensorSimTool::SensorSimTool
SensorSimTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: SensorSimTool.h:47
initialize
void initialize()
Definition: run_EoverP.cxx:894
ISiPropertiesTool.h
SensorSimTool::~SensorSimTool
virtual ~SensorSimTool()
Definition: SensorSimTool.h:64
SensorSimTool::RAMO_POTENTIAL
@ RAMO_POTENTIAL
Definition: SensorSimTool.h:43
TimedHitPtr< SiHit >
SensorSimTool::m_fluenceDataKey
SG::ReadCondHandleKey< PixelRadiationDamageFluenceMapData > m_fluenceDataKey
Definition: SensorSimTool.h:116
SensorSimTool::m_chargeCorrectionHistos
Gaudi::Property< std::vector< std::string > > m_chargeCorrectionHistos
Definition: SensorSimTool.h:104
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
SensorSimTool::m_siPropertiesTool
ToolHandle< ISiPropertiesTool > m_siPropertiesTool
Definition: SensorSimTool.h:77
SensorSimTool::initialize
virtual StatusCode initialize()
Definition: SensorSimTool.h:54
TimedHitPtr.h
SensorSimTool::NO_RADIATION_DAMAGE
@ NO_RADIATION_DAMAGE
Definition: SensorSimTool.h:42
SensorSimTool::interfaceID
static const InterfaceID & interfaceID()
Definition: SensorSimTool.h:52
SiChargedDiodeCollection
Definition: SiChargedDiodeCollection.h:109
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SensorSimTool::m_moduleDataKey
SG::ReadCondHandleKey< PixelModuleData > m_moduleDataKey
Definition: SensorSimTool.h:82
CLHEP
STD'S.
Definition: IAtRndmGenSvc.h:19
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
SensorSimTool::RadiationDamageSimulationType
RadiationDamageSimulationType
Definition: SensorSimTool.h:41
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SensorSimTool::finalize
virtual StatusCode finalize()
Definition: SensorSimTool.h:63
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SensorSimTool::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)=0
SensorSimTool::TEMPLATE_CORRECTION
@ TEMPLATE_CORRECTION
Definition: SensorSimTool.h:44
PixelRadiationDamageFluenceMapData.h
Store pixel constant parameters in PixelRadiationDamageFluenceMapData.
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
SensorSimTool::SensorSimTool
SensorSimTool()
SensorSimTool::m_distanceCorrectionHistos
Gaudi::Property< std::vector< std::string > > m_distanceCorrectionHistos
Definition: SensorSimTool.h:110
SG::ReadCondHandleKey< PixelModuleData >
SensorSimTool::m_digitizeITk3Das3D
Gaudi::Property< bool > m_digitizeITk3Das3D
Definition: SensorSimTool.h:122
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SensorSimTool
Definition: SensorSimTool.h:38
PixelModuleData.h
Store pixel constant parameters in PixelModuleData.
SensorSimTool::m_templateCorrectionRootFile
Gaudi::Property< std::string > m_templateCorrectionRootFile
Definition: SensorSimTool.h:92
AthAlgTool
Definition: AthAlgTool.h:26
SensorSimTool::m_lorentzAngleCorrectionHistos
Gaudi::Property< std::vector< std::string > > m_lorentzAngleCorrectionHistos
Definition: SensorSimTool.h:98