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__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

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

Definition at line 108 of file BDHadronTrackMonitoringAnalyzer.cc.

Function Documentation

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

Definition at line 3 of file BDHadronTrackMonitoringAnalyzer.cc.

References funct::abs(), edm::Ptr< T >::get(), reco::PFCandidate::gsfTrackRef(), edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), reco::LeafCandidate::pdgId(), pfDeepBoostedJetPreprocessParams_cfi::pfcand, reco::PFCandidate::trackRef(), and BDHadronTrackMonitoringAnalyzer::TrkHistCat.

Referenced by BDHadronTrackMonitoringAnalyzer::analyze().

4 {
5  const reco::PFCandidate * pfcand = dynamic_cast<const reco::PFCandidate *>(cnd.get());
6 
7  if ( (std::abs(pfcand->pdgId()) == 11 || pfcand->pdgId() == 22) && pfcand->gsfTrackRef().isNonnull() && pfcand->gsfTrackRef().isAvailable() )
8  return reco::TrackBaseRef(pfcand->gsfTrackRef());
9  else if ( pfcand->trackRef().isNonnull() && pfcand->trackRef().isAvailable() )
10  return reco::TrackBaseRef(pfcand->trackRef());
11  else
12  return reco::TrackBaseRef();
13 }
bool isAvailable() const
Definition: Ref.h:577
int pdgId() const final
PDG identifier.
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:159
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:442
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
Definition: TrackFwd.h:32
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:480