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::RecoTauImpactParameterSignificancePlugin Class Reference
Inheritance diagram for reco::tau::RecoTauImpactParameterSignificancePlugin:
reco::tau::RecoTauModifierPlugin reco::tau::RecoTauEventHolderPlugin reco::tau::RecoTauNamedPlugin

Public Member Functions

virtual void beginEvent () override
 
void operator() (PFTau &tau) const override
 
 RecoTauImpactParameterSignificancePlugin (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
virtual ~RecoTauImpactParameterSignificancePlugin ()
 
- Public Member Functions inherited from reco::tau::RecoTauModifierPlugin
virtual void beginJob (edm::EDProducer *)
 
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

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,
edm::ConsumesCollector &&  iC 
)
explicit

Definition at line 42 of file RecoTauImpactParameterSignificancePlugin.cc.

43  :RecoTauModifierPlugin(pset,std::move(iC)),
44  vertexAssociator_(pset.getParameter<edm::ParameterSet>("qualityCuts"),std::move(iC)){}
T getParameter(std::string const &) const
RecoTauModifierPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
virtual reco::tau::RecoTauImpactParameterSignificancePlugin::~RecoTauImpactParameterSignificancePlugin ( )
inlinevirtual

Definition at line 33 of file RecoTauImpactParameterSignificancePlugin.cc.

33 {}

Member Function Documentation

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

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< class >::product(), reco::tau::RecoTauVertexAssociator::setEvent(), and vertexAssociator_.

46  {
48  // Get tranisent track builder.
49  edm::ESHandle<TransientTrackBuilder> myTransientTrackBuilder;
50  evtSetup()->get<TransientTrackRecord>().get("TransientTrackBuilder",
51  myTransientTrackBuilder);
52  builder_= myTransientTrackBuilder.product();
53 }
void setEvent(const edm::Event &evt)
Load the vertices from the event.
const edm::EventSetup * evtSetup() const
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
void reco::tau::RecoTauImpactParameterSignificancePlugin::operator() ( PFTau tau) const
overridevirtual

Implements reco::tau::RecoTauModifierPlugin.

Definition at line 55 of file RecoTauImpactParameterSignificancePlugin.cc.

References reco::tau::RecoTauVertexAssociator::associatedVertex(), TransientTrackBuilder::build(), builder_, edm::Ptr< T >::isNonnull(), edm::Ref< C, T, F >::isNonnull(), reco::PFTau::jetRef(), reco::PFTau::leadPFChargedHadrCand(), singlePfTauSkim_cff::leadTrack, reco::PFTau::setleadPFChargedHadrCandsignedSipt(), IPTools::signedImpactParameter3D(), and vertexAssociator_.

55  {
56  // Get the transient lead track
57  if (tau.leadPFChargedHadrCand().isNonnull()) {
58  TrackRef leadTrack = tau.leadPFChargedHadrCand()->trackRef();
59  if (leadTrack.isNonnull()) {
60  const TransientTrack track = builder_->build(leadTrack);
61  GlobalVector direction(tau.jetRef()->px(), tau.jetRef()->py(),
62  tau.jetRef()->pz());
64  // Compute the significance
65  std::pair<bool,Measurement1D> ipsig =
66  IPTools::signedImpactParameter3D(track, direction, *pv);
67  if (ipsig.first)
68  tau.setleadPFChargedHadrCandsignedSipt(ipsig.second.significance());
69  }
70  }
71 }
reco::VertexRef associatedVertex(const PFJet &tau) const
reco::TransientTrack build(const reco::Track *p) const
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:71
edm::Ref< VertexCollection > VertexRef
persistent reference to a Vertex
Definition: VertexFwd.h:13
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:14

Member Data Documentation

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