ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
MuonCalib::ADCMTHistos Class Reference

#include <ADCMTHistos.h>

Collaboration diagram for MuonCalib::ADCMTHistos:

Public Member Functions

 ADCMTHistos ()
 Default Constructor. More...
 
 ADCMTHistos (int id, const T0MTSettings *settings, const char *hname=NULL)
 Initializing constructor. More...
 
void Initialize (int id, const T0MTSettings *settings, const char *hname=NULL)
 Initialize class. More...
 
TH1FGetADCSpec ()
 get adc spectrum More...
 
void FillA (double a)
 fill adc value More...
 
int Id () const
 return tube id More...
 
bool FitAdc ()
 fit adc More...
 
TF1 * GetAdcFunction () const
 returnd function fitted to adc-spectrum More...
 
bool AdcOk () const
 

Private Attributes

TH1Fm_adc
 pulse height spectrum More...
 
int m_id
 tube id; More...
 
std::unique_ptr< TF1 > m_adc_fit
 function which is fitted to the adc-spectrum More...
 
bool m_adc_ok
 is true if the adc-fit is ok; More...
 
const T0MTSettingsm_settings
 Pointer to settings class. More...
 

Detailed Description

Histogram and fitter class for drift time and pulsehight spectra The rising slope is fitted by a fermi-function: \(f(t)=r_{u,0} + \frac{A}{1+exp((t_0 - t)/T_0}\). The falling slope is fitted by \(g(t)=r_{u,max} + \frac{e(t,a,b)}{1+exp((t_{max} - t)/T_{max}}\) where \(e(t, a, b) = a e^{bt}\). A pattern recognition determines the fit ranges and the parameters \(r_u\), \(A\), \(a\) and \(b\).

Author
Felix.nosp@m..Rau.nosp@m.scher.nosp@m.@Phy.nosp@m.sik.U.nosp@m.ni-M.nosp@m.uench.nosp@m.en.D.nosp@m.e
Date
June 2006

}

Definition at line 44 of file ADCMTHistos.h.

Constructor & Destructor Documentation

◆ ADCMTHistos() [1/2]

MuonCalib::ADCMTHistos::ADCMTHistos ( )
inline

Default Constructor.

Definition at line 48 of file ADCMTHistos.h.

48 : m_adc(NULL), m_id(-1), m_adc_ok(false) {}

◆ ADCMTHistos() [2/2]

MuonCalib::ADCMTHistos::ADCMTHistos ( int  id,
const T0MTSettings settings,
const char *  hname = NULL 
)
inline

Initializing constructor.

Parameters
idtube id
settingst0-fit settings: settings will be asked about histogram binning

Definition at line 54 of file ADCMTHistos.h.

54  :
55  m_adc(NULL), m_id(-1), m_adc_ok(false) {
56  Initialize(id, settings, hname);
57  }

Member Function Documentation

◆ AdcOk()

bool MuonCalib::ADCMTHistos::AdcOk ( ) const
inline

Definition at line 85 of file ADCMTHistos.h.

85 { return m_adc_ok; }

◆ FillA()

void MuonCalib::ADCMTHistos::FillA ( double  a)

fill adc value

Parameters
aadc value

Definition at line 42 of file ADCMTHistos.cxx.

42 { m_adc->Fill(static_cast<Axis_t>(a)); }

◆ FitAdc()

bool MuonCalib::ADCMTHistos::FitAdc ( )

fit adc

Definition at line 60 of file ADCMTHistos.cxx.

60  {
61  m_adc_fit = std::make_unique<TF1>("adc_fun", adcfitf_skewnormal, 50, 320, 4);
62  Double_t average = m_adc->GetMean();
63  Double_t max = m_adc->GetMaximum();
64  m_adc_fit->SetParameters(max, average, 40, 1); // initialize value
65  m_adc_fit->SetLineColor(kRed);
66  m_adc_fit->SetParNames("Max", "Mean", "Sigma", "Skew_factor");
67  m_adc_fit->SetParLimits(0, 0, 1000000);
68  m_adc_fit->SetParLimits(1, 100, 200);
69  m_adc_fit->SetParLimits(2, 0, 200);
70  m_adc->Fit("adc_fun", "Q+", "", 50, 320);
71  m_adc_ok = true;
72  return true;
73  }

◆ GetAdcFunction()

TF1* MuonCalib::ADCMTHistos::GetAdcFunction ( ) const
inline

returnd function fitted to adc-spectrum

Definition at line 84 of file ADCMTHistos.h.

84 { return m_adc->GetFunction("adc_fun"); }

◆ GetADCSpec()

TH1F* MuonCalib::ADCMTHistos::GetADCSpec ( )
inline

get adc spectrum

Definition at line 67 of file ADCMTHistos.h.

67 { return m_adc; }

◆ Id()

int MuonCalib::ADCMTHistos::Id ( ) const
inline

return tube id

Definition at line 78 of file ADCMTHistos.h.

78 { return m_id; }

◆ Initialize()

void MuonCalib::ADCMTHistos::Initialize ( int  id,
const T0MTSettings settings,
const char *  hname = NULL 
)

Initialize class.

Parameters
idtube id
settingst0-fit settings: settings will be asked about histogram binning

Definition at line 48 of file ADCMTHistos.cxx.

48  {
49  m_settings = settings;
50  char buf[100];
51  if (hname == nullptr)
52  snprintf(buf, 100, "adc_spec_%d", id);
53  else
54  snprintf(buf, 100, "adc_spec_%s", hname);
55  m_adc = new TH1F(buf, "", settings->NBinsADC(), settings->ADCMin(), settings->ADCMax());
56  m_id = id;
57  m_adc_ok = false;
58  }

Member Data Documentation

◆ m_adc

TH1F* MuonCalib::ADCMTHistos::m_adc
private

pulse height spectrum

Definition at line 90 of file ADCMTHistos.h.

◆ m_adc_fit

std::unique_ptr<TF1> MuonCalib::ADCMTHistos::m_adc_fit
private

function which is fitted to the adc-spectrum

Definition at line 94 of file ADCMTHistos.h.

◆ m_adc_ok

bool MuonCalib::ADCMTHistos::m_adc_ok
private

is true if the adc-fit is ok;

Definition at line 96 of file ADCMTHistos.h.

◆ m_id

int MuonCalib::ADCMTHistos::m_id
private

tube id;

Definition at line 92 of file ADCMTHistos.h.

◆ m_settings

const T0MTSettings* MuonCalib::ADCMTHistos::m_settings
private

Pointer to settings class.

Definition at line 98 of file ADCMTHistos.h.


The documentation for this class was generated from the following files:
max
#define max(a, b)
Definition: cfImp.cxx:41
drawFromPickle.average
def average(lst)
Definition: drawFromPickle.py:38
dqt_zlumi_pandas.hname
string hname
Definition: dqt_zlumi_pandas.py:272
MuonCalib::ADCMTHistos::Initialize
void Initialize(int id, const T0MTSettings *settings, const char *hname=NULL)
Initialize class.
Definition: ADCMTHistos.cxx:48
MuonCalib::adcfitf_skewnormal
Double_t adcfitf_skewnormal(Double_t *x, Double_t *par)
skew normal ADC fitting
Definition: ADCMTHistos.cxx:17
MuonCalib::ADCMTHistos::m_adc_ok
bool m_adc_ok
is true if the adc-fit is ok;
Definition: ADCMTHistos.h:96
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
MuonCalib::ADCMTHistos::m_id
int m_id
tube id;
Definition: ADCMTHistos.h:92
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
MuonCalib::ADCMTHistos::m_settings
const T0MTSettings * m_settings
Pointer to settings class.
Definition: ADCMTHistos.h:98
a
TList * a
Definition: liststreamerinfos.cxx:10
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