ATLAS Offline Software
SCTSiLorentzAngleTestAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
10 // Local include
12 
13 // Athena include
14 #include "InDetIdentifier/SCT_ID.h"
15 
16 // Gaudi include
17 
18 // STL include
19 
20 SCTSiLorentzAngleTestAlg::SCTSiLorentzAngleTestAlg(const std::string& name, ISvcLocator* pSvcLocator):
21  ::AthReentrantAlgorithm(name, pSvcLocator),
22  m_id{nullptr}
23 {
24 }
25 
27 {
28  ATH_CHECK(m_tool.retrieve());
29  ATH_CHECK(detStore()->retrieve(m_id, "SCT_ID"));
30 
31  return StatusCode::SUCCESS;
32 }
33 
34 StatusCode SCTSiLorentzAngleTestAlg::execute(const EventContext& ctx) const
35 {
36  unsigned int maxHash{static_cast<unsigned int>(m_id->wafer_hash_max())};
37  for (unsigned int hash{0}; hash<maxHash; hash++) {
38  const IdentifierHash elementHash{hash};
39  const double lorentzShift{m_tool->getLorentzShift(elementHash, ctx)};
40  const double lorentzShiftEta{m_tool->getLorentzShiftEta(elementHash)};
41  const double tanLorentzAngle{m_tool->getTanLorentzAngle(elementHash, ctx)};
42  const double tanLorentzAngleEta{m_tool->getTanLorentzAngleEta(elementHash)};
43  const double biasVoltage{m_tool->getBiasVoltage(elementHash)};
44  const double depletionVoltage{m_tool->getDepletionVoltage(elementHash)};
45  const double temperature{m_tool->getTemperature(elementHash)};
46  ATH_MSG_INFO("hash " << hash <<
47  " lorentzShift " << lorentzShift <<
48  " lorentzShiftEta " << lorentzShiftEta <<
49  " tanLorentzAngle " << tanLorentzAngle <<
50  " tanLorentzAngleEta " << tanLorentzAngleEta <<
51  " biasVoltage " << biasVoltage <<
52  " depletionVoltage " << depletionVoltage <<
53  " temperature " << temperature);
54  }
55 
56  return StatusCode::SUCCESS;
57 }
58 
60 {
61  return StatusCode::SUCCESS;
62 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
SCTSiLorentzAngleTestAlg.h
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
SCTSiLorentzAngleTestAlg::SCTSiLorentzAngleTestAlg
SCTSiLorentzAngleTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCTSiLorentzAngleTestAlg.cxx:20
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SCTSiLorentzAngleTestAlg::initialize
virtual StatusCode initialize() override
Definition: SCTSiLorentzAngleTestAlg.cxx:26
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
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
SCTSiLorentzAngleTestAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: SCTSiLorentzAngleTestAlg.cxx:34
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
SCTSiLorentzAngleTestAlg::finalize
virtual StatusCode finalize() override
Definition: SCTSiLorentzAngleTestAlg.cxx:59
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
SCTSiLorentzAngleTestAlg::m_id
const SCT_ID * m_id
Definition: SCTSiLorentzAngleTestAlg.h:40
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
SCTSiLorentzAngleTestAlg::m_tool
ToolHandle< ISiLorentzAngleTool > m_tool
Definition: SCTSiLorentzAngleTestAlg.h:39