ATLAS Offline Software
Loading...
Searching...
No Matches
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;
25class TF1;
26class TDirectory;
27
28// this
29#include "T0MTSettings.h"
30
31namespace MuonCalib {
32
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-------------------------------
90 TH1F *m_adc;
92 int m_id;
94 std::unique_ptr<TF1> m_adc_fit;
99 };
100
101} // namespace MuonCalib
102
103#endif
static Double_t a
bool m_adc_ok
is true if the adc-fit is ok;
Definition ADCMTHistos.h:96
void Initialize(int id, const T0MTSettings *settings, const char *hname=NULL)
Initialize class.
std::unique_ptr< TF1 > m_adc_fit
function which is fitted to the adc-spectrum
Definition ADCMTHistos.h:94
TF1 * GetAdcFunction() const
returnd function fitted to adc-spectrum
Definition ADCMTHistos.h:84
void FillA(double a)
fill adc value
TH1F * GetADCSpec()
get adc spectrum
Definition ADCMTHistos.h:67
TH1F * m_adc
pulse height spectrum
Definition ADCMTHistos.h:90
ADCMTHistos(int id, const T0MTSettings *settings, const char *hname=NULL)
Initializing constructor.
Definition ADCMTHistos.h:54
const T0MTSettings * m_settings
Pointer to settings class.
Definition ADCMTHistos.h:98
int Id() const
return tube id
Definition ADCMTHistos.h:78
ADCMTHistos()
Default Constructor.
Definition ADCMTHistos.h:48
Settings for the T0 calibration (histogram booking and fitting parameters) Parameters for pattern rec...
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.