CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Attributes
modules::MuonCleanerBySegmentsT< T > Class Template Reference

Removes duplicates from a muon collection using segment references. More...

Inheritance diagram for modules::MuonCleanerBySegmentsT< T >:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

bool isBetterMuon (const T &mu1, const T &mu2) const
 
bool isSameMuon (const T &mu1, const T &mu2) const
 
template<>
bool isSameMuon (const pat::Muon &mu1, const pat::Muon &mu2) const
 
template<>
bool isSameMuon (const pat::Muon &mu1, const pat::Muon &mu2) const
 
 MuonCleanerBySegmentsT (const edm::ParameterSet &iConfig)
 
virtual void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
virtual ~MuonCleanerBySegmentsT ()
 
- 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)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

typedef std::pair< const
reco::Muon *, const reco::Muon * > 
MuonPointerPair
 Cut on the pair of objects together. More...
 

Private Attributes

StringCutObjectSelector
< MuonPointerPair, true > 
bestMuonSelector_
 
bool defaultBestMuon_
 Use default criteria to choose the best muon. More...
 
StringCutObjectSelector< Tpassthrough_
 Always-accept cut. More...
 
StringCutObjectSelector< Tpreselection_
 Preselection cut. More...
 
double sharedFraction_
 Fraction of shared segments. More...
 
edm::EDGetTokenT< edm::View< T > > srcToken_
 Tokens for input collections. 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)
 

Detailed Description

template<typename T>
class modules::MuonCleanerBySegmentsT< T >

Removes duplicates from a muon collection using segment references.

      This module removes duplicates from a muon collection using segment references.

      All muons that don't pass the preselection are discarded first

      Then, for each pair of muons that share at least a given fraction of segments,
      the worse one is flagged as ghost.

      Finally, all muons that are not flagged as ghosts, or which pass a 'passthrough' selection,
      are saved in the output.
Author
Giovanni Petrucciani
Version
Id:
MuonCleanerBySegments.cc,v 1.1 2012/08/11 13:00:50 gpetrucc Exp

Definition at line 40 of file MuonCleanerBySegments.cc.

Member Typedef Documentation

template<typename T >
typedef std::pair<const reco::Muon *, const reco::Muon *> modules::MuonCleanerBySegmentsT< T >::MuonPointerPair
private

Cut on the pair of objects together.

Definition at line 69 of file MuonCleanerBySegments.cc.

Constructor & Destructor Documentation

template<typename T >
modules::MuonCleanerBySegmentsT< T >::MuonCleanerBySegmentsT ( const edm::ParameterSet iConfig)
explicit

Definition at line 79 of file MuonCleanerBySegments.cc.

template<typename T >
virtual modules::MuonCleanerBySegmentsT< T >::~MuonCleanerBySegmentsT ( )
inlinevirtual

Definition at line 43 of file MuonCleanerBySegments.cc.

Member Function Documentation

template<typename T >
bool modules::MuonCleanerBySegmentsT< T >::isBetterMuon ( const T mu1,
const T mu2 
) const

Definition at line 134 of file MuonCleanerBySegments.cc.

template<typename T >
bool modules::MuonCleanerBySegmentsT< T >::isSameMuon ( const T mu1,
const T mu2 
) const
inline

Definition at line 47 of file MuonCleanerBySegments.cc.

template<>
bool modules::MuonCleanerBySegmentsT< pat::Muon >::isSameMuon ( const pat::Muon mu1,
const pat::Muon mu2 
) const
template<>
bool modules::MuonCleanerBySegmentsT< pat::Muon >::isSameMuon ( const pat::Muon mu1,
const pat::Muon mu2 
) const

Definition at line 154 of file MuonCleanerBySegments.cc.

template<typename T >
void modules::MuonCleanerBySegmentsT< T >::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::EDProducer.

Definition at line 93 of file MuonCleanerBySegments.cc.

Member Data Documentation

template<typename T >
StringCutObjectSelector<MuonPointerPair, true> modules::MuonCleanerBySegmentsT< T >::bestMuonSelector_
private

Definition at line 70 of file MuonCleanerBySegments.cc.

template<typename T >
bool modules::MuonCleanerBySegmentsT< T >::defaultBestMuon_
private

Use default criteria to choose the best muon.

Definition at line 67 of file MuonCleanerBySegments.cc.

template<typename T >
StringCutObjectSelector<T> modules::MuonCleanerBySegmentsT< T >::passthrough_
private

Always-accept cut.

Definition at line 61 of file MuonCleanerBySegments.cc.

template<typename T >
StringCutObjectSelector<T> modules::MuonCleanerBySegmentsT< T >::preselection_
private

Preselection cut.

Definition at line 59 of file MuonCleanerBySegments.cc.

template<typename T >
double modules::MuonCleanerBySegmentsT< T >::sharedFraction_
private

Fraction of shared segments.

Definition at line 64 of file MuonCleanerBySegments.cc.

template<typename T >
edm::EDGetTokenT<edm::View<T> > modules::MuonCleanerBySegmentsT< T >::srcToken_
private

Tokens for input collections.

Definition at line 56 of file MuonCleanerBySegments.cc.