CMS 3D CMS Logo

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

Functions

def getJetProperties (jetSeed, etaFwd, etaCen)
 
def printJetProperties (etaRange)
 

Variables

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

Function Documentation

◆ getJetProperties()

def studyJets.getJetProperties (   jetSeed,
  etaFwd,
  etaCen 
)

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)
Definition: studyJets.py:26
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ printJetProperties()

def studyJets.printJetProperties (   etaRange)

Definition at line 53 of file studyJets.py.

References getJetProperties(), caHitNtupletGeneratorKernels.if(), 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
def getJetProperties(jetSeed, etaFwd, etaCen)
Definition: studyJets.py:26
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
#define str(s)

Variable Documentation

◆ beEtaRange

studyJets.beEtaRange

Definition at line 105 of file studyJets.py.

◆ hfEtaRange

studyJets.hfEtaRange

Definition at line 106 of file studyJets.py.

◆ jetEtaSizes

studyJets.jetEtaSizes

Definition at line 109 of file studyJets.py.

◆ towerEtaWidths

studyJets.towerEtaWidths

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.