CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
studyJets Namespace Reference

Functions

def getJetProperties
 
def printJetProperties
 

Variables

tuple beEtaRange = xrange(16,29)
 
tuple hfEtaRange = xrange(29,41)
 
list jetEtaSizes = [9,8,7,6,5,4,3]
 
list towerEtaWidths
 Python script for studying eta dependence of jet sizes and seed centrality # Author: Aaron Bundock (aaron. More...
 

Function Documentation

def studyJets.getJetProperties (   jetSeed,
  etaFwd,
  etaCen 
)

Definition at line 26 of file studyJets.py.

References funct.abs().

Referenced by printJetProperties().

26 
27 def getJetProperties(jetSeed,etaFwd,etaCen):
28 
29  jetSize = 0
30  etaFwdSize = 0
31  etaCenSize = 0
32 
33  for ring in xrange(jetSeed-etaCen,jetSeed+etaFwd+1):
34 
35  if ring < 1:
36  ring = abs(ring-1)
37 
38  if ring >= len(towerEtaWidths):
39  break
40 
41  if ring < jetSeed:
42  etaFwdSize += towerEtaWidths[ring]
43  if ring > jetSeed:
44  etaCenSize += towerEtaWidths[ring]
45 
46  jetSize = (etaFwdSize + etaCenSize + towerEtaWidths[jetSeed])/0.8
47  seedCent = etaCenSize/etaFwdSize
48 
49  jetProps = [jetSize, seedCent]
50 
51  return jetProps
52 
def getJetProperties
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(), if(), print(), and str.

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

Variable Documentation

tuple studyJets.beEtaRange = xrange(16,29)

Definition at line 105 of file studyJets.py.

tuple studyJets.hfEtaRange = xrange(29,41)

Definition at line 106 of file studyJets.py.

list studyJets.jetEtaSizes = [9,8,7,6,5,4,3]

Definition at line 109 of file studyJets.py.

list studyJets.towerEtaWidths
Initial value:
1 = [0, 0.087, 0.087, 0.087, 0.087, 0.087, 0.087, 0.087, 0.087, 0.087, 0.087, # 0-10
2  0.087, 0.087, 0.087, 0.087, 0.087, 0.087, 0.087, 0.087, 0.087, 0.087, # 11-20
3  0.090, 0.100, 0.113, 0.129, 0.150, 0.178, 0.150, 0.350, # 21-28
4  0.132, 0.175, 0.176, 0.174, 0.176, 0.174, 0.177, 0.173, 0.175, 0.177, 0.173, 0.302]

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 18 of file studyJets.py.