#include <MuonAnalysis/MuonAssociators/src/MuonMCClassifier.cc>
Public Member Functions | |
MuonMCClassifier (const edm::ParameterSet &) | |
~MuonMCClassifier () override | |
Public Member Functions inherited from edm::stream::EDProducer<> | |
EDProducer ()=default | |
EDProducer (const EDProducer &)=delete | |
bool | hasAbilityToProduceInBeginLumis () const final |
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
bool | hasAbilityToProduceInBeginRuns () const final |
bool | hasAbilityToProduceInEndLumis () const final |
bool | hasAbilityToProduceInEndProcessBlocks () const final |
bool | hasAbilityToProduceInEndRuns () const final |
const EDProducer & | operator= (const EDProducer &)=delete |
Private Member Functions | |
int | convertAndPush (const TrackingParticle &tp, reco::GenParticleCollection &out, const TrackingParticleRef &momRef, const edm::Handle< reco::GenParticleCollection > &genParticles) const |
int | flavour (int pdgId) const |
Returns the flavour given a pdg id code. More... | |
TrackingParticleRef | getTpMother (TrackingParticleRef tp) |
void | produce (edm::Event &, const edm::EventSetup &) override |
template<typename T > | |
void | writeValueMap (edm::Event &iEvent, const edm::Handle< edm::View< reco::Muon > > &handle, const std::vector< T > &values, const std::string &label) const |
Write a ValueMap<int> in the event. More... | |
Private Attributes | |
edm::InputTag | associatorLabel_ |
The Associations. More... | |
double | decayAbsZ_ |
double | decayRho_ |
Cylinder to use to decide if a decay is early or late. More... | |
edm::InputTag | genParticles_ |
edm::EDGetTokenT < reco::GenParticleCollection > | genParticlesToken_ |
bool | hasMuonCut_ |
bool | linkToGenParticles_ |
Create a link to the generator level particles. More... | |
edm::EDGetTokenT < reco::MuonToTrackingParticleAssociator > | muAssocToken_ |
StringCutObjectSelector < pat::Muon > | muonCut_ |
edm::EDGetTokenT< edm::View < reco::Muon > > | muonsToken_ |
The RECO objects. More... | |
edm::EDGetTokenT < TrackingParticleCollection > | trackingParticlesToken_ |
The TrackingParticle objects. More... | |
reco::MuonTrackType | trackType_ |
Track to use. More... | |
Additional Inherited Members | |
Public Types inherited from edm::stream::EDProducer<> | |
using | CacheTypes = CacheContexts< T...> |
using | GlobalCache = typename CacheTypes::GlobalCache |
using | HasAbility = AbilityChecker< T...> |
using | InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache |
using | LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache |
using | LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache > |
using | LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache |
using | RunCache = typename CacheTypes::RunCache |
using | RunContext = RunContextT< RunCache, GlobalCache > |
using | RunSummaryCache = typename CacheTypes::RunSummaryCache |
CLASSIFICATION: For each RECO Muon, match to SIM particle, and then:
In any case, if the TP is not preferentially matched back to the same RECO muon, label as Ghost (flip the classification)
FLAVOUR:
Definition at line 65 of file MuonMCClassifier.cc.
|
explicit |
Definition at line 125 of file MuonMCClassifier.cc.
References Exception, genParticles_, genParticlesToken_, edm::ParameterSet::getParameter(), reco::GlbOrTrk, reco::GlobalTk, reco::InnerTk, linkToGenParticles_, reco::OuterTk, reco::Segments, AlCaHLTBitMon_QueryRunRegistry::string, and trackType_.
|
override |
Definition at line 186 of file MuonMCClassifier.cc.
|
private |
Convert TrackingParticle into GenParticle, save into output collection, if mother is primary set reference to it, return index in output collection
Definition at line 607 of file MuonMCClassifier.cc.
References TrackingParticle::charge(), Exception, genParticles_, edm::HandleBase::id(), edm::Ref< C, T, F >::id(), edm::Ref< C, T, F >::isNonnull(), TrackingParticle::p4(), TrackingParticle::pdgId(), TrackingParticle::status(), and TrackingParticle::vertex().
Referenced by produce().
|
private |
Returns the flavour given a pdg id code.
Definition at line 588 of file MuonMCClassifier.cc.
References funct::abs().
Referenced by produce().
|
inlineprivate |
Definition at line 108 of file MuonMCClassifier.cc.
References edm::Ref< C, T, F >::isNonnull().
Referenced by produce().
|
overrideprivate |
Definition at line 188 of file MuonMCClassifier.cc.
References funct::abs(), reco::MuonToTrackingParticleAssociator::associateMuons(), edm::RefToBaseVector< T >::begin(), convertAndPush(), decayAbsZ_, decayRho_, edm::RefToBaseVector< T >::end(), PVValHelper::eta, Exception, edm::helper::Filler< Map >::fill(), spr::find(), flavour(), EgammaValidation_cff::genp, genParticleCandidates2GenParticles_cfi::genParticles, genParticles_, genParticlesToken_, edm::Event::getByToken(), getTpMother(), reco::GlobalTk, hasMuonCut_, mps_fire::i, edm::HandleBase::id(), edm::Ref< C, T, F >::id(), edm::helper::Filler< Map >::insert(), reco::Muon::isGlobalMuon(), edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), linkToGenParticles_, LogTrace, match(), eostools::move(), RPCpg::mu, muAssocToken_, muonCut_, patZpeak::muons, muonsToken_, dqmiodumpmetadata::n, reco::OuterTk, phi, edm::Handle< T >::product(), DiDispStaMuonMonitor_cfi::pt, edm::RefToBaseVector< T >::push_back(), edm::RefVector< C, T, F >::push_back(), edm::Event::put(), cmsswSequenceInfo::tp, trackingTruthProducer_cfi::trackingParticles, trackingParticlesToken_, trackType_, and writeValueMap().
|
private |
Write a ValueMap<int> in the event.
Definition at line 575 of file MuonMCClassifier.cc.
References edm::helper::Filler< Map >::fill(), patZpeak::handle, edm::helper::Filler< Map >::insert(), eostools::move(), and edm::Event::put().
Referenced by produce().
|
private |
The Associations.
Definition at line 87 of file MuonMCClassifier.cc.
|
private |
Definition at line 91 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Cylinder to use to decide if a decay is early or late.
Definition at line 91 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Definition at line 95 of file MuonMCClassifier.cc.
Referenced by convertAndPush(), MuonMCClassifier(), and produce().
|
private |
Definition at line 96 of file MuonMCClassifier.cc.
Referenced by MuonMCClassifier(), and produce().
|
private |
A preselection cut for the muon. I pass through pat::Muon so that I can access muon id selectors
Definition at line 77 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Create a link to the generator level particles.
Definition at line 94 of file MuonMCClassifier.cc.
Referenced by MuonMCClassifier(), and produce().
|
private |
Definition at line 88 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Definition at line 78 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
|
private |
The TrackingParticle objects.
Definition at line 84 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Track to use.
Definition at line 81 of file MuonMCClassifier.cc.
Referenced by MuonMCClassifier(), and produce().