ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
ParticleGun_egammaET.egammaETSampler Class Reference
Inheritance diagram for ParticleGun_egammaET.egammaETSampler:
Collaboration diagram for ParticleGun_egammaET.egammaETSampler:

Public Member Functions

def __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)
 
def pt (self)
 

Public Attributes

 m
 
 eta
 
 phi
 
 hist
 

Detailed Description

Definition at line 18 of file ParticleGun_egammaET.py.

Constructor & Destructor Documentation

◆ __init__()

def 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.

20  def __init__(self, pid, eta=[-2.5, 2.5], phi=[0, PG.TWOPI],
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 

Member Function Documentation

◆ pt()

def 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

Definition at line 33 of file ParticleGun_egammaET.py.

◆ hist

ParticleGun_egammaET.egammaETSampler.hist

Definition at line 47 of file ParticleGun_egammaET.py.

◆ m

ParticleGun_egammaET.egammaETSampler.m

Definition at line 32 of file ParticleGun_egammaET.py.

◆ phi

ParticleGun_egammaET.egammaETSampler.phi

Definition at line 34 of file ParticleGun_egammaET.py.


The documentation for this class was generated from the following file:
xrange
void xrange(TH1 *h, bool symmetric)
Definition: computils.cxx:516
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
test_pyathena.pt
pt
Definition: test_pyathena.py:11
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
ParticleGun_egammaET.dbnFermiDirac
def dbnFermiDirac(x, mu, kT)
Definition: ParticleGun_egammaET.py:6