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
virtual double energy() const final
energy
bool exists(std::string const ¶meterName) const
checks if a parameter exists
virtual double phi() const final
momentum azimuthal angle
hadronicDecayMode decayMode() const
PFRecoTauMassPlugin(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
virtual ~PFRecoTauMassPlugin()
virtual void beginEvent()
virtual double mass() const final
mass
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
math::XYZTLorentzVector LorentzVector
Lorentz vector.
void operator()(PFTau &) const
virtual double theta() const final
momentum polar angle
#define DEFINE_EDM_PLUGIN(factory, type, name)
virtual double eta() const final
momentum pseudorapidity
virtual double pt() const final
transverse momentum