CMS 3D CMS Logo

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

List of all members.

Public Member Functions

virtual void beginEvent ()
void operator() (PFTau &) const
 RecoTauEnergyRecoveryPlugin2 (const edm::ParameterSet &)
virtual ~RecoTauEnergyRecoveryPlugin2 ()

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) [explicit]

Definition at line 51 of file RecoTauEnergyRecoveryPlugin2.cc.

  : RecoTauModifierPlugin(cfg),
    dRcone_(cfg.getParameter<double>("dRcone"))
{}
reco::tau::RecoTauEnergyRecoveryPlugin2::~RecoTauEnergyRecoveryPlugin2 ( ) [virtual]

Definition at line 56 of file RecoTauEnergyRecoveryPlugin2.cc.

{}

Member Function Documentation

void reco::tau::RecoTauEnergyRecoveryPlugin2::beginEvent ( ) [virtual]

Reimplemented from reco::tau::RecoTauModifierPlugin.

Definition at line 59 of file RecoTauEnergyRecoveryPlugin2.cc.

{}
void reco::tau::RecoTauEnergyRecoveryPlugin2::operator() ( PFTau tau) const [virtual]

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().

{
  reco::Candidate::LorentzVector tauAltP4(0.,0.,0.,0.);
  
  std::vector<reco::PFCandidatePtr> pfJetConstituents = tau.jetRef()->getPFConstituents();
  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfJetConstituent = pfJetConstituents.begin();
        pfJetConstituent != pfJetConstituents.end(); ++pfJetConstituent ) {
    double dR = deltaR((*pfJetConstituent)->p4(), tau.p4());
    if ( dR < dRcone_ ) tauAltP4 += (*pfJetConstituent)->p4();
  }

  tau.setalternatLorentzVect(tauAltP4);
}

Member Data Documentation

Definition at line 48 of file RecoTauEnergyRecoveryPlugin2.cc.

Referenced by operator()().