ATLAS Offline Software
Loading...
Searching...
No Matches
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
9
10// Local include
12
13// Athena include
15
16// Gaudi include
17
18// STL include
19
20SCTSiLorentzAngleTestAlg::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
34StatusCode 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}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
This is an Identifier helper class for the SCT subdetector.
const ServiceHandle< StoreGateSvc > & detStore() const
An algorithm that can be simultaneously executed in multiple threads.
This is a "hash" representation of an Identifier.
virtual StatusCode initialize() override
ToolHandle< ISiLorentzAngleTool > m_tool
virtual StatusCode execute(const EventContext &ctx) const override
virtual StatusCode finalize() override
SCTSiLorentzAngleTestAlg(const std::string &name, ISvcLocator *pSvcLocator)