CMS 3D CMS Logo

Public Member Functions | Private Attributes

reco::tau::RecoTauImpactParameterSignificancePlugin Class Reference

Inheritance diagram for reco::tau::RecoTauImpactParameterSignificancePlugin:
reco::tau::RecoTauModifierPlugin reco::tau::RecoTauEventHolderPlugin reco::tau::RecoTauNamedPlugin

List of all members.

Public Member Functions

virtual void beginEvent ()
void operator() (PFTau &tau) const
 RecoTauImpactParameterSignificancePlugin (const edm::ParameterSet &pset)
virtual ~RecoTauImpactParameterSignificancePlugin ()

Private Attributes

const TransientTrackBuilderbuilder_
RecoTauVertexAssociator vertexAssociator_

Detailed Description

Definition at line 29 of file RecoTauImpactParameterSignificancePlugin.cc.


Constructor & Destructor Documentation

reco::tau::RecoTauImpactParameterSignificancePlugin::RecoTauImpactParameterSignificancePlugin ( const edm::ParameterSet pset) [explicit]
virtual reco::tau::RecoTauImpactParameterSignificancePlugin::~RecoTauImpactParameterSignificancePlugin ( ) [inline, virtual]

Definition at line 33 of file RecoTauImpactParameterSignificancePlugin.cc.

{}

Member Function Documentation

void reco::tau::RecoTauImpactParameterSignificancePlugin::beginEvent ( ) [virtual]
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());
    }
  }
}

Member Data Documentation

Definition at line 38 of file RecoTauImpactParameterSignificancePlugin.cc.

Referenced by beginEvent(), and operator()().

Definition at line 37 of file RecoTauImpactParameterSignificancePlugin.cc.

Referenced by beginEvent(), and operator()().