| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DetSim::Default::Configure Class Reference

List of all members.

Public Member Functions

def __init__
def historian
def unobserver

Static Public Attributes

list giga_far_items
list giga_dayabay_items
list giga_lingao_items

Detailed Description

Do default DetSim configuration.

Definition at line 16 of file Default.py.


Member Function Documentation

def DetSim::Default::Configure::__init__ (   self,
  site = "far,
  dayabay,
  lingao,
  physlist = physics_list_basic+physics_list_nuclear,
  use_push_algs = True,
  use_sim_subseq = False 
)

Configure DetSim.  

"site" can be "far", "dayabay" or "lingao".  Default is all three

"physlist" specifies the physics lists.  You can use the
predefined lists in DetSim.configure.: physics_list_basic and
physics_list_nuclear.  Default is to use both.

After creating this object you may want to call historian() or
unobserver() to add to their configuration.

Definition at line 42 of file Default.py.

00047                                        :
00048         '''
00049         Configure DetSim.  
00050 
00051         "site" can be "far", "dayabay" or "lingao".  Default is all three
00052 
00053         "physlist" specifies the physics lists.  You can use the
00054         predefined lists in DetSim.configure.: physics_list_basic and
00055         physics_list_nuclear.  Default is to use both.
00056         
00057         After creating this object you may want to call historian() or
00058         unobserver() to add to their configuration.
00059 
00060         '''
00061 
00062         from GaussTools.GaussToolsConf import GiGaPhysListModular
00063         import GaudiKernel.SystemOfUnits as units
00064 
00065         # Note: we must name this with "GiGa." as it is assumed later when the
00066         # properties are looked up.  Really the action of giving it to GiGa
00067         # should take care of this.  More bugs in Configurables
00068         physics_list = GiGaPhysListModular("GiGa.GiGaPhysListModular")
00069         physics_list.CutForElectron = 100*units.micrometer
00070         physics_list.CutForPositron = 100*units.micrometer
00071         physics_list.CutForGamma = 1*units.millimeter
00072         physics_list.PhysicsConstructors = physlist
00073         self.physics_list = physics_list
00074 
00075         from GiGa.GiGaConf import GiGa
00076         giga = GiGa()
00077         giga.PhysicsList = physics_list
00078 
00079         # Start empty step action sequence to hold historian/unobserver
00080         from GaussTools.GaussToolsConf import GiGaStepActionSequence
00081         sa = GiGaStepActionSequence('GiGa.GiGaStepActionSequence')
00082         giga.SteppingAction = sa
00083 
00084         self.giga = giga
00085 
00086         # Tell GiGa the size of the world.
00087         # Set default world material to be vacuum to speed propagation of
00088         # particles in regions of little interest.
00089         from GiGaCnv.GiGaCnvConf import GiGaGeo
00090         giga_geom = GiGaGeo()
00091         giga_geom.XsizeOfWorldVolume = 2.4*units.kilometer
00092         giga_geom.YsizeOfWorldVolume = 2.4*units.kilometer
00093         giga_geom.ZsizeOfWorldVolume = 2.4*units.kilometer
00094         giga_geom.WorldMaterial = "/dd/Materials/Vacuum"
00095         self.gigageo = giga_geom
00096 
00097         # Set up for telling GiGa what geometry to use, but don't
00098         # actually set that.
00099         from GaussTools.GaussToolsConf import GiGaInputStream
00100         giga_items = GiGaInputStream()
00101         giga_items.ExecuteOnce = True
00102         giga_items.ConversionSvcName = "GiGaGeo"
00103         giga_items.DataProviderSvcName = "DetectorDataSvc"
00104         giga_items.StreamItems = [ ]
00105         site = site.lower()
00106         if "far" in site: 
00107             giga_items.StreamItems += self.giga_far_items
00108         if "dayabay" in site: 
00109             giga_items.StreamItems += self.giga_dayabay_items
00110         if "lingao" in site: 
00111             giga_items.StreamItems += self.giga_lingao_items
00112         self.giga_items = giga_items
00113 
00114         # Make sequencer alg to run all this stuff as subalgs
00115         from GaudiAlg.GaudiAlgConf import GaudiSequencer
00116         giga_sequence = GaudiSequencer()
00117         giga_sequence.Members = [ self.giga_items ]
00118         self.giga_sequence=giga_sequence
00119         if use_push_algs:
00120             # DetSim's algs
00121             from DetSim.DetSimConf import DsPushKine, DsPullEvent
00122             self.detsim_push_kine = DsPushKine()
00123             self.detsim_pull_event = DsPullEvent()
00124             giga_sequence.Members += [self.detsim_push_kine,
00125                                       self.detsim_pull_event]
00126             pass
00127         
00128         if not use_sim_subseq:
00129             from Gaudi.Configuration import ApplicationMgr
00130             theApp = ApplicationMgr()
00131             theApp.TopAlg.append(giga_sequence)
00132         
        return

def DetSim::Default::Configure::historian (   self,
  trackSelection = "",
  vertexSelection = "",
  useFastMuEnergyCut = False 
)

Add the Historian to the simulation and configure its
default track and vertex selection, default is empty.  Its
configurable is returned in order to allow further, direct
modification.

Definition at line 133 of file Default.py.

00135                                                                                      :
00136         ''' Add the Historian to the simulation and configure its
00137         default track and vertex selection, default is empty.  Its
00138         configurable is returned in order to allow further, direct
00139         modification.
00140         '''
00141         from Historian.HistorianConf import HistorianStepAction
00142         # Must name stepping action with anticipation of its final ownership.
00143         # This works around some inconsistency with configurable tools
00144         hist = HistorianStepAction('GiGa.GiGaStepActionSequence.HistorianStepAction')
00145         hist.TrackSelection = trackSelection
00146         hist.VertexSelection = vertexSelection
00147         hist.UseFastMuEnergyCut = useFastMuEnergyCut
00148 
00149         self.giga.SteppingAction.Members.append(hist)
        return hist

def DetSim::Default::Configure::unobserver (   self,
  stats = [] 
)

Add the Unobserver to the simulation and configure it with
a set of stats (default is empty).  Its configurable is
returned in order to allow further, direct modification.

Definition at line 150 of file Default.py.

00152                                    :
00153         ''' Add the Unobserver to the simulation and configure it with
00154         a set of stats (default is empty).  Its configurable is
00155         returned in order to allow further, direct modification.
00156         '''
00157         from Historian.HistorianConf import UnObserverStepAction
00158         # Must name stepping action with anticipation of its final ownership.
00159         # This works around some inconsistency with configurable tools
00160         unobs = UnObserverStepAction('GiGa.GiGaStepActionSequence.UnObserverStepAction')
00161         unobs.Stats = stats
00162         self.giga.SteppingAction.Members.append(unobs)
00163         return unobs
        


Member Data Documentation

list DetSim::Default::Configure::giga_far_items [static]

Initial value:

[
        "/dd/Structure/Sites/far-rock",
        "/dd/Geometry/AdDetails/AdSurfacesAll",
        "/dd/Geometry/AdDetails/AdSurfacesFar",
        "/dd/Geometry/PoolDetails/FarPoolSurfaces",
        "/dd/Geometry/PoolDetails/PoolSurfacesAll",
        ]

Definition at line 20 of file Default.py.

list DetSim::Default::Configure::giga_dayabay_items [static]

Initial value:

[
        "/dd/Structure/Sites/db-rock",
        "/dd/Geometry/AdDetails/AdSurfacesAll",
        "/dd/Geometry/AdDetails/AdSurfacesNear",
        "/dd/Geometry/PoolDetails/NearPoolSurfaces",
        "/dd/Geometry/PoolDetails/PoolSurfacesAll",
        ]

Definition at line 27 of file Default.py.

list DetSim::Default::Configure::giga_lingao_items [static]

Initial value:

[
        "/dd/Structure/Sites/la-rock",
        "/dd/Geometry/AdDetails/AdSurfacesAll",
        "/dd/Geometry/AdDetails/AdSurfacesNear",
        "/dd/Geometry/PoolDetails/NearPoolSurfaces",
        "/dd/Geometry/PoolDetails/PoolSurfacesAll",
        ]

Definition at line 34 of file Default.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:53:29 2011 for DetSim by doxygen 1.4.7