ATLAS Offline Software
Loading...
Searching...
No Matches
SimHitTester.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef PRDTESTERR4_SIMHITEST_H
6#define PRDTESTERR4_SIMHITEST_H
10namespace MuonValR4{
12 public:
14 const std::string& inContainer,
15 const ActsTrk::DetectorType detType,
16 MSG::Level msgLvl = MSG::Level::INFO);
17
18 bool declare_keys() override final;
19
20 bool fill(const EventContext& ctx) override final;
21
22 unsigned push_back(const xAOD::MuonSimHit& hit);
23
24 private:
25 unsigned int fillHit(const EventContext& ctx,
26 const xAOD::MuonSimHit& hit);
30 std::string m_collName{};
52 std::shared_ptr<MuonIdentifierBranch> m_identifier{};
53
55 std::unordered_map<const xAOD::MuonSimHit*, unsigned int> m_idxLookUp{};
56
57 };
58}
59#endif
bool msgLvl(const MSG::Level lvl) const
Test the output level.
unsigned push_back(const xAOD::MuonSimHit &hit)
std::unordered_map< const xAOD::MuonSimHit *, unsigned int > m_idxLookUp
look up table of alrady dumped sim hits
std::string m_collName
Name of the SimHit collection in the output tree.
SG::ReadHandleKey< xAOD::MuonSimHitContainer > m_key
Key of the SimHit container in the StoreGate.
VectorBranch< float > & m_kinE
Kinetic energy of the traversing particle.
bool fill(const EventContext &ctx) override final
The fill method checks if enough information is provided such that the branch is cleared from the inf...
ThreeVectorBranch m_globDir
Global direction of the traversing particle generating the hit.
unsigned int fillHit(const EventContext &ctx, const xAOD::MuonSimHit &hit)
VectorBranch< float > & m_beta
Velocity of the simHit expressed in terms of beta.
VectorBranch< float > & m_mass
Mass of the traversing particle.
ThreeVectorBranch m_locPos
Local position of the produced simHit.
VectorBranch< float > & m_globTime
Global time when the simHit was produced.
ThreeVectorBranch m_locDir
Local direction of the traversing particle generating the hit.
ThreeVectorBranch m_globPos
Global position of the SimHits.
VectorBranch< int > & m_pdgId
PdgId of the particle generating the hit.
bool declare_keys() override final
VectorBranch< float > & m_energyDep
Energy deposited in the volume.
SimHitTester(MuonTesterTree &tree, const std::string &inContainer, const ActsTrk::DetectorType detType, MSG::Level msgLvl=MSG::Level::INFO)
std::shared_ptr< MuonIdentifierBranch > m_identifier
Pointer to the Identifier branch.
TesterModuleBase(MuonTesterTree &tree, const std::string &grp_name, MSG::Level msglvl=MSG::Level::INFO)
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
TTree * tree() override final
Returns the underlying TTree object.
VectorBranch< T > & newVector(const std::string &name)
Creates new branches and returns their reference.
Property holding a SG store/key/clid from which a ReadHandle is made.
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
MuonSimHit_v1 MuonSimHit
Defined the version of the MuonSimHit.
Definition MuonSimHit.h:12