def getShowerRecoAlgModular(): # This function returns the default shower reco module # If you want to extend, customize, or otherwise alter the default # reco (which you should!) it's recommended that you do one of two # things: # 1) Copy this function, and change the lines you need # 2) Use this function as is and replace the modules with the built-in functions # to ShowerRecoAlgModular # Then, use the return value (alg) in place of ShowerRecoAlg in your python script # It should be noted, however, that this "default" set of modules is not yet developed # and if you are developing you ought to be updating it here! alg = showerreco.ShowerRecoAlgModular() alg.SetDebug(False) alg.SetVerbose(False) angle3D = showerreco.Angle3DFormula() angle3D.setMaxAngleError(0.1) angle3D.setValidateDirection(True) angle3D.setVerbosity(False) angle3D = showerreco.Angle3DFromVtxQweighted() energy = showerreco.LinearEnergy() energy.SetElectronLifetime(8000.) # in us MCC7 value #energy.SetElectronLifetime(1e6 ) # in us DATA value energy.SetRecombFactor(0.62) #energy.SetElecGain(198) # e- / ADC DATA value energy.SetElecGain(189) # MCC7 value energy.setVerbosity(False) energy.SetFillTree(True) dqdx = showerreco.dQdxModule() dedx = showerreco.dEdxFromdQdx() dedx.SetUsePitch(False) dedx.setVerbosity(False) geoModule = showerreco.GeoModule() geoModule.setFlipShowerDirection(False) alg.AddShowerRecoModule(showerreco.StartPoint3DModule()) alg.AddShowerRecoModule(angle3D) alg.AddShowerRecoModule(energy) #alg.AddShowerRecoModule(dqdx) #alg.AddShowerRecoModule(dedx) alg.AddShowerRecoModule(geoModule) alg.PrintModuleList() return alg
def getShowerRecoAlgModular(): # This function returns the default shower reco module # If you want to extend, customize, or otherwise alter the default # reco (which you should!) it's recommended that you do one of two # things: # 1) Copy this function, and change the lines you need # 2) Use this function as is and replace the modules with the built-in functions # to ShowerRecoAlgModular # Then, use the return value (alg) in place of ShowerRecoAlg in your python script # It should be noted, however, that this "default" set of modules is not yet developed # and if you are developing you ought to be updating it here! alg = showerreco.ShowerRecoAlgModular() alg.SetDebug(False) angle3D = showerreco.Angle3DFromVtxQweighted() energy = showerreco.LinearEnergy() energy.SetUseModBox(True) energy.SetUseArea(True) energy.setVerbosity(False) energy.SetFillTree(True) energy.SetMinNumHits(20) dqdx = showerreco.dQdxModule() dqdx.setVerbosity(False) dedx = showerreco.dEdxFromdQdx() dedx.setVerbosity(False) alg.AddShowerRecoModule(showerreco.StartPoint3DModule()) alg.AddShowerRecoModule(angle3D) filter = showerreco.Filter3DDir() filter.SetDotProdCut(0.5) alg.AddShowerRecoModule(filter) alg.AddShowerRecoModule(energy) alg.AddShowerRecoModule(dqdx) alg.AddShowerRecoModule(dedx) alg.AddShowerRecoModule(showerreco.GeoModule()) alg.PrintModuleList() return alg
def getShowerRecoAlgModular(): alg = showerreco.ShowerRecoAlgModular() alg.SetDebug(False) alg.SetVerbose(False) angle3D = showerreco.Angle3DFormula() angle3D.setMaxAngleError(0.1) angle3D.setValidateDirection(True) angle3D.setVerbosity(False) angle3D = showerreco.Angle3DFromVtxQweighted() gain = 196.97874008458268 energy = showerreco.LinearEnergy() energy.SetElectronLifetime(1e20) #1e6) #8000.) # in us MCC7 value energy.SetRecombFactor(0.572) energy.SetElecGain(gain) # e- / ADC DATA value, MCC8 #energy.SetElecGain(189) # MCC7 value energy.setVerbosity(False) energy.SetFillTree(True) dqdx = showerreco.dQdxModule() dedx = showerreco.dEdxFromdQdx() dedx.SetUsePitch(False) dedx.setVerbosity(True) geoModule = showerreco.GeoModule() geoModule.setFlipShowerDirection(False) alg.AddShowerRecoModule( showerreco.StartPoint3DModule() ) alg.AddShowerRecoModule(angle3D) alg.AddShowerRecoModule(energy) alg.AddShowerRecoModule( geoModule ) alg.PrintModuleList() return alg
def getShowerRecoAlgModular(): # This function returns the default shower reco module # If you want to extend, customize, or otherwise alter the default # reco (which you should!) it's recommended that you do one of two # things: # 1) Copy this function, and change the lines you need # 2) Use this function as is and replace the modules with the built-in functions # to ShowerRecoAlgModular # Then, use the return value (alg) in place of ShowerRecoAlg in your python script # It should be noted, however, that this "default" set of modules is not yet developed # and if you are developing you ought to be updating it here! alg = showerreco.ShowerRecoAlgModular() alg.SetDebug(True) alg.SetVerbose(False) # filteralgo = showerreco.FilterPFPart() # filteralgo.setMinNHitsAbsolute(5) # filteralgo.setMinNHitsLargest(10) # angle3D = showerreco.Angle3DFormula() # angle3D.setMaxAngleError(0.1) # angle3D.setValidateDirection(True) # angle3D.setVerbosity(True) angle3D = showerreco.Angle3DFromVtxQweighted() angle3D.setVerbosity(True) startPt = showerreco.YPlaneStartPoint3D() startPt.setVerbosity(True) energy = showerreco.LinearEnergy() energy.setVerbosity(True) # implement position-dependent calibration energy.CreateResponseMap(20) dQdsAVG = 248. #fin = open('/a/share/westside/dcaratelli/ll_shower/UserDev/RecoTool/ShowerReco3D/dqds_mc_xyz.txt','r') fin = open( '/home/vgenty/sw/larlite/UserDev/RecoTool/ShowerReco3D/dqds_mc_xyz.txt', 'r') for line in fin: words = line.split() x = float(words[0]) y = float(words[1]) z = float(words[2]) q = float(words[3]) energy.SetResponse(x, y, z, dQdsAVG / q) energy.SetElectronLifetime(1e6) # in us DATA value energy.SetRecombFactor(0.62) #energy.SetElecGain(243.) # MCC8.0 data energy.SetElecGain(200.) # MCC8.0 value energy.setVerbosity(False) energy.SetFillTree(True) dqdx = showerreco.dQdxModule() dqdx.setTrunkLength(3.) # dqdx.SetFillTree(True) # shrFilter = showerreco.FilterShowers() # shrFilter.setAngleCut(15.) # shrFilter.setVerbosity(False) # alg.AddShowerRecoModule( filteralgo ) alg.AddShowerRecoModule(angle3D) #alg.AddShowerRecoModule( showerreco.StartPoint3DModule() ) #alg.AddShowerRecoModule( showerreco.NearestStartPoint3D() ) alg.AddShowerRecoModule(startPt) alg.AddShowerRecoModule(dqdx) alg.AddShowerRecoModule(energy) alg.AddShowerRecoModule(showerreco.FillLength()) #alg.AddShowerRecoModule( shrFilter ) alg.PrintModuleList() return alg
def getShowerRecoAlgModular(): # This function returns the default shower reco module # If you want to extend, customize, or otherwise alter the default # reco (which you should!) it's recommended that you do one of two # things: # 1) Copy this function, and change the lines you need # 2) Use this function as is and replace the modules with the built-in functions # to ShowerRecoAlgModular # Then, use the return value (alg) in place of ShowerRecoAlg in your python script # It should be noted, however, that this "default" set of modules is not yet developed # and if you are developing you ought to be updating it here! alg = showerreco.ShowerRecoAlgModular() alg.SetDebug(True) alg.SetVerbose(False) filteralgo = showerreco.FilterPFPart() filteralgo.setMinNHitsAbsolute(5) filteralgo.setMinNHitsLargest(10) angle3D = showerreco.Angle3DFormula() angle3D.setMaxAngleError(0.1) angle3D.setValidateDirection(True) angle3D.setVerbosity(False) angle3D = showerreco.Angle3DFromVtxQweighted() startPt = showerreco.YPlaneStartPoint3D() startPt.setVerbosity(False) energy = showerreco.LinearEnergy() energy.SetElectronLifetime(1e6 ) # in us DATA value energy.SetRecombFactor(0.62) energy.SetElecGain(243.) # MCC8.0 data #energy.SetElecGain(200.) # MCC8.0 value energy.setVerbosity(False) energy.SetFillTree(True) dqdx = showerreco.dQdxModule() dedx = showerreco.dEdxFromdQdx() dedx.SetUsePitch(False) dedx.setVerbosity(True) shrFilter = showerreco.FilterShowers() shrFilter.setAngleCut(15.) shrFilter.setVerbosity(True) alg.AddShowerRecoModule( filteralgo ) alg.AddShowerRecoModule(angle3D) #alg.AddShowerRecoModule( showerreco.StartPoint3DModule() ) #alg.AddShowerRecoModule( showerreco.NearestStartPoint3D() ) alg.AddShowerRecoModule( startPt )#showerreco.YPlaneStartPoint3D() ) alg.AddShowerRecoModule(energy) alg.AddShowerRecoModule( showerreco.FillLength() ) alg.AddShowerRecoModule( shrFilter ) alg.PrintModuleList() return alg