30 return StatusCode::SUCCESS;
38 return StatusCode::FAILURE;
46 std::vector<SelDecorator> selDecors;
48 selDecors.emplace_back(key, ctx);
51 if (particle->pt() <
m_ptMin)
continue;
52 if (!selDecors.empty() && std::find_if(selDecors.begin(), selDecors.end(),
53 [particle](
const SelDecorator& dec){
54 return dec(*particle);
55 }) == selDecors.end())
continue;
63 track_part = muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
66 track_part = muon->trackParticle(xAOD::Muon::Primary);
70 ATH_MSG_ERROR(
"Unable to retrieve xAOD::TrackParticle from probe object");
71 return StatusCode::FAILURE;
76 std::vector<float>& dep_val{dec_deposit(*particle)};
77 std::vector<float>& eloss_val{dec_eloss(*particle)};
78 std::vector<uint16_t>&
types{dec_type(*particle)};
79 dep_val.reserve(deposits.size());
80 eloss_val.reserve(deposits.size());
81 types.reserve(deposits.size());
83 dep_val.push_back(it.energyDeposited());
84 eloss_val.push_back(it.muonEnergyLoss());
85 types.push_back(it.subCaloId());
88 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
static const std::vector< std::string > types
Handle class for reading a decoration on an object.
Handle class for adding a decoration to an object.
An algorithm that can be simultaneously executed in multiple threads.
Container class for CaloCell.
class describing the measured energy loss associated to muons on the detector level,...
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_typeKey
IDTrackCaloDepositsDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< xAOD::IParticleContainer > m_partKey
Particle container to decorate the Pivot plane coordinates to.
ToolHandle< ITrackDepositInCaloTool > m_trkDepositInCalo
StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< std::vector< std::string > > m_trkSelDecors
Optional list of decorators to select only the good tracks for the isolation decoration.
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_elossKey
StatusCode initialize() override
SG::ReadDecorHandleKeyArray< xAOD::IParticleContainer > m_trkSelKeys
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_depositKey
Gaudi::Property< float > m_ptMin
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Handle class for reading a decoration on an object.
bool isPresent() const
Is the referenced object present in SG?
Class providing the definition of the 4-vector interface.
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
SG::WriteDecorHandle< ContType, dType > makeHandle(const EventContext &ctx, const SG::WriteDecorHandleKey< ContType > &key, const dType &defValue=dType{})
@ TrackParticle
The object is a charged track particle.
@ Muon
The object is a muon.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Muon_v1 Muon
Reference the current persistent version: