ATLAS Offline Software
CorrelationMatrix.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 JETUNCERTAINTIES_CORRELATIONMATRIX_H
6 #define JETUNCERTAINTIES_CORRELATIONMATRIX_H
7 
11 
12 #include "xAODJet/Jet.h"
13 #include "xAODJet/JetContainer.h"
18 
19 #include "TString.h"
20 
21 class TH2D;
22 
23 namespace jet
24 {
25 
27 // ^ because using JetUncertaintiesTool
28 {
29  public:
30  // Constructor/destructor
31  CorrelationMatrix( const TString& name,
32  const int numBins,
33  const double minVal,
34  const double maxVal,
35  const double fixedVal1,
36  const double fixedVal2 );
37  virtual ~CorrelationMatrix();
38 
39  // Initialization
40  virtual StatusCode initializeForPt(const JetUncertaintiesTool& uncTool);
41  virtual StatusCode initializeForEta(const JetUncertaintiesTool& uncTool);
42 
43  // Information retrieval methods
44  virtual TString getName() const { return m_name; }
45  virtual const TH2D* getMatrix() const { return m_corrMat; }
46 
47 
48  private:
49  CorrelationMatrix(const std::string& name = "");
50 
51  // Private members
52  bool m_isInit;
53  const TString m_name;
54 
55  const int m_numBins;
56  const double m_minVal;
57  const double m_maxVal;
58  const double m_fixedVal1;
59  const double m_fixedVal2;
60 
61  TH2D* m_corrMat;
62 
63  // Required xAOD variables for manipulation of kinematics to fill the matrix
66 
70 
71  // Private helper methods
72  StatusCode checkInitialization(const JetUncertaintiesTool& uncTool) const;
73  StatusCode createStore();
74  StatusCode clearStore();
75  StatusCode setDefaultProperties(const JetUncertaintiesTool& uncTool);
76  TH2D* buildMatrix(const std::vector<double>& bins) const;
77  double getCorrelation(const JetUncertaintiesTool& uncTool) const;
78  double getCovariance(const JetUncertaintiesTool& uncTool, const xAOD::Jet* jet1, const xAOD::Jet* jet2) const;
79 };
80 
81 } // end jet namespace
82 
83 #endif
jet::CorrelationMatrix::m_fixedVal1
const double m_fixedVal1
Definition: CorrelationMatrix.h:58
jet::CorrelationMatrix::m_isInit
bool m_isInit
Definition: CorrelationMatrix.h:52
Jet.h
jet::CorrelationMatrix::m_numBins
const int m_numBins
Definition: CorrelationMatrix.h:55
jet::CorrelationMatrix::getName
virtual TString getName() const
Definition: CorrelationMatrix.h:44
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
jet::CorrelationMatrix
Definition: CorrelationMatrix.h:28
EventInfoAuxContainer.h
jet::CorrelationMatrix::m_jet2
xAOD::Jet * m_jet2
Definition: CorrelationMatrix.h:68
jet::CorrelationMatrix::getMatrix
virtual const TH2D * getMatrix() const
Definition: CorrelationMatrix.h:45
jet::CorrelationMatrix::m_maxVal
const double m_maxVal
Definition: CorrelationMatrix.h:57
EventInfoContainer.h
jet::CorrelationMatrix::m_corrMat
TH2D * m_corrMat
Definition: CorrelationMatrix.h:61
AsgMessaging.h
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
jet::CorrelationMatrix::m_eInfos
xAOD::EventInfoContainer * m_eInfos
Definition: CorrelationMatrix.h:65
JetUncertaintiesTool
Definition: JetUncertaintiesTool.h:44
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
jet::CorrelationMatrix::m_fixedVal2
const double m_fixedVal2
Definition: CorrelationMatrix.h:59
plotting.yearwise_luminosity_vs_mu.bins
bins
Definition: yearwise_luminosity_vs_mu.py:30
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
EventInfo.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
JetContainer.h
jet::CorrelationMatrix::m_minVal
const double m_minVal
Definition: CorrelationMatrix.h:56
jet::CorrelationMatrix::m_name
const TString m_name
Definition: CorrelationMatrix.h:53
jet::CorrelationMatrix::m_jets
xAOD::JetContainer * m_jets
Definition: CorrelationMatrix.h:64
jet::CorrelationMatrix::m_jet1
xAOD::Jet * m_jet1
Definition: CorrelationMatrix.h:67
JetAuxContainer.h
checker_macros.h
Define macros for attributes used to control the static checker.
jet::CorrelationMatrix::m_eInfo
xAOD::EventInfo * m_eInfo
Definition: CorrelationMatrix.h:69
JetUncertaintiesTool.h