Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 /// \file field/field05/src/F05SteppingAction. 28 /// \brief Implementation of the F05SteppingAc 29 // 30 31 //....oooOO0OOooo........oooOO0OOooo........oo 32 //....oooOO0OOooo........oooOO0OOooo........oo 33 34 #include "F05SteppingAction.hh" 35 36 #include "G4ProcessTable.hh" 37 #include "G4Step.hh" 38 #include "G4SystemOfUnits.hh" 39 #include "G4Track.hh" 40 41 //....oooOO0OOooo........oooOO0OOooo........oo 42 43 void F05SteppingAction::UserSteppingAction(con 44 { 45 G4String processName = aStep->GetPostStepPoi 46 47 if (processName != "DecayWithSpin") { 48 G4Track* aTrack = aStep->GetTrack(); 49 50 G4String particleName = aStep->GetTrack()- 51 52 G4ThreeVector polDir = aTrack->GetPolariza 53 G4ThreeVector momDir = aTrack->GetMomentum 54 55 if (particleName == "mu+") { 56 if (momDir * polDir < (1. - 1.E-7)) { 57 G4double cos_theta = momDir * polDir; 58 G4double gTime = aTrack->GetGlobalTime 59 60 G4cout << " *** ERROR - WARNING *** " 61 G4cout << "processName: " << processNa 62 G4cout << "particleName " << particleN 63 G4cout << "Global Time: " << gTime / n 64 G4cout << "Angle between spin and mome 65 G4Exception("SteppingAction::UserStepp 66 "Angle between spin and mo 67 } 68 } 69 } 70 } 71