/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes
visdet::VisDetConfig Class Reference

List of all members.

Public Member Functions

def __init__

Public Attributes

 detelem
 logvol
 which

Detailed Description

Definition at line 3 of file visdet.py.


Constructor & Destructor Documentation

def visdet::VisDetConfig::__init__ (   self,
  logvol = "",
  detelem = "",
  which = "RawTracerX" 
)

Definition at line 4 of file visdet.py.

00005                                                               :
00006         self.detelem = detelem
00007         self.logvol = logvol
00008         self.which = which
00009 
00010         print "Using vis method: ",self.which
00011 
00012         import gaudimodule as gm
00013         import units
00014         app = gm.AppMgr()
00015         app.ExtSvc += ["GiGa"]
00016 
00017         modularPL = app.property("GiGa.GiGaPhysListModular")
00018         #modularPL.OutputLevel = 1
00019         modularPL.CutForElectron = 100*units.micrometer
00020         modularPL.CutForPositron = 100*units.micrometer
00021         modularPL.CutForGamma = 1*units.millimeter
00022         modularPL.PhysicsConstructors = [ 
00023             "DsPhysConsGeneral",
00024             "DsPhysConsOptical" 
00025             ]
00026 
00027         print "\tGetting property GiGaEventActionCommand:"
00028         viscmd = app.property("GiGa.GiGaEventActionCommand")
00029         #viscmd.OutputLevel = 1
00030         #viscmd.EndOfEventCommands = [
00031         #    "/vis/viewer/update" 
00032         #    "/vis/viewer/flush",
00033         #    ]
00034 
00035         print "\tSet EndOfEventCommands"
00036 
00037         if self.which == "DAWNFILE":
00038             viscmd.BeginOfEventCommands = \
00039                 [ "/vis/scene/create",
00040                   "/vis/sceneHandler/create DAWNFILE",
00041                   "/vis/viewer/create",
00042                   "/vis/viewer/set/viewpointThetaPhi -90 -90",
00043                   "/vis/scene/add/volume", 
00044                   "/vis/scene/add/trajectories" ]
00045         elif self.which == "HepRepFile":
00046             viscmd.BeginOfEventCommands = [
00047                 "/vis/open HepRepFile",
00048                 #"/vis/scene/create",
00049                 #"/vis/scene/add/volume "+self.detelem,
00050                 #"/vis/DrawVolume",
00051                 "/vis/viewer/flush"
00052                 ]
00053         elif self.which == "HepRepXML":
00054             viscmd.BeginOfEventCommands = \
00055                 [ "/vis/open HepRepXML",
00056                   "/vis/scene/create far.heprep",
00057                   "/vis/scene/add/volume",
00058                   "/vis/sceneHandler/attach",
00059                   #"/vis/drawVolume",
00060                   "/vis/viewer/flush" 
00061                   ]
00062         elif self.which == "OGLIXm" or self.which == "OGLSXm":
00063             viscmd.BeginOfEventCommands = [
00064                 "/vis/open "+self.which,
00065                 "/vis/drawVolume",
00066                 ]                
00067         elif self.which == "OGLIX" or self.which == "OGLSX":
00068             viscmd.BeginOfEventCommands = [
00069                 "/vis/open "+self.which,
00070                 "/vis/drawVolume",
00071                 ]                
00072         elif self.which == "OIX":
00073             viscmd.BeginOfEventCommands = [
00074                 "/vis/open OIX",
00075                 "/vis/drawVolume",
00076                 ]                
00077         elif self.which == "RayTracer" or self.which == "RayTracerX":
00078             viscmd.BeginOfEventCommands = [
00079                 #"/vis/open "+self.which,
00080                 #"/vis/viewer/reset",
00081                 #"/vis/scene/create",
00082                 #"/vis/scene/add/volume "+self.detelem,
00083                 #"/vis/sceneHandler/attach",
00084                 #"/vis/viewer/set/style surface",
00085                 #"/vis/viewer/set/projection perspective 50 deg",
00086                 #"/vis/viewer/set/viewpointThetaPhi 130 20",
00087                 #"/vis/viewer/zoom 0.5",
00088                 #"/vis/rayTracer/trace foo.jpg",
00089                 #"/vis/viewer/flush",
00090                 ]                
00091         elif self.which == "ATree":
00092             viscmd.BeginOfEventCommands = [
00093                 "/vis/open ATree",
00094                 "/vis/ASCIITree/Verbose 15",
00095                 "/vis/scene/create",
00096                 "/vis/scene/add/volume "+self.detelem,
00097                 "/vis/sceneHandler/attach",
00098                 "/vis/drawTree",
00099                 "/vis/viewer/flush",
00100                 ]
00101         elif self.which == "GAGTree":
00102             viscmd.BeginOfEventCommands = [
00103                 "/vis/open GAGTree",
00104                 "/vis/scene/create",
00105                 "/vis/scene/add/volume "+self.detelem,
00106                 "/vis/sceneHandler/attach",
00107                 "/vis/drawTree",
00108                 "/vis/viewer/flush",
00109                 ]
00110         elif self.which == "xml":
00111             viscmd.BeginOfEventCommands = [
00112                 "/vis/open XMLTree",
00113                 "/vis/scene/create",
00114                 "/vis/scene/add/volume "+self.detelem,
00115                 "/vis/sceneHandler/attach",
00116                 "/vis/drawTree",
00117                 "/vis/viewer/flush",
00118                 ]
00119         else:
00120             viscmd.BeginOfEventCommands = []
00121 
00122         #eventseq = app.property("GiGa.GiGaEventActionSequence")
00123         #eventseq.Members = [# "GiGaEventActionDraw/DrawEvent",
00124         #"GiGaEventActionCommand" ]
00125 
00126 
00127         app.TopAlg += [ "GaudiSequencer/Simulation" ]
00128         seq = app.algorithm("Simulation")
00129         seq.Members = [ "GiGaInputStream/GIO" ]
00130 
00131         gio = app.algorithm("GIO")
00132         gio.ExecuteOnce = True
00133         gio.ConversionSvcName = "GiGaGeo"
00134         gio.DataProviderSvcName = "DetectorDataSvc"
00135         gio.StreamItems = [ self.logvol, self.detelem ]
00136 
00137         import units
00138         ggg = app.service("GiGaGeo")
00139         ggg.XsizeOfWorldVolume = 2400*units.meter
00140         ggg.YsizeOfWorldVolume = 2400*units.meter
00141         ggg.ZsizeOfWorldVolume = 2400*units.meter
00142         #ggg.WorldPhysicalVolumeName = "pvFarSiteRock"
00143         #ggg.WorldLogicalVolumeName = "lvFarSiteRock"
00144 
00145         seq.Members += [ "DsPushKine/PushKine", "DsPullEvent/PullEvent" ]
00146         push = app.algorithm("PushKine")
00147         push.Converter = "HepMCtoG4"
00148 
00149         giga = app.service("GiGa")
00150         giga.PhysicsList = "GiGaPhysListModular"
00151         giga.EventAction = "GiGaEventActionCommand"
00152         giga.VisManager = "GiGaVisManager/GiGaVis"
00153         if self.which[0:3] == 'Ray':
00154             giga.UIsession = "GiGaUIsession/GiGaUI"
00155         
00156 
00157 


Member Data Documentation

Definition at line 4 of file visdet.py.

Definition at line 4 of file visdet.py.

Definition at line 4 of file visdet.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 Fri May 16 2014 10:17:58 for DetSim by doxygen 1.7.4