CMS 3D CMS Logo

Functions
studyJets Namespace Reference

Functions

def getJetProperties (jetSeed, etaFwd, etaCen)
 Python script for studying eta dependence of jet sizes and seed centrality # Author: Aaron Bundock (aaron. More...
 
def printJetProperties (etaRange)
 

Function Documentation

def studyJets.getJetProperties (   jetSeed,
  etaFwd,
  etaCen 
)

Python script for studying eta dependence of jet sizes and seed centrality # Author: Aaron Bundock (aaron.

*nospamthankyamaam*bundock.ch) # Date: 15/01/18 # #

Definition at line 26 of file studyJets.py.

References funct.abs().

Referenced by printJetProperties().

26 def getJetProperties(jetSeed,etaFwd,etaCen):
27 
28  jetSize = 0
29  etaFwdSize = 0
30  etaCenSize = 0
31 
32  for ring in xrange(jetSeed-etaCen,jetSeed+etaFwd+1):
33 
34  if ring < 1:
35  ring = abs(ring-1)
36 
37  if ring >= len(towerEtaWidths):
38  break
39 
40  if ring < jetSeed:
41  etaFwdSize += towerEtaWidths[ring]
42  if ring > jetSeed:
43  etaCenSize += towerEtaWidths[ring]
44 
45  jetSize = (etaFwdSize + etaCenSize + towerEtaWidths[jetSeed])/0.8
46  seedCent = etaCenSize/etaFwdSize
47 
48  jetProps = [jetSize, seedCent]
49 
50  return jetProps
51 
52 
def getJetProperties(jetSeed, etaFwd, etaCen)
Python script for studying eta dependence of jet sizes and seed centrality # Author: Aaron Bundock (a...
Definition: studyJets.py:26
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def studyJets.printJetProperties (   etaRange)

Definition at line 53 of file studyJets.py.

References getJetProperties(), edm.print(), and str.

53 def printJetProperties(etaRange):
54 
55  print("Size \ eta\t", end=' ')
56  for seedEta in etaRange:
57  if(seedEta<29):
58  print(str(seedEta)+"\t\t", end=' ')
59  else:
60  print(str(seedEta+1)+"\t\t", end=' ')
61  print()
62 
63  for size in jetEtaSizes:
64 
65  if size%2:
66  print(" 9x"+str(size)+("\t"), end=' ')
67  for seedEta in etaRange:
68  print(("\t"), end=' ')
69  etaFwdCen = (size-1)/2
70  jetProps = getJetProperties(seedEta,etaFwdCen,etaFwdCen)
71  print(("%.2f / %.2f" %(jetProps[0],jetProps[1])), end=' ')
72  print()
73 
74  else:
75  print(" 9x"+str(size)+" cen", end=' ')
76  for seedEta in etaRange:
77  print(("\t"), end=' ')
78  etaFwd = size/2-1
79  etaCen = size/2
80  jetProps = getJetProperties(seedEta, etaFwd, etaCen)
81  print(("%.2f / %.2f" %(jetProps[0],jetProps[1])), end=' ')
82  print()
83  print(" 9x"+str(size)+" fwd", end=' ')
84  for seedEta in etaRange:
85  print(("\t"), end=' ')
86  etaFwd = size/2
87  etaCen = size/2-1
88  jetProps = getJetProperties(seedEta, etaFwd, etaCen)
89  print(("%.2f / %.2f" %(jetProps[0],jetProps[1])), end=' ')
90  print()
91 
92 
93 
94 print("\n")
95 print("==============================================================================================================================================================================================================================")
96 print("Eta-dependence of jet sizes & seed centrality")
97 print("First number = jet diameter in eta, normalised to 0.8 (offline)")
98 print("Second number = jet size on forward side of jet seed / jet size on central side of jet seed")
99 print("Ideally, best jet choice is where both numbers are closest to unity!")
100 print("9xN cen = larger area on side of jet further from beam pipe")
101 print("9xN fwd = larger area on side of jet closer to beam pipe")
102 print("==============================================================================================================================================================================================================================")
103 
104 
def printJetProperties(etaRange)
Definition: studyJets.py:53
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def getJetProperties(jetSeed, etaFwd, etaCen)
Python script for studying eta dependence of jet sizes and seed centrality # Author: Aaron Bundock (a...
Definition: studyJets.py:26
#define str(s)