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);
void beginEvent() override
void operator()(PFTau &) const override
PFRecoTauMassPlugin(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
#define DEFINE_EDM_PLUGIN(factory, type, name)
~PFRecoTauMassPlugin() override