ATLAS Offline Software
L1CaloPprFineTimePlotManager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //*************************************************************
6 // Name: L1CaloPprFineTimePlotManager.h
7 //
8 // Author: Patrick Rieck - rieck@physik.hu-berlin.de
9 //
10 // Rohin T Narayan (narayan@mail.cern.ch)
11 //
12 // Special plotter for fine time monitoring
13 //
14 // This class is derived from L1CaloPprPlotManager
15 // and implements the monitoring of ADC peak sampling offset jitter, aka fine time.
16 //
17 /*********************************************************************************************/
18 // For a brief description see https://twiki.cern.ch/twiki/bin/view/Sandbox/FineTimeMonitoring
19 /*********************************************************************************************/
20 //
21 #ifndef TRIGT1CALOCALIBTOOLS_L1CALOPPRFINETIMEPLOTMANAGER
22 #define TRIGT1CALOCALIBTOOLS_L1CALOPPRFINETIMEPLOTMANAGER
23 
24 #include "GaudiKernel/ToolHandle.h"
25 #include "GaudiKernel/ServiceHandle.h"
26 
28 
30 
33 
34 
35 class ITHistSvc;
37 class StoreGateSvc;
38 class StatusCode;
39 
40 namespace LVL1 {
41 class IL1CaloOfflineTriggerTowerTools;
42 class IL1TriggerTowerTool;
43 class TriggerTower;
44 }
45 
47 {
48 public:
49  // constructor for handling offline monitoring
50  L1CaloPprFineTimePlotManager(ITHistSvc* histoSvc,
51  ToolHandle<LVL1::IL1CaloOfflineTriggerTowerTools>&offlineTT_tool,
52  const int ADC_cut,
53  const unsigned int lumimax,
54  const std::string& pathInRootFile);
55  // constructor for online monitoring
57  ToolHandle<LVL1::IL1TriggerTowerTool>&onlineTT_tool,
58  const int ADC_cut, const unsigned int lumimax,
59  const std::string& pathInRootFile);
61 
62  inline void SetFineTimeCut(double& fineTimeCut) {m_fineTimeCut = fineTimeCut;};
63  inline void SetPpmAdcMaxValue(unsigned int ppmAdcMaxValue) {m_ppmAdcMaxValue = ppmAdcMaxValue;}
64  // StatusCode MakeSummary();
65  // method for setting the em and had reference values
66  inline void SetReferenceValue(double refValue) {m_RefValue = refValue;};
67  inline void SetEmReferenceValue(double refValue) {m_emRefValue = refValue;};
68  inline void SetHadReferenceValue(double refValue) {m_hadRefValue = refValue;};
69  // method for setting the calibration factor
70  inline void SetCalibrationFactor(double calFactor) {m_CalFactor = calFactor;};
71  inline void SetHadCalibrationFactor(double calFactor) {m_hadCalFactor = calFactor;};
72  inline void SetEmCalibrationFactor(double calFactor) {m_emCalFactor = calFactor;};
73 
74  // load calo cells
76  float LArQuality(const xAOD::TriggerTower* trigTower, int layer);
77  bool badLArQuality(float qual);
78  bool badHecQuality(float qual);
79 
80  void EnableCaloQualCut(bool doCut) {m_doCaloQualCut = doCut;};
81 
82 
83 private:
84 
86  ToolHandle<LVL1::IL1CaloMonitoringCaloTool> m_caloTool;
87 
88  // Providing fine time for histograms
89  double getMonitoringValue(const xAOD::TriggerTower* trigTower, CalLayerEnum theLayer);
90 
91  // decide whether the given value that is supposed to be monitored
92  // is acctually plotted
93  bool doMonitoring(double &value);
94 
95  double m_fineTimeCut; // plot fine time only for smaller absolut value
96  int m_ppmAdcMaxValue; // ADC saturation cut
97 
98  double m_RefValue;//, m_hadRefValue; // reference value per TT (read from db by the L1CaloPPrMonitoring)
99  double m_emRefValue;
101 
102  double m_CalFactor;//, m_hadCalFactor; // calibration factor per TT (read from db by the L1CaloPPrMonitoring)
105 
106  void loadTools();
107 
108  bool m_doCaloQualCut; //allows to switch calo quality cut (and usage of calo folders) on and off
109 
110 
111 // friend class LVL1::IL1CaloOfflineTriggerTowerTools;
112 // friend Identifier LVL1::IL1CaloOfflineTriggerTowerTools::hadID(double, double) const;
113 };
114 
115 #endif
L1CaloPprFineTimePlotManager::m_CalFactor
double m_CalFactor
Definition: L1CaloPprFineTimePlotManager.h:102
L1CaloPprFineTimePlotManager::m_emCalFactor
double m_emCalFactor
Definition: L1CaloPprFineTimePlotManager.h:103
L1CaloPprFineTimePlotManager::EnableCaloQualCut
void EnableCaloQualCut(bool doCut)
Definition: L1CaloPprFineTimePlotManager.h:80
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:74
L1CaloPprFineTimePlotManager
Definition: L1CaloPprFineTimePlotManager.h:47
L1CaloPprFineTimePlotManager::SetCalibrationFactor
void SetCalibrationFactor(double calFactor)
Definition: L1CaloPprFineTimePlotManager.h:70
L1CaloPprFineTimePlotManager::L1CaloPprFineTimePlotManager
L1CaloPprFineTimePlotManager(ITHistSvc *histoSvc, ToolHandle< LVL1::IL1CaloOfflineTriggerTowerTools > &offlineTT_tool, const int ADC_cut, const unsigned int lumimax, const std::string &pathInRootFile)
Definition: L1CaloPprFineTimePlotManager.cxx:18
L1CaloPprFineTimePlotManager::LArQuality
float LArQuality(const xAOD::TriggerTower *trigTower, int layer)
Definition: L1CaloPprFineTimePlotManager.cxx:98
L1CaloPprFineTimePlotManager::m_fineTimeCut
double m_fineTimeCut
Definition: L1CaloPprFineTimePlotManager.h:95
TriggerTowerContainer.h
L1CaloPprFineTimePlotManager::m_emRefValue
double m_emRefValue
Definition: L1CaloPprFineTimePlotManager.h:99
athena.value
value
Definition: athena.py:122
L1CaloPprFineTimePlotManager::m_storeGate
ServiceHandle< StoreGateSvc > m_storeGate
Definition: L1CaloPprFineTimePlotManager.h:80
L1CaloPprFineTimePlotManager::m_RefValue
double m_RefValue
Definition: L1CaloPprFineTimePlotManager.h:98
L1CaloPprFineTimePlotManager::badLArQuality
bool badLArQuality(float qual)
Definition: L1CaloPprFineTimePlotManager.cxx:115
IL1CaloMonitoringCaloTool.h
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
L1CaloPprFineTimePlotManager::m_hadRefValue
double m_hadRefValue
Definition: L1CaloPprFineTimePlotManager.h:100
L1CaloPprFineTimePlotManager::m_ppmAdcMaxValue
int m_ppmAdcMaxValue
Definition: L1CaloPprFineTimePlotManager.h:96
L1CaloPprFineTimePlotManager::m_hadCalFactor
double m_hadCalFactor
Definition: L1CaloPprFineTimePlotManager.h:104
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
L1CaloPprFineTimePlotManager::SetPpmAdcMaxValue
void SetPpmAdcMaxValue(unsigned int ppmAdcMaxValue)
Definition: L1CaloPprFineTimePlotManager.h:63
L1CaloPprFineTimePlotManager::SetHadCalibrationFactor
void SetHadCalibrationFactor(double calFactor)
Definition: L1CaloPprFineTimePlotManager.h:71
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
L1CaloPprFineTimePlotManager::SetEmCalibrationFactor
void SetEmCalibrationFactor(double calFactor)
Definition: L1CaloPprFineTimePlotManager.h:72
xAOD::TriggerTower_v2
Description of TriggerTower_v2.
Definition: TriggerTower_v2.h:49
L1CaloPprPlotManager.h
L1CaloPprFineTimePlotManager::doMonitoring
bool doMonitoring(double &value)
Definition: L1CaloPprFineTimePlotManager.cxx:217
L1CaloPprFineTimePlotManager::loadTools
void loadTools()
Definition: L1CaloPprFineTimePlotManager.cxx:225
L1CaloPprFineTimePlotManager::~L1CaloPprFineTimePlotManager
~L1CaloPprFineTimePlotManager()
Definition: L1CaloPprFineTimePlotManager.h:60
L1CaloPprFineTimePlotManager::SetReferenceValue
void SetReferenceValue(double refValue)
Definition: L1CaloPprFineTimePlotManager.h:66
L1CaloPprFineTimePlotManager::badHecQuality
bool badHecQuality(float qual)
Definition: L1CaloPprFineTimePlotManager.cxx:125
L1CaloPprFineTimePlotManager::getMonitoringValue
double getMonitoringValue(const xAOD::TriggerTower *trigTower, CalLayerEnum theLayer)
Definition: L1CaloPprFineTimePlotManager.cxx:136
L1CaloPprFineTimePlotManager::m_doCaloQualCut
bool m_doCaloQualCut
Definition: L1CaloPprFineTimePlotManager.h:108
L1CaloPprPlotManager
Definition: L1CaloPprPlotManager.h:85
L1CaloPprFineTimePlotManager::m_caloTool
ToolHandle< LVL1::IL1CaloMonitoringCaloTool > m_caloTool
Definition: L1CaloPprFineTimePlotManager.h:86
TriggerTower.h
beamspotman.qual
qual
Definition: beamspotman.py:481
L1CaloPprFineTimePlotManager::SetEmReferenceValue
void SetEmReferenceValue(double refValue)
Definition: L1CaloPprFineTimePlotManager.h:67
CalLayerEnum
CalLayerEnum
Definition: L1CaloPprPlotManager.h:78
L1CaloPprFineTimePlotManager::SetHadReferenceValue
void SetHadReferenceValue(double refValue)
Definition: L1CaloPprFineTimePlotManager.h:68
xAOD::TriggerTower
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/TriggerTower.h:16
L1CaloPprFineTimePlotManager::SetFineTimeCut
void SetFineTimeCut(double &fineTimeCut)
Definition: L1CaloPprFineTimePlotManager.h:62
L1CaloPprFineTimePlotManager::getCaloCells
StatusCode getCaloCells()
Definition: L1CaloPprFineTimePlotManager.cxx:82
ServiceHandle< StoreGateSvc >