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 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  1 //
  2 // ********************************************************************
  3 // * License and Disclaimer                                           *
  4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.                             *
 10 // *                                                                  *
 11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                                                  *
 18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // ********************************************************************
 25 //
 26 //
 27 //
 28 //
 29 
 30 
 31 #ifndef G4TheMTRayTracer_H
 32 #define G4TheMTRayTracer_H 1
 33 
 34 // class description:
 35 //
 36 // G4TheMTRayTracer
 37 //   This is a graphics driver of Geant4 which generates a figure file by
 38 // ray tracing technique. The format of output figure file can be selected
 39 // by assigning a pointer of G4VFigureFileMaker concrete class object.
 40 //   The main entry of ray tracing is Trace() method, which is available
 41 // only at Idle state. G4TheMTRayTracer shoots rays and controls its own event
 42 // loop. It generates G4Event objects used for its own purpose. When ray
 43 // tracing is working, all sensitive detectors are inactivated and all
 44 // user action classes are swapped out. Still, verbosities set to Geant4
 45 // manager classes are concerned. Thus, it is recommended to set verbosities
 46 // to minimum (usually zero).
 47 //   G4TheMTRayTracer can visualise absolutely all kinds of geometrical shapes
 48 // which G4Navigator can deal with. Instead, it can NOT visualise hits
 49 // nor trajectories generated by usual simulation.
 50 
 51 #include "globals.hh"
 52 #include "G4ThreeVector.hh"
 53 #include "G4Colour.hh"
 54 
 55 class G4RTMessenger;
 56 class G4RayShooter;
 57 class G4VFigureFileMaker;
 58 class G4VisAttributes;
 59 class G4VRTScanner;
 60 class G4UserWorkerInitialization;
 61 class G4RTWorkerInitialization;
 62 class G4UserRunAction;
 63 class G4RTRunAction;
 64 class G4RTPrimaryGeneratorAction;
 65 class G4RTRun;
 66 class G4RayTracerViewer;
 67 
 68 #include "G4TheRayTracer.hh"
 69 
 70 class G4TheMTRayTracer : public G4TheRayTracer
 71 {
 72     friend class G4RTPrimaryGeneratorAction;
 73     friend class G4RTRun;
 74     friend class G4RayTracerViewer;
 75 
 76   private:
 77     static G4TheMTRayTracer* theInstance;
 78 
 79   public: // with description
 80     G4TheMTRayTracer(G4VFigureFileMaker* figMaker = 0,
 81        G4VRTScanner* scanner = 0);
 82     // Constructor. The argument is the pointer to G4VFigureFileMaker
 83     // concrete class object. If it is not set and
 84     // SetFigureFileMaker() method is not invoked before Trace()
 85     // command is invoked, then G4RTJpegMaker will be used and JPEG
 86     // file will be generated.  The second argument is a scanner that
 87     // produces a sequence of window coordinates.  If it is not set
 88     // here or if SetScanner is not invoked before Trace(), a default
 89     // G4RTSimpleScanner will be used.
 90 
 91   static G4TheMTRayTracer* Instance();
 92   static G4TheMTRayTracer* Instance
 93   (G4VFigureFileMaker* figMaker,G4VRTScanner* scanner);
 94 
 95   public:
 96     virtual ~G4TheMTRayTracer();
 97 
 98   public: // with description
 99     virtual void Trace(const G4String& fileName);
100     // The main entry point which triggers ray tracing. "fileName" is output
101     // file name, and it must contain extention (e.g. myFigure.jpg). This
102     // method is available only if Geant4 is at Idle state.
103 
104   protected:
105     virtual G4bool CreateBitMap();
106     // Event loop
107 
108   protected:
109     virtual void StoreUserActions();
110     virtual void RestoreUserActions();
111 
112   protected:
113     const G4UserWorkerInitialization * theUserWorkerInitialization;
114     G4RTWorkerInitialization * theRTWorkerInitialization;
115     const G4UserRunAction * theUserRunAction;
116     G4RTRunAction * theRTRunAction;
117 
118 };
119 
120 #endif
121