Ignore:
Timestamp:
Nov 5, 2010, 4:08:39 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/extended/electromagnetic/TestEm14/src/SteppingAction.cc

    r1337 r1342  
    2424// ********************************************************************
    2525//
    26 // $Id: SteppingAction.cc,v 1.6 2010/04/02 13:22:02 maire Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: SteppingAction.cc,v 1.7 2010/10/13 13:42:33 vnivanch Exp $
     27// GEANT4 tag $Name: examples-V09-03-09 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3434#include "RunAction.hh"
    3535#include "HistoManager.hh"
    36 
    3736#include "G4RunManager.hh"
    3837
     
    5352void SteppingAction::UserSteppingAction(const G4Step* aStep)
    5453{
    55   G4StepPoint* endPoint = aStep->GetPostStepPoint();
     54  const G4StepPoint* endPoint = aStep->GetPostStepPoint();
    5655  G4String procName = endPoint->GetProcessDefinedStep()->GetProcessName();     
    5756  G4bool transmit = (endPoint->GetStepStatus() <= fGeomBoundary); 
    58   if (transmit) runAction->CountProcesses(procName);
     57  if (transmit) { runAction->CountProcesses(procName); }
    5958  else {                         
    6059    //count real processes and sum track length
     
    8281  //secondaries
    8382  //
    84   G4TrackVector* secondary = fpSteppingManager->GetSecondary();
     83  const G4TrackVector* secondary = fpSteppingManager->GetSecondary();
    8584  for (size_t lp=0; lp<(*secondary).size(); lp++) {
    8685    G4double charge = (*secondary)[lp]->GetDefinition()->GetPDGCharge();
    87     if (charge != 0.) id = 3; else id = 5;
     86    if (charge != 0.) { id = 3; } else { id = 5; }
    8887    G4double energy = (*secondary)[lp]->GetKineticEnergy();
    8988    histoManager->FillHisto(id,energy);
    9089
    91     id++;
     90    ++id;
    9291    G4ThreeVector direction = (*secondary)[lp]->GetMomentumDirection();     
    9392    G4double costeta = direction.x();
     
    9594     
    9695    //energy tranferred to charged secondaries
    97     if (charge != 0.) runAction->SumeTransf(energy);         
     96    if (charge != 0.) { runAction->SumeTransf(energy); }         
    9897  }
    9998         
Note: See TracChangeset for help on using the changeset viewer.