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_
 
RecoTauVertexAssociator vertexAssociator_
 

Detailed Description

Definition at line 31 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  vertexAssociator_(pset.getParameter<edm::ParameterSet>("qualityCuts"), std::move(iC)) {}

◆ ~RecoTauImpactParameterSignificancePlugin()

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

Definition at line 34 of file RecoTauImpactParameterSignificancePlugin.cc.

34 {}

Member Function Documentation

◆ beginEvent()

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

Reimplemented from reco::tau::RecoTauModifierPlugin.

Definition at line 48 of file RecoTauImpactParameterSignificancePlugin.cc.

48  {
50  // Get tranisent track builder.
51  edm::ESHandle<TransientTrackBuilder> myTransientTrackBuilder;
52  evtSetup()->get<TransientTrackRecord>().get("TransientTrackBuilder", myTransientTrackBuilder);
53  builder_ = myTransientTrackBuilder.product();
54  }

References builder_, reco::tau::RecoTauEventHolderPlugin::evt(), reco::tau::RecoTauEventHolderPlugin::evtSetup(), reco::get(), edm::EventSetup::get(), edm::ESHandle< T >::product(), reco::tau::RecoTauVertexAssociator::setEvent(), and vertexAssociator_.

◆ operator()()

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

Implements reco::tau::RecoTauModifierPlugin.

Definition at line 74 of file RecoTauImpactParameterSignificancePlugin.cc.

74  {
75  // Get the transient lead track
76  if (tau.leadChargedHadrCand().isNonnull()) {
77  const reco::Track* leadTrack = getTrack(*tau.leadChargedHadrCand());
78  if (leadTrack != nullptr) {
79  const TransientTrack track = builder_->build(leadTrack);
80  GlobalVector direction(tau.jetRef()->px(), tau.jetRef()->py(), tau.jetRef()->pz());
82  // Compute the significance
83  std::pair<bool, Measurement1D> ipsig = IPTools::signedImpactParameter3D(track, direction, *pv);
84  if (ipsig.first)
85  tau.setleadPFChargedHadrCandsignedSipt(ipsig.second.significance());
86  }
87  }
88  }

References reco::tau::RecoTauVertexAssociator::associatedVertex(), TransientTrackBuilder::build(), builder_, getTrack(), singlePfTauSkim_cff::leadTrack, MetAnalyzer::pv(), IPTools::signedImpactParameter3D(), metsig::tau, HLT_2018_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()().

◆ 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
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
reco::tau::RecoTauEventHolderPlugin::evt
const edm::Event * evt() const
Definition: RecoTauPluginsCommon.cc:16
metsig::tau
Definition: SignAlgoResolutions.h:49
reco::tau::RecoTauImpactParameterSignificancePlugin::vertexAssociator_
RecoTauVertexAssociator vertexAssociator_
Definition: RecoTauImpactParameterSignificancePlugin.cc:39
singlePfTauSkim_cff.leadTrack
leadTrack
Definition: singlePfTauSkim_cff.py:22
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
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
TransientTrackRecord
Definition: TransientTrackRecord.h:11
reco::Track
Definition: Track.h:27
edm::ESHandle< TransientTrackBuilder >
reco::tau::RecoTauVertexAssociator::associatedVertex
reco::VertexRef associatedVertex(const Jet &jet) const
Definition: RecoTauVertexAssociator.cc:378
edm::ParameterSet
Definition: ParameterSet.h:36
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
reco::get
T get(const Candidate &c)
Definition: component.h:60
getTrack
static const TrackGhostTrackState * getTrack(const BasicGhostTrackState *basic)
Definition: GhostTrackState.cc:49
eostools.move
def move(src, dest)
Definition: eostools.py:511
TransientTrackBuilder::build
reco::TransientTrack build(const reco::Track *p) const
Definition: TransientTrackBuilder.cc:20
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
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