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::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &eventSetup)
 
double discriminate (const reco::PFTauRef &)
 
 RecoTauDecayModeCutMultiplexer (const edm::ParameterSet &pset)
 
 ~RecoTauDecayModeCutMultiplexer ()
 
- 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 &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

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_
 

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
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 
- Protected Attributes inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
double prediscriminantFailValue_
 
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 22 of file RecoTauDecayModeCutMultiplexer.cc.

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

24  toMultiplex_ = pset.getParameter<edm::InputTag>("toMultiplex");
25  typedef std::vector<edm::ParameterSet> VPSet;
26  const VPSet& decayModes = pset.getParameter<VPSet>("decayModes");
27  // Setup our cut map
28  BOOST_FOREACH(const edm::ParameterSet &dm, decayModes) {
29  // Get the mass window for each decay mode
30  decayModeCuts_.insert(std::make_pair(
31  // The decay mode as a key
32  std::make_pair(
33  dm.getParameter<uint32_t>("nCharged"),
34  dm.getParameter<uint32_t>("nPiZeros")),
35  // The selection
36  dm.getParameter<double>("cut")
37  ));
38  }
39 }
T getParameter(std::string const &) const
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 
)
virtual

Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 42 of file RecoTauDecayModeCutMultiplexer.cc.

References edm::Event::getByLabel(), handle_, and toMultiplex_.

43  {
44  evt.getByLabel(toMultiplex_, handle_);
45 }
edm::Handle< reco::PFTauDiscriminator > handle_
double RecoTauDecayModeCutMultiplexer::discriminate ( const reco::PFTauRef tau)

Definition at line 48 of file RecoTauDecayModeCutMultiplexer.cc.

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

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

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 beginEvent(), and RecoTauDecayModeCutMultiplexer().