Skip to content

Commit

Permalink
Fixing the access to APEs
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca committed Apr 3, 2017
1 parent e502e82 commit 8b88938
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Alignment/MuonAlignment/python/geometryXMLparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Alignable:
def pos(self):
return self.x, self.y, self.z
def covariance(self):
return (self.xx, self.xy, self.xz), (self.xy, self.yy, self.yz), (self.xz, self.yz, self.zz)
return (self.xx, self.xy, self.xz, self.xa, self.xb, self.xc), (self.xy, self.yy, self.yz), (self.xz, self.yz, self.zz)

class DTAlignable:
def index(self):
Expand Down Expand Up @@ -135,7 +135,7 @@ def startElement(self, tag, attrib):
self._operation.setposition[name] = float(attrib[name])

elif tag == "setape":
for name in "xx", "xy", "xz", "yy", "yz", "zz":
for name in "xx", "xy", "xz", "xa", "xb", "xc", "yy", "yz", "ya", "yb", "yc", "zz", "za", "zb", "zc", "aa", "ab", "ac", "bb", "bc", "cc":
self._operation.setposition[name] = float(attrib[name])

elif tag[0:2] == "DT":
Expand Down Expand Up @@ -191,8 +191,8 @@ def position_ape(ali, attributes):
(ali.relativeto, f(ali.x), f(ali.y), f(ali.z), f(ali.phix), f(ali.phiy), f(ali.phiz)))

if "xx" in ali.__dict__:
writeline(" <setape xx=\"%s\" xy=\"%s\" xz=\"%s\" yy=\"%s\" yz=\"%s\" zz=\"%s\" />\n" % \
(f(ali.xx), f(ali.xy), f(ali.xz), f(ali.yy), f(ali.yz), f(ali.zz)))
writeline(" <setape xx=\"%s\" xy=\"%s\" xz=\"%s\" xa=\"%s\" xb=\"%s\" xc=\"%s\" yy=\"%s\" yz=\"%s\" ya=\"%s\" yb=\"%s\" yc=\"%s\" zz=\"%s\" za=\"%s\" zb=\"%s\" zc=\"%s\" aa=\"%s\" ab=\"%s\" ac=\"%s\" bb=\"%s\" bc=\"%s\" cc=\"%s\" />\n" % \
(f(ali.xx), f(ali.xy), f(ali.xz), f(ali.xa), f(ali.xb), f(ali.xc), f(ali.yy), f(ali.yz), f(ali.ya), f(ali.yb), f(ali.yc), f(ali.zz), f(ali.za), f(ali.zb), f(ali.zc), f(ali.aa), f(ali.ab), f(ali.ac), f(ali.bb), f(ali.bc), f(ali.cc)))

for key in dtkeys:
writeline("<operation>\n")
Expand Down

0 comments on commit 8b88938

Please sign in to comment.