G4VSteppingVerbose.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id: G4VSteppingVerbose.hh 67009 2013-01-29 16:00:21Z gcosmo $
00028 //
00029 //---------------------------------------------------------------
00030 //
00031 // G4VSteppingVerbose.hh
00032 //
00033 // class description:
00034 //   This class manages the vervose outputs in G4SteppingManager. 
00035 //   The instance should be singleton. Users can inherit this 
00036 //   class to make their own verbosing class.
00037 //
00038 // Contact:
00039 //   Questions and comments to this code should be sent to
00040 //     Katsuya Amako  (e-mail: Katsuya.Amako@kek.jp)
00041 //     Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
00042 //
00043 //---------------------------------------------------------------
00044 
00045 #ifndef G4VSteppingVerbose_h
00046 #define G4VSteppingVerbose_h
00047 
00048 class G4SteppingManager;
00049 
00050 #include "globals.hh"                 // Include from 'global'
00051 #include <vector>
00052 
00053 class G4Navigator;
00054 class G4VPhysicalVolume;
00055 class G4VSensitiveDetector;
00056 #include "G4VProcess.hh"
00057 class G4ProcessVector;
00058 class G4SteppingManager;              // Include from 'tracking'
00059 class G4Track;
00060 #include "G4TrackVector.hh"           // Include from 'tracking'
00061 #include "G4StepStatus.hh"            // Include from 'track'
00062 class G4UserSteppingAction;
00063 class G4StepPoint;
00064 #include "G4TouchableHandle.hh"
00065 class G4VParticleChange;
00066 #include "G4ForceCondition.hh"  //enum 'track'
00067 #include "G4GPILSelection.hh"   //enum 'track'
00068 
00069 
00070 class G4VSteppingVerbose
00071 {
00072 // Constructor/Destructor
00073 protected:    // to force 'singleton'
00074   G4VSteppingVerbose();  
00075 public:  
00076   virtual ~G4VSteppingVerbose();
00077   //
00078 protected:  
00079   static G4VSteppingVerbose* fInstance;// pointer to the instance 
00080   static G4int Silent; //flag for verbosity
00081   static G4int SilentStepInfo; //another flag for verbosity
00082 public:   // with description
00083 // static methods to set/get the object's pointer 
00084   static void SetInstance(G4VSteppingVerbose* Instance);
00085   static G4VSteppingVerbose* GetInstance();
00086   static G4int GetSilent();
00087   static void SetSilent(G4int fSilent);
00088   static G4int GetSilentStepInfo();
00089   static void SetSilentStepInfo(G4int fSilent);
00090 // these method are invoked in the SteppingManager 
00091   virtual void NewStep() = 0;
00092   void CopyState();
00093   void SetManager(G4SteppingManager* const);
00094   virtual void AtRestDoItInvoked() = 0;
00095   virtual void AlongStepDoItAllDone() = 0;
00096   virtual void PostStepDoItAllDone() = 0;
00097   virtual void AlongStepDoItOneByOne() = 0;
00098   virtual void PostStepDoItOneByOne() = 0;
00099   virtual void StepInfo() = 0;
00100   virtual void TrackingStarted() = 0;
00101   virtual void DPSLStarted() = 0;
00102   virtual void DPSLUserLimit() = 0;
00103   virtual void DPSLPostStep() = 0;
00104   virtual void DPSLAlongStep() = 0;
00105   virtual void VerboseTrack() = 0;
00106   virtual void VerboseParticleChange() = 0;
00107   // Member data
00108 
00109 protected:
00110   G4SteppingManager* fManager;
00111   
00112   G4UserSteppingAction* fUserSteppingAction;
00113   
00114   G4double PhysicalStep;
00115   G4double GeometricalStep;
00116   G4double CorrectedStep;
00117   G4bool PreStepPointIsGeom;
00118   G4bool FirstStep;
00119   G4StepStatus fStepStatus;
00120 
00121   G4double TempInitVelocity;
00122   G4double TempVelocity;
00123   G4double Mass;
00124 
00125   G4double sumEnergyChange;
00126 
00127   G4VParticleChange* fParticleChange;
00128   G4Track* fTrack;
00129   G4TrackVector* fSecondary;
00130   G4Step* fStep;
00131   G4StepPoint* fPreStepPoint;
00132   G4StepPoint* fPostStepPoint;
00133 
00134   G4VPhysicalVolume* fCurrentVolume;
00135   G4VSensitiveDetector* fSensitive;
00136   G4VProcess* fCurrentProcess;
00137   // The pointer to the process of which DoIt or
00138   // GetPhysicalInteractionLength has been just executed.
00139 
00140 
00141   G4ProcessVector* fAtRestDoItVector;
00142   G4ProcessVector* fAlongStepDoItVector;
00143   G4ProcessVector* fPostStepDoItVector;
00144 
00145   G4ProcessVector* fAtRestGetPhysIntVector;
00146   G4ProcessVector* fAlongStepGetPhysIntVector;
00147   G4ProcessVector* fPostStepGetPhysIntVector;
00148 
00149   size_t MAXofAtRestLoops;
00150   size_t MAXofAlongStepLoops;
00151   size_t MAXofPostStepLoops;
00152   
00153   G4double currentMinimumStep;
00154   G4double numberOfInteractionLengthLeft;
00155 
00156   size_t fAtRestDoItProcTriggered;
00157   size_t fAlongStepDoItProcTriggered;
00158   size_t fPostStepDoItProcTriggered;
00159 
00160   G4int fN2ndariesAtRestDoIt;
00161   G4int fN2ndariesAlongStepDoIt;
00162   G4int fN2ndariesPostStepDoIt;
00163       // These are the numbers of secondaries generated by the process
00164       // just executed.
00165 
00166   G4Navigator *fNavigator;
00167 
00168   G4int verboseLevel;
00169 
00170   typedef std::vector<G4int> 
00171              G4SelectedAtRestDoItVector;
00172   typedef std::vector<G4int> 
00173              G4SelectedAlongStepDoItVector;
00174   typedef std::vector<G4int>
00175              G4SelectedPostStepDoItVector;
00176   G4SelectedAtRestDoItVector* fSelectedAtRestDoItVector;
00177   G4SelectedAlongStepDoItVector* fSelectedAlongStepDoItVector;
00178   G4SelectedPostStepDoItVector* fSelectedPostStepDoItVector;
00179 
00180   G4double   fPreviousStepSize;
00181 
00182   G4TouchableHandle fTouchableHandle;
00183 
00184   G4SteppingControl StepControlFlag;
00185 
00186   G4double physIntLength;
00187   G4ForceCondition fCondition;
00188   G4GPILSelection  fGPILSelection;
00189       // Above three variables are for the method 
00190       // DefinePhysicalStepLength(). To pass these information to
00191       // the method Verbose, they are kept at here. Need a more 
00192       // elegant mechanism.
00193 
00194 
00195 };
00196 #endif

Generated on Mon May 27 17:50:22 2013 for Geant4 by  doxygen 1.4.7