def METHOD_NAME(self, subdetid, pattern={}):
    # list of all detids in the structure
    detids = []
    # open TrackerTree.root file
    treeFile = ROOT.TFile(os.path.join(self.config.jobDataPath,
                                       ".TrackerTree.root"))
    tree = treeFile.Get("TrackerTreeGenerator/TrackerTree/TrackerTree")
    for entry in tree:
        # check if entry is part of the structure
        if (entry.SubdetId == subdetid):
            # to create a child also check the pattern
            structure_found = False
            for structure in ("Half", "Side", "Layer", "Rod", "Ring",
                              "Petal", "Blade", "Panel", "OuterInner",
                              "Module"):
                if structure.lower() in pattern:
                    if getattr(entry, structure) != pattern[structure.lower()]:
                        structure_found = True
                        break
            if structure_found: continue
            detids.append(entry.RawId)
    return detids