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

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &eventSetup) override
 
double discriminate (const reco::PFTauRef &) const override
 
 RecoTauDecayModeCutMultiplexer (const edm::ParameterSet &pset)
 
 ~RecoTauDecayModeCutMultiplexer ()
 
- Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
virtual double discriminate (const TauRef &tau) const =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::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- 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::map< IntPair, double > DecayModeCutMap
 
typedef std::pair< unsigned
int, unsigned int > 
IntPair
 

Private Attributes

DecayModeCutMap decayModeCuts_
 
edm::Handle
< reco::PFTauDiscriminator
handle_
 
edm::InputTag toMultiplex_
 
edm::EDGetTokenT
< reco::PFTauDiscriminator
toMultiplex_token
 

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::stream::EDProducer<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase 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::stream::EDProducerBase
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)
 
- Protected Attributes inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
std::string moduleLabel_
 
double prediscriminantFailValue_
 
edm::EDGetTokenT< TauCollectionTau_token
 
size_t tauIndex_
 
edm::InputTag TauProducer_
 

Detailed Description

Definition at line 5 of file RecoTauDecayModeCutMultiplexer.cc.

Member Typedef Documentation

typedef std::map<IntPair, double> RecoTauDecayModeCutMultiplexer::DecayModeCutMap
private

Definition at line 15 of file RecoTauDecayModeCutMultiplexer.cc.

typedef std::pair<unsigned int, unsigned int> RecoTauDecayModeCutMultiplexer::IntPair
private

Definition at line 14 of file RecoTauDecayModeCutMultiplexer.cc.

Constructor & Destructor Documentation

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

Definition at line 23 of file RecoTauDecayModeCutMultiplexer.cc.

References decayModeCuts_, symbols::dm, edm::ParameterSet::getParameter(), toMultiplex_, and toMultiplex_token.

25  toMultiplex_ = pset.getParameter<edm::InputTag>("toMultiplex");
26  toMultiplex_token = consumes<reco::PFTauDiscriminator>(toMultiplex_);
27  typedef std::vector<edm::ParameterSet> VPSet;
28  const VPSet& decayModes = pset.getParameter<VPSet>("decayModes");
29  // Setup our cut map
30  BOOST_FOREACH(const edm::ParameterSet &dm, decayModes) {
31  // Get the mass window for each decay mode
32  decayModeCuts_.insert(std::make_pair(
33  // The decay mode as a key
34  std::make_pair(
35  dm.getParameter<uint32_t>("nCharged"),
36  dm.getParameter<uint32_t>("nPiZeros")),
37  // The selection
38  dm.getParameter<double>("cut")
39  ));
40  }
41 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::PFTauDiscriminator > toMultiplex_token
tuple dm
Definition: symbols.py:65
TauDiscriminationProducerBase< reco::PFTau, reco::PFTauDiscriminator > PFTauDiscriminationProducerBase
RecoTauDecayModeCutMultiplexer::~RecoTauDecayModeCutMultiplexer ( )
inline

Definition at line 9 of file RecoTauDecayModeCutMultiplexer.cc.

9 {}

Member Function Documentation

void RecoTauDecayModeCutMultiplexer::beginEvent ( const edm::Event event,
const edm::EventSetup eventSetup 
)
overridevirtual

Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 44 of file RecoTauDecayModeCutMultiplexer.cc.

References edm::Event::getByToken(), handle_, and toMultiplex_token.

45  {
46  evt.getByToken(toMultiplex_token, handle_);
47 }
edm::Handle< reco::PFTauDiscriminator > handle_
edm::EDGetTokenT< reco::PFTauDiscriminator > toMultiplex_token
double RecoTauDecayModeCutMultiplexer::discriminate ( const reco::PFTauRef tau) const
override

Definition at line 50 of file RecoTauDecayModeCutMultiplexer.cc.

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

50  {
51  double disc_result = (*handle_)[tau];
52  DecayModeCutMap::const_iterator cutIter =
53  decayModeCuts_.find(std::make_pair(tau->signalPFChargedHadrCands().size(),
54  tau->signalPiZeroCandidates().size()));
55 
56  // Return null if it doesn't exist
57  if (cutIter == decayModeCuts_.end()) {
59  }
60  // See if the discriminator passes our cuts
61  return disc_result > cutIter->second;
62 }

Member Data Documentation

DecayModeCutMap RecoTauDecayModeCutMultiplexer::decayModeCuts_
private
edm::Handle<reco::PFTauDiscriminator> RecoTauDecayModeCutMultiplexer::handle_
private

Definition at line 19 of file RecoTauDecayModeCutMultiplexer.cc.

Referenced by beginEvent().

edm::InputTag RecoTauDecayModeCutMultiplexer::toMultiplex_
private

Definition at line 18 of file RecoTauDecayModeCutMultiplexer.cc.

Referenced by RecoTauDecayModeCutMultiplexer().

edm::EDGetTokenT<reco::PFTauDiscriminator> RecoTauDecayModeCutMultiplexer::toMultiplex_token
private

Definition at line 20 of file RecoTauDecayModeCutMultiplexer.cc.

Referenced by beginEvent(), and RecoTauDecayModeCutMultiplexer().