Example #1
0
file_gcon.write(" 2\n")
#--------------------------------------------------------------------------




###########################################################################
# Heart of this file
#--------------------------------------------------------------------------

# deprecated__________________________
#inversion_list = [4,6] # list of 8L layer that in 11L ECP map are stereo
# deprecated__________________________

# create the elements used to search the similar
tocheck = ftkutils.Pattern(int(XL2nd))


###########################################################################
# Diagonosis plots
#--------------------------------------------------------------------------

if hasROOT:
    h_n_conn = ROOT.TH1F('h_n_conn','h_n_conn',12,-.5,11.5);
    h_coverage = ROOT.TH1F('h_coverage','h_coverage',11,0.5,11.5);


# global counter of sector ID for new constant set
counter = 0;
gcon_counter = 0;
Example #2
0
kdtreebank11L = []
for i in xrange(nsubregions):
    name11L = name7L.replace("7L", "11L").replace("sub%d" % subid, "sub%d" % i)
    print "Load sector in", name11L
    tmpbank = ftkutils.PatternBank(name11L)
    tmpbank.LoadPatterns()
    sectbank11L.append(tmpbank)
    # create a KD-Tree representation for this bank
    kdtreebank11L.append(tmpbank.BuildKDTree())

# standard convertion map from 7L to 11L
conv7to11 = [0, 1, 2, 3, None, 4, None, 5, None, 6, None]
inversion_list = [4, 6]  # list of 7L layer that in 11L ECP map are stereo

# create the elements used to search the similar
tocheck = ftkutils.Pattern(11)
# loop of the reference 7L bank
for pattern7L in sectbank7L.patterns:
    print "Check: ",
    pattern7L.PrintToFile(sys.stdout)
    # expand the 7L in an 11L pattern
    stereoID = [4, 6, 8, 10]
    for i in xrange(11):
        if conv7to11[i] == None:
            tocheck.ssid[i] = -1
        else:
            tocheck.ssid[i] = pattern7L.ssid[conv7to11[i]]
    # check if the SCT layers relation needs correction
    for i in xrange(4):
        # check if is is an endcap module and has inverted axial-stereo layers
        if pattern7L.ssid[3 + i] % 100 >= 20 and (3 + i) in inversion_list: