| 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 | // $Id: G4VSteppingVerbose.cc,v 1.19 2010/07/19 13:41:21 gcosmo Exp $
|
|---|
| 28 | // GEANT4 tag $Name: tracking-V09-03-08 $
|
|---|
| 29 | //
|
|---|
| 30 | //---------------------------------------------------------------
|
|---|
| 31 | //
|
|---|
| 32 | // G4VSteppingVerbose.cc
|
|---|
| 33 | //
|
|---|
| 34 | // Description:
|
|---|
| 35 | // This class manages the vervose outputs in G4SteppingManager.
|
|---|
| 36 | //
|
|---|
| 37 | //
|
|---|
| 38 | // Contact:
|
|---|
| 39 | // Questions and comments to this code should be sent to
|
|---|
| 40 | // Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
|
|---|
| 41 | // Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
|
|---|
| 42 | //
|
|---|
| 43 | //---------------------------------------------------------------
|
|---|
| 44 |
|
|---|
| 45 | #include "G4VSteppingVerbose.hh"
|
|---|
| 46 | #include "G4SteppingManager.hh"
|
|---|
| 47 | #include "G4Track.hh"
|
|---|
| 48 | #include "G4ParticleDefinition.hh"
|
|---|
| 49 |
|
|---|
| 50 | G4VSteppingVerbose* G4VSteppingVerbose::fInstance = 0;
|
|---|
| 51 | G4int G4VSteppingVerbose::Silent = 0;
|
|---|
| 52 | G4int G4VSteppingVerbose::SilentStepInfo = 0;
|
|---|
| 53 |
|
|---|
| 54 | G4VSteppingVerbose::G4VSteppingVerbose()
|
|---|
| 55 | : fManager(0), fUserSteppingAction(0),
|
|---|
| 56 | PhysicalStep(0.), GeometricalStep(0.), CorrectedStep(0.),
|
|---|
| 57 | PreStepPointIsGeom(false), FirstStep(false),
|
|---|
| 58 | TempInitVelocity(0.), TempVelocity(0.), Mass(0.), sumEnergyChange(0.),
|
|---|
| 59 | fParticleChange(0), fTrack(0), fSecondary(0), fStep(0),
|
|---|
| 60 | fPreStepPoint(0), fPostStepPoint(0), fCurrentVolume(0),
|
|---|
| 61 | fSensitive(0), fCurrentProcess(0), fAtRestDoItVector(0),
|
|---|
| 62 | fAlongStepDoItVector(0), fPostStepDoItVector(0), fAtRestGetPhysIntVector(0),
|
|---|
| 63 | fAlongStepGetPhysIntVector(0), fPostStepGetPhysIntVector(0),
|
|---|
| 64 | MAXofAtRestLoops(0), MAXofAlongStepLoops(0), MAXofPostStepLoops(0),
|
|---|
| 65 | currentMinimumStep(0.), numberOfInteractionLengthLeft(0.),
|
|---|
| 66 | fAtRestDoItProcTriggered(0), fAlongStepDoItProcTriggered(0),
|
|---|
| 67 | fPostStepDoItProcTriggered(0), fN2ndariesAtRestDoIt(0),
|
|---|
| 68 | fN2ndariesAlongStepDoIt(0), fN2ndariesPostStepDoIt(0),
|
|---|
| 69 | fNavigator(0), verboseLevel(0), fSelectedAtRestDoItVector(0),
|
|---|
| 70 | fSelectedAlongStepDoItVector(0), fSelectedPostStepDoItVector(0),
|
|---|
| 71 | fPreviousStepSize(0.), physIntLength(0.)
|
|---|
| 72 | {
|
|---|
| 73 | if(fInstance!= 0)
|
|---|
| 74 | {
|
|---|
| 75 | G4Exception("G4VSteppingVerbose::G4VSteppingVerbose()",
|
|---|
| 76 | "Tracking0014", FatalException,
|
|---|
| 77 | "Only one SteppingVerbose class can be instantiated.");
|
|---|
| 78 | }
|
|---|
| 79 | }
|
|---|
| 80 | G4VSteppingVerbose::~G4VSteppingVerbose(){;}
|
|---|
| 81 |
|
|---|
| 82 | //////////////////////////////////////////////////////////////////
|
|---|
| 83 | void G4VSteppingVerbose::SetManager(G4SteppingManager* const fMan)
|
|---|
| 84 | //////////////////////////////////////////////////////////////////
|
|---|
| 85 | {
|
|---|
| 86 | fManager=fMan;
|
|---|
| 87 | }
|
|---|
| 88 |
|
|---|
| 89 | //////////////////////////////////////////////////
|
|---|
| 90 | void G4VSteppingVerbose::CopyState()
|
|---|
| 91 | //////////////////////////////////////////////////
|
|---|
| 92 | {
|
|---|
| 93 |
|
|---|
| 94 | fUserSteppingAction = fManager->GetUserAction();
|
|---|
| 95 | // fVerbose = this;
|
|---|
| 96 |
|
|---|
| 97 | PhysicalStep = fManager->GetPhysicalStep();
|
|---|
| 98 | GeometricalStep = fManager->GetGeometricalStep();
|
|---|
| 99 | CorrectedStep = fManager->GetCorrectedStep();
|
|---|
| 100 | PreStepPointIsGeom = fManager->GetPreStepPointIsGeom();
|
|---|
| 101 | FirstStep = fManager->GetFirstStep();
|
|---|
| 102 | fStepStatus = fManager->GetfStepStatus();
|
|---|
| 103 |
|
|---|
| 104 | TempInitVelocity = fManager->GetTempInitVelocity();
|
|---|
| 105 | TempVelocity = fManager->GetTempVelocity();
|
|---|
| 106 | Mass = fManager->GetMass();
|
|---|
| 107 |
|
|---|
| 108 | sumEnergyChange = fManager->GetsumEnergyChange();
|
|---|
| 109 |
|
|---|
| 110 | fParticleChange = fManager->GetfParticleChange();
|
|---|
| 111 | fTrack = fManager->GetfTrack();
|
|---|
| 112 | fSecondary = fManager->GetfSecondary();
|
|---|
| 113 | fStep = fManager->GetfStep();
|
|---|
| 114 | fPreStepPoint = fManager->GetfPreStepPoint();
|
|---|
| 115 | fPostStepPoint = fManager->GetfPostStepPoint();
|
|---|
| 116 |
|
|---|
| 117 | fCurrentVolume = fManager->GetfCurrentVolume();
|
|---|
| 118 | fSensitive = fManager->GetfSensitive();
|
|---|
| 119 | fCurrentProcess = fManager->GetfCurrentProcess();
|
|---|
| 120 |
|
|---|
| 121 | fAtRestDoItVector = fManager->GetfAtRestDoItVector();
|
|---|
| 122 | fAlongStepDoItVector = fManager->GetfAlongStepDoItVector();
|
|---|
| 123 | fPostStepDoItVector = fManager->GetfPostStepDoItVector();
|
|---|
| 124 |
|
|---|
| 125 | fAtRestGetPhysIntVector = fManager->GetfAtRestGetPhysIntVector();
|
|---|
| 126 | fAlongStepGetPhysIntVector = fManager->GetfAlongStepGetPhysIntVector();
|
|---|
| 127 | fPostStepGetPhysIntVector = fManager->GetfPostStepGetPhysIntVector();
|
|---|
| 128 |
|
|---|
| 129 | MAXofAtRestLoops = fManager->GetMAXofAtRestLoops();
|
|---|
| 130 | MAXofAlongStepLoops = fManager->GetMAXofAlongStepLoops();
|
|---|
| 131 | MAXofPostStepLoops = fManager->GetMAXofPostStepLoops();
|
|---|
| 132 |
|
|---|
| 133 | fAtRestDoItProcTriggered = fManager->GetfAtRestDoItProcTriggered();
|
|---|
| 134 | fAlongStepDoItProcTriggered = fManager->GetfAlongStepDoItProcTriggered();
|
|---|
| 135 | fPostStepDoItProcTriggered = fManager->GetfPostStepDoItProcTriggered();
|
|---|
| 136 |
|
|---|
| 137 | fN2ndariesAtRestDoIt = fManager->GetfN2ndariesAtRestDoIt();
|
|---|
| 138 | fN2ndariesAlongStepDoIt = fManager->GetfN2ndariesAlongStepDoIt();
|
|---|
| 139 | fN2ndariesPostStepDoIt = fManager->GetfN2ndariesPostStepDoIt();
|
|---|
| 140 |
|
|---|
| 141 | fNavigator = fManager->GetfNavigator();
|
|---|
| 142 |
|
|---|
| 143 | verboseLevel = fManager->GetverboseLevel();
|
|---|
| 144 |
|
|---|
| 145 | fSelectedAtRestDoItVector = fManager->GetfSelectedAtRestDoItVector();
|
|---|
| 146 | fSelectedAlongStepDoItVector = fManager->GetfSelectedAlongStepDoItVector();
|
|---|
| 147 | fSelectedPostStepDoItVector = fManager->GetfSelectedPostStepDoItVector();
|
|---|
| 148 |
|
|---|
| 149 | fPreviousStepSize = fManager->GetfPreviousStepSize();
|
|---|
| 150 |
|
|---|
| 151 | fTouchableHandle = fManager->GetTouchableHandle();
|
|---|
| 152 |
|
|---|
| 153 | StepControlFlag = fManager->GetStepControlFlag();
|
|---|
| 154 |
|
|---|
| 155 | physIntLength = fManager->GetphysIntLength();
|
|---|
| 156 | fCondition = fManager->GetfCondition();
|
|---|
| 157 | fGPILSelection = fManager->GetfGPILSelection();
|
|---|
| 158 | }
|
|---|
| 159 |
|
|---|
| 160 | void G4VSteppingVerbose::SetInstance(G4VSteppingVerbose* Instance)
|
|---|
| 161 | {
|
|---|
| 162 | fInstance=Instance;
|
|---|
| 163 | }
|
|---|
| 164 |
|
|---|
| 165 | G4VSteppingVerbose* G4VSteppingVerbose::GetInstance()
|
|---|
| 166 | {
|
|---|
| 167 | return fInstance;
|
|---|
| 168 | }
|
|---|
| 169 |
|
|---|
| 170 | G4int G4VSteppingVerbose::GetSilent()
|
|---|
| 171 | {
|
|---|
| 172 | return Silent;
|
|---|
| 173 | }
|
|---|
| 174 |
|
|---|
| 175 | void G4VSteppingVerbose::SetSilent(G4int fSilent)
|
|---|
| 176 | {
|
|---|
| 177 | Silent=fSilent;
|
|---|
| 178 | }
|
|---|
| 179 |
|
|---|
| 180 | G4int G4VSteppingVerbose::GetSilentStepInfo()
|
|---|
| 181 | {
|
|---|
| 182 | return SilentStepInfo;
|
|---|
| 183 | }
|
|---|
| 184 |
|
|---|
| 185 | void G4VSteppingVerbose::SetSilentStepInfo(G4int fSilent)
|
|---|
| 186 | {
|
|---|
| 187 | SilentStepInfo=fSilent;
|
|---|
| 188 | }
|
|---|
| 189 |
|
|---|