CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/RecoTauTag/RecoTau/plugins/PFTauDiscriminatorLogicalAndProducer.cc

Go to the documentation of this file.
00001 #include "RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h"
00002 
00003 /* 
00004  * class PFRecoTauDiscriminatioLogicalAndProducer
00005  *
00006  * Applies a boolean operator (AND or OR) to a set 
00007  * of PFTauDiscriminators.  Note that the set of PFTauDiscriminators
00008  * is accessed/combined in the base class (the Prediscriminants).
00009  *
00010  * This class merely exposes this behavior directly by 
00011  * returning true for all taus that pass the prediscriminants
00012  *
00013  * revised : Mon Aug 31 12:59:50 PDT 2009
00014  * Authors : Michele Pioppi, Evan Friis (UC Davis)
00015  */
00016 
00017 using namespace reco;
00018 
00019 class PFTauDiscriminatorLogicalAndProducer : public PFTauDiscriminationProducerBase {
00020    public:
00021       explicit PFTauDiscriminatorLogicalAndProducer(const edm::ParameterSet&);
00022       ~PFTauDiscriminatorLogicalAndProducer(){};
00023       double discriminate(const PFTauRef& pfTau);
00024    private:
00025       double passResult_;
00026 };
00027 
00028 PFTauDiscriminatorLogicalAndProducer::PFTauDiscriminatorLogicalAndProducer(const edm::ParameterSet& iConfig):PFTauDiscriminationProducerBase(iConfig)
00029 {
00030    passResult_               = iConfig.getParameter<double>("PassValue");
00031    prediscriminantFailValue_ = iConfig.getParameter<double>("FailValue"); //defined in base class
00032 }
00033 
00034 double
00035 PFTauDiscriminatorLogicalAndProducer::discriminate(const PFTauRef& pfTau)
00036 {
00037    // if this function is called on a tau, it is has passed (in the base class)
00038    // the set of prediscriminants, using the prescribed boolean operation.  thus 
00039    // we only need to return TRUE
00040    return passResult_;
00041 }
00042 
00043 DEFINE_FWK_MODULE(PFTauDiscriminatorLogicalAndProducer);