Difference between revisions of "Day5, 10/04/2011"
Jump to navigation
Jump to search
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[https://wiki.iac.isu.edu/index.php/Simulations_of_Particle_Interactions_with_Matter._Dr._Forest._Fall_2011 go back] | [https://wiki.iac.isu.edu/index.php/Simulations_of_Particle_Interactions_with_Matter._Dr._Forest._Fall_2011 go back] | ||
| + | |||
| + | /home/foretony/geant4/NucSim/Homewrk5 | ||
| + | |||
| + | |||
* gedit src/ExN02SteppingVerbose.cc | * gedit src/ExN02SteppingVerbose.cc | ||
| + | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... | ||
| + | |||
ExN02SteppingVerbose::ExN02SteppingVerbose() | ExN02SteppingVerbose::ExN02SteppingVerbose() | ||
{ | { | ||
| Line 13: | Line 19: | ||
outfile.close(); //added 10/4/11 | outfile.close(); //added 10/4/11 | ||
} | } | ||
| + | |||
| + | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... | ||
| + | |||
| + | void ExN02SteppingVerbose::StepInfo() | ||
| + | { | ||
| + | CopyState(); | ||
| + | |||
| + | G4int prec = G4cout.precision(3); | ||
| + | |||
| + | //outfile << "Roman Olga: " << fTrack->GetVolume()->GetName() << G4endl; //added 10/4/11 try for fun | ||
| + | //G4cout << "Roman Olga: " << fTrack->GetVolume()->GetName() << G4endl; //added 10/4/11 try for fun | ||
| + | |||
| + | |||
| + | // if( verboseLevel >= 1 ){ | ||
| + | if( fTrack->GetVolume()->GetName() =="World") | ||
| + | { | ||
| + | if(SigmaRoverR) | ||
| + | { | ||
| + | outfile << SigmaRoverR << G4endl; | ||
| + | G4cout << " R= " << SigmaRoverR << G4endl; | ||
| + | } | ||
| + | SigmaRoverR=0; | ||
| + | } | ||
| + | |||
| + | // if( fTrack->GetVolume()->GetName() =="Target" && fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName() == "hIoni"){ | ||
| + | if( fTrack->GetVolume()->GetName() =="Target" ){ | ||
| + | SigmaRoverR+=fStep->GetStepLength(); | ||
| + | |||
| + | } | ||
| − | |||
** void ExN02SteppingVerbose::TrackingStarted() print first step | ** void ExN02SteppingVerbose::TrackingStarted() print first step | ||
| Line 30: | Line 64: | ||
void StepInfo(); | void StepInfo(); | ||
void TrackingStarted(); | void TrackingStarted(); | ||
| + | |||
| + | Float SigmaRoverR; //added 10/4/11 | ||
| + | Float FinalEnergy; //added 10/4/11 | ||
| + | Float PreviousEnergy; //added 10/4/11 | ||
private: //added 10/4/11 | private: //added 10/4/11 | ||
| Line 35: | Line 73: | ||
}; | }; | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Latest revision as of 22:07, 4 October 2011
/home/foretony/geant4/NucSim/Homewrk5
- gedit src/ExN02SteppingVerbose.cc
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExN02SteppingVerbose::ExN02SteppingVerbose() {
outfile.open("sigmaR.txt"); //added 10/4/11
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExN02SteppingVerbose::~ExN02SteppingVerbose() {
outfile.close(); //added 10/4/11
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExN02SteppingVerbose::StepInfo() {
CopyState(); G4int prec = G4cout.precision(3);
//outfile << "Roman Olga: " << fTrack->GetVolume()->GetName() << G4endl; //added 10/4/11 try for fun //G4cout << "Roman Olga: " << fTrack->GetVolume()->GetName() << G4endl; //added 10/4/11 try for fun
// if( verboseLevel >= 1 ){
if( fTrack->GetVolume()->GetName() =="World")
{
if(SigmaRoverR)
{
outfile << SigmaRoverR << G4endl;
G4cout << " R= " << SigmaRoverR << G4endl;
}
SigmaRoverR=0;
}
// if( fTrack->GetVolume()->GetName() =="Target" && fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName() == "hIoni"){
if( fTrack->GetVolume()->GetName() =="Target" ){
SigmaRoverR+=fStep->GetStepLength();
}
- void ExN02SteppingVerbose::TrackingStarted() print first step
- gedit include/ExN02SteppingVerbose.hh
class ExN02SteppingVerbose : public G4SteppingVerbose {
public: ExN02SteppingVerbose(); ~ExN02SteppingVerbose();
void StepInfo(); void TrackingStarted();
Float SigmaRoverR; //added 10/4/11 Float FinalEnergy; //added 10/4/11 Float PreviousEnergy; //added 10/4/11
private: //added 10/4/11 std::ofstream outfile;
};