#include <MuonAnalysis/MuonAssociators/src/MuonMCClassifier.cc>
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::EDProducer | |
typedef EDProducer | ModuleType |
Public Types inherited from edm::ProducerBase | |
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > > |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
Static Public Member Functions inherited from edm::EDProducer | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &descriptions) |
static bool | wantsGlobalLuminosityBlocks () |
static bool | wantsGlobalRuns () |
static bool | wantsStreamLuminosityBlocks () |
static bool | wantsStreamRuns () |
Protected Member Functions inherited from edm::ProducerBase | |
template<class ProductType > | |
BranchAliasSetterT< ProductType > | produces () |
declare what type of product will make and with which optional label More... | |
template<typename ProductType , BranchType B> | |
BranchAliasSetterT< ProductType > | produces () |
template<typename ProductType , Transition B> | |
BranchAliasSetterT< ProductType > | produces () |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
template<BranchType B> | |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
template<Transition B> | |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
template<typename ProductType , Transition B> | |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
template<class ProductType > | |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
template<typename ProductType , BranchType B> | |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
ProducesCollector | producesCollector () |
Protected Member Functions inherited from edm::EDConsumerBase | |
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
ConsumesCollector | consumesCollector () |
Use a ConsumesCollector to gather consumes information from helper functions. More... | |
template<typename ProductType , BranchType B = InEvent> | |
void | consumesMany () |
void | consumesMany (const TypeToGet &id) |
template<BranchType B> | |
void | consumesMany (const TypeToGet &id) |
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes () |
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag const &tag) |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
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 66 of file MuonMCClassifier.cc.
|
explicit |
Definition at line 126 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, PbPb_ZMuSkimMuonDPG_cff::trackType, and trackType_.
|
override |
Definition at line 187 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 608 of file MuonMCClassifier.cc.
References Exception, genParticles2HepMC_cfi::genParticles, genParticles_, edm::Ref< C, T, F >::id(), edm::Ref< C, T, F >::isNonnull(), MillePedeFileConverter_cfg::out, and cmsswSequenceInfo::tp.
Referenced by produce().
|
private |
Returns the flavour given a pdg id code.
Definition at line 589 of file MuonMCClassifier.cc.
References funct::abs(), and EgammaValidation_cff::pdgId.
Referenced by produce().
|
inlineprivate |
Definition at line 109 of file MuonMCClassifier.cc.
References cmsswSequenceInfo::tp.
Referenced by produce().
|
overrideprivatevirtual |
Implements edm::EDProducer.
Definition at line 189 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, genParticles2HepMC_cfi::genParticles, genParticles_, genParticlesToken_, getTpMother(), reco::GlobalTk, hasMuonCut_, mps_fire::i, iEvent, edm::helper::Filler< Map >::insert(), edm::Ref< C, T, F >::isNonnull(), linkToGenParticles_, LogTrace, match(), eostools::move(), amptDefaultParameters_cff::mu, muAssocToken_, muonCut_, PDWG_BPHSkim_cff::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(), cmsswSequenceInfo::tp, muonClassificationByHits_cfi::trackingParticles, trackingParticlesToken_, trackType_, and writeValueMap().
|
private |
Write a ValueMap<int> in the event.
Definition at line 576 of file MuonMCClassifier.cc.
References trigObjTnPSource_cfi::filler, patZpeak::handle, iEvent, label, eostools::move(), and contentValuesCheck::values.
Referenced by produce().
|
private |
The Associations.
Definition at line 88 of file MuonMCClassifier.cc.
|
private |
Definition at line 92 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Cylinder to use to decide if a decay is early or late.
Definition at line 92 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Definition at line 96 of file MuonMCClassifier.cc.
Referenced by convertAndPush(), MuonMCClassifier(), and produce().
|
private |
Definition at line 97 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 78 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Create a link to the generator level particles.
Definition at line 95 of file MuonMCClassifier.cc.
Referenced by MuonMCClassifier(), and produce().
|
private |
Definition at line 89 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Definition at line 79 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
|
private |
The TrackingParticle objects.
Definition at line 85 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Track to use.
Definition at line 82 of file MuonMCClassifier.cc.
Referenced by MuonMCClassifier(), and produce().