Import Geant4 10.2.0 source tree
This commit is contained in:
@@ -27,77 +27,48 @@
|
||||
/// \brief Implementation of the F01EventAction class
|
||||
//
|
||||
//
|
||||
// $Id: F01EventAction.cc 76248 2013-11-08 11:19:52Z gcosmo $
|
||||
// $Id: F01EventAction.cc 92496 2015-09-02 07:22:25Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "F01EventAction.hh"
|
||||
|
||||
#include "F01RunAction.hh"
|
||||
|
||||
#include "F01CalorHit.hh"
|
||||
#include "F01EventActionMessenger.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4EventManager.hh"
|
||||
#include "G4HCofThisEvent.hh"
|
||||
#include "G4VHitsCollection.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01EventAction::F01EventAction(F01RunAction* action)
|
||||
: G4UserEventAction(),
|
||||
fCalorimeterCollID(-1),
|
||||
fEventMessenger(0),
|
||||
fRunAction(action),
|
||||
fVerboseLevel(0),
|
||||
fPrintModulo(10000)
|
||||
{
|
||||
fEventMessenger = new F01EventActionMessenger(this);
|
||||
}
|
||||
fRunAction(action)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01EventAction::~F01EventAction()
|
||||
{
|
||||
delete fEventMessenger;
|
||||
}
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F01EventAction::BeginOfEventAction(const G4Event* evt)
|
||||
{
|
||||
G4int evtNb = evt->GetEventID();
|
||||
if (evtNb%fPrintModulo == 0)
|
||||
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
|
||||
|
||||
if (fVerboseLevel>1)
|
||||
G4cout << "<<< Event " << evtNb << " started." << G4endl;
|
||||
|
||||
if (fCalorimeterCollID==-1)
|
||||
{
|
||||
G4SDManager * sdManager = G4SDManager::GetSDMpointer();
|
||||
fCalorimeterCollID = sdManager->GetCollectionID("CalCollection");
|
||||
}
|
||||
}
|
||||
void F01EventAction::BeginOfEventAction(const G4Event*)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F01EventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
if (fVerboseLevel>0)
|
||||
G4cout << "<<< Event " << evt->GetEventID() << " ended." << G4endl;
|
||||
|
||||
// save rndm status
|
||||
if (fRunAction->GetRndmFreq() == 2)
|
||||
{
|
||||
G4Random::saveEngineStatus("endOfEvent.rndm");
|
||||
|
||||
G4int evtNb = evt->GetEventID();
|
||||
if (evtNb%fPrintModulo == 0)
|
||||
G4int printProgress = G4RunManager::GetRunManager()->GetPrintProgress();
|
||||
if (evtNb%printProgress == 0)
|
||||
{
|
||||
G4cout << "\n---> End of Event: " << evtNb << G4endl;
|
||||
G4Random::showEngineStatus();
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file field/field01/src/F01EventActionMessenger.cc
|
||||
/// \brief Implementation of the F01EventActionMessenger class
|
||||
//
|
||||
//
|
||||
// $Id: F01EventActionMessenger.cc 76248 2013-11-08 11:19:52Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "F01EventActionMessenger.hh"
|
||||
|
||||
#include "F01EventAction.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01EventActionMessenger::F01EventActionMessenger(F01EventAction* evAct)
|
||||
: G4UImessenger(),
|
||||
fEventAction(evAct),
|
||||
fSetVerboseCmd(0),
|
||||
fPrintCmd(0)
|
||||
{
|
||||
fSetVerboseCmd = new G4UIcmdWithAnInteger("/event/setverbose",this);
|
||||
fSetVerboseCmd->SetGuidance("Set verbose level .");
|
||||
fSetVerboseCmd->SetParameterName("level",true);
|
||||
fSetVerboseCmd->SetDefaultValue(0);
|
||||
|
||||
fPrintCmd = new G4UIcmdWithAnInteger("/event/printModulo",this);
|
||||
fPrintCmd->SetGuidance("Print events modulo n");
|
||||
fPrintCmd->SetParameterName("EventNb",false);
|
||||
fPrintCmd->SetRange("EventNb>0");
|
||||
fPrintCmd->AvailableForStates(G4State_Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01EventActionMessenger::~F01EventActionMessenger()
|
||||
{
|
||||
delete fSetVerboseCmd;
|
||||
delete fPrintCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F01EventActionMessenger::SetNewValue(G4UIcommand * command,
|
||||
G4String newValue)
|
||||
{
|
||||
if(command == fSetVerboseCmd)
|
||||
{fEventAction->SetEventVerbose(fSetVerboseCmd->GetNewIntValue(newValue));}
|
||||
|
||||
if(command == fPrintCmd)
|
||||
{fEventAction->SetPrintModulo(fPrintCmd->GetNewIntValue(newValue));}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -27,7 +27,7 @@
|
||||
/// \brief Implementation of the F01FieldSetup class
|
||||
//
|
||||
//
|
||||
// $Id: F01FieldSetup.cc 77115 2013-11-21 15:06:37Z gcosmo $
|
||||
// $Id: F01FieldSetup.cc 90341 2015-05-26 08:38:36Z gcosmo $
|
||||
//
|
||||
// User Field setup class implementation.
|
||||
//
|
||||
@@ -56,6 +56,10 @@
|
||||
#include "G4HelixSimpleRunge.hh"
|
||||
#include "G4CashKarpRKF45.hh"
|
||||
#include "G4RKG3_Stepper.hh"
|
||||
#include "G4ConstRK4.hh"
|
||||
#include "G4NystromRK4.hh"
|
||||
#include "G4HelixMixedStepper.hh"
|
||||
#include "G4ExactHelixStepper.hh"
|
||||
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
@@ -129,6 +133,9 @@ void F01FieldSetup::CreateStepperAndChordFinder()
|
||||
{
|
||||
// Update field
|
||||
|
||||
G4cout<< " F01FieldSetup::CreateStepperAndChordFinder() called "
|
||||
<< " to reset Stepper." << G4endl;
|
||||
|
||||
SetStepper();
|
||||
G4cout<<"The minimal step is equal to "<<fMinStep/mm<<" mm"<<G4endl;
|
||||
|
||||
@@ -153,45 +160,64 @@ void F01FieldSetup::SetStepper()
|
||||
{
|
||||
case 0:
|
||||
fStepper = new G4ExplicitEuler( fEquation );
|
||||
G4cout<<"G4ExplicitEuler is calledS"<<G4endl;
|
||||
G4cout<<"G4ExplicitEuler is chosen."<<G4endl;
|
||||
break;
|
||||
case 1:
|
||||
fStepper = new G4ImplicitEuler( fEquation );
|
||||
G4cout<<"G4ImplicitEuler is called"<<G4endl;
|
||||
G4cout<<"G4ImplicitEuler is chosen"<<G4endl;
|
||||
break;
|
||||
case 2:
|
||||
fStepper = new G4SimpleRunge( fEquation );
|
||||
G4cout<<"G4SimpleRunge is called"<<G4endl;
|
||||
G4cout<<"G4SimpleRunge is chosen"<<G4endl;
|
||||
break;
|
||||
case 3:
|
||||
fStepper = new G4SimpleHeum( fEquation );
|
||||
G4cout<<"G4SimpleHeum is called"<<G4endl;
|
||||
G4cout<<"G4SimpleHeum is chosen"<<G4endl;
|
||||
break;
|
||||
case 4:
|
||||
fStepper = new G4ClassicalRK4( fEquation );
|
||||
G4cout<<"G4ClassicalRK4 (default) is called"<<G4endl;
|
||||
G4cout<<"G4ClassicalRK4 (default) is chosen"<<G4endl;
|
||||
break;
|
||||
case 5:
|
||||
fStepper = new G4HelixExplicitEuler( fEquation );
|
||||
G4cout<<"G4HelixExplicitEuler is called"<<G4endl;
|
||||
G4cout<<"G4HelixExplicitEuler is chosen"<<G4endl;
|
||||
break;
|
||||
case 6:
|
||||
fStepper = new G4HelixImplicitEuler( fEquation );
|
||||
G4cout<<"G4HelixImplicitEuler is called"<<G4endl;
|
||||
G4cout<<"G4HelixImplicitEuler is chosen"<<G4endl;
|
||||
break;
|
||||
case 7:
|
||||
fStepper = new G4HelixSimpleRunge( fEquation );
|
||||
G4cout<<"G4HelixSimpleRunge is called"<<G4endl;
|
||||
G4cout<<"G4HelixSimpleRunge is chosen"<<G4endl;
|
||||
break;
|
||||
case 8:
|
||||
fStepper = new G4CashKarpRKF45( fEquation );
|
||||
G4cout<<"G4CashKarpRKF45 is called"<<G4endl;
|
||||
G4cout<<"G4CashKarpRKF45 is chosen"<<G4endl;
|
||||
break;
|
||||
case 9:
|
||||
fStepper = new G4RKG3_Stepper( fEquation );
|
||||
G4cout<<"G4RKG3_Stepper is called"<<G4endl;
|
||||
G4cout<<"G4RKG3_Stepper is chosen"<<G4endl;
|
||||
break;
|
||||
case 10:
|
||||
fStepper = new G4ExactHelixStepper( fEquation );
|
||||
G4cout<<"G4ExactHelixStepper is chosen"<<G4endl;
|
||||
break;
|
||||
case 11:
|
||||
fStepper = new G4HelixMixedStepper( fEquation );
|
||||
G4cout<<"G4HelixMixedStepper is chosen"<<G4endl;
|
||||
break;
|
||||
case 12:
|
||||
fStepper = new G4ConstRK4( fEquation );
|
||||
G4cout<<"G4ConstRK4 Stepper is chosen"<<G4endl;
|
||||
break;
|
||||
case 13:
|
||||
fStepper = new G4NystromRK4( fEquation );
|
||||
G4cout<<" G4NystromRK4 Stepper is chosen"<<G4endl;
|
||||
break;
|
||||
default: // fStepper = 4;
|
||||
fStepper = new G4ClassicalRK4( fEquation );
|
||||
G4cout<<"G4ClassicalRK4 Stepper (default) is chosen"<<G4endl;
|
||||
break;
|
||||
default: fStepper = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/// \brief Implementation of the F01RunAction class
|
||||
//
|
||||
//
|
||||
// $Id: F01RunAction.cc 76248 2013-11-08 11:19:52Z gcosmo $
|
||||
// $Id: F01RunAction.cc 92496 2015-09-02 07:22:25Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -61,10 +61,8 @@ F01RunAction::~F01RunAction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F01RunAction::BeginOfRunAction(const G4Run* run)
|
||||
void F01RunAction::BeginOfRunAction(const G4Run*)
|
||||
{
|
||||
G4cout << "### Run " << run->GetRunID() << " start." << G4endl;
|
||||
|
||||
// save Rndm status
|
||||
if (fSaveRndm > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user