ATLAS Offline Software
Loading...
Searching...
No Matches
TrackClassifier.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TrackClassifier_TrackClassifier_H
6#define TrackClassifier_TrackClassifier_H
7
8#include <AsgTools/AsgTool.h>
10
14
15#include <memory>
16#include <fstream>
17#include "lwtnn/lightweight_network_config.hh"
18#include "lwtnn/LightweightNeuralNetwork.hh"
19#include "lwtnn/LightweightGraph.hh"
20#include "lwtnn/parse_json.hh"
21
22#include <math.h>
23
24namespace FlavorTagDiscriminants {
25 class TrackClassifier final : public asg::AsgTool, virtual public ITrackClassifier
26 {
27
29
30 public:
31 // this is a standard tool constructor
32 TrackClassifier (const std::string& name);
33 virtual ~TrackClassifier();
34
35 // inherited interface
36 virtual StatusCode initialize () override;
37 virtual std::map<std::string, double> ComputeScore( const xAOD::TrackParticle* track, const xAOD::Jet* jet) const override;
38 virtual double compute_HF_Score(const xAOD::TrackParticle* track, const xAOD::Jet* jet) const override;
39 virtual bool selectTrack(const xAOD::TrackParticle* track, const xAOD::Jet* jet) const override;
40
41 private:
42
43 std::unique_ptr<lwt::LightweightGraph> m_lwtnn_network;
44 std::string m_NNModelFilepath;
45
46 // the HF score cut in each jet pt bin (expressed in GeV),
47 //resembling 99% WP signal (heavy flavor tracks) efficiency in singleB jets:
48 const std::map<double, double>
50 {0.0, -1.},
51 {250.0, 0.08892564848065376},
52 {500.0, 0.046739218756556504},
53 {750.0, 0.03829977475106716},
54 {1000.0, 0.033665632829070084},
55 {1500.0, 0.033094046637415886},
56 {2000.0, 0.029787263832986355},
57 {2500.0, 0.02972860541194677},
58 {3000.0, 0.029779289849102497},
59 {4000.0, 0.026585028506815437},
60 {5000.0, 0.025235182605683804}
61 };
62
63 int get(const xAOD::TrackParticle* part, xAOD::SummaryType info) const;
64 bool pass_cut(const double score, const xAOD::Jet* jet) const;
65
66 };
67}
68#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
bool pass_cut(const double score, const xAOD::Jet *jet) const
std::unique_ptr< lwt::LightweightGraph > m_lwtnn_network
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
virtual bool selectTrack(const xAOD::TrackParticle *track, const xAOD::Jet *jet) const override
const std::map< double, double > m_WPcuts
virtual double compute_HF_Score(const xAOD::TrackParticle *track, const xAOD::Jet *jet) const override
int get(const xAOD::TrackParticle *part, xAOD::SummaryType info) const
virtual std::map< std::string, double > ComputeScore(const xAOD::TrackParticle *track, const xAOD::Jet *jet) const override
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Jet_v1 Jet
Definition of the current "jet version".
TrackParticle_v1 TrackParticle
Reference the current persistent version:
SummaryType
Enumerates the different types of information stored in Summary.