22 namespace reco {
namespace tau {
55 std::cout <<
"<PFRecoTauMassPlugin::operator()>:" << std::endl;
56 std::cout <<
"tau: Pt = " << tau.
pt() <<
", eta = " << tau.
eta() <<
", phi = " << tau.
phi() <<
", mass = " << tau.
mass() <<
" (decayMode = " << tau.
decayMode() <<
")" << std::endl;
60 double tauEn = tau.
energy();
61 const double chargedPionMass = 0.13957;
62 if ( tauEn < chargedPionMass ) tauEn = chargedPionMass;
63 double tauP_modified = TMath::Sqrt(tauEn*tauEn - chargedPionMass*chargedPionMass);
64 double tauPx_modified = TMath::Cos(tau.
phi())*TMath::Sin(tau.
theta())*tauP_modified;
65 double tauPy_modified = TMath::Sin(tau.
phi())*TMath::Sin(tau.
theta())*tauP_modified;
66 double tauPz_modified = TMath::Cos(tau.
theta())*tauP_modified;
69 std::cout <<
"--> setting tauP4: Pt = " << tauP4_modified.pt() <<
", eta = " << tauP4_modified.eta() <<
", phi = " << tauP4_modified.phi() <<
", mass = " << tauP4_modified.mass() << std::endl;
71 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
bool exists(std::string const ¶meterName) const
checks if a parameter exists
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