|
ATLAS Offline Software
|
Go to the documentation of this file.
21 return StatusCode::FAILURE;
23 return StatusCode::SUCCESS;
29 std::map<Identifier, std::vector<const xAOD::MuonSimHit*>,
39 overlayed[hit->identify()].push_back(hit);
41 }
while (viewer.next());
43 return StatusCode::SUCCESS;
50 ATH_CHECK(writeHandle.record(std::make_unique<xAOD::MuonSimHitContainer>(),
51 std::make_unique<xAOD::MuonSimHitAuxContainer>()));
53 for (
auto& [mergeId,
hits] : overlayed) {
56 return a->globalTime() <
b->globalTime();
59 for (
auto itr =
hits.begin(); itr !=
hits.end(); ++itr){
65 xAOD::MuonSimHit* merged = writeHandle->push_back(std::make_unique<xAOD::MuonSimHit>());
66 (*merged) = (*primHit);
67 auto mergeItr = itr +1;
68 for ( ; mergeItr !=
hits.end(); ++mergeItr) {
74 if(mergeMe->globalTime() - primHit->globalTime() <
m_mergeTime) {
76 if (std::abs(mergeMe->pdgId()) == 13 || (mergeMe->genParticleLink() && !merged->
genParticleLink())){
78 (*merged) = (*mergeMe);
81 merged->
setEnergyDeposit(mergeMe->energyDeposit() + primHit->energyDeposit());
82 }
else if (mergeMe->globalTime() - primHit->globalTime() <
m_deadTime) {
91 return StatusCode::SUCCESS;
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Property< double > m_mergeTime
Define a detector merge time.
StatusCode execute(const EventContext &ctx) const override final
SG::ReadHandleKey< xAOD::MuonSimHitContainer > m_bkgKey
#define ATH_MSG_VERBOSE(x)
Property holding a SG store/key/clid from which a ReadHandle is made.
bool ignoreTruthLink(const T &p, bool vetoPileUp)
Helper function for SDO creation in PileUpTools.
Gaudi::Property< double > m_deadTime
Define a detector dead time.
Handle class for recording to StoreGate.
const HepMcParticleLink & genParticleLink() const
Returns the link to the HepMC particle producing this hit.
Gaudi::Property< bool > m_includePileUpTruth
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode initialize() override final
SG::ReadHandleKey< xAOD::MuonSimHitContainer > m_sigKey
Gaudi::Property< int > m_vetoPileUpTruthLinks
void setEnergyDeposit(const float deposit)
Sets the energy deposited by the traversing particle inside the gas volume.
This header ties the generic definitions in this package.
SG::WriteHandleKey< xAOD::MuonSimHitContainer > m_writeKey
float energyDeposit() const
Returns the energy deposited by the traversing particle inside the gas volume.
Handle class for reading from StoreGate.