コード例 #1
0
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)

    # 3D Axis Module:
    axis3D = showerreco.Axis3DModule()
    axis3D.setMaxIterations(100)
    axis3D.setNStepsInitial(25)
    axis3D.setTargetError(0.001)
    axis3D.setNormalErrorRange(0.01)
    axis3D.setThetaRangeStart(0.1)
    axis3D.setThetaRangeMin(0.0005)
    axis3D.setNStepsStart(4)
    axis3D.setConvergeRate(0.85)
    axis3D.setVerbosity(True)
    axis3D.setSeedVectorErrorCutoff(0.1)

    angle3D = showerreco.Angle3DFormula()
    angle3D.setMaxAngleError(0.1)
    angle3D.setVerbosity(False)

    energy = showerreco.LinearEnergy()
    energy.SetUseModBox(True)
    energy.setVerbosity(False)

    dqdx = showerreco.dQdxModule()

    dedx = showerreco.dEdxFromdQdx()
    dedx.SetUsePitch(False)
    dedx.setVerbosity(False)

    #alg.AddShowerRecoModule(axis3D)
    alg.AddShowerRecoModule(angle3D)
    alg.AddShowerRecoModule(showerreco.StartPoint3DModule())
    alg.AddShowerRecoModule(energy)
    alg.AddShowerRecoModule(dqdx)
    alg.AddShowerRecoModule(dedx)
    # alg.AddShowerRecoModule(showerreco.StartPoint2DModule()  )
    #alg.AddShowerRecoModule(showerreco.OtherStartPoint3D()  )
    # alg.AddShowerRecoModule(showerreco.ShowerChargeModule()  )

    alg.AddShowerRecoModule(showerreco.GeoModule())

    alg.PrintModuleList()

    return alg
コード例 #2
0
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)

  # 3D Axis Module:
  axis3D = showerreco.Axis3DModule()
  axis3D.setMaxIterations(100)
  axis3D.setNStepsInitial(25)
  axis3D.setTargetError(0.001)
  axis3D.setNormalErrorRange(0.01)
  axis3D.setThetaRangeStart(0.1)
  axis3D.setThetaRangeMin(0.0005)
  axis3D.setNStepsStart(4)
  axis3D.setConvergeRate(0.85)
  axis3D.setVerbosity(True)
  axis3D.setSeedVectorErrorCutoff(0.1)

  angle3D = showerreco.Angle3DFormula()
  angle3D.setMaxAngleError(0.1)
  angle3D.setVerbosity(False)

  energy = showerreco.LinearEnergy()
  energy.SetUseModBox(True)
  energy.setVerbosity(False)

  dqdx = showerreco.dQdxModule()

  dedx = showerreco.dEdxFromdQdx()
  dedx.SetUsePitch(False)
  dedx.setVerbosity(False)

  #alg.AddShowerRecoModule(axis3D)
  alg.AddShowerRecoModule(angle3D)
  alg.AddShowerRecoModule(showerreco.StartPoint3DModule()  )
  alg.AddShowerRecoModule(energy)
  alg.AddShowerRecoModule(dqdx)
  alg.AddShowerRecoModule(dedx)
  # alg.AddShowerRecoModule(showerreco.StartPoint2DModule()  )
  #alg.AddShowerRecoModule(showerreco.OtherStartPoint3D()  )
  # alg.AddShowerRecoModule(showerreco.ShowerChargeModule()  )

  alg.AddShowerRecoModule(showerreco.GeoModule())

  alg.PrintModuleList()

  return alg
コード例 #3
0
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)
    
    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(True)

    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
コード例 #4
0
ファイル: run_mass_peak.py プロジェクト: jhewes15/Hewes
def ShowerReco():
  
  ana_unit = fmwk.ShowerReco3D()

  alg = showerreco.ShowerRecoAlgModular()
  alg.SetDebug(False)

  axis3D = showerreco.Axis3DModule()
  axis3D.setMaxIterations(100)
  axis3D.setNStepsInitial(25)
  axis3D.setTargetError(0.001)
  axis3D.setNormalErrorRange(0.01)
  axis3D.setThetaRangeStart(0.1)
  axis3D.setThetaRangeMin(0.0005)
  axis3D.setNStepsStart(4)
  axis3D.setConvergeRate(0.85)
  axis3D.setVerbosity(False)
  axis3D.setSeedVectorErrorCutoff(0.1)

  angle3D = showerreco.Angle3DFormula()
  angle3D.setMaxAngleError(0.1)
  angle3D.setVerbosity(False)
  
  energy = showerreco.LinearEnergy()
  energy.SetUseModBox(True)
  energy.setVerbosity(False)
  
  dqdx = showerreco.dQdxModule()
  
  dedx = showerreco.dEdxFromdQdx()
  dedx.SetUsePitch(False)
  dedx.setVerbosity(False)
  
  #alg.AddShowerRecoModule(showerreco.StartPoint2DModule()  )
  #alg.AddShowerRecoModule(showerreco.SanityCheckInitial() )
  alg.AddShowerRecoModule(axis3D)
  alg.AddShowerRecoModule(showerreco.StartPoint3DModule() )
  #alg.AddShowerRecoModule(angle3D)
  #alg.AddShowerRecoModule(showerreco.StartPoint3DModule()  )
  alg.AddShowerRecoModule(energy)
  alg.AddShowerRecoModule(dqdx)
  alg.AddShowerRecoModule(dedx)
  #alg.AddShowerRecoModule(showerreco.OtherStartPoint3D()  )
  #alg.AddShowerRecoModule(showerreco.ShowerChargeModule()  )
  #alg.AddShowerRecoModule(showerreco.GeoModule())
  #alg.AddShowerRecoModule(showerreco.SanityCheckFinal() )
  
  alg.PrintModuleList()
  
  ana_unit.AddShowerAlgo(alg)
  return ana_unit
コード例 #5
0
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)

  startPoint = showerreco.StartPointPandora()

  axis = showerreco.PCA3DAxis()

  energy = showerreco.LinearEnergy()
  #energy.SetHitRecoCorrection(1.289, 0)
  #energy.SetHitRecoCorrection(1.323, 1)
  #energy.SetHitRecoCorrection(1.336, 2)
  energy.SetUseModBox(True)
  energy.setVerbosity(False)

  dqdx = showerreco.dQdxModule()

  dedx = showerreco.dEdxFromdQdx()
  dedx.SetUsePitch(False)
  dedx.setVerbosity(False)

  alg.AddShowerRecoModule(showerreco.ToyGeoModule())
  alg.AddShowerRecoModule(axis)
  alg.AddShowerRecoModule(startPoint)
  alg.AddShowerRecoModule(energy)
  alg.AddShowerRecoModule(dqdx)
  alg.AddShowerRecoModule(dedx)
  # alg.AddShowerRecoModule(showerreco.StartPoint2DModule()  )
  #alg.AddShowerRecoModule(showerreco.OtherStartPoint3D()  )
  # alg.AddShowerRecoModule(showerreco.ShowerChargeModule()  )

  # alg.AddShowerRecoModule(showerreco.GeoModule())
  alg.PrintModuleList()

  return alg
コード例 #6
0
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)

    startPoint = showerreco.StartPointPandora()

    axis = showerreco.PCA3DAxis()

    energy = showerreco.LinearEnergy()
    #energy.SetHitRecoCorrection(1.289, 0)
    #energy.SetHitRecoCorrection(1.323, 1)
    #energy.SetHitRecoCorrection(1.336, 2)
    energy.SetUseModBox(True)
    energy.setVerbosity(False)

    dqdx = showerreco.dQdxModule()

    dedx = showerreco.dEdxFromdQdx()
    dedx.SetUsePitch(False)
    dedx.setVerbosity(False)

    alg.AddShowerRecoModule(showerreco.ToyGeoModule())
    alg.AddShowerRecoModule(axis)
    alg.AddShowerRecoModule(startPoint)
    alg.AddShowerRecoModule(energy)
    alg.AddShowerRecoModule(dqdx)
    alg.AddShowerRecoModule(dedx)
    # alg.AddShowerRecoModule(showerreco.StartPoint2DModule()  )
    #alg.AddShowerRecoModule(showerreco.OtherStartPoint3D()  )
    # alg.AddShowerRecoModule(showerreco.ShowerChargeModule()  )

    # alg.AddShowerRecoModule(showerreco.GeoModule())
    alg.PrintModuleList()

    return alg
コード例 #7
0
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
コード例 #8
0
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
コード例 #9
0
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
コード例 #10
0
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()

    # implement position-dependent calibration
    energy.CreateResponseMap(15)
    dQdsAVG = 0.
    ctr = 0.
    fin = open('/home/david/Dropbox/Neutrinos/Calorimetry/3DCorrection/MCC82_0903/dqds_0903_data_xyz.txt','r')
    for line in fin:
        words = line.split()
        q = float(words[3])
        dQdsAVG += q
        ctr += 1
    dQdsAVG /= ctr
    print 'dQdsAVG = %.02f'%dQdsAVG
    fin.seek(0)
    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.572)
    energy.SetElecGain(243.) # MCC8.0 data
    #energy.SetElecGain(200.) # MCC8.0 value
    energy.setVerbosity(False)
    energy.SetFillTree(True)

    dqdx = showerreco.dQdxModule()
    dqdx.setTrunkLength(2.)
    #dqdx.SetFillTree(True)
    
    shrFilter = showerreco.FilterShowers()
    shrFilter.setAngleCut(25.)
    shrFilter.setVerbosity(False)

    alg.AddShowerRecoModule( filteralgo )
    alg.AddShowerRecoModule(angle3D)
    #alg.AddShowerRecoModule( showerreco.StartPoint3DModule() )
    #alg.AddShowerRecoModule( showerreco.NearestStartPoint3D() )
    alg.AddShowerRecoModule( startPt )#showerreco.YPlaneStartPoint3D() )
    alg.AddShowerRecoModule( dqdx )
    alg.AddShowerRecoModule(energy)
    alg.AddShowerRecoModule( showerreco.FillLength() )
    alg.AddShowerRecoModule( shrFilter )
    
    alg.PrintModuleList()
    
    return alg