CMS 3D CMS Logo

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

Public Member Functions

 CaloRecoTauDiscriminationByLeadingTrackPtCut (const edm::ParameterSet &iConfig)
 
double discriminate (const CaloTauRef &theCaloTauRef) const override
 
 ~CaloRecoTauDiscriminationByLeadingTrackPtCut () 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 minPtLeadTrack_
 

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 17 of file CaloRecoTauDiscriminationByLeadingTrackPtCut.cc.

Constructor & Destructor Documentation

CaloRecoTauDiscriminationByLeadingTrackPtCut::CaloRecoTauDiscriminationByLeadingTrackPtCut ( const edm::ParameterSet iConfig)
inlineexplicit

Definition at line 19 of file CaloRecoTauDiscriminationByLeadingTrackPtCut.cc.

References edm::ParameterSet::getParameter().

20  minPtLeadTrack_ = iConfig.getParameter<double>("MinPtLeadingTrack");
21  }
T getParameter(std::string const &) const
TauDiscriminationProducerBase< reco::CaloTau, reco::CaloTauDiscriminator > CaloTauDiscriminationProducerBase
CaloRecoTauDiscriminationByLeadingTrackPtCut::~CaloRecoTauDiscriminationByLeadingTrackPtCut ( )
inlineoverride

Definition at line 22 of file CaloRecoTauDiscriminationByLeadingTrackPtCut.cc.

References fillDescriptions().

22 {}

Member Function Documentation

double CaloRecoTauDiscriminationByLeadingTrackPtCut::discriminate ( const CaloTauRef theCaloTauRef) const
override

Definition at line 31 of file CaloRecoTauDiscriminationByLeadingTrackPtCut.cc.

References edm::Ref< C, T, F >::isNonnull().

32 {
33  double leadTrackPt_ = -1;
34 
35  if( theCaloTauRef->leadTrack().isNonnull() )
36  {
37  leadTrackPt_ = theCaloTauRef->leadTrack()->pt();
38  }
39 
40  return ( (leadTrackPt_ > minPtLeadTrack_) ? 1. : 0. );
41 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
void CaloRecoTauDiscriminationByLeadingTrackPtCut::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 44 of file CaloRecoTauDiscriminationByLeadingTrackPtCut.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), DEFINE_FWK_MODULE, TauDiscriminatorTools::leadTrack, TauDiscriminatorTools::requireLeadTrackCalo, and AlCaHLTBitMon_QueryRunRegistry::string.

44  {
45  // caloRecoTauDiscriminationByLeadingTrackPtCut
47  desc.add<double>("MinPtLeadingTrack", 5.0);
48  desc.add<edm::InputTag>("CaloTauProducer", edm::InputTag("caloRecoTauProducer"));
49  {
51  requireLeadTrackCalo.add<std::string>("BooleanOperator", "and");
52  {
54  leadTrack.add<double>("cut");
55  leadTrack.add<edm::InputTag>("Producer");
56  requireLeadTrackCalo.add<edm::ParameterSetDescription>("leadTrack", leadTrack);
57  }
58  desc.add<edm::ParameterSetDescription>("Prediscriminants", requireLeadTrackCalo);
59  }
60  descriptions.add("caloRecoTauDiscriminationByLeadingTrackPtCut", desc);
61 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

double CaloRecoTauDiscriminationByLeadingTrackPtCut::minPtLeadTrack_
private