ATLAS Offline Software
Loading...
Searching...
No Matches
MMMonUtils Namespace Reference

Functions

 getMMLabel (x, y)
 getMMLabelY (y)
 getMMLabelX (x)
 get_MPV_charge (histo)
 get_mean_and_sigma (histo, minval, maxval)
 getXYbins (nPCB, iphi, start0, histoname, histo_list)
 fitFermiDirac (x, par)
 get_time (histo)
 poi (histo_name, side, eta)

Variables

 tf1_fd = TF1("fd", fitFermiDirac, 0., 700., 5)

Function Documentation

◆ fitFermiDirac()

MMMonUtils.fitFermiDirac ( x,
par )

Definition at line 44 of file MMMonUtils.py.

44def fitFermiDirac(x, par):
45 fermiDirac= par[0]/( 1 + TMath.Exp( (par[1]-x[0])/par[2] ) + TMath.Exp( (x[0]-par[3])/par[4] ))
46 return fermiDirac
47

◆ get_mean_and_sigma()

MMMonUtils.get_mean_and_sigma ( histo,
minval,
maxval )

Definition at line 27 of file MMMonUtils.py.

27def get_mean_and_sigma(histo, minval, maxval):
28 fgaus = TF1("fgaus","gaus",minval,maxval)
29 histo.Fit("fgaus","QRN")
30 mean = fgaus.GetParameter(1)
31 sigma = fgaus.GetParameter(2)
32 return mean,sigma
33

◆ get_MPV_charge()

MMMonUtils.get_MPV_charge ( histo)

Definition at line 21 of file MMMonUtils.py.

21def get_MPV_charge(histo):
22 flandau = TF1("flandau","landau",0,800)
23 histo.Fit("flandau","QRN")
24 mpv = flandau.GetParameter(1)
25 return mpv
26

◆ get_time()

MMMonUtils.get_time ( histo)

Definition at line 50 of file MMMonUtils.py.

50def get_time(histo):
51 fd = tf1_fd
52 p0=histo.GetMaximum()/4.
53 p1=histo.GetBinLowEdge(histo.FindFirstBinAbove())
54 p2=0.5
55 p3=histo.GetBinLowEdge(histo.FindLastBinAbove())
56 p4=0.5
57
58
59 fd.SetParameters(p0, p1, p2, p3, p4)
60 fd.SetParLimits(0, 0, histo.GetMaximum())
61 fd.SetParLimits(1, histo.GetBinLowEdge(histo.FindFirstBinAbove())-5, histo.GetBinLowEdge(histo.FindFirstBinAbove())+10)
62 fd.SetParLimits(2, 0.001, 10)
63 fd.SetParLimits(3, histo.GetBinLowEdge(histo.FindFirstBinAbove()), histo.GetBinLowEdge(histo.FindLastBinAbove())+5)
64 fd.SetParLimits(4, 0.001, 10)
65
66
67 histo.Fit("fd","QRN")
68 t0 = fd.GetParameter(1)
69 tmax = fd.GetParameter(3)
70
71 return [t0, tmax]
72
73

◆ getMMLabel()

MMMonUtils.getMMLabel ( x,
y )

Definition at line 8 of file MMMonUtils.py.

8def getMMLabel(x,y):
9 labelx = getattr(labels, x)
10 labely = getattr(labels, y)
11 return labelx,labely
12

◆ getMMLabelX()

MMMonUtils.getMMLabelX ( x)

Definition at line 17 of file MMMonUtils.py.

17def getMMLabelX(x):
18 labelx = getattr(labels, x)
19 return labelx
20

◆ getMMLabelY()

MMMonUtils.getMMLabelY ( y)

Definition at line 13 of file MMMonUtils.py.

13def getMMLabelY(y):
14 labely = getattr(labels, y)
15 return labely
16

◆ getXYbins()

MMMonUtils.getXYbins ( nPCB,
iphi,
start0,
histoname,
histo_list )

Definition at line 34 of file MMMonUtils.py.

34def getXYbins(nPCB, iphi, start0, histoname, histo_list):
35 ybin = iphi
36 ind = 0
37 if start0 is True:
38 ind = histo_list[iphi].index(histoname)
39 else:
40 ind = histo_list[iphi-1].index(histoname)
41 xbin = (ind+1) + (nPCB-1)*ind
42 return xbin,ybin
43
Definition index.py:1

◆ poi()

MMMonUtils.poi ( histo_name,
side,
eta )

Definition at line 74 of file MMMonUtils.py.

74def poi(histo_name, side, eta):
75 poi = ''
76 if histo_name=='Charge_vs_PCB':
77 poi = f'{side}: MPV of Landau Fit to Cluster charge {eta}'
78 elif histo_name=='Charge_vs_PCB_ontrack':
79 poi = f'{side}: MPV of Landau Fit to Cluster charge {eta} ontrack'
80 elif histo_name=='Charge_vs_PCB_onseg':
81 poi = f'{side}: MPV of Landau Fit to Cluster charge {eta} onseg'
82 elif histo_name=='Cluster_size_vs_PCB':
83 poi = f'Cluster size {side} {eta} per PCB'
84 elif histo_name=='Cluster_size_vs_PCB_ontrack':
85 poi = f'Cluster size {side} {eta} ontrack per PCB'
86 elif histo_name=='Cluster_size_vs_PCB_onseg':
87 poi = f'Cluster size {side} {eta} onseg per PCB'
88 elif histo_name=='Cluster_time_vs_PCB':
89 poi = f'Cluster time {side} {eta} per PCB'
90 elif histo_name=='Cluster_time_ontrack_vs_PCB':
91 poi = f'Cluster time {side} {eta} ontrack per PCB'
92 elif histo_name=='Cluster_time_onseg_vs_PCB':
93 poi = f'Cluster time {side} {eta} on seg per PCB'
94 elif histo_name=='Strip_time_vs_PCB':
95 poi = f'Strip time {side} {eta} per PCB'
96 elif histo_name=='Strip_time_vs_PCB':
97 poi = f'Strip time {side} {eta} per PCB'
98 elif histo_name=='Strip_time_onseg_vs_PCB':
99 poi = f'Strip time on seg {side} {eta} per PCB'
100 elif histo_name=='Strip_time_ontrack_vs_PCB':
101 poi = f'Strip time on track {side} {eta} per PCB'
102 return(poi)

Variable Documentation

◆ tf1_fd

MMMonUtils.tf1_fd = TF1("fd", fitFermiDirac, 0., 700., 5)

Definition at line 48 of file MMMonUtils.py.