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
RecoTauDiscriminantCutMultiplexer Class Reference
Inheritance diagram for RecoTauDiscriminantCutMultiplexer:
TauDiscriminationProducerBase< TauType, TauDiscriminator > edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &eventSetup)
 
double discriminate (const reco::PFTauRef &)
 
 RecoTauDiscriminantCutMultiplexer (const edm::ParameterSet &pset)
 
 ~RecoTauDiscriminantCutMultiplexer ()
 
- Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
virtual double discriminate (const TauRef &tau)=0
 
virtual void endEvent (edm::Event &evt)
 
void produce (edm::Event &, const edm::EventSetup &)
 
 TauDiscriminationProducerBase (const edm::ParameterSet &iConfig)
 
 TauDiscriminationProducerBase ()
 
virtual ~TauDiscriminationProducerBase ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 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
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

typedef std::map< int, double > DiscriminantCutMap
 

Private Attributes

DiscriminantCutMap cuts_
 
edm::InputTag key_
 
edm::Handle
< reco::PFTauDiscriminator
keyHandle_
 
edm::InputTag toMultiplex_
 
edm::Handle
< reco::PFTauDiscriminator
toMultiplexHandle_
 

Additional Inherited Members

- Public Types inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
typedef std::vector< TauType > TauCollection
 
typedef edm::Ref< TauCollectionTauRef
 
typedef edm::RefProd
< TauCollection
TauRefProd
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- 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::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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)
 
- Protected Attributes inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
std::string moduleLabel_
 
double prediscriminantFailValue_
 
edm::InputTag TauProducer_
 

Detailed Description

Definition at line 23 of file RecoTauDiscriminantCutMultiplexer.cc.

Member Typedef Documentation

typedef std::map<int, double> RecoTauDiscriminantCutMultiplexer::DiscriminantCutMap
private

Definition at line 32 of file RecoTauDiscriminantCutMultiplexer.cc.

Constructor & Destructor Documentation

RecoTauDiscriminantCutMultiplexer::RecoTauDiscriminantCutMultiplexer ( const edm::ParameterSet pset)
explicit

Definition at line 41 of file RecoTauDiscriminantCutMultiplexer.cc.

References cuts_, edm::ParameterSet::getParameter(), key_, and toMultiplex_.

43  toMultiplex_ = pset.getParameter<edm::InputTag>("toMultiplex");
44  key_ = pset.getParameter<edm::InputTag>("key");
45  /*code*/
46  typedef std::vector<edm::ParameterSet> VPSet;
47  VPSet mapping = pset.getParameter<VPSet>("mapping");
48  // Setup our cut map
49  BOOST_FOREACH(const edm::ParameterSet &dm, mapping) {
50  // Get the mass window for each decay mode
51  cuts_.insert(std::make_pair(
52  // The category as a key
53  dm.getParameter<uint32_t>("category"),
54  // The selection
55  dm.getParameter<double>("cut")
56  ));
57  }
58 }
T getParameter(std::string const &) const
TauDiscriminationProducerBase< reco::PFTau, reco::PFTauDiscriminator > PFTauDiscriminationProducerBase
RecoTauDiscriminantCutMultiplexer::~RecoTauDiscriminantCutMultiplexer ( )
inline

Definition at line 27 of file RecoTauDiscriminantCutMultiplexer.cc.

27 {}

Member Function Documentation

void RecoTauDiscriminantCutMultiplexer::beginEvent ( const edm::Event event,
const edm::EventSetup eventSetup 
)
virtual
double RecoTauDiscriminantCutMultiplexer::discriminate ( const reco::PFTauRef tau)

Definition at line 67 of file RecoTauDiscriminantCutMultiplexer.cc.

References cuts_, TauDiscriminationProducerBase< TauType, TauDiscriminator >::prediscriminantFailValue_, and metsig::tau.

67  {
68  double disc_result = (*toMultiplexHandle_)[tau];
69  double key_result = (*keyHandle_)[tau];
70  DiscriminantCutMap::const_iterator cutIter = cuts_.find(TMath::Nint(key_result));
71 
72  // Return null if it doesn't exist
73  if (cutIter == cuts_.end()) {
75  }
76  // See if the discriminator passes our cuts
77  return disc_result > cutIter->second;
78 }

Member Data Documentation

DiscriminantCutMap RecoTauDiscriminantCutMultiplexer::cuts_
private
edm::InputTag RecoTauDiscriminantCutMultiplexer::key_
private
edm::Handle<reco::PFTauDiscriminator> RecoTauDiscriminantCutMultiplexer::keyHandle_
private

Definition at line 38 of file RecoTauDiscriminantCutMultiplexer.cc.

Referenced by beginEvent().

edm::InputTag RecoTauDiscriminantCutMultiplexer::toMultiplex_
private
edm::Handle<reco::PFTauDiscriminator> RecoTauDiscriminantCutMultiplexer::toMultiplexHandle_
private

Definition at line 37 of file RecoTauDiscriminantCutMultiplexer.cc.

Referenced by beginEvent().