 |
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include <unordered_map>
30 m_muonP4 = std::make_unique<MuonValR4::IParticleFourMomBranch>(
m_tree,
"truthMuon");
33 return StatusCode::SUCCESS;
36 const EventContext& ctx{Gaudi::Hive::currentContext()};
40 std::unordered_map<const xAOD::MuonSimHit*, const xAOD::TruthParticle*> hitPartMap{};
46 hitPartMap[hit] = truthPart;
55 for (
const auto& sp : *bucket) {
57 m_muonP4->push_back(hitPartMap[simHit]);
64 return StatusCode::SUCCESS;
73 case MdtDriftCircleType:{
75 const auto*
re = prd->readoutElement();
84 const auto*
re = prd->readoutElement();
93 const auto*
re = prd->readoutElement();
95 const double halfLength = design.
stripLength(prd->channelNumber());
102 case MMClusterType: {
104 const auto*
re = prd->readoutElement();
111 case sTgcStripType: {
113 const auto*
re = prd->readoutElement();
116 switch (prd->channelType()) {
123 for (
const Amg::Vector2D& corner :
re->localPadCorners(prd->measurementHash())) {
126 xHigh =
std::max(xHigh, corner.x());
127 yHigh =
std::max(yHigh, corner.y());
136 const double halfLength = 0.5*
re->stripLength(prd->measurementHash());
150 return StatusCode::SUCCESS;
const MuonGMR4::SpectrometerSector * msSector() const
RpcMeasurement_v1: Class storing the geneic.
MuonVal::MuonTesterTree m_tree
xAOD::UncalibMeasType type() const
SG::ReadDecorHandleKey< xAOD::MuonSegmentContainer > m_truthLinkKey
: The muon space point bucket represents a collection of points that will bre processed together in t...
MuonVal::VectorBranch< char > & m_truthLink
const xAOD::TruthParticle * getTruthMatchedParticle(const xAOD::MuonSegment &segment)
Returns the particle truth-matched to the segment.
StatusCode init(OWNER *instance)
Initialize method.
std::shared_ptr< MuonVal::IParticleFourMomBranch > m_muonP4
virtual double stripLength(int stripNumb) const
Returns length of the strip.
Eigen::Matrix< double, 2, 1 > Vector2D
@ isMC
Flag determining whether the branch is simulation.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_truthSegKey
const Amg::Transform3D & localToGlobalTrans(const ActsTrk::GeometryContext &gctx) const
Returns the local -> global tarnsformation from the sector.
std::shared_ptr< MuonValR4::SpacePointTesterModule > m_spCollection
virtual StatusCode initialize() override final
Class describing a MuonSegment.
SG::ReadHandleKeyArray< SpacePointContainer > m_spacePointKeys
MuonVal::ThreeVectorBranch m_spGlobPos
const xAOD::UncalibratedMeasurement * primaryMeasurement() const
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
std::size_t fillSpacePoint(const ActsTrk::GeometryContext &gctx, const SpacePoint &sp)
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
Eigen::Affine3d Transform3D
MuonVal::ThreeVectorBranch m_spGlobEdgeHigh
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
MuonVal::VectorBranch< char > & m_spReadoutSide
virtual StatusCode finalize() override final
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
MuonVal::ThreeVectorBranch m_spGlobEdgeLow
Eigen::Matrix< double, 3, 1 > Vector3D
This header ties the generic definitions in this package.
const Amg::Vector3D & localPosition() const
const boost::regex re(r_e)
void set(const Amg::Vector3D &vec, size_t pos)
UncalibMeasType
Define the type of the uncalibrated measurement.
bool fill(const EventContext &ctx)
Fills the tree per call.
const xAOD::MuonSimHit * getTruthMatchedHit(const xAOD::UncalibratedMeasurement &prdHit)
Returns the MuonSimHit, if there's any, matched to the uncalibrated muon measurement.
StatusCode write()
Finally write the TTree objects.
MuonVal::VectorBranch< float > & m_spTime
https://gitlab.cern.ch/atlas/athena/-/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecEvent/Mu...
virtual StatusCode execute() override final
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits(const xAOD::MuonSegment &segment)
: Returns all sim hits matched to a xAOD::MuonSegment
const Amg::Vector3D & sensorDirection() const
bool addBranch(std::shared_ptr< IMuonTesterBranch > branch)
Branch is added to the tree without transferring the ownership.