CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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

virtual void beginEvent () override
 
void operator() (PFTau &) const override
 
 RecoTauEnergyRecoveryPlugin2 (const edm::ParameterSet &, edm::ConsumesCollector &&iC)
 
virtual ~RecoTauEnergyRecoveryPlugin2 ()
 
- Public Member Functions inherited from reco::tau::RecoTauModifierPlugin
virtual void endEvent ()
 
 RecoTauModifierPlugin (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
virtual ~RecoTauModifierPlugin ()
 
- 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 &)
 
virtual ~RecoTauEventHolderPlugin ()
 
- 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 37 of file RecoTauEnergyRecoveryPlugin2.cc.

Constructor & Destructor Documentation

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

Definition at line 51 of file RecoTauEnergyRecoveryPlugin2.cc.

52  : RecoTauModifierPlugin(cfg, std::move(iC)),
53  dRcone_(cfg.getParameter<double>("dRcone"))
54 {}
T getParameter(std::string const &) const
def move
Definition: eostools.py:510
RecoTauModifierPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
reco::tau::RecoTauEnergyRecoveryPlugin2::~RecoTauEnergyRecoveryPlugin2 ( )
virtual

Definition at line 56 of file RecoTauEnergyRecoveryPlugin2.cc.

57 {}

Member Function Documentation

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

Reimplemented from reco::tau::RecoTauModifierPlugin.

Definition at line 59 of file RecoTauEnergyRecoveryPlugin2.cc.

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

Implements reco::tau::RecoTauModifierPlugin.

Definition at line 62 of file RecoTauEnergyRecoveryPlugin2.cc.

References reco::deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, dRcone_, reco::PFTau::jetRef(), reco::LeafCandidate::p4(), and reco::BaseTau::setalternatLorentzVect().

63 {
64  reco::Candidate::LorentzVector tauAltP4(0.,0.,0.,0.);
65 
66  std::vector<reco::PFCandidatePtr> pfJetConstituents = tau.jetRef()->getPFConstituents();
67  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfJetConstituent = pfJetConstituents.begin();
68  pfJetConstituent != pfJetConstituents.end(); ++pfJetConstituent ) {
69  double dR = deltaR((*pfJetConstituent)->p4(), tau.p4());
70  if ( dR < dRcone_ ) tauAltP4 += (*pfJetConstituent)->p4();
71  }
72 
73  tau.setalternatLorentzVect(tauAltP4);
74 }
double deltaR(const T1 &t1, const T2 &t2)
Definition: deltaR.h:48
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37

Member Data Documentation

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

Definition at line 48 of file RecoTauEnergyRecoveryPlugin2.cc.

Referenced by operator()().