Import Geant4 7.0.0 source tree
This commit is contained in:
@@ -20,27 +20,24 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: TrackingAction.cc,v 1.7 2004/03/31 11:35:00 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
// $Id: TrackingAction.cc,v 1.8 2004/07/23 15:39:40 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "TrackingAction.hh"
|
||||
#include "PrimaryGeneratorAction.hh"
|
||||
#include "RunAction.hh"
|
||||
#include "HistoManager.hh"
|
||||
|
||||
#include "G4Track.hh"
|
||||
|
||||
#ifdef USE_AIDA
|
||||
#include "AIDA/IHistogram1D.h"
|
||||
#endif
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
TrackingAction::TrackingAction(RunAction* RunAct)
|
||||
:runAction(RunAct)
|
||||
TrackingAction::TrackingAction(PrimaryGeneratorAction* prim, RunAction* run,
|
||||
HistoManager* histo)
|
||||
:primary(prim), runAction(run), histoManager(histo)
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -60,22 +57,28 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
|
||||
//increase nb of processed tracks
|
||||
//count nb of steps of this track
|
||||
G4int nbSteps = aTrack->GetCurrentStepNumber();
|
||||
|
||||
G4double Trleng = aTrack->GetTrackLength();
|
||||
|
||||
if (aTrack->GetDefinition()->GetPDGCharge() == 0.) {
|
||||
runAction->CountTraks0(1);
|
||||
runAction->CountSteps0(nbSteps);
|
||||
|
||||
} else {
|
||||
|
||||
runAction->CountTraks1(1);
|
||||
runAction->CountSteps1(nbSteps);
|
||||
|
||||
#ifdef USE_AIDA
|
||||
G4double Trleng = aTrack->GetTrackLength();
|
||||
runAction->GetHisto(0)->fill(Trleng);
|
||||
runAction->GetHisto(1)->fill((float)nbSteps);
|
||||
#endif
|
||||
}
|
||||
histoManager->FillHisto(1,Trleng);
|
||||
histoManager->FillHisto(2,(float)nbSteps);
|
||||
}
|
||||
|
||||
//csda and projected ranges for primary particle
|
||||
if (aTrack->GetTrackID() == 1) {
|
||||
runAction->AddCsdaRange(Trleng);
|
||||
G4ThreeVector vertex = primary->GetParticleGun()->GetParticlePosition();
|
||||
G4ThreeVector position = aTrack->GetPosition() - vertex;
|
||||
runAction->AddProjRange(position.x());
|
||||
runAction->AddTransvDev(position.y());
|
||||
runAction->AddTransvDev(position.z());
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user