Skip to content
Snippets Groups Projects
Commit 4d5dedd8 authored by Chad Lantz's avatar Chad Lantz
Browse files

Removed unnecessary processing

parent 70d1a014
No related branches found
No related tags found
1 merge request!1Segmented lg
......@@ -46,9 +46,7 @@ class SteppingAction : public G4UserSteppingAction
virtual void UserSteppingAction(const G4Step*);
private:
G4int fScintillationCounter;
G4int fCerenkovCounter;
G4int fEventNumber;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......
......@@ -41,50 +41,19 @@
SteppingAction::SteppingAction()
: G4UserSteppingAction()
{
fScintillationCounter = 0;
fCerenkovCounter = 0;
fEventNumber = -1;
}
/*
*/
SteppingAction::~SteppingAction()
{ ; }
{
}
/*
*/
void SteppingAction::UserSteppingAction(const G4Step* step)
{
G4int eventNumber = G4RunManager::GetRunManager()->
GetCurrentEvent()->GetEventID();
if (eventNumber != fEventNumber) {
fEventNumber = eventNumber;
fScintillationCounter = 0;
fCerenkovCounter = 0;
}
G4Track* track = step->GetTrack();
G4String ParticleName = track->GetDynamicParticle()->
GetParticleDefinition()->GetParticleName();
if (ParticleName == "opticalphoton") return;
const std::vector<const G4Track*>* secondaries =
step->GetSecondaryInCurrentStep();
if (secondaries->size()>0) {
for(unsigned int i=0; i<secondaries->size(); ++i) {
if (secondaries->at(i)->GetParentID()>0) {
if(secondaries->at(i)->GetDynamicParticle()->GetParticleDefinition()
== G4OpticalPhoton::OpticalPhotonDefinition()){
if (secondaries->at(i)->GetCreatorProcess()->GetProcessName()
== "Scintillation")fScintillationCounter++;
if (secondaries->at(i)->GetCreatorProcess()->GetProcessName()
== "Cerenkov")fCerenkovCounter++;
}
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment