TagProbeEfficiencyMon.h 4.29 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/

// ***************************************************************************
//
// NAME:    TagProbeEfficiencyMon.h
// PACKAGE: TrigT1CaloMonitoring
// AUTHOR:  Jason Barkeloo & Kate Whalen
//
// **************************************************************************

#ifndef TRIGT1CALOMONITORING_TAGPROBEEFFICIENCYMON_H
#define TRIGT1CALOMONITORING_TAGPROBEEFFICIENCYMON_H

#include <map>
#include <string>
#include <vector>

// Athena includes
#include "GaudiKernel/ToolHandle.h"
#include "AthenaMonitoring/ManagedMonitorToolBase.h"

// xAOD includes
#include "xAODTrigL1Calo/TriggerTower.h"

// Root Includes
#include <TLorentzVector.h>

class TH1F_LW;
class TH2F_LW;
class TH2I_LW;
class StatusCode;

namespace TrigConf { class ILVL1ConfigSvc; }

namespace LVL1 {

  // Forward declarations:
  class ITrigT1CaloMonErrorTool;
  class TrigT1CaloLWHistogramTool;

  class TagProbeEfficiencyMon: public ManagedMonitorToolBase { 
 
  public: 
  
  TagProbeEfficiencyMon(const std::string & type, const std::string& name, 
                                                  const IInterface* parent);
  virtual ~TagProbeEfficiencyMon(); 

  virtual StatusCode initialize();
  virtual StatusCode finalize();

  virtual StatusCode bookHistogramsRecurrent();
  virtual StatusCode fillHistograms();
  virtual StatusCode procHistograms();
 
  private: 
 
  //=============================================
  // Monitoring tools 
  // ============================================
 
  // Trigger configuration service
  ServiceHandle<TrigConf::ILVL1ConfigSvc> m_configSvc;
  
  /// Tool to retrieve bytestream errors
  ToolHandle<ITrigT1CaloMonErrorTool> m_errorTool;
  /// Histogram helper tool
  ToolHandle<TrigT1CaloLWHistogramTool> m_histTool;

  //============================================
  // StoreGate keys
  // ===========================================

  /// Trigger tower container StoreGate key
  std::string m_xAODTriggerTowerContainerName;
  /// CPM TOB RoI container StoreGate key
  std::string m_cpmTobRoiLocation;
  /// Error vector StoreGate key
  std::string m_errorLocation;

  //===========================================
  // Helper variables 
  // ==========================================
 
  /// Root directory
  std::string m_rootDir;
  /// Maximum energy plotted
Shaun Roe's avatar
Shaun Roe committed
90
  int m_maxEnergyRange{};
91
  /// Histograms booked flag
Shaun Roe's avatar
Shaun Roe committed
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
  bool m_histBooked{};
  float m_lowcutTag{};
  float m_lowcutProbe{};
  float m_inv_m_range{};
  float m_m_z{};
  int m_probe_et_bins{};
  int m_probe_eta_bins{};
  int m_probe_phi_bins{};
  double m_probe_et_min{};
  double m_probe_et_max{};
  double m_probe_eta_min{};
  double m_probe_eta_max{};
  double m_probe_phi_min{};
  double m_probe_phi_max{};
  int m_tag_charge{};
  std::vector<int> m_probelist{};
  int m_probe_check{};
  //TLorentzVector tagLV{}; 
110
111
  TLorentzVector m_probeLV;
  TLorentzVector m_combLV; 
Shaun Roe's avatar
Shaun Roe committed
112
  //TLorentzVector probeLV1{};
113
114
  TLorentzVector m_combLV1; 
  TLorentzVector m_tmpProbe; 
115
116
117
118
119
120

  //===========================================
  // Histograms
  // ==========================================
  
  // Histograms used to make efficiency plots
121
  static const int s_thresh_num=16; //16 EM Thresholds
Shaun Roe's avatar
Shaun Roe committed
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
  TH1F_LW* m_h_probe_eta_pass[s_thresh_num]{};
  TH1F_LW* m_h_probe_phi_pass[s_thresh_num]{};
  TH1F_LW* m_h_probe_Et_pass[s_thresh_num]{};
  TH1F_LW* m_h_lumib_int_Et_pass[s_thresh_num]{};
  TH1F_LW* m_h_lumib_int_phi_pass[s_thresh_num]{};
  TH1F_LW* m_h_lumib_int_eta_pass[s_thresh_num]{};
  TH1F_LW* m_h_lumib_int_Et_tot{};
  TH1F_LW* m_h_lumib_int_phi_tot{};
  TH1F_LW* m_h_lumib_int_eta_tot{};
  TH1F_LW* m_h_eta_eff[s_thresh_num]{};
  TH1F_LW* m_h_phi_eff[s_thresh_num]{};
  TH1F_LW* m_h_Et_eff[s_thresh_num]{};
  TH1F_LW* m_h_probe_eta_tot{};
  TH1F_LW* m_h_probe_phi_tot{};
  TH1F_LW* m_h_probe_Et_tot{};
  TH1F_LW* m_h_z_inv_mass{};
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153


  //==========================================
  // Helper Functions
  //==========================================
  bool inGoodEtaRange(double eta);//Not working currently hardcoded
  double calcDeltaR(double eta1, double phi1, double eta2, double phi2);
  double correctDeltaPhi(double dPhi);



  }; 
//==============================================================================
} // end namespace
//==============================================================================
#endif