Import Geant4 10.2.0 source tree
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: F04EventAction.cc 78002 2013-12-02 08:25:49Z gcosmo $
|
||||
// $Id: F04EventAction.cc 90239 2015-05-21 09:07:05Z gcosmo $
|
||||
//
|
||||
/// \file field/field04/src/F04EventAction.cc
|
||||
/// \brief Implementation of the F04EventAction class
|
||||
@@ -40,13 +40,13 @@
|
||||
#include "G4Trajectory.hh"
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F04EventAction::F04EventAction(F04RunAction* runAction)
|
||||
: fRunaction(runAction), fVerboselevel(0),
|
||||
fPrintModulo(10), fDrawFlag("all")
|
||||
: fRunaction(runAction), fVerboseLevel(0)
|
||||
{
|
||||
fEventMessenger = new F04EventActionMessenger(this);
|
||||
}
|
||||
@@ -63,37 +63,18 @@ F04EventAction::~F04EventAction()
|
||||
void F04EventAction::BeginOfEventAction(const G4Event* evt)
|
||||
{
|
||||
G4int evtNb = evt->GetEventID();
|
||||
if (evtNb%fPrintModulo == 0)
|
||||
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
|
||||
|
||||
if(fVerboselevel>0)
|
||||
if(fVerboseLevel>0)
|
||||
G4cout << "<<< Event " << evtNb << " started." << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4Threading.hh"
|
||||
|
||||
void F04EventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
// G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
//
|
||||
// if(pVVisManager)
|
||||
// {
|
||||
// G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
//
|
||||
// G4int n_trajectories = 0;
|
||||
//
|
||||
// if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
|
||||
// for(G4int i=0; i<n_trajectories; i++)
|
||||
// { G4Trajectory* trj =
|
||||
// (G4Trajectory *)((*(evt->GetTrajectoryContainer()))[i]);
|
||||
// if (fDrawFlag == "all") trj->DrawTrajectory();
|
||||
// else if ((fDrawFlag == "charged")&&(trj->GetCharge() != 0.))
|
||||
// trj->DrawTrajectory();
|
||||
// }
|
||||
// }
|
||||
|
||||
if (fVerboselevel>0)
|
||||
if (fVerboseLevel>0)
|
||||
G4cout << "<<< Event " << evt->GetEventID() << " ended." << G4endl;
|
||||
|
||||
if (fRunaction->GetRndmFreq() == 2)
|
||||
@@ -101,12 +82,6 @@ void F04EventAction::EndOfEventAction(const G4Event* evt)
|
||||
std::ostringstream os;
|
||||
os<<"endOfEvent_"<<G4Threading::G4GetThreadId()<<".rndm";
|
||||
G4Random::saveEngineStatus(os.str().c_str());
|
||||
G4int evtNb = evt->GetEventID();
|
||||
if (evtNb%fPrintModulo == 0)
|
||||
{
|
||||
G4cout << "\n---> End of Event: " << evtNb << G4endl;
|
||||
G4Random::showEngineStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,13 +89,12 @@ void F04EventAction::EndOfEventAction(const G4Event* evt)
|
||||
|
||||
G4int F04EventAction::GetEventNo()
|
||||
{
|
||||
G4int evno = fpEventManager->GetConstCurrentEvent()->GetEventID();
|
||||
return evno ;
|
||||
return fpEventManager->GetConstCurrentEvent()->GetEventID();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F04EventAction::SetEventVerbose(G4int level)
|
||||
{
|
||||
fVerboselevel = level ;
|
||||
fVerboseLevel = level ;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: F04EventActionMessenger.cc 68021 2013-03-13 13:36:07Z gcosmo $
|
||||
// $Id: F04EventActionMessenger.cc 90239 2015-05-21 09:07:05Z gcosmo $
|
||||
//
|
||||
/// \file field/field04/src/F04EventActionMessenger.cc
|
||||
/// \brief Implementation of the F04EventActionMessenger class
|
||||
@@ -31,9 +31,7 @@
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
|
||||
#include "F04EventAction.hh"
|
||||
#include "F04EventActionMessenger.hh"
|
||||
@@ -47,20 +45,6 @@ F04EventActionMessenger::F04EventActionMessenger(F04EventAction* eventAction)
|
||||
fSetVerboseCmd->SetGuidance("Set verbose level ." );
|
||||
fSetVerboseCmd->SetParameterName("level",true);
|
||||
fSetVerboseCmd->SetDefaultValue(0);
|
||||
|
||||
fDrawCmd = new G4UIcmdWithAString("/event/drawTracks",this);
|
||||
fDrawCmd->SetGuidance("Draw the tracks in the event");
|
||||
fDrawCmd->SetGuidance(" Choice : none,charged, all");
|
||||
fDrawCmd->SetParameterName("choice",true);
|
||||
fDrawCmd->SetDefaultValue("all");
|
||||
fDrawCmd->SetCandidates("none charged all");
|
||||
fDrawCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
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......
|
||||
@@ -68,8 +52,6 @@ F04EventActionMessenger::F04EventActionMessenger(F04EventAction* eventAction)
|
||||
F04EventActionMessenger::~F04EventActionMessenger()
|
||||
{
|
||||
delete fSetVerboseCmd;
|
||||
delete fDrawCmd;
|
||||
delete fPrintCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -79,9 +61,4 @@ void F04EventActionMessenger::
|
||||
{
|
||||
if(command == fSetVerboseCmd)
|
||||
fEventAction->SetEventVerbose(fSetVerboseCmd->GetNewIntValue(newValue));
|
||||
|
||||
if(command == fDrawCmd)fEventAction->SetDrawFlag(newValue);
|
||||
|
||||
if(command == fPrintCmd)
|
||||
fEventAction->SetPrintModulo(fPrintCmd->GetNewIntValue(newValue));
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: F04Trajectory.cc 76690 2013-11-14 08:45:07Z gcosmo $
|
||||
// $Id: F04Trajectory.cc 90239 2015-05-21 09:07:05Z gcosmo $
|
||||
//
|
||||
/// \file field/field04/src/F04Trajectory.cc
|
||||
/// \brief Implementation of the F04Trajectory class
|
||||
@@ -112,15 +112,6 @@ void F04Trajectory::ShowTrajectory(std::ostream& os) const
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F04Trajectory::DrawTrajectory() const
|
||||
{
|
||||
// Invoke the default implementation in G4VTrajectory...
|
||||
G4VTrajectory::DrawTrajectory();
|
||||
// ... or override with your own code here.
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F04Trajectory::AppendStep(const G4Step* aStep)
|
||||
{
|
||||
fpPointsContainer->push_back(new F04TrajectoryPoint(aStep));
|
||||
|
||||
Reference in New Issue
Block a user