 |
ATLAS Offline Software
|
Go to the documentation of this file.
40 return StatusCode::SUCCESS;
49 ATH_CHECK(outputCands.
record(std::make_unique<L0Muon::RPCCandDataContainer>()));
61 ATH_MSG_ERROR(
"No valid option selected for building candidates.");
62 return StatusCode::FAILURE;
75 return StatusCode::SUCCESS;
77 std::vector<const xAOD::MuonSimHit*>
79 const EventContext& ctx)
const {
85 std::vector<const xAOD::MuonSimHit*> rpcHits{};
87 for (
const SegLink_t& link : acc_link(truthPart)) {
99 return a->identify() <
b->identify();
105 const EventContext &ctx)
const
119 if (rpcHits.empty()) {
136 auto cand = std::make_unique<L0Muon::RPCCandData>(subdetectorId, 0, 0);
141 cand->setThreshold(0);
145 std::array<float, 4> zPos{};
146 std::array<int, 4> nZPos{};
164 const int dR = id_helper.doubletR(
id);
179 for (
int i = 0;
i < 4; ++
i) {
181 zPos[
i] = std::abs(zPos[
i]);
185 cand->setZPos(
static_cast<uint16_t>(zPos[
i]/
193 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
Identifier identify() const
Returns the global ATLAS identifier of the SimHit.
Scalar phi() const
phi method
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthPartKey
truth containers
ToolHandle< GenericMonitoringTool > m_monTool
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
Scalar eta() const
pseudorapidity method
SG::WriteHandleKey< L0Muon::RPCCandDataContainer > m_outputCandKey
Output Trigger candidates.
Class describing a MuonSegment.
std::vector< const xAOD::MuonSimHit * > collectHits(const xAOD::TruthParticle &truthPart, const EventContext &ctx) const
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
StatusCode buildFromTruth(L0Muon::RPCCandDataContainer &outputCands, const EventContext &ctx) const
build the candidates from the MC truth
static constexpr uint16_t s_zPosBitRange
12 bits for z position
virtual StatusCode initialize() override
Handle class for recording to StoreGate.
Handle class for reading a decoration on an object.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
::StatusCode StatusCode
StatusCode definition for legacy code.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
helper service
Class describing a truth particle in the MC record.
const MuonGMR4::MuonDetectorManager * m_detMgr
Out copy_if(In first, const In &last, Out res, const Pred &p)
Gaudi::Property< bool > m_useTruth
configuration options
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ElementLink< MuonR4::SegmentContainer > SegLink_t
Abrivation of the link to the reco segment container
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_segmentLinkKey
StIndex
enum to classify the different station layers in the muon spectrometer
ElementLink implementation for ROOT usage.
virtual StatusCode execute(const EventContext &ctx) const override
double charge(const T &p)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
bool isBarrel(const ChIndex index)
Returns true if the chamber index points to a barrel chamber.
static constexpr float s_zPosRange
range of the RPC hits z positions
std::vector< SegLink_t > SegLinkVec_t
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< xAOD::NRPCRDOContainer > m_keyRpcRdo
RPC Rdo.
Handle class for reading a decoration on an object.
bool isPresent() const
Is the referenced object present in SG?
Declare a monitored scalar variable.
Handle class for reading from StoreGate.
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits(const xAOD::MuonSegment &segment)
: Returns all sim hits matched to a xAOD::MuonSegment
Amg::Vector3D stripPosition(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
Returns the position of the strip center.
Gaudi::Property< bool > m_usePatterns