5 from builtins
import range
10 ROOT.PyConfig.IgnoreCommandLineOptions =
True 13 import Alignment.MillePedeAlignmentAlgorithm.mpsvalidate.geometrydata
as mpsv_geometrydata
17 """ Creates a list of the aligned strucutres. Get the fields out of the 18 TrackerTree.root file. 27 return mpsv_geometrydata.data[objid].subdetid
30 return mpsv_geometrydata.data[objid].discriminator
35 ndiscriminator = {key: []
for key
in discriminator}
37 treeFile = ROOT.TFile(os.path.join(self.config.jobDataPath,
39 tree = treeFile.Get(
"TrackerTreeGenerator/TrackerTree/TrackerTree")
43 if (entry.SubdetId == subdetid):
44 for structure
in discriminator:
45 ndiscriminator[structure].
append(getattr(entry, structure))
46 for structure
in discriminator:
47 ndiscriminator[structure] = [x
for x
in ndiscriminator[structure]
if x != 0]
49 return [len(set(ndiscriminator[structure]))
50 for structure
in discriminator]
54 for entry
in MillePedeUser:
56 if (entry.ObjId != 1
and 999999
not in map(abs, entry.Par)):
60 name =
str(entry.Name)
65 self.structures.append(
66 Structure(name, subdetid, discriminator, ndiscriminator))
74 ranges = struct.ndiscriminator
75 pranges = [
list(
range(1, x+1))
for x
in ranges]
78 for number
in itertools.product(*pranges):
80 pattern = dict(
zip(
map(
lambda x: x.lower(), struct.discriminator), number))
82 name =
" ".
join(
"{0} {1}".
format(key.lower(), value)
83 for (key, value)
in pattern.items())
85 detids = self.
get_detids(struct.subdetid, pattern)
87 child =
Structure(name, struct.subdetid, detids=detids)
88 struct.children.append(child)
95 treeFile = ROOT.TFile(os.path.join(self.config.jobDataPath,
97 tree = treeFile.Get(
"TrackerTreeGenerator/TrackerTree/TrackerTree")
101 if (entry.SubdetId == subdetid):
103 structure_found =
False 104 for structure
in (
"Half",
"Side",
"Layer",
"Rod",
"Ring",
105 "Petal",
"Blade",
"Panel",
"OuterInner",
107 if structure.lower()
in pattern:
108 if getattr(entry, structure) != pattern[structure.lower()]:
109 structure_found =
True 111 if structure_found:
continue 113 detids.append(entry.RawId)
118 """ A object represents a physical strucutre 121 def __init__(self, name, subdetid, discriminator=[], ndiscriminator=[], detids=[]):
bool any(const std::vector< T > &v, const T &what)
def get_detids(self, subdetid, pattern={})
def get_subdetid(self, objid)
def contains_detid(self, detid)
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
def __init__(self, config)
static std::string join(char **cmd)
def create_children_list(self)
def __init__(self, name, subdetid, discriminator=[], ndiscriminator=[], detids=[])
def get_discriminator(self, objid)
def create_list(self, MillePedeUser)
def get_ndiscriminator(self, objid)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run