CMS 3D CMS Logo

List of all members | Public Member Functions | Static 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
 

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 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
 
- 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 19 of file PFRecoTauDiscriminationByDeltaE.cc.

Constructor & Destructor Documentation

PFRecoTauDiscriminationByDeltaE::PFRecoTauDiscriminationByDeltaE ( const ParameterSet iConfig)
inlineexplicit

Definition at line 21 of file PFRecoTauDiscriminationByDeltaE.cc.

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

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

Definition at line 28 of file PFRecoTauDiscriminationByDeltaE.cc.

References fillDescriptions().

28 {}

Member Function Documentation

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

Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 43 of file PFRecoTauDiscriminationByDeltaE.cc.

43  {
44 }
double PFRecoTauDiscriminationByDeltaE::DeltaE ( const PFTauRef tau) const
private

Definition at line 53 of file PFRecoTauDiscriminationByDeltaE.cc.

References mps_fire::i, and p4.

53  {
54  double tracksE = 0;
55  const std::vector<CandidatePtr>& signalTracks = tau->signalChargedHadrCands();
56  for(size_t i = 0; i < signalTracks.size(); ++i){
57  TLorentzVector p4;
58  p4.SetXYZM(signalTracks[i]->px(),
59  signalTracks[i]->py(),
60  signalTracks[i]->pz(),
62  tracksE += p4.E();
63  }
64 
65  double hadrTauP = tau->momentum().r() * (1.0 - tau->emFraction());
66  if (tau->emFraction() >= 1.0) {
67  return -1.0; // electron
68  } else {
69  return tracksE / hadrTauP - 1.0;
70  }
71 }
double p4[4]
Definition: TauolaWrapper.h:92
double PFRecoTauDiscriminationByDeltaE::discriminate ( const reco::PFTauRef tau) const
override
void PFRecoTauDiscriminationByDeltaE::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 74 of file PFRecoTauDiscriminationByDeltaE.cc.

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

74  {
75  // pfRecoTauDiscriminationByDeltaE
77  desc.add<double>("deltaEmin", -0.15);
78  {
80  psd0.add<std::string>("BooleanOperator", "and");
81  {
83  psd1.add<double>("cut");
84  psd1.add<edm::InputTag>("Producer");
85  psd0.addOptional<edm::ParameterSetDescription>("leadTrack", psd1);
86  }
87  desc.add<edm::ParameterSetDescription>("Prediscriminants", psd0);
88  }
89  desc.add<double>("deltaEmax", 1.0);
90  desc.add<bool>("BooleanOutput", true);
91  desc.add<edm::InputTag>("PFTauProducer", edm::InputTag("pfRecoTauProducer"));
92  descriptions.add("pfRecoTauDiscriminationByDeltaE", desc);
93 }
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

bool PFRecoTauDiscriminationByDeltaE::booleanOutput
private

Definition at line 40 of file PFRecoTauDiscriminationByDeltaE.cc.

double PFRecoTauDiscriminationByDeltaE::chargedPionMass
private

Definition at line 37 of file PFRecoTauDiscriminationByDeltaE.cc.

double PFRecoTauDiscriminationByDeltaE::deltaEmax
private

Definition at line 39 of file PFRecoTauDiscriminationByDeltaE.cc.

double PFRecoTauDiscriminationByDeltaE::deltaEmin
private

Definition at line 39 of file PFRecoTauDiscriminationByDeltaE.cc.