Beispiel #1
0
  def setupPhysics( self, kernel, name=None):
    seq = kernel.physicsList()
    seq.extends  = name if name is not None else self.list
    seq.decays   = self.decays
    seq.enableUI()
    seq.dump()

    from DDG4 import PhysicsList

    # Add special particle types from specialized physics constructor
    if self.pdgfile:
      seq = kernel.physicsList()
      part = PhysicsList(kernel, 'Geant4ExtraParticles/ExtraParticles')
      part.enableUI()
      seq.adopt(part)
      part.pdgfile = self.pdgfile

    # Add global range cut
    if self.rangecut is not None:
      seq = kernel.physicsList()
      rg = PhysicsList(kernel,'Geant4DefaultRangeCut/GlobalRangeCut')
      rg.enableUI()
      seq.adopt(rg)
      rg.RangeCut = self.rangecut

    return seq
Beispiel #2
0
    def setupPhysics(self, kernel, name=None):
        seq = kernel.physicsList()
        seq.extends = name if name is not None else self.list
        seq.decays = self.decays
        seq.enableUI()
        seq.dump()

        from DDG4 import PhysicsList

        # Add special particle types from specialized physics constructor
        if self.pdgfile:
            seq = kernel.physicsList()
            part = PhysicsList(kernel, 'Geant4ExtraParticles/ExtraParticles')
            part.enableUI()
            seq.adopt(part)
            part.pdgfile = self.pdgfile

        # Add global range cut
        if self.rangecut is not None:
            seq = kernel.physicsList()
            rg = PhysicsList(kernel, 'Geant4DefaultRangeCut/GlobalRangeCut')
            rg.enableUI()
            seq.adopt(rg)
            rg.RangeCut = self.rangecut

        return seq
Beispiel #3
0
    def setupPhysics(self, kernel, name=None):
        seq = kernel.physicsList()
        seq.extends = name if name is not None else self.list
        seq.decays = self.decays
        seq.enableUI()
        seq.dump()

        from DDG4 import PhysicsList

        # Add special particle types from specialized physics constructor
        if self.pdgfile:
            seq = kernel.physicsList()
            part = PhysicsList(kernel, 'Geant4ExtraParticles/ExtraParticles')
            part.enableUI()
            seq.adopt(part)
            part.pdgfile = self.pdgfile

        # Add global range cut
        if self.rangecut is not None:
            seq = kernel.physicsList()
            rg = PhysicsList(kernel, 'Geant4DefaultRangeCut/GlobalRangeCut')
            rg.enableUI()
            seq.adopt(rg)
            rg.RangeCut = self.rangecut


# Add cerenkov physics

        opt2 = PhysicsList(kernel,
                           'Geant4OpticalPhotonPhysics/OpticalGammaPhys')
        opt2.VerboseLevel = 9
        opt2.enableUI()
        seq.adopt(opt2)

        cerenkov = PhysicsList(kernel, 'Geant4CerenkovPhysics/CerenkovPhys')
        cerenkov.MaxNumPhotonsPerStep = 10
        cerenkov.MaxBetaChangePerStep = 10.0
        cerenkov.TrackSecondariesFirst = True
        cerenkov.VerboseLevel = 9
        cerenkov.enableUI()
        seq.adopt(cerenkov)

        # Add scintillator physics

        #    scintill = PhysicsList(kernel, 'Geant4ScintillationPhysics/ScintillationPhys')
        #    scintill.VerboseLevel = 10
        #    scintill.TrackSecondariesFirst = True
        #    scintill.enableUI()
        #    seq.adopt(scintill)

        return seq