|
ATLAS Offline Software
|
Go to the documentation of this file.
42 return StatusCode::SUCCESS;
70 ATH_CHECK(outputRawChannels.
record(std::make_unique<LArRawChannelContainer>()));
75 std::bitset<200000> keepCellSet;
76 size_t nCellsAllClus = 0;
84 ATH_MSG_DEBUG(
"Cluster pt: "<< clus->pt()<<
", eta/phi: "<< clus->eta() <<
" / "<< clus->phi());
89 ATH_MSG_DEBUG(
" Cluster without cell links found in collection: " <<
m_clusterCntKey.
key() <<
" ===> cells cannot be written in AOD as requested ! " );
97 nCellsAllClus += cellLinks->
size();
101 if (
it.index() >= inputCellContainer->
size()) {
113 if (!keepCellSet.test(chOnlHash)){
114 keepCellSet.set(chOnlHash);
115 outputCells->push_back(
cell);
120 ATH_MSG_DEBUG(
"\tTotal Copied " << outputCells->size() <<
" of " << nCellsAllClus <<
" calo cells, linked to CaloCluster.");
122 if (keepCellSet.any()){
126 if (keepCellSet.test(onlHash)) {
127 outputRawChannels->push_back(
chan);
130 ATH_MSG_DEBUG(
"\tCopied " << outputRawChannels->size() <<
" of " << (*inputRawChContainer).size() <<
" raw channels.");
133 for (
const LArDigit* dig : *inputDigitsContainer) {
135 if (keepCellSet.test(onlHash)) {
136 outputDigits->push_back(dig);
139 ATH_MSG_DEBUG(
"\tCopied " << outputDigits->size() <<
" of " << inputDigitsContainer->size() <<
" digits.");
144 if (keepCellSet.any()){
147 for (
const LArHit* hit : *inputHitsContainer) {
151 if (keepCellSet.test(onlHash)) {
152 LArHit* clusHit =
new LArHit(hit->cellID(),hit->energy(),hit->time());
158 ATH_MSG_DEBUG(
"\tCopied " << outputHits->
size() <<
" of " << inputHitsContainer->size() <<
" hits.");
162 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
SG::WriteHandleKey< ConstCaloCellCont_t > m_caloCellOutputKey
Gaudi::Property< float > m_clusterPtCut
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
void finalize()
The method to be called at the end of event by SD.
const ID_type & dataID() const
Get the key that we reference, as a string.
const_iterator begin() const
const begin method
const std::string & key() const
Return the StoreGate ID for the referenced object.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
const DataLink< CaloCellContainer > & getCellContainerLink() const
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
Description of a calorimeter cluster.
virtual StatusCode initialize() override
Gaudi initialize method.
const CaloCell_ID * m_caloCellId
SG::WriteHandleKey< ConstLArDigitCont_t > m_digitsOutputKey
Liquid Argon digit base class.
Liquid Argon ROD output object base class.
virtual StatusCode execute(const EventContext &ctx) const override
Execute the algorithm.
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadHandleKey< LArDigitContainer > m_digitsInputKey
Gaudi::Property< bool > m_isMC
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterCntKey
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
HWIdentifier createSignalChannelID(const Identifier &id) const
create a HWIdentifier from an Identifier (not inline)
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
size_t size() const
size method
StatusCode initialize(bool used=true)
Class to store hit energy and time in LAr cell from G4 simulation.
const_iterator end() const
const end method
SG::ReadHandleKey< LArRawChannelContainer > m_rawChInputKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Data object for each calorimeter readout cell.
SG::WriteHandleKey< LArRawChannelContainer > m_rawChOutputKey
SG::ReadHandleKey< LArHitContainer > m_hitsInputKey
Handle class for reading from StoreGate.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
SG::ReadHandleKey< CaloCellContainer > m_caloCellInputKey
const_iterator to loop over cells belonging to a cluster
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Property< float > m_clusterEtaCut
SG::WriteHandleKey< LArHitContainer > m_hitsOutputKey
const LArOnlineID * m_onlineID