Import Geant4 6.0.0 source tree
This commit is contained in:
@@ -58,17 +58,30 @@ void ExN04EventAction::BeginOfEventAction(const G4Event*)
|
||||
calorimeterCollID = SDman->GetCollectionID(colNam="calCollection");
|
||||
muonCollID = SDman->GetCollectionID(colNam="muonCollection");
|
||||
}
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
if(pVVisManager)
|
||||
{
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/vis/draw/current");
|
||||
}
|
||||
}
|
||||
|
||||
void ExN04EventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
G4cout << ">>> Event " << evt->GetEventID() << G4endl;
|
||||
|
||||
|
||||
// get number of stored trajectories
|
||||
//
|
||||
G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
G4int n_trajectories = 0;
|
||||
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
|
||||
|
||||
// extract the trajectories and draw them
|
||||
//
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
{
|
||||
for (G4int i=0; i<n_trajectories; i++)
|
||||
{ G4Trajectory* trj = (G4Trajectory*)
|
||||
((*(evt->GetTrajectoryContainer()))[i]);
|
||||
trj->DrawTrajectory(50);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(trackerCollID<0||calorimeterCollID<0||muonCollID<0) return;
|
||||
|
||||
G4HCofThisEvent * HCE = evt->GetHCofThisEvent();
|
||||
@@ -105,16 +118,5 @@ void ExN04EventAction::EndOfEventAction(const G4Event* evt)
|
||||
G4cout << " " << n_hit
|
||||
<< " hits are stored in ExN04MuonHitsCollection." << G4endl;
|
||||
}
|
||||
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
if(pVVisManager)
|
||||
{
|
||||
if(THC) THC->DrawAllHits();
|
||||
if(CHC) CHC->DrawAllHits();
|
||||
if(MHC) MHC->DrawAllHits();
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/vis/show/view");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user