CMS 3D CMS Logo

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

Public Member Functions

void beginEvent (const edm::Event &, const edm::EventSetup &) override
 
double discriminate (const reco::PFTauRef &) const override
 
 PFRecoTauDiscriminationByDeltaE (const ParameterSet &iConfig)
 
 ~PFRecoTauDiscriminationByDeltaE () override
 
- Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
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
 

Private Member Functions

double DeltaE (const PFTauRef &) const
 

Private Attributes

bool booleanOutput
 
double chargedPionMass
 
double deltaEmax
 
double deltaEmin
 

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
 
- Static Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
static std::string getTauTypeString ()
 helper method to retrieve tau type name, e.g. to build correct cfi getter More...
 
- 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 16 of file PFRecoTauDiscriminationByDeltaE.cc.

Constructor & Destructor Documentation

PFRecoTauDiscriminationByDeltaE::PFRecoTauDiscriminationByDeltaE ( const ParameterSet iConfig)
inlineexplicit

Definition at line 18 of file PFRecoTauDiscriminationByDeltaE.cc.

References CaloRecoTauDiscriminationByDeltaE_cfi::deltaEmax, CaloRecoTauDiscriminationByDeltaE_cfi::deltaEmin, and edm::ParameterSet::getParameter().

19  deltaEmin = iConfig.getParameter<double>("deltaEmin");
20  deltaEmax = iConfig.getParameter<double>("deltaEmax");
21  chargedPionMass = 0.139;
22  booleanOutput = iConfig.getParameter<bool>("BooleanOutput");
23  }
T getParameter(std::string const &) const
TauDiscriminationProducerBase< reco::PFTau, reco::PFTauDiscriminator > PFTauDiscriminationProducerBase
PFRecoTauDiscriminationByDeltaE::~PFRecoTauDiscriminationByDeltaE ( )
inlineoverride

Definition at line 25 of file PFRecoTauDiscriminationByDeltaE.cc.

25 {}

Member Function Documentation

void PFRecoTauDiscriminationByDeltaE::beginEvent ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 39 of file PFRecoTauDiscriminationByDeltaE.cc.

39  {
40 }
double PFRecoTauDiscriminationByDeltaE::DeltaE ( const PFTauRef tau) const
private

Definition at line 49 of file PFRecoTauDiscriminationByDeltaE.cc.

References DEFINE_FWK_MODULE, mps_fire::i, and p4.

49  {
50  double tracksE = 0;
51  const std::vector<PFCandidatePtr>& signalTracks = tau->signalPFChargedHadrCands();
52  for(size_t i = 0; i < signalTracks.size(); ++i){
53  TLorentzVector p4;
54  p4.SetXYZM(signalTracks[i]->px(),
55  signalTracks[i]->py(),
56  signalTracks[i]->pz(),
58  tracksE += p4.E();
59  }
60 
61  double hadrTauP = tau->momentum().r() * (1.0 - tau->emFraction());
62  if (tau->emFraction() >= 1.0) {
63  return -1.0; // electron
64  } else {
65  return tracksE / hadrTauP - 1.0;
66  }
67 }
double p4[4]
Definition: TauolaWrapper.h:92
double PFRecoTauDiscriminationByDeltaE::discriminate ( const reco::PFTauRef tau) const
override

Member Data Documentation

bool PFRecoTauDiscriminationByDeltaE::booleanOutput
private

Definition at line 36 of file PFRecoTauDiscriminationByDeltaE.cc.

double PFRecoTauDiscriminationByDeltaE::chargedPionMass
private

Definition at line 33 of file PFRecoTauDiscriminationByDeltaE.cc.

double PFRecoTauDiscriminationByDeltaE::deltaEmax
private

Definition at line 35 of file PFRecoTauDiscriminationByDeltaE.cc.

double PFRecoTauDiscriminationByDeltaE::deltaEmin
private

Definition at line 35 of file PFRecoTauDiscriminationByDeltaE.cc.