musrSteppingAction.cc

Go to the documentation of this file.
00001 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00002 
00003 #include "musrSteppingAction.hh"
00004 #include "G4SteppingManager.hh"
00005 #include "G4UnitsTable.hh"
00006 
00007 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00008 
00009 musrSteppingAction::musrSteppingAction()
00010 { 
00011  pointer=this;
00012 }
00013 
00014 musrSteppingAction::~musrSteppingAction()
00015 { 
00016  ;
00017 }
00018 
00019 
00020  musrSteppingAction* musrSteppingAction::pointer=0;
00021  musrSteppingAction* musrSteppingAction::GetInstance()
00022 {
00023   return pointer;
00024   }
00025 
00026 
00027 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00028 
00029 void musrSteppingAction::UserSteppingAction(const G4Step* aStep)
00030 { 
00031   G4String p_name;
00032   if (aStep->GetTrack()->GetDefinition())
00033     {
00034     p_name=aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetParticleName();
00035 
00036     if (p_name == "mu+")
00037       {
00038     G4ThreeVector position = aStep->GetPostStepPoint()->GetPosition();
00039     //    G4double tof=aStep->GetTrack()->GetLocalTime();
00040     //    G4double energy=aStep->GetTrack()->GetDynamicParticle()->GetKineticEnergy();
00041     G4ThreeVector polarization=aStep->GetTrack()->GetDynamicParticle()->GetPolarization();
00042 
00043     //      G4cout << "Stepping action: mu+ properties \n"
00044     //       << "position "      << G4BestUnit(position,"Length") <<"; \n"
00045     //        << "time of flight " << G4BestUnit(tof,"Time")        <<"; \n"
00046     //        << "kinetic energy  "<< G4BestUnit(energy,"Energy")   <<"; \n"
00047     //        <<  "polarization   "<< polarization <<";\n"
00048     //       <<G4endl;
00049       }
00050 
00051     }
00052 
00053 }
00054 
00055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00056 

Generated on Mon Mar 27 12:19:54 2006 for MUSR by  doxygen 1.4.6