CMS 3D CMS Logo

lumiParameters.py
Go to the documentation of this file.
1 from __future__ import print_function
3  '''
4  collection of constants used in lumi related calculation
5  '''
6  def __init__ (self):
7  self.NBX = 3564 # number beam crossings
8  self.numorbit = 2**18 # 262144
9  self.rotationRate = 11245.613 # for 3.5 TeV Beam energy
10  self.rotationTime = 1 / self.rotationRate
12  ##self.minBiasXsec = 71300 # unit: microbarn
13 
14 
15  def setRotationRate(self,rate):
16  '''
17  update the default LHC orbit frequency
18  Single beam energy of 450GeV: 11245.589
19  Single beam energy of 3.5TeV: 11245.613
20  '''
21  self.rotationRate =rate
22 
23  def setNumOrbit(self,numorbit):
24  self.numorbit=numorbit
25 
26  def setNumBx(self,numbx):
27  '''
28  update the default number of BX
29  '''
30  self.NBX = numbx
31 
33  '''Given the rotation rate, calculate lumi section length and
34  rotation time. This should be called if rotationRate is
35  updated.
36  '''
37  self.rotationTime = 1 / self.rotationRate
38  self.lumiSectionLen = self.numorbit * self.rotationTime
39 
40  def lslengthsec(self):
41  '''
42  Calculate lslength in sec from number of orbit and BX
43  '''
44  return self.lumiSectionLen
45 
46 #=======================================================
47 # Unit Test
48 #=======================================================
49 if __name__ == "__main__":
51  print(p.lslengthsec())
52  print(p.NBX)
53  print(p.numorbit)
54 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def setNumOrbit(self, numorbit)