Public Member Functions | |
DeepTauId (const edm::ParameterSet &cfg, const deep_tau::DeepTauCache *cache) | |
Public Member Functions inherited from deep_tau::DeepTauBase | |
DeepTauBase (const edm::ParameterSet &cfg, const OutputCollection &outputs, const DeepTauCache *cache) | |
void | produce (edm::Event &event, const edm::EventSetup &es) override |
~DeepTauBase () override | |
Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DeepTauCache > > | |
EDProducer ()=default | |
bool | hasAbilityToProduceInBeginLumis () const final |
bool | hasAbilityToProduceInBeginRuns () const final |
bool | hasAbilityToProduceInEndLumis () const final |
bool | hasAbilityToProduceInEndRuns () const final |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
static const OutputCollection & | GetOutputs () |
static void | globalEndJob (const deep_tau::DeepTauCache *cache_) |
static std::unique_ptr< deep_tau::DeepTauCache > | initializeGlobalCache (const edm::ParameterSet &cfg) |
Static Public Member Functions inherited from deep_tau::DeepTauBase | |
static void | globalEndJob (const DeepTauCache *cache) |
static std::unique_ptr< DeepTauCache > | initializeGlobalCache (const edm::ParameterSet &cfg) |
Static Public Attributes | |
static constexpr float | default_value = -999. |
Private Member Functions | |
void | checkInputs (const tensorflow::Tensor &inputs, const char *block_name, int n_inputs, int n_eta=1, int n_phi=1) const |
void | createConvFeatures (const TauType &tau, const reco::Vertex &pv, double rho, const pat::ElectronCollection &electrons, const pat::MuonCollection &muons, const pat::PackedCandidateCollection &pfCands, const CellGrid &grid, bool is_inner) |
void | createEgammaBlockInputs (unsigned idx, const TauType &tau, const reco::Vertex &pv, double rho, const pat::ElectronCollection &electrons, const pat::PackedCandidateCollection &pfCands, const Cell &cell_map, bool is_inner) |
void | createHadronsBlockInputs (unsigned idx, const TauType &tau, const reco::Vertex &pv, double rho, const pat::PackedCandidateCollection &pfCands, const Cell &cell_map, bool is_inner) |
template<typename dnn > | |
tensorflow::Tensor | createInputsV1 (const TauType &tau, const ElectronCollection &electrons, const MuonCollection &muons) const |
void | createMuonBlockInputs (unsigned idx, const TauType &tau, const reco::Vertex &pv, double rho, const pat::MuonCollection &muons, const pat::PackedCandidateCollection &pfCands, const Cell &cell_map, bool is_inner) |
void | createTauBlockInputs (const TauType &tau, const reco::Vertex &pv, double rho) |
template<typename Collection > | |
void | fillGrids (const TauType &tau, const Collection &objects, CellGrid &inner_grid, CellGrid &outer_grid) |
tensorflow::Tensor | getPartialPredictions (bool is_inner) |
tensorflow::Tensor | getPredictions (edm::Event &event, const edm::EventSetup &es, edm::Handle< TauCollection > taus) override |
void | getPredictionsV1 (const TauType &tau, const pat::ElectronCollection &electrons, const pat::MuonCollection &muons, std::vector< tensorflow::Tensor > &pred_vector) |
void | getPredictionsV2 (const TauType &tau, const pat::ElectronCollection &electrons, const pat::MuonCollection &muons, const pat::PackedCandidateCollection &pfCands, const reco::Vertex &pv, double rho, std::vector< tensorflow::Tensor > &pred_vector) |
void | setCellConvFeatures (tensorflow::Tensor &convTensor, const tensorflow::Tensor &features, unsigned batch_idx, int eta_index, int phi_index) |
Static Private Member Functions | |
static void | calculateElectronClusterVars (const pat::Electron *ele, float &elecEe, float &elecEgamma) |
static bool | calculateElectronClusterVarsV2 (const pat::Electron &ele, float &cc_ele_energy, float &cc_gamma_energy, int &cc_n_gamma) |
static float | calculateGottfriedJacksonAngleDifference (const pat::Tau &tau) |
static bool | calculateGottfriedJacksonAngleDifference (const pat::Tau &tau, double &gj_diff) |
static const pat::Electron * | findMatchedElectron (const pat::Tau &tau, const pat::ElectronCollection &electrons, double deltaR) |
static double | getInnerSignalConeRadius (double pt) |
template<typename T > | |
static float | getValue (T value) |
template<typename T > | |
static float | getValueLinear (T value, float min_value, float max_value, bool positive) |
template<typename T > | |
static float | getValueNorm (T value, float mean, float sigma, float n_sigmas_max=5) |
static bool | isInEcalCrack (double eta) |
template<typename CandidateCollection > | |
static void | processIsolationPFComponents (const pat::Tau &tau, const CandidateCollection &candidates, LorentzVectorXYZ &p4, float &pt, float &d_eta, float &d_phi, float &m, float &n) |
template<typename CandidateCollection > | |
static void | processSignalPFComponents (const pat::Tau &tau, const CandidateCollection &candidates, LorentzVectorXYZ &p4_inner, LorentzVectorXYZ &p4_outer, float &pt_inner, float &dEta_inner, float &dPhi_inner, float &m_inner, float &pt_outer, float &dEta_outer, float &dPhi_outer, float &m_outer, float &n_inner, float &n_outer) |
Private Attributes | |
std::array< std::unique_ptr< tensorflow::Tensor >, 2 > | convTensor_ |
const int | debug_level |
const bool | disable_dxy_pca_ |
std::array< std::unique_ptr< tensorflow::Tensor >, 2 > | eGammaTensor_ |
edm::EDGetTokenT< ElectronCollection > | electrons_token_ |
std::array< std::unique_ptr< tensorflow::Tensor >, 2 > | hadronsTensor_ |
std::string | input_layer_ |
edm::EDGetTokenT< MuonCollection > | muons_token_ |
std::array< std::unique_ptr< tensorflow::Tensor >, 2 > | muonTensor_ |
std::string | output_layer_ |
edm::EDGetTokenT< double > | rho_token_ |
std::unique_ptr< tensorflow::Tensor > | tauBlockTensor_ |
const unsigned | version |
std::array< std::unique_ptr< tensorflow::Tensor >, 2 > | zeroOutputTensor_ |
Static Private Attributes | |
static constexpr float | pi = M_PI |
Definition at line 808 of file DeepTauId.cc.
|
inlineexplicit |
Definition at line 844 of file DeepTauId.cc.
References deep_tau::DeepTauBase::cache_, convTensor_, eGammaTensor_, Exception, deep_tau::DeepTauCache::getGraph(), getPartialPredictions(), hadronsTensor_, input_layer_, muonTensor_, dqmiodumpmetadata::n, Skims_PA_cff::name, output_layer_, setCellConvFeatures(), tauBlockTensor_, version, and zeroOutputTensor_.
|
inlinestaticprivate |
Definition at line 1946 of file DeepTauId.cc.
References default_value, HCALHighEnergyHPDFilter_cfi::energy, and pat::Electron::superCluster().
Referenced by createInputsV1().
|
inlinestaticprivate |
Definition at line 923 of file DeepTauId.cc.
References HCALHighEnergyHPDFilter_cfi::energy, and pat::Electron::superCluster().
Referenced by createEgammaBlockInputs().
|
inlinestaticprivate |
Definition at line 2057 of file DeepTauId.cc.
References calculateGottfriedJacksonAngleDifference(), default_value, and metsig::tau.
|
inlinestaticprivate |
Definition at line 2039 of file DeepTauId.cc.
References funct::abs(), funct::pow(), and metsig::tau.
Referenced by calculateGottfriedJacksonAngleDifference(), createInputsV1(), and createTauBlockInputs().
|
inlineprivate |
Definition at line 946 of file DeepTauId.cc.
References gather_cfg::cout, debug_level, PVValHelper::eta, Exception, alignBH_cfg::fixed, dqmMemoryStats::float, input, PixelMapPlotter::inputs, edm::isNotFinite(), dqmdumpme::k, and phi.
Referenced by createEgammaBlockInputs(), createHadronsBlockInputs(), createMuonBlockInputs(), and createTauBlockInputs().
|
inlineprivate |
Definition at line 1100 of file DeepTauId.cc.
References convTensor_, createEgammaBlockInputs(), createHadronsBlockInputs(), createMuonBlockInputs(), eGammaTensor_, pwdgSkimBPark_cfi::electrons, PVValHelper::eta, getPartialPredictions(), getRunAppsInfo::grid, hadronsTensor_, training_settings::idx, createfilelist::int, PDWG_BPHSkim_cff::muons, muonTensor_, phi, MetAnalyzer::pv(), rho, setCellConvFeatures(), metsig::tau, and zeroOutputTensor_.
Referenced by getPredictionsV2().
|
inlineprivate |
Definition at line 1270 of file DeepTauId.cc.
References funct::abs(), calculateElectronClusterVarsV2(), checkInputs(), HLT_2018_cff::dPhi, eGammaTensor_, nanoDQM_cff::Electron, pwdgSkimBPark_cfi::electrons, f, dqmMemoryStats::float, get, getValue(), getValueLinear(), getValueNorm(), training_settings::idx, PixelMapPlotter::inputs, isInEcalCrack(), MetAnalyzer::pv(), rho, ZElectronSkim_cff::rho, metsig::tau, runTauDisplay::tau_eta, and runTauDisplay::tau_pt.
Referenced by createConvFeatures().
|
inlineprivate |
Definition at line 1629 of file DeepTauId.cc.
References funct::abs(), checkInputs(), HLT_2018_cff::dPhi, f, dqmMemoryStats::float, get, getValue(), getValueLinear(), getValueNorm(), hadronsTensor_, training_settings::idx, PixelMapPlotter::inputs, isInEcalCrack(), MetAnalyzer::pv(), rho, ZElectronSkim_cff::rho, metsig::tau, runTauDisplay::tau_eta, and runTauDisplay::tau_pt.
Referenced by createConvFeatures().
|
inlineprivate |
Definition at line 1745 of file DeepTauId.cc.
References funct::abs(), calculateElectronClusterVars(), calculateGottfriedJacksonAngleDifference(), taus_cff::decayMode, default_value, HLT_2018_cff::dEta, HLT_2018_cff::dPhi, PVValHelper::dxy, PVValHelper::dz, pwdgSkimBPark_cfi::electrons, reco::tau::eratio(), PVValHelper::eta, findMatchedElectron(), get, PixelMapPlotter::inputs, electrons_cff::ip3d, isInEcalCrack(), EgHLTOffHistBins_cfi::mass, PDWG_BPHSkim_cff::muons, reco::tau::n_photons_total(), processIsolationPFComponents(), processSignalPFComponents(), DiDispStaMuonMonitor_cfi::pt, reco::tau::pt_weighted_deta_strip(), reco::tau::pt_weighted_dphi_strip(), reco::tau::pt_weighted_dr_iso(), reco::tau::pt_weighted_dr_signal(), and metsig::tau.
|
inlineprivate |
Definition at line 1489 of file DeepTauId.cc.
References funct::abs(), checkInputs(), MuonSubdetId::CSC, HLT_2018_cff::dPhi, MuonSubdetId::DT, f, dqmMemoryStats::float, get, getValue(), getValueLinear(), getValueNorm(), training_settings::idx, PixelMapPlotter::inputs, isInEcalCrack(), dumpRecoGeometry_cfg::Muon, PDWG_BPHSkim_cff::muons, muonTensor_, MetAnalyzer::pv(), pat::Muon::PV2D, rho, ZElectronSkim_cff::rho, MuonSubdetId::RPC, relativeConstraints::station, metsig::tau, runTauDisplay::tau_eta, and runTauDisplay::tau_pt.
Referenced by createConvFeatures().
|
inlineprivate |
Definition at line 1171 of file DeepTauId.cc.
References funct::abs(), calculateGottfriedJacksonAngleDifference(), checkInputs(), default_value, disable_dxy_pca_, reco::tau::eratio(), f, get, getValue(), getValueLinear(), getValueNorm(), PixelMapPlotter::inputs, isInEcalCrack(), reco::tau::n_photons_total(), pi, reco::tau::pt_weighted_deta_strip(), reco::tau::pt_weighted_dphi_strip(), reco::tau::pt_weighted_dr_iso(), reco::tau::pt_weighted_dr_signal(), rho, ZElectronSkim_cff::rho, metsig::tau, runTauDisplay::tau_eta, runTauDisplay::tau_mass, runTauDisplay::tau_phi, runTauDisplay::tau_pt, and tauBlockTensor_.
Referenced by getPredictionsV2().
|
inlinestatic |
Definition at line 822 of file DeepTauId.cc.
References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and HLT_2018_cff::InputTag.
|
inlineprivate |
Definition at line 1040 of file DeepTauId.cc.
References reco::deltaPhi(), getInnerSignalConeRadius(), getRunAppsInfo::grid, dqmiodumpmetadata::n, getGTfromDQMFile::obj, funct::pow(), and metsig::tau.
Referenced by getPredictionsV2().
|
inlinestaticprivate |
Definition at line 2069 of file DeepTauId.cc.
References PbPb_ZMuSkimMuonDPG_cff::deltaR, reco::deltaR2(), pwdgSkimBPark_cfi::electrons, reco::LeafCandidate::pt(), and metsig::tau.
Referenced by createInputsV1().
|
inlinestaticprivate |
Definition at line 2032 of file DeepTauId.cc.
References SiStripPI::max, cosmictrackSelector_cfi::min_pt, and DiDispStaMuonMonitor_cfi::pt.
Referenced by fillGrids(), and processSignalPFComponents().
|
inlinestatic |
Definition at line 812 of file DeepTauId.cc.
References Output, and deep_tau::DeepTauBase::outputs_.
|
inlineprivate |
Definition at line 1076 of file DeepTauId.cc.
References deep_tau::DeepTauBase::cache_, eGammaTensor_, deep_tau::DeepTauCache::getSession(), hadronsTensor_, muonTensor_, and tensorflow::run().
Referenced by createConvFeatures(), and DeepTauId().
|
inlineoverrideprivatevirtual |
Implements deep_tau::DeepTauBase.
Definition at line 968 of file DeepTauId.cc.
References pwdgSkimBPark_cfi::electrons, electrons_token_, Exception, getPredictionsV1(), getPredictionsV2(), dqmdumpme::k, PDWG_BPHSkim_cff::muons, muons_token_, deep_tau::NumberOfOutputs, deep_tau::DeepTauBase::pfcandToken_, rho, rho_token_, Tau3MuMonitor_cff::taus, version, pwdgSkimBPark_cfi::vertices, and deep_tau::DeepTauBase::vtxToken_.
|
inlineprivate |
Definition at line 1006 of file DeepTauId.cc.
References deep_tau::DeepTauBase::cache_, pwdgSkimBPark_cfi::electrons, deep_tau::DeepTauCache::getSession(), input_layer_, PixelMapPlotter::inputs, PDWG_BPHSkim_cff::muons, output_layer_, tensorflow::run(), and metsig::tau.
Referenced by getPredictions().
|
inlineprivate |
Definition at line 1014 of file DeepTauId.cc.
References deep_tau::DeepTauBase::cache_, convTensor_, createConvFeatures(), createTauBlockInputs(), pwdgSkimBPark_cfi::electrons, fillGrids(), deep_tau::DeepTauCache::getSession(), PDWG_BPHSkim_cff::muons, MetAnalyzer::pv(), rho, tensorflow::run(), metsig::tau, and tauBlockTensor_.
Referenced by getPredictions().
|
inlinestaticprivate |
Definition at line 902 of file DeepTauId.cc.
Referenced by createEgammaBlockInputs(), createHadronsBlockInputs(), createMuonBlockInputs(), createTauBlockInputs(), getValueLinear(), and getValueNorm().
|
inlinestaticprivate |
Definition at line 907 of file DeepTauId.cc.
References getValue(), hcaldqm::quantity::max_value, and hcaldqm::quantity::min_value.
Referenced by createEgammaBlockInputs(), createHadronsBlockInputs(), createMuonBlockInputs(), and createTauBlockInputs().
|
inlinestaticprivate |
Definition at line 917 of file DeepTauId.cc.
References getValue(), and SiStripPI::mean.
Referenced by createEgammaBlockInputs(), createHadronsBlockInputs(), createMuonBlockInputs(), and createTauBlockInputs().
|
inlinestatic |
|
inlinestatic |
Definition at line 892 of file DeepTauId.cc.
References looper::cfg.
|
inlinestaticprivate |
Definition at line 2064 of file DeepTauId.cc.
References funct::abs(), and PVValHelper::eta.
Referenced by createEgammaBlockInputs(), createHadronsBlockInputs(), createInputsV1(), createMuonBlockInputs(), and createTauBlockInputs().
|
inlinestaticprivate |
Definition at line 2010 of file DeepTauId.cc.
References HLT_2018_cff::candidates, default_value, HLT_2018_cff::dEta, HLT_2018_cff::dPhi, visualization-live-secondInstance_cfg::m, dqmiodumpmetadata::n, p4, DiDispStaMuonMonitor_cfi::pt, and metsig::tau.
Referenced by createInputsV1().
|
inlinestaticprivate |
Definition at line 1966 of file DeepTauId.cc.
References HLT_2018_cff::candidates, default_value, reco::deltaR(), HLT_2018_cff::dEta, HLT_2018_cff::dPhi, HGC3DClusterGenMatchSelector_cfi::dR, getInnerSignalConeRadius(), and metsig::tau.
Referenced by createInputsV1().
|
inlineprivate |
Definition at line 1162 of file DeepTauId.cc.
References postprocess-scan-build::features, and dqmiodumpmetadata::n.
Referenced by createConvFeatures(), and DeepTauId().
|
private |
Definition at line 2091 of file DeepTauId.cc.
Referenced by createConvFeatures(), DeepTauId(), and getPredictionsV2().
|
private |
Definition at line 2088 of file DeepTauId.cc.
Referenced by checkInputs().
|
staticconstexpr |
Definition at line 810 of file DeepTauId.cc.
Referenced by calculateElectronClusterVars(), calculateGottfriedJacksonAngleDifference(), createInputsV1(), createTauBlockInputs(), processIsolationPFComponents(), and processSignalPFComponents().
|
private |
Definition at line 2089 of file DeepTauId.cc.
Referenced by createTauBlockInputs().
|
private |
Definition at line 2091 of file DeepTauId.cc.
Referenced by createConvFeatures(), createEgammaBlockInputs(), DeepTauId(), and getPartialPredictions().
|
private |
Definition at line 2083 of file DeepTauId.cc.
Referenced by getPredictions().
|
private |
Definition at line 2091 of file DeepTauId.cc.
Referenced by createConvFeatures(), createHadronsBlockInputs(), DeepTauId(), and getPartialPredictions().
|
private |
Definition at line 2086 of file DeepTauId.cc.
Referenced by DeepTauId(), and getPredictionsV1().
|
private |
Definition at line 2084 of file DeepTauId.cc.
Referenced by getPredictions().
|
private |
Definition at line 2091 of file DeepTauId.cc.
Referenced by createConvFeatures(), createMuonBlockInputs(), DeepTauId(), and getPartialPredictions().
|
private |
Definition at line 2086 of file DeepTauId.cc.
Referenced by DeepTauId(), and getPredictionsV1().
|
staticconstexprprivate |
Definition at line 899 of file DeepTauId.cc.
Referenced by createTauBlockInputs().
|
private |
Definition at line 2085 of file DeepTauId.cc.
Referenced by getPredictions().
|
private |
Definition at line 2090 of file DeepTauId.cc.
Referenced by createTauBlockInputs(), DeepTauId(), and getPredictionsV2().
|
private |
Definition at line 2087 of file DeepTauId.cc.
Referenced by validation.Sample::datasetpattern(), DeepTauId(), validation.Sample::filename(), and getPredictions().
|
private |
Definition at line 2091 of file DeepTauId.cc.
Referenced by createConvFeatures(), and DeepTauId().