Public Member Functions | |
virtual void | beginEvent () |
void | operator() (PFTau &tau) const |
RecoTauImpactParameterSignificancePlugin (const edm::ParameterSet &pset) | |
virtual | ~RecoTauImpactParameterSignificancePlugin () |
Private Attributes | |
const TransientTrackBuilder * | builder_ |
RecoTauVertexAssociator | vertexAssociator_ |
Definition at line 29 of file RecoTauImpactParameterSignificancePlugin.cc.
reco::tau::RecoTauImpactParameterSignificancePlugin::RecoTauImpactParameterSignificancePlugin | ( | const edm::ParameterSet & | pset | ) | [explicit] |
Definition at line 42 of file RecoTauImpactParameterSignificancePlugin.cc.
:RecoTauModifierPlugin(pset), vertexAssociator_(pset.getParameter<edm::ParameterSet>("qualityCuts")){}
virtual reco::tau::RecoTauImpactParameterSignificancePlugin::~RecoTauImpactParameterSignificancePlugin | ( | ) | [inline, virtual] |
Definition at line 33 of file RecoTauImpactParameterSignificancePlugin.cc.
{}
void reco::tau::RecoTauImpactParameterSignificancePlugin::beginEvent | ( | ) | [virtual] |
Reimplemented from reco::tau::RecoTauModifierPlugin.
Definition at line 46 of file RecoTauImpactParameterSignificancePlugin.cc.
References builder_, reco::tau::RecoTauEventHolderPlugin::evt(), reco::tau::RecoTauEventHolderPlugin::evtSetup(), edm::EventSetup::get(), edm::ESHandle< T >::product(), reco::tau::RecoTauVertexAssociator::setEvent(), and vertexAssociator_.
{ vertexAssociator_.setEvent(*evt()); // Get tranisent track builder. edm::ESHandle<TransientTrackBuilder> myTransientTrackBuilder; evtSetup()->get<TransientTrackRecord>().get("TransientTrackBuilder", myTransientTrackBuilder); builder_= myTransientTrackBuilder.product(); }
void reco::tau::RecoTauImpactParameterSignificancePlugin::operator() | ( | PFTau & | tau | ) | const [virtual] |
Implements reco::tau::RecoTauModifierPlugin.
Definition at line 55 of file RecoTauImpactParameterSignificancePlugin.cc.
References reco::tau::RecoTauVertexAssociator::associatedVertex(), TransientTrackBuilder::build(), builder_, edm::Ref< C, T, F >::isNonnull(), reco::PFTau::jetRef(), reco::PFTau::leadPFChargedHadrCand(), singlePfTauSkim_cff::leadTrack, reco::PFTau::setleadPFChargedHadrCandsignedSipt(), IPTools::signedImpactParameter3D(), and vertexAssociator_.
{ // Get the transient lead track if (tau.leadPFChargedHadrCand().isNonnull()) { TrackRef leadTrack = tau.leadPFChargedHadrCand()->trackRef(); if (leadTrack.isNonnull()) { const TransientTrack track = builder_->build(leadTrack); GlobalVector direction(tau.jetRef()->px(), tau.jetRef()->py(), tau.jetRef()->pz()); VertexRef pv = vertexAssociator_.associatedVertex(tau); // Compute the significance std::pair<bool,Measurement1D> ipsig = IPTools::signedImpactParameter3D(track, direction, *pv); if (ipsig.first) tau.setleadPFChargedHadrCandsignedSipt(ipsig.second.significance()); } } }
const TransientTrackBuilder* reco::tau::RecoTauImpactParameterSignificancePlugin::builder_ [private] |
Definition at line 38 of file RecoTauImpactParameterSignificancePlugin.cc.
Referenced by beginEvent(), and operator()().
RecoTauVertexAssociator reco::tau::RecoTauImpactParameterSignificancePlugin::vertexAssociator_ [private] |
Definition at line 37 of file RecoTauImpactParameterSignificancePlugin.cc.
Referenced by beginEvent(), and operator()().