48 std::cout <<
"<PFRecoTauMassPlugin::operator()>:" << std::endl;
49 std::cout <<
"tau: Pt = " << tau.
pt() <<
", eta = " << tau.
eta() <<
", phi = " << tau.
phi()
50 <<
", mass = " << tau.
mass() <<
" (decayMode = " << tau.
decayMode() <<
")" << std::endl;
54 double tauEn = tau.
energy();
55 const double chargedPionMass = 0.13957;
56 if (tauEn < chargedPionMass)
57 tauEn = chargedPionMass;
58 double tauP_modified = TMath::Sqrt(tauEn * tauEn - chargedPionMass * chargedPionMass);
59 double tauPx_modified = TMath::Cos(tau.
phi()) * TMath::Sin(tau.
theta()) * tauP_modified;
60 double tauPy_modified = TMath::Sin(tau.
phi()) * TMath::Sin(tau.
theta()) * tauP_modified;
61 double tauPz_modified = TMath::Cos(tau.
theta()) * tauP_modified;
64 std::cout <<
"--> setting tauP4: Pt = " << tauP4_modified.pt() <<
", eta = " << tauP4_modified.eta()
65 <<
", phi = " << tauP4_modified.phi() <<
", mass = " << tauP4_modified.mass() << std::endl;
67 tau.
setP4(tauP4_modified);
double pt() const final
transverse momentum
void beginEvent() override
void operator()(PFTau &) const override
hadronicDecayMode decayMode() const
double theta() const final
momentum polar angle
PFRecoTauMassPlugin(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
T getParameter(std::string const &) const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
double mass() const final
mass
#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 energy() const final
energy
double eta() const final
momentum pseudorapidity