CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
PFTauDiscriminatorLogicalAndProducer Class Reference
Inheritance diagram for PFTauDiscriminatorLogicalAndProducer:
TauDiscriminationProducerBase< TauType, TauDiscriminator > edm::stream::EDProducer<>

Public Member Functions

double discriminate (const PFTauRef &pfTau) const override
 
 PFTauDiscriminatorLogicalAndProducer (const edm::ParameterSet &)
 
 ~PFTauDiscriminatorLogicalAndProducer () override
 
- Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
virtual void beginEvent (const edm::Event &, const edm::EventSetup &)
 
virtual double discriminate (const TauRef &tau) const =0
 
virtual void endEvent (edm::Event &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 TauDiscriminationProducerBase (const edm::ParameterSet &iConfig)
 
 TauDiscriminationProducerBase ()
 
 ~TauDiscriminationProducerBase () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
static void fillProducerDescriptions (edm::ParameterSetDescription &desc)
 
static std::string getTauTypeString ()
 helper method to retrieve tau type name, e.g. to build correct cfi getter More...
 

Private Attributes

double passResult_
 

Additional Inherited Members

- Public Types inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
typedef std::vector< TauType > TauCollection
 
typedef edm::Ref< TauCollectionTauRef
 
typedef edm::RefProd< TauCollectionTauRefProd
 
- 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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- 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 21 of file PFTauDiscriminatorLogicalAndProducer.cc.

Constructor & Destructor Documentation

PFTauDiscriminatorLogicalAndProducer::PFTauDiscriminatorLogicalAndProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 31 of file PFTauDiscriminatorLogicalAndProducer.cc.

References edm::ParameterSet::getParameter(), passResult_, and TauDiscriminationProducerBase< TauType, TauDiscriminator >::prediscriminantFailValue_.

Referenced by fillDescriptions().

32 {
33  passResult_ = iConfig.getParameter<double>("PassValue");
34  prediscriminantFailValue_ = iConfig.getParameter<double>("FailValue"); //defined in base class
35 }
T getParameter(std::string const &) const
TauDiscriminationProducerBase< reco::PFTau, reco::PFTauDiscriminator > PFTauDiscriminationProducerBase
PFTauDiscriminatorLogicalAndProducer::~PFTauDiscriminatorLogicalAndProducer ( )
inlineoverride

Definition at line 24 of file PFTauDiscriminatorLogicalAndProducer.cc.

References fillDescriptions().

24 {};

Member Function Documentation

double PFTauDiscriminatorLogicalAndProducer::discriminate ( const PFTauRef pfTau) const
override

Definition at line 38 of file PFTauDiscriminatorLogicalAndProducer.cc.

References passResult_.

39 {
40  // if this function is called on a tau, it is has passed (in the base class)
41  // the set of prediscriminants, using the prescribed boolean operation. thus
42  // we only need to return TRUE
43  return passResult_;
44 }
void PFTauDiscriminatorLogicalAndProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 47 of file PFTauDiscriminatorLogicalAndProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), DEFINE_FWK_MODULE, PFTauDiscriminatorLogicalAndProducer(), and AlCaHLTBitMon_QueryRunRegistry::string.

47  {
48  // PFTauDiscriminatorLogicalAndProducer
50 
51  {
53  psd0.add<std::string>("BooleanOperator", "and");
54  {
56  psd1.add<double>("cut", 0.5);
57  psd1.add<edm::InputTag>("Producer", edm::InputTag("pfRecoTauDiscriminationAgainstElectron"));
58  psd0.add<edm::ParameterSetDescription>("discr2", psd1);
59  }
60  {
62  psd1.add<double>("cut", 0.5);
63  psd1.add<edm::InputTag>("Producer", edm::InputTag("pfRecoTauDiscriminationByIsolation"));
64  psd0.add<edm::ParameterSetDescription>("discr1", psd1);
65  }
66  desc.add<edm::ParameterSetDescription>("Prediscriminants", psd0);
67  }
68 
69  desc.add<double>("PassValue", 1.0);
70  desc.add<double>("FailValue", 0.0);
71  desc.add<edm::InputTag>("PFTauProducer", edm::InputTag("pfRecoTauProducer"));
72  descriptions.add("PFTauDiscriminatorLogicalAndProducer", desc);
73 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

double PFTauDiscriminatorLogicalAndProducer::passResult_
private