#include <MuonAnalysis/MuonAssociators/src/MuonMCClassifier.cc>
Public Member Functions | |
MuonMCClassifier (const edm::ParameterSet &) | |
~MuonMCClassifier () | |
Public Member Functions inherited from edm::EDProducer | |
EDProducer () | |
ModuleDescription const & | moduleDescription () const |
virtual | ~EDProducer () |
Public Member Functions inherited from edm::ProducerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
std::vector< edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
std::function< void(BranchDescription const &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
void | resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel) |
virtual | ~ProducerBase () noexcept(false) |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
void | convertCurrentProcessAlias (std::string const &processName) |
Convert "@currentProcess" in InputTag process names to the actual current process name. More... | |
EDConsumerBase () | |
EDConsumerBase (EDConsumerBase const &)=delete | |
EDConsumerBase (EDConsumerBase &&)=default | |
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
virtual | ~EDConsumerBase () noexcept(false) |
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) |
virtual 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 | |
std::string | 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... | |
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 | |
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) |
Protected Member Functions inherited from edm::EDConsumerBase | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
EDGetToken | consumes (const TypeToGet &id, 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 ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | mayConsume (const TypeToGet &id, 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 69 of file MuonMCClassifier.cc.
|
explicit |
Definition at line 128 of file MuonMCClassifier.cc.
References Exception, genParticles_, genParticlesToken_, edm::ParameterSet::getParameter(), reco::GlobalTk, reco::InnerTk, linkToGenParticles_, reco::OuterTk, reco::Segments, AlCaHLTBitMon_QueryRunRegistry::string, tkIsoDeposits_cff::trackType, and trackType_.
MuonMCClassifier::~MuonMCClassifier | ( | ) |
Definition at line 172 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 483 of file MuonMCClassifier.cc.
References TrackingParticle::charge(), DEFINE_FWK_MODULE, 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 getTpMother(), and produce().
|
private |
Returns the flavour given a pdg id code.
Definition at line 467 of file MuonMCClassifier.cc.
References funct::abs().
Referenced by produce().
|
inlineprivate |
Definition at line 111 of file MuonMCClassifier.cc.
References convertAndPush(), GenHFHadronMatcher_cfi::genParticles, edm::Ref< C, T, F >::isNonnull(), and MillePedeFileConverter_cfg::out.
Referenced by produce().
|
overrideprivatevirtual |
Definition at line 177 of file MuonMCClassifier.cc.
References funct::abs(), reco::MuonToTrackingParticleAssociator::associateMuons(), associatorLabel_, edm::RefToBaseVector< T >::begin(), convertAndPush(), decayAbsZ_, decayRho_, edm::RefToBaseVector< T >::end(), Exception, edm::helper::Filler< Map >::fill(), spr::find(), flavour(), GenHFHadronMatcher_cfi::genParticles, genParticles_, genParticlesToken_, edm::Event::getByLabel(), 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_, match(), eostools::move(), RPCpg::mu, muonCut_, electronCleaner_cfi::muons, muonsToken_, gen::n, reco::OuterTk, edm::Handle< T >::product(), edm::RefToBaseVector< T >::push_back(), edm::RefVector< C, T, F >::push_back(), edm::Event::put(), trackingTruthProducer_cfi::trackingParticles, trackingParticlesToken_, trackType_, and writeValueMap().
|
private |
Write a ValueMap<int> in the event.
Definition at line 452 of file MuonMCClassifier.cc.
References edm::helper::Filler< Map >::fill(), objects.autophobj::filler, cmsBatch::handle, edm::helper::Filler< Map >::insert(), eostools::move(), and edm::Event::put().
Referenced by produce().
|
private |
|
private |
Definition at line 94 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Cylinder to use to decide if a decay is early or late.
Definition at line 94 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Definition at line 98 of file MuonMCClassifier.cc.
Referenced by convertAndPush(), MuonMCClassifier(), and produce().
|
private |
Definition at line 99 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 81 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Create a link to the generator level particles.
Definition at line 97 of file MuonMCClassifier.cc.
Referenced by MuonMCClassifier(), and produce().
|
private |
Definition at line 82 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
|
private |
The TrackingParticle objects.
Definition at line 88 of file MuonMCClassifier.cc.
Referenced by produce().
|
private |
Track to use.
Definition at line 85 of file MuonMCClassifier.cc.
Referenced by MuonMCClassifier(), and produce().