CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
reco::tau::RecoTauEnergyRecoveryPlugin2 Class Reference
Inheritance diagram for reco::tau::RecoTauEnergyRecoveryPlugin2:
reco::tau::RecoTauModifierPlugin reco::tau::RecoTauEventHolderPlugin reco::tau::RecoTauNamedPlugin

Public Member Functions

void beginEvent () override
 
void operator() (PFTau &) const override
 
 RecoTauEnergyRecoveryPlugin2 (const edm::ParameterSet &, edm::ConsumesCollector &&iC)
 
 ~RecoTauEnergyRecoveryPlugin2 () override
 
- Public Member Functions inherited from reco::tau::RecoTauModifierPlugin
virtual void endEvent ()
 
 RecoTauModifierPlugin (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
 ~RecoTauModifierPlugin () override
 
- Public Member Functions inherited from reco::tau::RecoTauEventHolderPlugin
const edm::Eventevt () const
 
edm::Eventevt ()
 
const edm::EventSetupevtSetup () const
 
 RecoTauEventHolderPlugin (const edm::ParameterSet &pset)
 
void setup (edm::Event &, const edm::EventSetup &)
 
 ~RecoTauEventHolderPlugin () override
 
- Public Member Functions inherited from reco::tau::RecoTauNamedPlugin
const std::string & name () const
 
 RecoTauNamedPlugin (const edm::ParameterSet &pset)
 
virtual ~RecoTauNamedPlugin ()
 

Private Attributes

double dRcone_
 

Detailed Description

Definition at line 36 of file RecoTauEnergyRecoveryPlugin2.cc.

Constructor & Destructor Documentation

reco::tau::RecoTauEnergyRecoveryPlugin2::RecoTauEnergyRecoveryPlugin2 ( const edm::ParameterSet cfg,
edm::ConsumesCollector &&  iC 
)
explicit

Definition at line 47 of file RecoTauEnergyRecoveryPlugin2.cc.

49  : RecoTauModifierPlugin(cfg, std::move(iC)), dRcone_(cfg.getParameter<double>("dRcone")) {}
def move
Definition: eostools.py:511
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
RecoTauModifierPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
reco::tau::RecoTauEnergyRecoveryPlugin2::~RecoTauEnergyRecoveryPlugin2 ( )
override

Definition at line 51 of file RecoTauEnergyRecoveryPlugin2.cc.

51 {}

Member Function Documentation

void reco::tau::RecoTauEnergyRecoveryPlugin2::beginEvent ( )
overridevirtual

Reimplemented from reco::tau::RecoTauModifierPlugin.

Definition at line 53 of file RecoTauEnergyRecoveryPlugin2.cc.

53 {}
void reco::tau::RecoTauEnergyRecoveryPlugin2::operator() ( PFTau tau) const
overridevirtual

Implements reco::tau::RecoTauModifierPlugin.

Definition at line 55 of file RecoTauEnergyRecoveryPlugin2.cc.

References reco::deltaR(), dRcone_, reco::PFTau::jetRef(), reco::RecoCandidate::p4, and reco::BaseTau::setalternatLorentzVect().

55  {
56  reco::Candidate::LorentzVector tauAltP4(0., 0., 0., 0.);
57 
58  std::vector<reco::CandidatePtr> pfJetConstituents = tau.jetRef()->getJetConstituents();
59  for (std::vector<reco::CandidatePtr>::const_iterator pfJetConstituent = pfJetConstituents.begin();
60  pfJetConstituent != pfJetConstituents.end();
61  ++pfJetConstituent) {
62  double dR = deltaR((*pfJetConstituent)->p4(), tau.p4());
63  if (dR < dRcone_)
64  tauAltP4 += (*pfJetConstituent)->p4();
65  }
66 
67  tau.setalternatLorentzVect(tauAltP4);
68  }
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36

Member Data Documentation

double reco::tau::RecoTauEnergyRecoveryPlugin2::dRcone_
private

Definition at line 44 of file RecoTauEnergyRecoveryPlugin2.cc.

Referenced by operator()().