14 const SG::AuxElement::ConstAccessor<double> acc_pt_vis(
"pt_vis");
15 const SG::AuxElement::ConstAccessor<double> acc_eta_vis(
"eta_vis");
16 const SG::AuxElement::ConstAccessor<double> acc_phi_vis(
"phi_vis");
17 const SG::AuxElement::ConstAccessor<double> acc_m_vis(
"m_vis");
18 const SG::AuxElement::ConstAccessor<unsigned int> acc_classifierType(
19 "classifierParticleType");
20 const SG::AuxElement::ConstAccessor<unsigned int> acc_classifierOutcome(
21 "classifierParticleOutCome");
28 const std::string& name, ISvcLocator* loc)
45 return StatusCode::SUCCESS;
66 if (acc_classifierType(*tau) !=
IsoTau)
continue;
68 TLorentzVector tauVis;
70 acc_pt_vis(*tau), acc_eta_vis(*tau),
71 acc_phi_vis(*tau), acc_m_vis(*tau));
73 float dR =
jet->p4().DeltaR(tauVis);
82 deltaPt(*
jet) =
static_cast<float>(
jet->pt() - acc_pt_vis(*best));
83 ptVis(*
jet) = acc_pt_vis(*best);
84 outcome(*
jet) = acc_classifierOutcome(*best);
86 unsigned int prong = acc_classifierOutcome(*best);
89 decayMode(*
jet) =
static_cast<int>(
97 deltaPt(*
jet) = std::numeric_limits<float>::quiet_NaN();
98 ptVis(*
jet) = std::numeric_limits<double>::quiet_NaN();
101 decayMode(*
jet) = -1;
105 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for adding a decoration to an object.
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteDecorHandleKey< JC > m_dec_decayMode
SG::WriteDecorHandleKey< JC > m_dec_deltaPt
ToolHandle< TauAnalysisTools::ITauTruthMatchingTool > m_tauTruthTool
SG::ReadHandleKey< TPC > m_truthTauKey
virtual StatusCode initialize() override
virtual StatusCode execute(const EventContext &ctx) const override
SG::WriteDecorHandleKey< JC > m_dec_isHadTau
SG::WriteDecorHandleKey< JC > m_dec_classifierOutcome
Gaudi::Property< float > m_maxDeltaR
TruthTauDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< JC > m_jetKey
SG::WriteDecorHandleKey< JC > m_dec_matched
SG::WriteDecorHandleKey< JC > m_dec_ptVis
Handle class for adding a decoration to an object.
Jet_v1 Jet
Definition of the current "jet version".
TruthParticle_v1 TruthParticle
Typedef to implementation.