4 #include "Artus/KappaAnalysis/interface/Producers/ValidTausProducer.h"
6 #include "HiggsAnalysis/KITHiggsToTauTau/interface/HttTypes.h"
32 ValidTausProducer::Init(settings, metadata);
35 MvaIsolationCutsByIndex = Utility::ParseMapTypes<size_t, float>(Utility::ParseVectorToMap(specSettings.GetTauDiscriminatorMvaIsolation()), MvaIsolationCutsByName);
38 LambdaNtupleConsumer<HttTypes>::AddFloatQuantity(static_cast<spec_metadata_type&>(metadata),
"leadingTauIso", [
this](
spec_event_type const& event,
spec_product_type const& product) {
39 return product.m_validTaus.size() >=1 ? SafeMap::GetWithDefault(product.
m_tauIsolation, product.m_validTaus[0], DefaultValues::UndefinedDouble) : DefaultValues::UndefinedDouble;
41 LambdaNtupleConsumer<HttTypes>::AddFloatQuantity(static_cast<spec_metadata_type&>(metadata),
"leadingTauIsoOverPt", [
this](
spec_event_type const& event,
spec_product_type const& product) {
42 return product.m_validTaus.size() >=1 ? SafeMap::GetWithDefault(product.
m_tauIsolationOverPt, product.m_validTaus[0], DefaultValues::UndefinedDouble) : DefaultValues::UndefinedDouble;
44 LambdaNtupleConsumer<HttTypes>::AddFloatQuantity(static_cast<spec_metadata_type&>(metadata),
"trailingTauIso", [
this](
spec_event_type const& event,
spec_product_type const& product) {
45 return product.m_validTaus.size() >=2 ? SafeMap::GetWithDefault(product.
m_tauIsolation, product.m_validTaus[1], DefaultValues::UndefinedDouble) : DefaultValues::UndefinedDouble;
47 LambdaNtupleConsumer<HttTypes>::AddFloatQuantity(static_cast<spec_metadata_type&>(metadata),
"trailingTauIsoOverPt", [
this](
spec_event_type const& event,
spec_product_type const& product) {
48 return product.m_validTaus.size() >=2 ? SafeMap::GetWithDefault(product.
m_tauIsolationOverPt, product.m_validTaus[1], DefaultValues::UndefinedDouble) : DefaultValues::UndefinedDouble;
58 bool ApplyCustomMvaIsolationCut(KTau* tau,
event_type const& event,
59 std::vector<float>)
const;
60 bool ApplyCustomElectronRejection(KTau* tau,
event_type const& event,
63 std::map<size_t, std::vector<float> > MvaIsolationCutsByIndex;
64 std::map<std::string, std::vector<float> > MvaIsolationCutsByName;
Reads settings for all parts of the KappaAnalysis code from a prepared json configuration file...
Definition: HttSettings.h:15
KappaTypes::event_type event_type
Definition: HttValidTausProducer.h:19
virtual bool AdditionalCriteria(KTau *tau, event_type const &event, product_type &product, setting_type const &settings, metadata_type const &metadata) const override
Definition: HttValidTausProducer.cc:5
std::map< KTau *, double > m_tauIsolation
Definition: HttProduct.h:88
HttTypes::setting_type spec_setting_type
Definition: HttValidTausProducer.h:25
HttTypes::event_type spec_event_type
Definition: HttValidTausProducer.h:23
HttTypes::metadata_type spec_metadata_type
Definition: HttValidTausProducer.h:26
KappaTypes::metadata_type metadata_type
Definition: HttValidTausProducer.h:22
GlobalProducer, for valid taus. Config tags:
Definition: HttValidTausProducer.h:15
KappaTypes::setting_type setting_type
Definition: HttValidTausProducer.h:21
std::map< KTau *, double > m_tauIsolationOverPt
Definition: HttProduct.h:89
Definition: HttEvent.h:14
HttTypes::product_type spec_product_type
Definition: HttValidTausProducer.h:24
virtual void Init(setting_type const &settings, metadata_type &metadata) override
Definition: HttValidTausProducer.h:30
Definition: HttProduct.h:17
KappaTypes::product_type product_type
Definition: HttValidTausProducer.h:20