|
ATLAS Offline Software
|
Go to the documentation of this file.
35 return StatusCode::SUCCESS;
44 return StatusCode::SUCCESS;
49 std::map<
Identifier, std::vector<const LArTTL1*>> &towerMap)
const
57 std::map<Identifier, std::vector<const LArTTL1*>>
::iterator test = towerMap.find(
id );
59 if (
test != towerMap.end()) {
61 test->second.push_back(tower);
65 std::vector<const LArTTL1*>
towers;
67 towerMap.emplace(
id,
towers);
78 const std::string &
label)
const
81 std::map<Identifier, std::vector<const LArTTL1*>> towerMap;
86 ATH_MSG_ERROR(
"Could not get background " <<
label <<
" LArTTL1Container container " << bkgTowers.
name() <<
" from store " << bkgTowers.
store());
87 return StatusCode::FAILURE;
94 ATH_MSG_ERROR(
"Could not get signal " <<
label <<
" LArTTL1Container container " << signalTowers.
name() <<
" from store " << signalTowers.
store());
95 return StatusCode::FAILURE;
105 ATH_CHECK( outputContainer.
record(std::make_unique<LArTTL1Container>()) );
114 std::vector<float> mergedAmps;
116 if (mergedAmps.empty()) {
117 mergedAmps = tower->samples();
119 std::vector<float> amps = tower->samples();
120 if (amps.size() != mergedAmps.size()) {
121 ATH_MSG_WARNING(
"LAr " <<
label <<
" vectors have different lengths: " << amps.size() <<
", " << mergedAmps.size());
123 for (
size_t i = 0;
i < amps.size(); ++
i) {
124 mergedAmps[
i] += amps[
i];
131 std::unique_ptr<LArTTL1> ttL1 = std::make_unique<LArTTL1>(hwId, Id, mergedAmps);
132 outputContainer->
push_back(ttL1.release());
135 return StatusCode::SUCCESS;
JetConstituentVector::iterator iterator
SG::ReadHandleKey< LArTTL1Container > m_signalHadTTL1Key
const_pointer_type cptr()
Dereference the pointer.
StatusCode overlay(const EventContext &ctx, const SG::ReadHandleKey< LArTTL1Container > &bkgKey, const SG::ReadHandleKey< LArTTL1Container > &signalKey, const SG::WriteHandleKey< LArTTL1Container > &outputKey, const std::string &label) const
Main algorithm execute.
const std::string & name() const
Return the StoreGate ID for the referenced object.
LArTTL1Overlay(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override final
#define ATH_MSG_VERBOSE(x)
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
SG::WriteHandleKey< LArTTL1Container > m_outputEmTTL1Key
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadHandleKey< LArTTL1Container > m_bkgHadTTL1Key
Handle class for recording to StoreGate.
virtual StatusCode execute(const EventContext &ctx) const override final
Main algorithm execute.
SG::ReadHandleKey< LArTTL1Container > m_signalEmTTL1Key
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string store() const
Return the name of the store holding the object we are proxying.
void groupTowers(const LArTTL1Container *towers, std::map< Identifier, std::vector< const LArTTL1 * >> &towerMap) const
Steps over LAr tower collection and overlays on existing collection.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Container class for LArTTL1.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const HWIdentifier & ttOnlineID() const
return LArTTChannelID (online Id)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::WriteHandleKey< LArTTL1Container > m_outputHadTTL1Key
SG::ReadHandleKey< LArTTL1Container > m_bkgEmTTL1Key
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
const Identifier & ttOfflineID() const
return TT offline Identifier
Handle class for reading from StoreGate.
Liquid Argon TT L1 sum class.