1 #ifndef RecoTauTag_RecoTau_DeepTauBase_h 2 #define RecoTauTag_RecoTau_DeepTauBase_h 13 #include <Math/VectorUtil.h> 17 #include "tensorflow/core/util/memmapped_file_system.h" 36 std::unique_ptr<TF1>
fn_;
42 using GraphPtr = std::shared_ptr<tensorflow::GraphDef>;
44 DeepTauCache(
const std::map<std::string, std::string>& graph_names,
bool mem_mapped);
54 std::map<std::string, tensorflow::Session*>
sessions_;
55 std::map<std::string, std::unique_ptr<tensorflow::MemmappedEnv>>
memmappedEnv_;
70 using WPMap = std::map<std::string, CutterPtr>;
73 using ResultMap = std::map<std::string, std::unique_ptr<TauDiscriminator>>;
74 std::vector<size_t>
num_, den_;
76 Output(
const std::vector<size_t>&
num,
const std::vector<size_t>& den) : num_(num), den_(den) {}
79 const WPMap& working_points)
const;
std::unique_ptr< TF1 > fn_
std::map< std::string, tensorflow::Session * > sessions_
edm::EDGetTokenT< TauCollection > tausToken_
const DeepTauCache * cache_
std::vector< size_t > num_
const tensorflow::GraphDef & getGraph(const std::string &name="") const
std::map< std::string, CutterPtr > WPMap
static void globalEndJob(const DeepTauCache *cache)
std::map< std::string, Output > OutputCollection
OutputCollection outputs_
Output(const std::vector< size_t > &num, const std::vector< size_t > &den)
std::map< std::string, std::unique_ptr< TauDiscriminator >> ResultMap
std::vector< Electron > ElectronCollection
std::shared_ptr< tensorflow::GraphDef > GraphPtr
TauWPThreshold(const std::string &cut_str)
def get_value(data, filters)
pat::ElectronCollection ElectronCollection
std::vector< TauType > TauCollection
Analysis-level tau class.
pat::MuonCollection MuonCollection
double operator()(const pat::Tau &tau) const
std::vector< Muon > MuonCollection
std::unique_ptr< Cutter > CutterPtr
std::map< std::string, GraphPtr > graphs_
std::map< std::string, std::unique_ptr< tensorflow::MemmappedEnv > > memmappedEnv_
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double >> LorentzVectorXYZ
std::map< std::string, WPMap > workingPoints_
tensorflow::Session & getSession(const std::string &name="") const
edm::EDGetTokenT< pat::PackedCandidateCollection > pfcandToken_
edm::EDGetTokenT< reco::VertexCollection > vtxToken_