ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleGun_egammaET.egammaETSampler Class Reference
Inheritance diagram for ParticleGun_egammaET.egammaETSampler:
Collaboration diagram for ParticleGun_egammaET.egammaETSampler:

Public Member Functions

 __init__ (self, pid, eta=[-2.5, 2.5], phi=[0, PG.TWOPI], mu1=0.5, kT1=0.1, mu2=200, kT2=20, y0=0.005, PtMin=0, PtMax=3e3, nBins=None)
 pt (self)

Public Attributes

 m = PG.MASSES[abs(pid)]
 eta = eta
 phi = phi
 hist = PG.TH1(etSpectrumFullRange)

Detailed Description

Definition at line 18 of file ParticleGun_egammaET.py.

Constructor & Destructor Documentation

◆ __init__()

ParticleGun_egammaET.egammaETSampler.__init__ ( self,
pid,
eta = [-2.5, 2.5],
phi = [0, PG.TWOPI],
mu1 = 0.5,
kT1 = 0.1,
mu2 = 200,
kT2 = 20,
y0 = 0.005,
PtMin = 0,
PtMax = 3e3,
nBins = None )
Parameters for the MVA-shaped spectrum : higher density in the < 100 GeV range
PtMin = 0 # minimum Pt
PtMax = 3000 # maximum Pt (3 TeV)
nBins # number of bins (one every 100 MeV by default)
mu1 = 0.5       # mu1,kT1 : smooth but steep ramp-up from 0 to 1 GeV (requested by TauCP)
kT1 = 0.1
mu2 = 200       # mu2,kT2 : smooth, slow ramp-down in the 100-300 GeV range
kT2 = 20
y0 = 0.005      # y0 : baseline for low-density at high ET up to PtMax

Definition at line 20 of file ParticleGun_egammaET.py.

21 mu1 = 0.5, kT1 = 0.1, mu2 = 200, kT2 = 20, y0 = 0.005, PtMin = 0 , PtMax = 3e3, nBins=None):
22 """
23 Parameters for the MVA-shaped spectrum : higher density in the < 100 GeV range
24 PtMin = 0 # minimum Pt
25 PtMax = 3000 # maximum Pt (3 TeV)
26 nBins # number of bins (one every 100 MeV by default)
27 mu1 = 0.5 # mu1,kT1 : smooth but steep ramp-up from 0 to 1 GeV (requested by TauCP)
28 kT1 = 0.1
29 mu2 = 200 # mu2,kT2 : smooth, slow ramp-down in the 100-300 GeV range
30 kT2 = 20
31 y0 = 0.005 # y0 : baseline for low-density at high ET up to PtMax
32 """
33 self.m = PG.MASSES[abs(pid)]
34 self.eta = eta
35 self.phi = phi
36
37 # Create and fill a very fine-grained histogram
38 from ROOT import TH1D
39 etSpectrumFullRange = TH1D("ETSpectrumFullRange",
40 "Reference ET spectrum for egamma MVA calib",
41 int(nBins or (PtMax - PtMin)*10), PtMin , PtMax)
42 for i in xrange(etSpectrumFullRange.GetNbinsX()):
43 x = etSpectrumFullRange.GetBinCenter(i+1)
44 y1 = dbnFermiDirac(x,mu1,kT1)
45 y2 = dbnFermiDirac(x,mu2,kT2)
46 y = y0 - y1 + y2
47 etSpectrumFullRange.SetBinContent(i+1,y)
48 self.hist = PG.TH1(etSpectrumFullRange) #< wrap *after* populating
49
void xrange(TH1 *h, bool symmetric)

Member Function Documentation

◆ pt()

ParticleGun_egammaET.egammaETSampler.pt ( self)

Definition at line 50 of file ParticleGun_egammaET.py.

50 def pt(self):
51 return self.hist.GetRandom() * GeV

Member Data Documentation

◆ eta

ParticleGun_egammaET.egammaETSampler.eta = eta

Definition at line 34 of file ParticleGun_egammaET.py.

◆ hist

ParticleGun_egammaET.egammaETSampler.hist = PG.TH1(etSpectrumFullRange)

Definition at line 48 of file ParticleGun_egammaET.py.

◆ m

ParticleGun_egammaET.egammaETSampler.m = PG.MASSES[abs(pid)]

Definition at line 33 of file ParticleGun_egammaET.py.

◆ phi

ParticleGun_egammaET.egammaETSampler.phi = phi

Definition at line 35 of file ParticleGun_egammaET.py.


The documentation for this class was generated from the following file: