def ArgoMatch(): palgo_array = cmtool.CPAlgoArray() palgo1 = cmtool.CPAlgoNHits() # palgo1.SetMinHits(45) palgo_array.AddAlgo(palgo1) algo_array = cmtool.CFAlgoArray() # wireAlg = argomatch.CFAlgoShowerWireMatch() timeAlg = cmtool.CFAlgoTimeOverlap() timeAlg.RequireThreePlanes(False) # algo_array.AddAlgo(wireAlg) algo_array.AddAlgo(timeAlg) return palgo_array, algo_array
def getMatchManager(): nplanes = larutil.Geometry.GetME().Nplanes() manager = cmtool.CMatchManager(nplanes) priority_array = cmtool.CPAlgoArray() palgo1 = cmtool.CPAlgoNHits() palgo1.SetMinHits(20) priority_array.AddAlgo(palgo1) match_array = cmtool.CFAlgoArray() timeAlg = cmtool.CFAlgoTimeOverlap() timeAlg.RequireThreePlanes(False) match_array.AddAlgo(timeAlg) manager.AddPriorityAlgo(priority_array) manager.AddMatchAlgo(match_array) return manager
# palgo_array = cmtool.CPAlgoArray() # palgo1 = cmtool.CPAlgoNHits() # palgo1.SetMinHits(25) # palgo2 = cmtool.CPAlgoIgnoreTracks() # palgo_array.AddAlgo(palgo1) # palgo_array.AddAlgo(palgo2) # ana_unit.GetManager().AddPriorityAlgo(palgo_array) #Andrzej: The algorithms below are ranked by their effectiveness-- TimeOverlap is best, #then 3DAngle, then StartPoint . Right now, only TimeOverlap is called. algo_array = cmtool.CFAlgoArray() #algo_array.SetMode(cmtool.CFAlgoArray.kPositiveAddition) algo_array.AddAlgo(cmtool.CFAlgoTimeOverlap()) #algo_array.AddAlgo(cmtool.CFAlgoTimeProf()) #algo_array.AddAlgo(cmtool.CFAlgo3DAngle()) #algo_array.AddAlgo(cmtool.CFAlgoStartPointMatch()) # ana_unit.GetManager().AddMatchAlgo(algo_array) my_proc.add_process(ana_unit) print print "Finished configuring ana_processor. Start event loop!" print my_proc.run(0) sys.exit(0)