ATLAS Offline Software
SCTSiPropertiesTestAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
9 SCTSiPropertiesTestAlg::SCTSiPropertiesTestAlg(const std::string& name, ISvcLocator* pSvcLocator)
10  : ::AthReentrantAlgorithm(name, pSvcLocator)
11  , m_id{nullptr}
12 {
13 }
14 
16  // SCT silicon properties tool
17  ATH_CHECK(m_tool.retrieve());
18 
19  // SCT ID helper
20  ATH_CHECK(detStore()->retrieve(m_id, "SCT_ID"));
21 
22  return StatusCode::SUCCESS;
23 }
24 
25 StatusCode SCTSiPropertiesTestAlg::execute(const EventContext& ctx) const {
26  unsigned int maxHash{static_cast<unsigned int>(m_id->wafer_hash_max())};
27  for (unsigned int hash{0}; hash<maxHash; hash++) {
28  const IdentifierHash elementHash{hash};
29  const InDet::SiliconProperties& siProperties{m_tool->getSiProperties(elementHash, ctx)};
30  const double electronDriftMobility{siProperties.electronDriftMobility()};
31  const double holeDriftMobility{siProperties.holeDriftMobility()};
32  const double electronHallMobility{siProperties.electronHallMobility()};
33  const double holeHallMobility{siProperties.holeHallMobility()};
34  const double electronDiffusionConstant{siProperties.electronDiffusionConstant()};
35  const double holeDiffusionConstant{siProperties.holeDiffusionConstant()};
36  const double electronSaturationVelocity{siProperties.electronSaturationVelocity()};
37  const double holeSaturationVelocity{siProperties.holeSaturationVelocity()};
38  const double electronHolePairsPerEnergy{siProperties.electronHolePairsPerEnergy()};
39  ATH_MSG_INFO("hash " << hash <<
40  " electronDriftMobility " << electronDriftMobility <<
41  " holeDriftMobility " << holeDriftMobility <<
42  " electronHallMobility " << electronHallMobility <<
43  " holeHallMobility " << holeHallMobility <<
44  " electronDiffusionConstant " << electronDiffusionConstant <<
45  " holeDiffusionConstant " << holeDiffusionConstant <<
46  " electronSaturationVelocity " << electronSaturationVelocity <<
47  " holeSaturationVelocity " << holeSaturationVelocity <<
48  " electronHolePairsPerEnergy " << electronHolePairsPerEnergy);
49  }
50 
51  return StatusCode::SUCCESS;
52 }
53 
55 {
56  return StatusCode::SUCCESS;
57 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SCTSiPropertiesTestAlg::initialize
virtual StatusCode initialize() override
Definition: SCTSiPropertiesTestAlg.cxx:15
SCTSiPropertiesTestAlg::finalize
virtual StatusCode finalize() override
Definition: SCTSiPropertiesTestAlg.cxx:54
SCTSiPropertiesTestAlg::m_id
const SCT_ID * m_id
Definition: SCTSiPropertiesTestAlg.h:29
SCTSiPropertiesTestAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: SCTSiPropertiesTestAlg.cxx:25
SCTSiPropertiesTestAlg::SCTSiPropertiesTestAlg
SCTSiPropertiesTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCTSiPropertiesTestAlg.cxx:9
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SCTSiPropertiesTestAlg.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SCTSiPropertiesTestAlg::m_tool
ToolHandle< ISiPropertiesTool > m_tool
Definition: SCTSiPropertiesTestAlg.h:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SCT_ID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: SCT_ID.cxx:636
InDet::SiliconProperties
Definition: SiliconProperties.h:24
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25