Definition at line 91 of file ReadRPCRun2DataFile.py.
◆ __init__()
def ReadRPCRun2DataFile.Decodes.__init__ |
( |
|
self, |
|
|
|
topocells = [] |
|
) |
| |
◆ addTopoCell()
def ReadRPCRun2DataFile.Decodes.addTopoCell |
( |
|
self, |
|
|
|
topocell |
|
) |
| |
Definition at line 184 of file ReadRPCRun2DataFile.py.
184 def addTopoCell(self,topocell):
185 self.topocells += [ topocell ]
◆ asXML()
def ReadRPCRun2DataFile.Decodes.asXML |
( |
|
self, |
|
|
|
depth |
|
) |
| |
Definition at line 189 of file ReadRPCRun2DataFile.py.
189 def asXML(self, depth):
190 s =
' '*depth +
'<Decode>\n'
191 for tc
in self.topocells:
192 s += tc.asXML(depth+4)
193 s +=
' '*depth +
'</Decode>\n'
◆ fromAllRois()
def ReadRPCRun2DataFile.Decodes.fromAllRois |
( |
|
cls, |
|
|
|
allrois |
|
) |
| |
Definition at line 96 of file ReadRPCRun2DataFile.py.
96 def fromAllRois(cls,allrois):
98 for (etacode,phicode), roisInCell
in groupby(
sorted(allrois, key=attrgetter(
'etacode',
'phicode')), key=attrgetter(
'etacode',
'phicode')):
100 (eta, phi, ieta, iphi, etamin, etamax, phimin, phimax) = cls.getTopoCellPosition(etacode, phicode, roisInCell)
101 newDecodes.addTopoCell( TopoCell(etacode=etacode, phicode=phicode, eta=eta, phi=phi, ieta=ieta, iphi=iphi, etamin=etamin, etamax=etamax, phimin=phimin, phimax=phimax) )
◆ getStats()
def ReadRPCRun2DataFile.Decodes.getStats |
( |
|
self, |
|
|
|
stats |
|
) |
| |
Definition at line 186 of file ReadRPCRun2DataFile.py.
186 def getStats(self,stats):
187 stats[
'decodes'] += 1
188 stats[
'topocells'] += len(self.topocells)
◆ getTopoCellPosition()
def ReadRPCRun2DataFile.Decodes.getTopoCellPosition |
( |
|
cls, |
|
|
|
etacode, |
|
|
|
phicode, |
|
|
|
rois |
|
) |
| |
Definition at line 105 of file ReadRPCRun2DataFile.py.
115 cellsEta = [(
min(e.etamin,e.etamax),
max(e.etamin,e.etamax))
for e
in rois]
116 etamins, etamaxs = zip(*cellsEta)
117 etamin =
min( [
min(e.etamin,e.etamax)
for e
in rois] )
118 etamax =
max( [
max(e.etamin,e.etamax)
for e
in rois] )
119 eta = (etamin+etamax)/2
123 cellsPhi = [(e.phimin, e.phimax)
for e
in rois]
126 upperedge = any([e.phi>6.2
for e
in rois])
127 loweredge = any([e.phi<0.2
for e
in rois])
128 splitTopoCell = upperedge
and loweredge
132 maxAtLowerEdge =
max([e.phimax
for e
in rois
if e.phi<1])
133 minAtUpperEdge =
min([e.phimin
for e
in rois
if e.phi>5])
134 centerTopoCell = minAtUpperEdge + maxAtLowerEdge
135 if centerTopoCell>=2*PI:
136 phimin = minAtUpperEdge - 2 * PI
137 phimax = maxAtLowerEdge
139 phimin = minAtUpperEdge
140 phimax = maxAtLowerEdge + 2 * PI
141 phi = (phimin+phimax)/2
144 phimins, phimaxs = zip(*cellsPhi)
145 phimin =
min(phimins)
146 phimax =
max(phimaxs)
147 phi = (phimin+phimax)/2
152 if ieta== 12: ieta= 11
153 if ieta==-12: ieta=-11
159 if abs(ieta)
in [2,5]:
160 if phi>2.05
and phi<2.35: iphi += 1
161 if phi>2.75
and phi<3.25: iphi += 1
162 if phi>3.45: iphi += 1
165 if phi>2.05
and phi<2.35: iphi += 1
166 if phi>2.75
and phi<3.25: iphi += 1
167 if phi>3.45
and phi<4.95: iphi += 1
168 if phi>5.05: iphi += 1
170 if abs(ieta)
in [15,18]:
171 if phi>2.65: iphi += 1
174 if phi>2.15
and phi<2.35: iphi += 1
175 if phi>2.65
and phi<3.25: iphi += 1
176 if phi>3.35: iphi += 1
179 if phi>0.05
and phi<5.35: iphi += 1
180 if phi>5.35: iphi += 2
182 return (eta, phi, ieta, iphi, etamin, etamax, phimin, phimax)
◆ topocells
ReadRPCRun2DataFile.Decodes.topocells |
The documentation for this class was generated from the following file: