7#ifndef DECORATELEPTONTAGGERRNN_H
8#define DECORATELEPTONTAGGERRNN_H
24#include "TStopwatch.h"
27#include "GaudiKernel/ITHistSvc.h"
28#include "GaudiKernel/ToolHandle.h"
41#include <unordered_map>
63 virtual StatusCode
execute()
override;
64 virtual StatusCode
finalize()
override;
73 std::vector<decoratorFloatH_t>& decors)
const;
83 const std::vector<Prompt::VarHolder> &tracks,
84 std::vector<decoratorFloatH_t>& decors);
88 StatusCode
makeHist(TH1 *&
h,
const std::string &key,
int nbin,
double xmin,
double xmax);
91 Gaudi::Property<std::string>
m_outputStream {
this,
"outputStream",
"",
"Path of the ROOT output directory of the histograms for RNN debug"};
92 Gaudi::Property<std::string>
m_decorationPrefixRNN {
this,
"decorationPrefixRNN",
"",
"Prefix of the name for the decorator of RNN to the lepton"};
94 Gaudi::Property<double>
m_minTrackpT {
this,
"minTrackpT", 500.0,
"pT cut config for the input tracks to RNN"};
95 Gaudi::Property<double>
m_maxTrackEta {
this,
"maxTrackEta", 2.5,
"abs(eta) cut config for the input tracks to RNN"};
96 Gaudi::Property<double>
m_maxTrackZ0Sin {
this,
"maxTrackZ0Sin", 1.0,
"Z0sin cut config for the input tracks to RNN"};
98 Gaudi::Property<double>
m_minTrackLeptonDR {
this,
"minTrackLeptonDR", 1.0e-6,
"Delta R between lepton and track cut config for the input tracks to RNN"};
99 Gaudi::Property<double>
m_maxTrackLeptonDR {
this,
"maxTrackLeptonDR", 0.4,
"Delta R between lepton and track cut config for the input tracks to RNN"};
100 Gaudi::Property<double>
m_maxLepTrackJetDR {
this,
"maxLepTrackJetDR", 0.4,
"Maximum distance between lepton and track jet for track jet matching"};
102 Gaudi::Property<double>
m_maxTrackSharedSiHits {
this,
"maxTrackSharedSiHits", 1.5,
"track shared si hits cut config for the input tracks to RNN"};
103 Gaudi::Property<unsigned>
m_minTrackSiHits {
this,
"minTrackSiHits", 6.5,
"track silicon detector hits cut config for the input tracks to RNN"};
104 Gaudi::Property<unsigned>
m_maxTrackSiHoles {
this,
"maxTrackSiHoles", 2.5,
"track holes cut config for the input tracks to RNN"};
105 Gaudi::Property<unsigned>
m_maxTrackPixHoles {
this,
"maxTrackPixHoles", 1.5,
"track pixel holes cut config for the input tracks to RNN"};
107 Gaudi::Property<bool>
m_debug {
this,
"debug",
false,
"debug statement"};
108 Gaudi::Property<bool>
m_printTime {
this,
"printTime",
false,
"print running time, for debug"};
112 this,
"toolRNN",
"defaultToolRNN",
"Dedicated tool for RNN prediction"
119 this,
"inputContainerLepton",
"",
120 "Container's name of the lepton that you want to decorate"
123 this,
"inputContainerTrack",
"",
"Track container name"
126 this,
"inputContainerTrackJet",
"",
"Track Jet container name"
129 this,
"inputContainerPrimaryVertices",
"",
"Primary vertex container name"
133 this,
"EventHandleKey",
"EventInfo"
145 {
this,
"DecorHandleKeys", {} };
Handle class for adding a decoration to an object.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Header file for AthHistogramAlgorithm.
ServiceHandle< ITHistSvc > m_histSvc
virtual StatusCode finalize() override
SG::ReadHandleKey< xAOD::JetContainer > m_inputContainerTrackJetKey
Gaudi::Property< double > m_maxTrackEta
SG::WriteDecorHandle< xAOD::IParticleContainer, float > decoratorFloatH_t
const xAOD::TrackParticle * findMuonTrack(const xAOD::Muon *muon)
bool compDummy(const xAOD::IParticle &particle, std::vector< decoratorFloatH_t > &decors) const
Gaudi::Property< unsigned > m_minTrackSiHits
std::map< std::string, TH1 * > m_hists
DecoratePromptLeptonRNN(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< unsigned > m_maxTrackSiHoles
Gaudi::Property< bool > m_debug
StatusCode makeHist(TH1 *&h, const std::string &key, int nbin, double xmin, double xmax)
ToolHandle< IRNNTool > m_toolRNN
std::unordered_map< std::string, size_t > m_decorNameMap
Gaudi::Property< bool > m_printTime
Gaudi::Property< double > m_maxTrackLeptonDR
const xAOD::Jet * findClosestTrackJet(const xAOD::TrackParticle *particle, const xAOD::JetContainer &trackJets)
SG::ReadHandleKey< xAOD::IParticleContainer > m_inputContainerLeptonKey
Gaudi::Property< double > m_maxLepTrackJetDR
std::unique_ptr< SG::AuxElement::ConstAccessor< unsigned char > > m_accessQuality
bool passTrack(Prompt::VarHolder &p)
Gaudi::Property< double > m_maxTrackZ0Sin
virtual StatusCode initialize() override
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainer > m_decorHandleKeys
SG::ReadHandleKey< xAOD::VertexContainer > m_inputContainerPrimaryVerticesKey
Gaudi::Property< std::string > m_decorationPrefixRNN
Gaudi::Property< std::string > m_outputStream
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputContainerTrackKey
bool compScore(const xAOD::IParticle &particle, const std::vector< Prompt::VarHolder > &tracks, std::vector< decoratorFloatH_t > &decors)
virtual StatusCode execute() override
Gaudi::Property< double > m_maxTrackSharedSiHits
Gaudi::Property< unsigned > m_maxTrackPixHoles
SG::ReadHandleKey< xAOD::EventInfo > m_eventHandleKey
Gaudi::Property< double > m_minTrackLeptonDR
bool prepTrackObject(Prompt::VarHolder &p, const xAOD::TrackParticle &track, const xAOD::TrackParticle &lepton, const xAOD::Jet &trackJet, const xAOD::Vertex &priVtx, const xAOD::EventInfo event)
Gaudi::Property< double > m_minTrackpT
Property holding a SG store/key/clid from which a ReadHandle is made.
Handle class for adding a decoration to an object.
Class providing the definition of the 4-vector interface.
DecorHandleKeyArray< WriteDecorHandle< T, S >, WriteDecorHandleKey< T >, Gaudi::DataHandle::Writer > WriteDecorHandleKeyArray
Jet_v1 Jet
Definition of the current "jet version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
Muon_v1 Muon
Reference the current persistent version:
JetContainer_v1 JetContainer
Definition of the current "jet container version".