ATLAS Offline Software
ADCMTHistos.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // ADCMTHistos.h
6 // Header file for class ADCMTHistos
8 // (c) ATLAS Detector software
10 //
12 
13 #ifndef ADCMTHistos_H
14 #define ADCMTHistos_H
15 
16 // c - c++
17 #include <iostream>
18 #include <memory>
19 
20 // root
21 #include "TH1.h"
22 /*#include "TF1.h"
23 #include "TDirectory.h"*/
24 // class TH1F;
25 class TF1;
26 class TDirectory;
27 
28 // this
29 #include "T0MTSettings.h"
30 
31 namespace MuonCalib {
32 
44  class ADCMTHistos {
45  public:
46  //---------------------------constructor----------------------------------------
48  inline ADCMTHistos() : m_adc(NULL), m_id(-1), m_adc_ok(false), m_settings(nullptr) {}
54  inline ADCMTHistos(int id, const T0MTSettings *settings, const char *hname = NULL) :
55  m_adc(NULL), m_id(-1), m_adc_ok(false), m_settings(nullptr) {
56  Initialize(id, settings, hname);
57  }
58  //---------------------------public member functions----------------------------
64  void Initialize(int id, const T0MTSettings *settings, const char *hname = NULL);
65 
67  inline TH1F *GetADCSpec() { return m_adc; }
68 
73  void FillA(double a);
74 
78  inline int Id() const { return m_id; }
79 
81  bool FitAdc();
82 
84  inline TF1 *GetAdcFunction() const { return m_adc->GetFunction("adc_fun"); }
85  inline bool AdcOk() const { return m_adc_ok; }
86 
87  private:
88  //---------------------------private data members-------------------------------
92  int m_id;
94  std::unique_ptr<TF1> m_adc_fit;
96  bool m_adc_ok;
99  };
100 
101 } // namespace MuonCalib
102 
103 #endif
T0MTSettings.h
MuonCalib::ADCMTHistos::ADCMTHistos
ADCMTHistos(int id, const T0MTSettings *settings, const char *hname=NULL)
Initializing constructor.
Definition: ADCMTHistos.h:54
dqt_zlumi_pandas.hname
string hname
Definition: dqt_zlumi_pandas.py:279
MuonCalib::ADCMTHistos::Initialize
void Initialize(int id, const T0MTSettings *settings, const char *hname=NULL)
Initialize class.
Definition: ADCMTHistos.cxx:48
MuonCalib::ADCMTHistos::m_adc_ok
bool m_adc_ok
is true if the adc-fit is ok;
Definition: ADCMTHistos.h:96
MuonCalib::ADCMTHistos::FitAdc
bool FitAdc()
fit adc
Definition: ADCMTHistos.cxx:60
MuonCalib::ADCMTHistos::m_id
int m_id
tube id;
Definition: ADCMTHistos.h:92
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::ADCMTHistos
Definition: ADCMTHistos.h:44
MuonCalib::ADCMTHistos::ADCMTHistos
ADCMTHistos()
Default Constructor.
Definition: ADCMTHistos.h:48
MuonCalib::ADCMTHistos::GetADCSpec
TH1F * GetADCSpec()
get adc spectrum
Definition: ADCMTHistos.h:67
MuonCalib::ADCMTHistos::m_settings
const T0MTSettings * m_settings
Pointer to settings class.
Definition: ADCMTHistos.h:98
MuonCalib::ADCMTHistos::FillA
void FillA(double a)
fill adc value
Definition: ADCMTHistos.cxx:42
a
TList * a
Definition: liststreamerinfos.cxx:10
MuonCalib::ADCMTHistos::GetAdcFunction
TF1 * GetAdcFunction() const
returnd function fitted to adc-spectrum
Definition: ADCMTHistos.h:84
MuonCalib::ADCMTHistos::m_adc
TH1F * m_adc
pulse height spectrum
Definition: ADCMTHistos.h:90
MuonCalib::ADCMTHistos::m_adc_fit
std::unique_ptr< TF1 > m_adc_fit
function which is fitted to the adc-spectrum
Definition: ADCMTHistos.h:94
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
MuonCalib::ADCMTHistos::AdcOk
bool AdcOk() const
Definition: ADCMTHistos.h:85
MuonCalib::ADCMTHistos::Id
int Id() const
return tube id
Definition: ADCMTHistos.h:78
MuonCalib::T0MTSettings
Definition: T0MTSettings.h:28