17 for ai, bi, name
in zip(list(a) + [0]*(5 - len(a)), \
18 list(b) + [0]*(5 - len(b)), \
19 (
"wheel",
"station",
"sector",
"superlayer",
"layer")):
20 exec(
"a%s = %d" % (name, ai))
21 exec(
"b%s = %d" % (name, bi))
23 if awheel == bwheel
and astation == bstation:
25 if asector != bsector:
26 if astation == 4: sectororder = [0, 1, 2, 3, 4, 13, 5, 6, 7, 8, 9, 10, 14, 11, 12]
27 elif awheel == 0: sectororder = [0, 1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12]
28 else: sectororder = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
29 return cmp(sectororder.index(asector), sectororder.index(bsector))
31 elif asuperlayer != bsuperlayer:
32 superlayerorder = [0, 1, 3, 2]
33 return cmp(superlayerorder.index(asuperlayer), superlayerorder.index(bsuperlayer))
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)