12 constexpr float min_warn_pt = 3500;
13 constexpr float dummy_result = 5.;
37 return StatusCode::SUCCESS;
44 return StatusCode::FAILURE;
53 std::vector<SelDecorator> selDecors;
55 selDecors.emplace_back(key, ctx);
63 return StatusCode::FAILURE;
68 track = probeMuon->
trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle);
71 bool passSelection = muon->pt() >
m_ptMin && (selDecors.empty () ||
72 std::find_if(selDecors.begin(),selDecors.end(),
73 [&muon](
const SelDecorator& dec){
75 }) != selDecors.end());
77 int extr_code = ExtStatus::NotPresent;
78 float eta{dummy_result},
phi{dummy_result};
81 if (passSelection && muon->pt() > min_warn_pt)
82 ATH_MSG_WARNING(
"Warning - Pivot plane extrapolation failed for a track particle with IP pt "
83 << muon->pt() <<
", eta " << muon->eta() <<
", phi " << muon->phi());
84 extr_code = ExtStatus::Failed;
86 eta = pTag->position().eta();
87 phi = pTag->position().phi();
88 extr_code = ExtStatus::Success;
92 dec_Decorated(*muon) = extr_code;
94 return StatusCode::SUCCESS;
100 const Trk::Perigee& perigee = track.perigeeParameters();
105 std::unique_ptr<Trk::CylinderSurface> cylinder =
109 bool boundaryCheck =
true;
111 std::unique_ptr<Trk::TrackParameters> p{
125 const int SignOfEta = track.eta() > 0 ? 1. : -1.;
131 boundaryCheck =
false;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Handle class for reading a decoration on an object.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Class providing the definition of the 4-vector interface.
const TrackParticle * primaryTrackParticle() const
Returns a pointer (which should not usually be NULL, but might be if the muon has been stripped of in...
const TrackParticle * trackParticle(TrackParticleType type) const
Returns a pointer (which can be NULL) to the TrackParticle used in identification of this muon.
Eigen::Affine3d Transform3D
SG::WriteDecorHandle< ContType, dType > makeHandle(const EventContext &ctx, const SG::WriteDecorHandleKey< ContType > &key, const dType &defValue=dType{})
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
@ TrackParticle
The object is a charged track particle.
@ Muon
The object is a muon.
@ TruthParticle
The object is a truth particle.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Muon_v1 Muon
Reference the current persistent version: