ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsVariablePlots.h
Go to the documentation of this file.
1//Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3#ifndef FTAGVALIDATION_PHYSICSVARIABLEPLOTS_H
4#define FTAGVALIDATION_PHYSICSVARIABLEPLOTS_H 1
5
7
10
11#include "GaudiKernel/ITHistSvc.h"
12#include "TH1.h"
13#include "TH2.h"
14#include "map"
15#include "tuple"
16
17namespace FTAGValidation {
18
21
22 public:
23 PhysicsVariablePlots( const std::string& name, ISvcLocator* pSvcLocator );
24 virtual ~PhysicsVariablePlots();
25
26 virtual StatusCode initialize() override;
27 virtual StatusCode execute() override;
28 virtual StatusCode finalize() override;
30 protected:
32
33 StatusCode initializeHistograms();
34
35 StatusCode analyseTrackParticleObjects( const xAOD::Jet*,
36 const xAOD::Vertex*,
37 const std::string&,
38 std::string = "" );
39
40 StatusCode computeAndStoreTrackVariables( const std::string&, const xAOD::Jet*,
41 const std::string&, const xAOD::TrackParticle*,
42 const xAOD::Vertex*, const std::string& = "" );
43
44 StatusCode analyseBTaggingObject( const xAOD::Jet*,
45 const std::string&,
46 std::string = "" );
47
48 template < typename T >
49 StatusCode defineHistogram( const std::string&,
50 const std::string&,
51 int,double,double,
52 const std::string& path = "" );
53 template < typename T >
54 StatusCode defineHistogram( const std::string&,
55 const std::string&,
56 int,double,double,
57 int,double,double,
58 const std::string& path = "" );
59
60 template < typename T >
61 StatusCode fillHistogram( const std::string&,T );
62 template < typename T,typename U >
63 StatusCode fillHistogram( const std::string&,T,U );
64
65 private:
66 ServiceHandle< ITHistSvc > m_histSvc { this, "THistSvc", "", "Histogramming svc" };
67
68 SG::ReadHandleKey< xAOD::JetContainer > m_jetKey { this, "JetCollectionKey", "",
69 "Input Jet collection name" };
71 "Input Vertex collection name" };
72 SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackKey { this, "TrackParticleCollectionKey", "",
73 "Input Track collection name" };
74
75 private:
76 enum HISTO { TYPE=0,NAME=1,TITLE=2,PATH=3,XBINS=4,XMIN=5,XMAX=6,YBINS=7,YMIN=8,YMAX=9 };
77
78 Gaudi::Property< std::vector< std::vector< std::string > > > m_Histograms1Ddefinitions { this,"Histograms1D",{},
79 "Map with 1D histograms" };
80 Gaudi::Property< std::vector< std::vector< std::string > > > m_Histograms2Ddefinitions { this,"Histograms2D",{},
81 "Map with 1D histograms" };
82
83 std::map< const std::string,TH1* > m_Histograms1D;
84 std::map< const std::string,TH2* > m_Histograms2D;
85
86 };
87
89
90} //> end namespace FTAGValidation
91
92#endif
93
FTAGValidationAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode analyseBTaggingObject(const xAOD::Jet *, const std::string &, std::string="")
virtual StatusCode execute() override
StatusCode fillHistogram(const std::string &, T)
std::map< const std::string, TH2 * > m_Histograms2D
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackKey
StatusCode computeAndStoreTrackVariables(const std::string &, const xAOD::Jet *, const std::string &, const xAOD::TrackParticle *, const xAOD::Vertex *, const std::string &="")
std::map< const std::string, TH1 * > m_Histograms1D
Gaudi::Property< std::vector< std::vector< std::string > > > m_Histograms2Ddefinitions
StatusCode analyseTrackParticleObjects(const xAOD::Jet *, const xAOD::Vertex *, const std::string &, std::string="")
PhysicsVariablePlots(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::vector< std::vector< std::string > > > m_Histograms1Ddefinitions
StatusCode defineHistogram(const std::string &, const std::string &, int, double, double, const std::string &path="")
SG::ReadHandleKey< xAOD::JetContainer > m_jetKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Jet_v1 Jet
Definition of the current "jet version".
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.