ATLAS Offline Software
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 
17 namespace 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;
29 
30  protected:
32 
34 
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 
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" };
70  SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey { this, "VertexCollectionKey", "",
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 
FTAGValidation::FTAGValidationAlgorithm
Definition: FTAGValidationAlgorithm.h:19
FTAGValidation::PhysicsVariablePlots::m_jetKey
SG::ReadHandleKey< xAOD::JetContainer > m_jetKey
Definition: PhysicsVariablePlots.h:68
FTAGValidation::PhysicsVariablePlots::m_Histograms2Ddefinitions
Gaudi::Property< std::vector< std::vector< std::string > > > m_Histograms2Ddefinitions
Definition: PhysicsVariablePlots.h:80
FTAGValidation::PhysicsVariablePlots::analyseTrackParticleObjects
StatusCode analyseTrackParticleObjects(const xAOD::Jet *, const xAOD::Vertex *, const std::string &, std::string="")
Definition: PhysicsVariablePlots.cxx:254
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
FTAGValidation::PhysicsVariablePlots::YMIN
@ YMIN
Definition: PhysicsVariablePlots.h:76
FTAGValidation::PhysicsVariablePlots::analyseBTaggingObject
StatusCode analyseBTaggingObject(const xAOD::Jet *, const std::string &, std::string="")
Definition: PhysicsVariablePlots.cxx:415
FTAGValidation::PhysicsVariablePlots::YBINS
@ YBINS
Definition: PhysicsVariablePlots.h:76
FTAGValidation::PhysicsVariablePlots::defineHistogram
StatusCode defineHistogram(const std::string &, const std::string &, int, double, double, int, double, double, const std::string &path="")
PhysicsVariablePlots.icc
FTAGValidation::PhysicsVariablePlots::~PhysicsVariablePlots
virtual ~PhysicsVariablePlots()
Definition: PhysicsVariablePlots.cxx:24
FTAGValidation::PhysicsVariablePlots::initialize
virtual StatusCode initialize() override
Definition: PhysicsVariablePlots.cxx:28
FTAGValidation::PhysicsVariablePlots::initializeHistograms
StatusCode initializeHistograms()
Definition: PhysicsVariablePlots.cxx:183
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
FTAGValidation::PhysicsVariablePlots::m_Histograms2D
std::map< const std::string, TH2 * > m_Histograms2D
Definition: PhysicsVariablePlots.h:84
FTAGValidation::PhysicsVariablePlots::fillHistogram
StatusCode fillHistogram(const std::string &, T, U)
FTAGValidation::PhysicsVariablePlots::m_Histograms1D
std::map< const std::string, TH1 * > m_Histograms1D
Definition: PhysicsVariablePlots.h:83
FTAGValidationAlgorithm.h
FTAGValidation
Definition: FTAGValidationAlgorithm.h:16
TrackParticleAuxContainer.h
FTAGValidation::PhysicsVariablePlots::XMIN
@ XMIN
Definition: PhysicsVariablePlots.h:76
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FTAGValidation::PhysicsVariablePlots::m_Histograms1Ddefinitions
Gaudi::Property< std::vector< std::vector< std::string > > > m_Histograms1Ddefinitions
Definition: PhysicsVariablePlots.h:78
FTAGValidation::PhysicsVariablePlots::execute
virtual StatusCode execute() override
Definition: PhysicsVariablePlots.cxx:51
FTAGValidation::PhysicsVariablePlots::NAME
@ NAME
Definition: PhysicsVariablePlots.h:76
FTAGValidation::PhysicsVariablePlots::m_vertexKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
Definition: PhysicsVariablePlots.h:70
FTAGValidation::PhysicsVariablePlots::finalize
virtual StatusCode finalize() override
Definition: PhysicsVariablePlots.cxx:176
FTAGValidation::PhysicsVariablePlots::XBINS
@ XBINS
Definition: PhysicsVariablePlots.h:76
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
FTAGValidation::PhysicsVariablePlots::computeAndStoreTrackVariables
StatusCode computeAndStoreTrackVariables(const std::string &, const xAOD::Jet *, const std::string &, const xAOD::TrackParticle *, const xAOD::Vertex *, const std::string &="")
Definition: PhysicsVariablePlots.cxx:320
FTAGValidation::PhysicsVariablePlots
Definition: PhysicsVariablePlots.h:20
FTAGValidation::PhysicsVariablePlots::YMAX
@ YMAX
Definition: PhysicsVariablePlots.h:76
FTAGValidation::PhysicsVariablePlots::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Definition: PhysicsVariablePlots.h:66
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
FTAGValidation::PhysicsVariablePlots::defineHistogram
StatusCode defineHistogram(const std::string &, const std::string &, int, double, double, const std::string &path="")
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
FTAGValidation::PhysicsVariablePlots::m_trackKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackKey
Definition: PhysicsVariablePlots.h:72
FTAGValidation::PhysicsVariablePlots::TYPE
@ TYPE
Definition: PhysicsVariablePlots.h:76
FTAGValidation::PhysicsVariablePlots::XMAX
@ XMAX
Definition: PhysicsVariablePlots.h:76
FTAGValidation::PhysicsVariablePlots::TITLE
@ TITLE
Definition: PhysicsVariablePlots.h:76
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
FTAGValidation::PhysicsVariablePlots::PhysicsVariablePlots
PhysicsVariablePlots()
FTAGValidation::PhysicsVariablePlots::PATH
@ PATH
Definition: PhysicsVariablePlots.h:76
FTAGValidation::PhysicsVariablePlots::fillHistogram
StatusCode fillHistogram(const std::string &, T)
TrackParticleContainer.h
ServiceHandle< ITHistSvc >
FTAGValidation::PhysicsVariablePlots::HISTO
HISTO
Definition: PhysicsVariablePlots.h:76