CMS 3D CMS Logo

TauDiscriminationAgainstElectronDeadECAL.cc
Go to the documentation of this file.
1 
22 
23 template <class TauType, class TauDiscriminator>
25 public:
26  typedef std::vector<TauType> TauCollection;
30  moduleLabel_(cfg.getParameter<std::string>("@module_label")),
31  verbosity_(cfg.getParameter<int>("verbosity")),
32  antiElectronDeadECAL_(cfg, edm::EDConsumerBase::consumesCollector()) {}
34 
35  void beginEvent(const edm::Event& evt, const edm::EventSetup& es) override { antiElectronDeadECAL_.beginEvent(es); }
36 
37  double discriminate(const TauRef& tau) const override {
38  if (verbosity_) {
39  edm::LogPrint(this->getTauTypeString() + "AgainstEleDeadECAL")
40  << "<" + this->getTauTypeString() + "AgainstElectronDeadECAL::discriminate>:";
41  edm::LogPrint(this->getTauTypeString() + "AgainstEleDeadECAL") << " moduleLabel = " << moduleLabel_;
42  edm::LogPrint(this->getTauTypeString() + "AgainstEleDeadECAL")
43  << " tau: Pt = " << tau->pt() << ", eta = " << tau->eta() << ", phi = " << tau->phi();
44  }
45  double discriminator = 1.;
46  if (antiElectronDeadECAL_(tau.get())) {
47  discriminator = 0.;
48  }
49  if (verbosity_) {
50  edm::LogPrint(this->getTauTypeString() + "AgainstEleDeadECAL") << "--> discriminator = " << discriminator;
51  }
52  return discriminator;
53  }
54 
55  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
56 
57 private:
60 
62 };
63 
64 template <class TauType, class TauDiscriminator>
66  edm::ConfigurationDescriptions& descriptions) {
67  // {pfReco,pat}TauDiscriminationAgainstElectronDeadECAL
69 
70  desc.add<double>("dR", 0.08);
71  desc.add<unsigned int>("minStatus", 12);
72  desc.add<bool>("extrapolateToECalEntrance", true);
73  desc.add<int>("verbosity", 0);
74 
76  desc); // inherited from the base-class
77 
78  descriptions.addWithDefaultLabel(desc);
79 }
80 
85 
ConfigurationDescriptions.h
PFRecoTauDiscriminationAgainstElectronDeadECAL
TauDiscriminationAgainstElectronDeadECAL< reco::PFTau, reco::PFTauDiscriminator > PFRecoTauDiscriminationAgainstElectronDeadECAL
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:82
AntiElectronDeadECAL.h
TauDiscriminationAgainstElectronDeadECAL::antiElectronDeadECAL_
AntiElectronDeadECAL antiElectronDeadECAL_
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:61
TauDiscriminationProducerBase.h
metsig::tau
Definition: SignAlgoResolutions.h:49
TauDiscriminationAgainstElectronDeadECAL::beginEvent
void beginEvent(const edm::Event &evt, const edm::EventSetup &es) override
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:35
edm
HLT enums.
Definition: AlignableModifier.h:19
TauDiscriminationAgainstElectronDeadECAL::TauRef
edm::Ref< TauCollection > TauRef
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:27
edm::LogPrint
Log< level::Warning, true > LogPrint
Definition: MessageLogger.h:130
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Ref
Definition: AssociativeIterator.h:58
TauDiscriminationAgainstElectronDeadECAL::moduleLabel_
std::string moduleLabel_
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:58
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
AntiElectronDeadECAL
Definition: AntiElectronDeadECAL.h:37
TauDiscriminationAgainstElectronDeadECAL::TauCollection
std::vector< TauType > TauCollection
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:26
PDWG_TauSkim_cff.discriminator
discriminator
Definition: PDWG_TauSkim_cff.py:7
TauDiscriminationProducerBase< TauType, TauDiscriminator >::getTauTypeString
static std::string getTauTypeString()
helper method to retrieve tau type name, e.g. to build correct cfi getter
Definition: TauDiscriminationProducerBase.cc:196
TauDiscriminationProducerBase
Definition: TauDiscriminationProducerBase.h:54
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
TauDiscriminationProducerBase::fillProducerDescriptions
static void fillProducerDescriptions(edm::ParameterSetDescription &desc)
Definition: TauDiscriminationProducerBase.cc:173
Event.h
TauDiscriminationAgainstElectronDeadECAL
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:24
createfilelist.int
int
Definition: createfilelist.py:10
TauDiscriminationAgainstElectronDeadECAL::verbosity_
int verbosity_
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:59
edm::EventSetup
Definition: EventSetup.h:58
PATTauDiscriminationAgainstElectronDeadECAL
TauDiscriminationAgainstElectronDeadECAL< pat::Tau, pat::PATTauDiscriminator > PATTauDiscriminationAgainstElectronDeadECAL
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:84
TauDiscriminationAgainstElectronDeadECAL::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:65
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
looper.cfg
cfg
Definition: looper.py:296
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
TauDiscriminationAgainstElectronDeadECAL::TauDiscriminationAgainstElectronDeadECAL
TauDiscriminationAgainstElectronDeadECAL(const edm::ParameterSet &cfg)
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:28
std
Definition: JetResolutionObject.h:76
EventSetup.h
TauDiscriminationAgainstElectronDeadECAL::discriminate
double discriminate(const TauRef &tau) const override
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:37
edm::Event
Definition: Event.h:73
TauDiscriminationAgainstElectronDeadECAL::~TauDiscriminationAgainstElectronDeadECAL
~TauDiscriminationAgainstElectronDeadECAL() override
Definition: TauDiscriminationAgainstElectronDeadECAL.cc:33
edm::ConfigurationDescriptions::addWithDefaultLabel
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:87
AntiElectronDeadECAL::beginEvent
void beginEvent(const edm::EventSetup &)
Definition: AntiElectronDeadECAL.cc:29