CMS 3D CMS Logo

Typedefs | Functions
BDHadronTrackMonitoringAnalyzer.cc File Reference
#include "Validation/RecoB/plugins/BDHadronTrackMonitoringAnalyzer.h"

Go to the source code of this file.

Typedefs

using P = std::pair< OmniClusterRef, TrackingParticleRef >
 

Functions

bool compare (const P &i, const P &j)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< BDHadronTrackMonitoringAnalyzer > > s_filler_0__LINE__ ("BDHadronTrackMonitoringAnalyzer")
 
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< BDHadronTrackMonitoringAnalyzer > > s_maker__LINE__ ("BDHadronTrackMonitoringAnalyzer")
 
const reco::TrackBaseRef toTrackRef (const edm::Ptr< reco::Candidate > &cnd)
 

Typedef Documentation

◆ P

using P = std::pair<OmniClusterRef, TrackingParticleRef>

Definition at line 203 of file BDHadronTrackMonitoringAnalyzer.cc.

Function Documentation

◆ compare()

bool compare ( const P i,
const P j 
)

◆ s_filler_0__LINE__()

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< BDHadronTrackMonitoringAnalyzer > > s_filler_0__LINE__ ( "BDHadronTrackMonitoringAnalyzer"  )
static

◆ s_maker__LINE__()

static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< BDHadronTrackMonitoringAnalyzer > > s_maker__LINE__ ( "BDHadronTrackMonitoringAnalyzer"  )
static

◆ toTrackRef()

const reco::TrackBaseRef toTrackRef ( const edm::Ptr< reco::Candidate > &  cnd)

Definition at line 7 of file BDHadronTrackMonitoringAnalyzer.cc.

References funct::abs(), edm::Ptr< T >::get(), and pfDeepBoostedJetPreprocessParams_cfi::pfcand.

Referenced by BDHadronTrackMonitoringAnalyzer::analyze().

7  {
8  const reco::PFCandidate *pfcand = dynamic_cast<const reco::PFCandidate *>(cnd.get());
9 
10  if ((std::abs(pfcand->pdgId()) == 11 || pfcand->pdgId() == 22) && pfcand->gsfTrackRef().isNonnull() &&
11  pfcand->gsfTrackRef().isAvailable())
12  return reco::TrackBaseRef(pfcand->gsfTrackRef());
13  else if (pfcand->trackRef().isNonnull() && pfcand->trackRef().isAvailable())
14  return reco::TrackBaseRef(pfcand->trackRef());
15  else
16  return reco::TrackBaseRef();
17 }
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
Definition: TrackFwd.h:35
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:141
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41