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
edm::Eventevt ()
 
const edm::Eventevt () const
 
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)) {}

◆ ~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

◆ operator()()

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

Implements reco::tau::RecoTauModifierPlugin.

Definition at line 73 of file RecoTauImpactParameterSignificancePlugin.cc.

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  }

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

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

Vector3DBase
Definition: Vector3DBase.h:8
reco::tau::RecoTauEventHolderPlugin::evt
const edm::Event * evt() const
Definition: RecoTauPluginsCommon.cc:16
edm::ESInputTag
Definition: ESInputTag.h:87
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
metsig::tau
Definition: SignAlgoResolutions.h:49
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
reco::tau::RecoTauImpactParameterSignificancePlugin::vertexAssociator_
RecoTauVertexAssociator vertexAssociator_
Definition: RecoTauImpactParameterSignificancePlugin.cc:39
singlePfTauSkim_cff.leadTrack
leadTrack
Definition: singlePfTauSkim_cff.py:22
reco::tau::RecoTauModifierPlugin::RecoTauModifierPlugin
RecoTauModifierPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
Definition: RecoTauBuilderPlugins.h:106
IPTools::signedImpactParameter3D
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:81
reco::Track
Definition: Track.h:27
reco::tau::RecoTauVertexAssociator::associatedVertex
reco::VertexRef associatedVertex(const Jet &jet) const
Definition: RecoTauVertexAssociator.cc:378
edm::ParameterSet
Definition: ParameterSet.h:47
reco::VertexRef
edm::Ref< VertexCollection > VertexRef
persistent reference to a Vertex
Definition: VertexFwd.h:13
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
reco::tau::RecoTauVertexAssociator::setEvent
void setEvent(const edm::Event &evt)
Load the vertices from the event.
Definition: RecoTauVertexAssociator.cc:242
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
getTrack
static const TrackGhostTrackState * getTrack(const BasicGhostTrackState *basic)
Definition: GhostTrackState.cc:49
eostools.move
def move(src, dest)
Definition: eostools.py:511
reco::tau::RecoTauImpactParameterSignificancePlugin::transTrackBuilderToken_
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transTrackBuilderToken_
Definition: RecoTauImpactParameterSignificancePlugin.cc:38
TransientTrackBuilder::build
reco::TransientTrack build(const reco::Track *p) const
Definition: TransientTrackBuilder.cc:20
reco::tau::RecoTauEventHolderPlugin::evtSetup
const edm::EventSetup * evtSetup() const
Definition: RecoTauPluginsCommon.cc:18
reco::tau::RecoTauImpactParameterSignificancePlugin::builder_
const TransientTrackBuilder * builder_
Definition: RecoTauImpactParameterSignificancePlugin.cc:40
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27