Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "CLHEP/Random/RandFlat.h"
33 return StatusCode::SUCCESS;
38 return StatusCode::SUCCESS;
42 const EventContext& ctx{Gaudi::Hive::currentContext()};
49 return StatusCode::SUCCESS;
55 std::unordered_map <const SpacePointBucket*, std::vector<const Segment*>> segmentMap;
78 CLHEP::RandFlat::shoot(rndEngine,0.,1.) >
m_fracToKeep) {
87 std::unordered_map<const SpacePoint*, std::vector<int16_t>> spacePointToSegment;
89 auto match_itr = segmentMap.find(bucket);
91 if (match_itr != segmentMap.end()) {
92 unsigned int segIdx{0};
94 for (
const auto& meas :
segment->measurements()) {
96 spacePointToSegment[meas->spacePoint()].push_back(segIdx);
110 std::unordered_map<Identifier, unsigned> layNumbers{};
112 for(
const SpacePointBucket::value_type& sp : *bucket) {
113 const unsigned layer{layNumbers.insert(
114 std::make_pair(layerSorter.detectorLayerId(sp->identify()),
115 layNumbers.size())).first->second};
139 const std::vector<int16_t>& segIdxs = spacePointToSegment[sp.get()];
161 Amg::Vector3D globalPos = sp->msSector()->localToGlobalTrans(*gctx) * sp->positionInChamber();
168 return StatusCode::FAILURE;
172 return StatusCode::SUCCESS;
179 rngWrapper->
setSeed(rngName, ctx);
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
MuonVal::VectorBranch< unsigned int > & m_spoint_dimension
CLHEP::HepRandomEngine * getRandomEngine(const EventContext &ctx) const
: The muon space point bucket represents a collection of points that will bre processed together in t...
StatusCode init(OWNER *instance)
Initialize method.
MuonVal::VectorBranch< uint16_t > & m_spoint_adc
MuonVal::ScalarBranch< float > & m_bucket_max
The SpacePointPerLayerSorter sort two given space points by their layer Identifier.
MuonVal::MuonTesterTree m_tree
MuonVal::VectorBranch< float > & m_spoint_covYX
virtual StatusCode execute() override final
Placeholder for what will later be the muon segment EDM representation.
MuonVal::MuonIdentifierBranch m_spoint_id
MuonVal::ThreeVectorBranch m_spoint_globalPosition
SG::ReadHandleKeyArray< SpacePointContainer > m_spacePointKeys
virtual StatusCode finalize() override final
#define ATH_MSG_VERBOSE(x)
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
MuonVal::ScalarBranch< float > & m_bucket_min
MuonVal::VectorBranch< unsigned int > & m_spoint_nPhiInstances
@ MdtStatusDriftTime
The tube produced a vaild measurement.
ServiceHandle< IAthRNGSvc > m_rndmSvc
MuonVal::ThreeVectorBranch m_segmentPos
MuonVal::VectorBranch< float > & m_spoint_covXY
MuonVal::VectorBranch< float > & m_spoint_covY
MuonVal::ScalarBranch< uint16_t > & m_bucket_layers
MuonVal::VectorBranch< unsigned short > & m_spoint_measuresPhi
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
MuonVal::ThreeVectorBranch m_spoint_localPosition
Gaudi::Property< bool > m_isMC
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
void disableBranch(const std::string &br_name)
Skips the branch from being added to the tree.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< double > m_fracToKeep
virtual void push_back(const Identifier &id)
MuonVal::VectorBranch< unsigned short > & m_spoint_isStrip
MuonVal::VectorBranch< unsigned short > & m_spoint_isMdt
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MuonVal::VectorBranch< unsigned short > & m_spoint_measuresEta
MuonVal::MatrixBranch< int16_t > & m_spoint_mat
MuonVal::VectorBranch< unsigned short > & m_spoint_trueLabel
Include the GeoPrimitives which need to be put first.
std::string name() const override final
Returns the name of the branch.
MuonVal::VectorBranch< float > & m_spoint_driftR
void push_back(const T &value)
Adds a new element at the end of the vector.
virtual StatusCode initialize() override final
MuonVal::VectorBranch< uint16_t > & m_spoint_layer
A wrapper class for event-slot-local random engines.
MuonVal::VectorBranch< uint16_t > & m_spoint_tdc
Eigen::Matrix< double, 3, 1 > Vector3D
SG::ReadHandleKeyArray< MuonR4::SegmentContainer > m_inSegmentKeys
MuonVal::ScalarBranch< uint16_t > & m_bucket_spacePoints
MuonVal::ScalarBranch< uint16_t > & m_bucket_segments
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
StatusCode dumpContainer(const EventContext &ctx, const SG::ReadHandleKey< SpacePointContainer > &spacePointKey, const SG::ReadHandleKey< SegmentContainer > &segmentKey)
Dumps the space point container with the associated muon segment container.
This header ties the generic definitions in this package.
MuonVal::VectorBranch< float > & m_segment_numberDoF
bool fill(const EventContext &ctx)
Fills the tree per call.
MuonVal::VectorBranch< float > & m_segment_chiSquared
StatusCode write()
Finally write the TTree objects.
ToolHandle< MuonValR4::IPatternVisualizationTool > m_visionTool
Pattern visualization tool.
size_t size() const
Returns the number of actual saved elements.
Gaudi::Property< std::string > m_streamName
Handle class for reading from StoreGate.
https://gitlab.cern.ch/atlas/athena/-/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecEvent/Mu...
MuonVal::ThreeVectorBranch m_segmentDir
MuonVal::VectorBranch< unsigned int > & m_spoint_nEtaInstances
MuonVal::VectorBranch< float > & m_spoint_covX
TTree * tree()
TTree object.
MuonVal::VectorBranch< uint16_t > & m_spoint_nSegments
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
bool addBranch(std::shared_ptr< IMuonTesterBranch > branch)
Branch is added to the tree without transferring the ownership.