22 namespace reco {
namespace tau {
54 std::cout <<
"<PFRecoTauMassPlugin::operator()>:" << std::endl;
55 std::cout <<
"tau: Pt = " << tau.
pt() <<
", eta = " << tau.
eta() <<
", phi = " << tau.
phi() <<
", mass = " << tau.
mass() <<
" (decayMode = " << tau.
decayMode() <<
")" << std::endl;
59 double tauEn = tau.
energy();
60 const double chargedPionMass = 0.13957;
61 if ( tauEn < chargedPionMass ) tauEn = chargedPionMass;
62 double tauP_modified = TMath::Sqrt(tauEn*tauEn - chargedPionMass*chargedPionMass);
63 double tauPx_modified = TMath::Cos(tau.
phi())*TMath::Sin(tau.
theta())*tauP_modified;
64 double tauPy_modified = TMath::Sin(tau.
phi())*TMath::Sin(tau.
theta())*tauP_modified;
65 double tauPz_modified = TMath::Cos(tau.
theta())*tauP_modified;
68 std::cout <<
"--> setting tauP4: Pt = " << tauP4_modified.pt() <<
", eta = " << tauP4_modified.eta() <<
", phi = " << tauP4_modified.phi() <<
", mass = " << tauP4_modified.mass() << std::endl;
70 tau.
setP4(tauP4_modified);
T getParameter(std::string const &) const
double eta() const final
momentum pseudorapidity
double theta() const final
momentum polar angle
void beginEvent() override
double pt() const final
transverse momentum
void operator()(PFTau &) const override
hadronicDecayMode decayMode() const
PFRecoTauMassPlugin(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
double energy() const final
energy
math::XYZTLorentzVector LorentzVector
Lorentz vector.
#define DEFINE_EDM_PLUGIN(factory, type, name)
~PFRecoTauMassPlugin() override
double phi() const final
momentum azimuthal angle
void setP4(const LorentzVector &p4) final
set 4-momentum
double mass() const final
mass