CMS 3D CMS Logo

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

void beginEvent () override
 
void operator() (PFTau &tau) const override
 
 RecoTauImpactParameterSignificancePlugin (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
 ~RecoTauImpactParameterSignificancePlugin () override
 
- Public Member Functions inherited from reco::tau::RecoTauModifierPlugin
virtual void endEvent ()
 
 RecoTauModifierPlugin (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
 ~RecoTauModifierPlugin () override
 
- 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 &)
 
 ~RecoTauEventHolderPlugin () override
 
- Public Member Functions inherited from reco::tau::RecoTauNamedPlugin
const std::string & name () const
 
 RecoTauNamedPlugin (const edm::ParameterSet &pset)
 
virtual ~RecoTauNamedPlugin ()
 

Private Attributes

const TransientTrackBuilderbuilder_
 
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecordtransTrackBuilderToken_
 
RecoTauVertexAssociator vertexAssociator_
 

Detailed Description

Definition at line 30 of file RecoTauImpactParameterSignificancePlugin.cc.

Constructor & Destructor Documentation

◆ RecoTauImpactParameterSignificancePlugin()

reco::tau::RecoTauImpactParameterSignificancePlugin::RecoTauImpactParameterSignificancePlugin ( const edm::ParameterSet pset,
edm::ConsumesCollector &&  iC 
)
explicit

Definition at line 43 of file RecoTauImpactParameterSignificancePlugin.cc.

45  : RecoTauModifierPlugin(pset, std::move(iC)),
46  transTrackBuilderToken_(iC.esConsumes(edm::ESInputTag{"", "TransientTrackBuilder"})),
47  vertexAssociator_(pset.getParameter<edm::ParameterSet>("qualityCuts"), std::move(iC)) {}
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transTrackBuilderToken_
RecoTauModifierPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
def move(src, dest)
Definition: eostools.py:511

◆ ~RecoTauImpactParameterSignificancePlugin()

reco::tau::RecoTauImpactParameterSignificancePlugin::~RecoTauImpactParameterSignificancePlugin ( )
inlineoverride

Definition at line 33 of file RecoTauImpactParameterSignificancePlugin.cc.

33 {}

Member Function Documentation

◆ beginEvent()

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

Reimplemented from reco::tau::RecoTauModifierPlugin.

Definition at line 49 of file RecoTauImpactParameterSignificancePlugin.cc.

References builder_, reco::tau::RecoTauEventHolderPlugin::evt(), reco::tau::RecoTauEventHolderPlugin::evtSetup(), edm::EventSetup::getData(), reco::tau::RecoTauVertexAssociator::setEvent(), transTrackBuilderToken_, and vertexAssociator_.

49  {
51  // Get tranisent track builder.
53  }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
const edm::EventSetup * evtSetup() const
void setEvent(const edm::Event &evt)
Load the vertices from the event.
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transTrackBuilderToken_

◆ operator()()

void reco::tau::RecoTauImpactParameterSignificancePlugin::operator() ( PFTau tau) const
overridevirtual

Implements reco::tau::RecoTauModifierPlugin.

Definition at line 73 of file RecoTauImpactParameterSignificancePlugin.cc.

References reco::tau::RecoTauVertexAssociator::associatedVertex(), TransientTrackBuilder::build(), builder_, getTrack(), singlePfTauSkim_cff::leadTrack, IPTools::signedImpactParameter3D(), metsig::tau, HLT_2023v12_cff::track, and vertexAssociator_.

73  {
74  // Get the transient lead track
75  if (tau.leadChargedHadrCand().isNonnull()) {
76  const reco::Track* leadTrack = getTrack(*tau.leadChargedHadrCand());
77  if (leadTrack != nullptr) {
78  const TransientTrack track = builder_->build(leadTrack);
79  GlobalVector direction(tau.jetRef()->px(), tau.jetRef()->py(), tau.jetRef()->pz());
81  // Compute the significance
82  std::pair<bool, Measurement1D> ipsig = IPTools::signedImpactParameter3D(track, direction, *pv);
83  if (ipsig.first)
84  tau.setleadPFChargedHadrCandsignedSipt(ipsig.second.significance());
85  }
86  }
87  }
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:81
reco::VertexRef associatedVertex(const Jet &jet) const
reco::TransientTrack build(const reco::Track *p) const
edm::Ref< VertexCollection > VertexRef
persistent reference to a Vertex
Definition: VertexFwd.h:13
static const TrackGhostTrackState * getTrack(const BasicGhostTrackState *basic)

Member Data Documentation

◆ builder_

const TransientTrackBuilder* reco::tau::RecoTauImpactParameterSignificancePlugin::builder_
private

Definition at line 40 of file RecoTauImpactParameterSignificancePlugin.cc.

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

◆ transTrackBuilderToken_

const edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> reco::tau::RecoTauImpactParameterSignificancePlugin::transTrackBuilderToken_
private

Definition at line 38 of file RecoTauImpactParameterSignificancePlugin.cc.

Referenced by beginEvent().

◆ vertexAssociator_

RecoTauVertexAssociator reco::tau::RecoTauImpactParameterSignificancePlugin::vertexAssociator_
private

Definition at line 39 of file RecoTauImpactParameterSignificancePlugin.cc.

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