<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.iac.isu.edu/index.php?action=history&amp;feed=atom&amp;title=ExN02SteppingVerbose.cc</id>
	<title>ExN02SteppingVerbose.cc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.iac.isu.edu/index.php?action=history&amp;feed=atom&amp;title=ExN02SteppingVerbose.cc"/>
	<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=ExN02SteppingVerbose.cc&amp;action=history"/>
	<updated>2026-05-09T23:40:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=ExN02SteppingVerbose.cc&amp;diff=121168&amp;oldid=prev</id>
		<title>Vanwdani: Created page with &quot;&lt;pre&gt; // // ******************************************************************** // * License and Disclaimer                                           * // *...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=ExN02SteppingVerbose.cc&amp;diff=121168&amp;oldid=prev"/>
		<updated>2018-01-23T03:08:45Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; // // ******************************************************************** // * License and Disclaimer                                           * // *...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
// ********************************************************************&lt;br /&gt;
// * License and Disclaimer                                           *&lt;br /&gt;
// *                                                                  *&lt;br /&gt;
// * The  Geant4 software  is  copyright of the Copyright Holders  of *&lt;br /&gt;
// * the Geant4 Collaboration.  It is provided  under  the terms  and *&lt;br /&gt;
// * conditions of the Geant4 Software License,  included in the file *&lt;br /&gt;
// * LICENSE and available at  http://cern.ch/geant4/license .  These *&lt;br /&gt;
// * include a list of copyright holders.                             *&lt;br /&gt;
// *                                                                  *&lt;br /&gt;
// * Neither the authors of this software system, nor their employing *&lt;br /&gt;
// * institutes,nor the agencies providing financial support for this *&lt;br /&gt;
// * work  make  any representation or  warranty, express or implied, *&lt;br /&gt;
// * regarding  this  software system or assume any liability for its *&lt;br /&gt;
// * use.  Please see the license in the file  LICENSE  and URL above *&lt;br /&gt;
// * for the full disclaimer and the limitation of liability.         *&lt;br /&gt;
// *                                                                  *&lt;br /&gt;
// * This  code  implementation is the result of  the  scientific and *&lt;br /&gt;
// * technical work of the GEANT4 collaboration.                      *&lt;br /&gt;
// * By using,  copying,  modifying or  distributing the software (or *&lt;br /&gt;
// * any work based  on the software)  you  agree  to acknowledge its *&lt;br /&gt;
// * use  in  resulting  scientific  publications,  and indicate your *&lt;br /&gt;
// * acceptance of all terms of the Geant4 Software license.          *&lt;br /&gt;
// ********************************************************************&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
// $Id: ExN02SteppingVerbose.cc 69899 2013-05-17 10:05:33Z gcosmo $&lt;br /&gt;
// &lt;br /&gt;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......&lt;br /&gt;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... &lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;ExN02SteppingVerbose.hh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;G4SteppingManager.hh&amp;quot;&lt;br /&gt;
#include &amp;quot;G4UnitsTable.hh&amp;quot;&lt;br /&gt;
int event_count=0;&lt;br /&gt;
int trigger=0;&lt;br /&gt;
int flag=0;&lt;br /&gt;
double Theta,theta;&lt;br /&gt;
double Phi;&lt;br /&gt;
&lt;br /&gt;
double x_0,x_1;&lt;br /&gt;
double y_0,y_1;&lt;br /&gt;
double z_0,z_1;&lt;br /&gt;
&lt;br /&gt;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......&lt;br /&gt;
ExN02SteppingVerbose::ExN02SteppingVerbose()&lt;br /&gt;
{&lt;br /&gt;
  outfile.open(&amp;quot;MollerShield.dat&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......&lt;br /&gt;
&lt;br /&gt;
ExN02SteppingVerbose::~ExN02SteppingVerbose()&lt;br /&gt;
{&lt;br /&gt;
  outfile.close();&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......&lt;br /&gt;
&lt;br /&gt;
void ExN02SteppingVerbose::StepInfo()&lt;br /&gt;
{&lt;br /&gt;
  CopyState();&lt;br /&gt;
  &lt;br /&gt;
const G4VProcess* process  = fStep-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep();&lt;br /&gt;
        G4String procName = &amp;quot; UserLimit&amp;quot;;&lt;br /&gt;
        if (process) procName = process-&amp;gt;GetProcessName();&lt;br /&gt;
        if (fStepStatus == fWorldBoundary) procName = &amp;quot;OutOfWorld&amp;quot;;&lt;br /&gt;
if(fTrack-&amp;gt;GetDefinition()-&amp;gt;GetPDGEncoding()==11 &amp;amp;&amp;amp; fTrack-&amp;gt;GetParentID()==0 &amp;amp;&amp;amp; flag==0)&lt;br /&gt;
    {&lt;br /&gt;
        x_1=fTrack-&amp;gt;GetPosition().x();&lt;br /&gt;
        y_1=fTrack-&amp;gt;GetPosition().y();&lt;br /&gt;
        z_1=fTrack-&amp;gt;GetPosition().z();&lt;br /&gt;
&lt;br /&gt;
        Theta=sqrt((x_1-x_0)*(x_1-x_0)+(y_1-y_0)*(y_1-y_0)+(z_1-z_0)*(z_1-z_0));&lt;br /&gt;
        Theta=acos((z_1-z_0)/Theta)*180/3.14159265359;  &lt;br /&gt;
&lt;br /&gt;
        theta=sqrt((fTrack-&amp;gt;GetMomentum().x())*(fTrack-&amp;gt;GetMomentum().x())+(fTrack-&amp;gt;GetMomentum().y())*(fTrack-&amp;gt;GetMomentum().y())+(fTrack-&amp;gt;GetMomentum().z())*(fTrack-&amp;gt;GetMomentum().z()));&lt;br /&gt;
        theta=acos((fTrack-&amp;gt;GetMomentum().z())/theta)*180/3.14159265359;  &lt;br /&gt;
&lt;br /&gt;
        Phi=sqrt((fTrack-&amp;gt;GetMomentum().x())*(fTrack-&amp;gt;GetMomentum().x())+(fTrack-&amp;gt;GetMomentum().y())*(fTrack-&amp;gt;GetMomentum().y()));&lt;br /&gt;
        Phi=acos((fTrack-&amp;gt;GetMomentum().x())/Phi)*180/3.14159265359;  &lt;br /&gt;
        if(fTrack-&amp;gt;GetMomentum().y()&amp;lt;0)&lt;br /&gt;
                Phi=-Phi;&lt;br /&gt;
&lt;br /&gt;
        outfile &amp;lt;&amp;lt; std::setw(5) &amp;lt;&amp;lt; fTrack-&amp;gt;GetCurrentStepNumber() &amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetPosition().x(),&amp;quot;Length&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetPosition().y(),&amp;quot;Length&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetPosition().z(),&amp;quot;Length&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetMomentum().x(),&amp;quot;Energy&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetMomentum().y(),&amp;quot;Energy&amp;quot;) &lt;br /&gt;
          &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetMomentum().z(),&amp;quot;Energy&amp;quot;)  &lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetKineticEnergy(),&amp;quot;Energy&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(15) &amp;lt;&amp;lt; G4BestUnit(fStep-&amp;gt;GetTotalEnergyDeposit(),&amp;quot;Energy&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fStep-&amp;gt;GetStepLength(),&amp;quot;Length&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetTrackLength(),&amp;quot;Length&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; fTrack-&amp;gt;GetVolume()-&amp;gt;GetName()&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(15) &amp;lt;&amp;lt; procName&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(4)&amp;lt;&amp;lt; std::setw(10) &amp;lt;&amp;lt; Theta&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(4)&amp;lt;&amp;lt; std::setw(10) &amp;lt;&amp;lt; theta&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(4)&amp;lt;&amp;lt; std::setw(10) &amp;lt;&amp;lt; Phi&lt;br /&gt;
           &amp;lt;&amp;lt; G4endl;        &lt;br /&gt;
&lt;br /&gt;
        if(fTrack-&amp;gt;GetVolume()-&amp;gt;GetName()==&amp;quot;Tracker&amp;quot;)&lt;br /&gt;
                flag=1;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......&lt;br /&gt;
&lt;br /&gt;
void ExN02SteppingVerbose::TrackingStarted()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
CopyState();&lt;br /&gt;
G4int prec = G4cout.precision(17);&lt;br /&gt;
&lt;br /&gt;
if( verboseLevel &amp;gt; 0 )&lt;br /&gt;
        {&lt;br /&gt;
        &lt;br /&gt;
        flag=0;&lt;br /&gt;
&lt;br /&gt;
    outfile &amp;lt;&amp;lt; &amp;quot;Event # &amp;quot; &amp;lt;&amp;lt; event_count &amp;lt;&amp;lt; G4endl;&lt;br /&gt;
    outfile &amp;lt;&amp;lt; std::setw( 5) &amp;lt;&amp;lt; &amp;quot;Step#&amp;quot;      &amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; &amp;quot;X&amp;quot;          &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; &amp;quot;Y&amp;quot;          &amp;lt;&amp;lt; &amp;quot;    &amp;quot;  &lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; &amp;quot;Z&amp;quot;          &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; &amp;quot;Px&amp;quot;          &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; &amp;quot;Py&amp;quot;          &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; &amp;quot;Pz&amp;quot;          &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; &amp;quot;KineE&amp;quot;      &amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(15) &amp;lt;&amp;lt; &amp;quot;dEStep&amp;quot;     &amp;lt;&amp;lt; &amp;quot; &amp;quot;  &lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(15) &amp;lt;&amp;lt; &amp;quot;StepLeng&amp;quot;  &lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(15) &amp;lt;&amp;lt; &amp;quot;TrakLeng&amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; &amp;quot;Volume&amp;quot;     &amp;lt;&amp;lt; &amp;quot;  &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(15) &amp;lt;&amp;lt; &amp;quot;Process&amp;quot;   &amp;lt;&amp;lt; &amp;quot;  &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(12) &amp;lt;&amp;lt; &amp;quot;Theta(pos)&amp;quot;  &amp;lt;&amp;lt; &amp;quot;  &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(8) &amp;lt;&amp;lt; &amp;quot;theta(mom)&amp;quot; &amp;lt;&amp;lt; &amp;quot;  &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(8) &amp;lt;&amp;lt; &amp;quot;Phi(pos)&amp;quot; &amp;lt;&amp;lt; G4endl;             &lt;br /&gt;
&lt;br /&gt;
        x_0=fTrack-&amp;gt;GetPosition().x();&lt;br /&gt;
        y_0=fTrack-&amp;gt;GetPosition().y();&lt;br /&gt;
        z_0=fTrack-&amp;gt;GetPosition().z();&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
&lt;br /&gt;
   outfile &amp;lt;&amp;lt; std::setw(5) &amp;lt;&amp;lt; fTrack-&amp;gt;GetCurrentStepNumber() &amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetPosition().x(),&amp;quot;Length&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetPosition().y(),&amp;quot;Length&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetPosition().z(),&amp;quot;Length&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetMomentum().x(),&amp;quot;Energy&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetMomentum().y(),&amp;quot;Energy&amp;quot;) &lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetMomentum().z(),&amp;quot;Energy&amp;quot;)  &lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetKineticEnergy(),&amp;quot;Energy&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(15) &amp;lt;&amp;lt; G4BestUnit(fStep-&amp;gt;GetTotalEnergyDeposit(),&amp;quot;Energy&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fStep-&amp;gt;GetStepLength(),&amp;quot;Length&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setprecision(7)&amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; G4BestUnit(fTrack-&amp;gt;GetTrackLength(),&amp;quot;Length&amp;quot;)&lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(9) &amp;lt;&amp;lt; fTrack-&amp;gt;GetVolume()-&amp;gt;GetName()&lt;br /&gt;
           &amp;lt;&amp;lt; &amp;quot;   initStep&amp;quot; &lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(12) &amp;lt;&amp;lt; &amp;quot;NA&amp;quot;          &lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(12) &amp;lt;&amp;lt; &amp;quot;NA&amp;quot; &lt;br /&gt;
           &amp;lt;&amp;lt; std::setw(10) &amp;lt;&amp;lt; &amp;quot;NA&amp;quot; &amp;lt;&amp;lt;   G4endl;        &lt;br /&gt;
        event_count++;&lt;br /&gt;
         &lt;br /&gt;
        }&lt;br /&gt;
  G4cout.precision(prec);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vanwdani</name></author>
	</entry>
</feed>