|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/SystemOfUnits.h"
17 #include "lwtnn/LightweightGraph.hh"
18 #include "lwtnn/parse_json.hh"
36 ATH_MSG_ERROR (
"useDB requested but neither Run1DSPThresholdsKey nor Run2DSPThresholdsKey initialized.");
37 return StatusCode::FAILURE;
43 return StatusCode::SUCCESS;
54 auto outputContainerLRPtr = std::make_unique<LArRawChannelContainer>();
69 const bool connected = (*cabling)->isOnlineConnected(
id);
74 const std::vector<short>& samples =
digit->samples();
79 return StatusCode::FAILURE;
83 std::vector<short>subsamples(
nSamples, 0.0);
96 if (!connected)
continue;
99 return StatusCode::FAILURE;
103 if (!connected)
continue;
105 <<
" gain " <<
gain);
106 return StatusCode::FAILURE;
115 std::vector<float>samp_no_ped(
nSamples, 0.0);
117 if (subsamples[
i] == 4096 || subsamples[
i] == 0)
saturated =
true;
118 samp_no_ped[
i] = subsamples[
i]-
p;
122 std::map<std::string, std::map<std::string, double> >
inputs;
123 std::map<std::string, std::map<std::string, std::vector<double> > >input_sequences;
130 std::vector<double>nn_in;
134 for (
auto d : subsamples) {
136 nn_in.push_back((
d-
p)/4096.0);
145 input_sequences[
"node_0"] = {
150 inputs[
"node_0"] = {{
"variable_0", 0}};
162 const float E = adc2mev[0]+
A*adc2mev[1];
172 outputContainerLRPtr->emplace_back(
id,
static_cast<int>(std::floor(
E+0.5)),
173 static_cast<int>(std::floor(tau+0.5)),
182 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
virtual float pedestal(const HWIdentifier &id, int gain) const =0
const LArVectorProxy ADC2MEV(const HWIdentifier &id, int gain) const
StatusCode initialize() override
SG::ReadCondHandleKey< ILArShape > m_shapeKey
Gaudi::Property< std::string > m_input_node
SG::ReadCondHandleKey< LArDSPThresholdsComplete > m_run1DSPThresholdsKey
SG::ReadCondHandleKey< ILArOFC > m_ofcKey
#define ATH_MSG_VERBOSE(x)
bool empty() const
Test if the key is blank.
SG::ReadCondHandleKey< AthenaAttributeList > m_run2DSPThresholdsKey
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
SG::WriteHandleKey< LArRawChannelContainer > m_rawChannelKey
Gaudi::Property< std::string > m_network_output
setScaleOne setStatusOne saturated
Liquid Argon digit base class.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::string > m_nn_json
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Gaudi::Property< bool > m_useDBFortQ
SG::ReadHandleKey< LArDigitContainer > m_digitKey
SG::ReadCondHandleKey< LArADC2MeV > m_adc2MeVKey
StatusCode execute(const EventContext &ctx) const override
StatusCode initialize(bool used=true)
const LArOnlineID * m_onlineId
GraphConfig parse_json_graph(std::istream &json)
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
Gaudi::Property< int > m_firstSample
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey