00001 00002 /* 00003 * 00004 * Copyright: Mathieu Trocme, mathieu.trocme@gmail.com (21 september 2009) 00005 * 00006 * This software is a computer program whose purpose is to: provide a universal Hit/SD output method in Geant4 with a proper Root coupling 00007 * 00008 * This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free software. 00009 * You can use, modify and/or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info". 00010 * As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability. 00011 * In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. 00012 * Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security. 00013 * 00014 * The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms. 00015 * 00016 */ 00017 00018 00019 // 00020 // Documentation : See doc.html (readme, main.cc, ...) 00021 // Convention : Root coding convention: TMyClass for classes, fMyVariable for class data members, kMyVariable for constants, gMyVariable for global variables 00022 // Help : http://www.lcsim.org/software/geant4/doxygen/html/classes.html 00023 // 00024 00025 00026 #ifndef TStandard_SD_hh 00027 #define TStandard_SD_hh 00028 00029 extern bool gMyDebug ; 00030 00031 00032 #include "G4VSensitiveDetector.hh" 00033 #include "G4HCofThisEvent.hh" 00034 #include "G4Step.hh" 00035 #include "G4SDManager.hh" 00036 #include "G4VProcess.hh" 00037 00038 #include "TStandard_Hit.hh" 00039 00040 00041 class TStandard_SD : public G4VSensitiveDetector 00042 { 00043 00044 private : 00045 00046 G4String fSDName ; 00047 THitsCollection* fHitsColl ; 00048 G4int fHitsColl_ID ; 00049 00050 G4String fParticleName ; 00051 G4int fZ, fA ; 00052 G4int fTrackID, fParentTrackID ; 00053 G4String fCreatorProcessName ; 00054 00055 G4double fEkin0 ; /// initial kinetic energy [MeV] 00056 G4ThreeVector fPosition0 ; /// initial position 00057 G4double fRx0, fRy0, fRz0 ; /// initial position [mum] 00058 G4ThreeVector fDirection0 ; /// initial direction 00059 G4double fTheta0, fPhi0 ; /// initial spherical angles [degree] 00060 00061 G4String fVolumeName ; 00062 G4double fEkin ; /// kinetic energy [MeV] 00063 G4double fEdep ; /// deposited energy [keV] 00064 G4double fDose ; /// dose [gray] 00065 G4double fRangeTot ; /// total range [mum] 00066 G4ThreeVector fPosition ; /// position 00067 G4double fRx, fRy, fRz ; /// position [mum] 00068 G4ThreeVector fDirection ; /// direction 00069 G4double fTheta, fPhi ; /// spherical angles [degree] 00070 G4double fGlobalTime, fLocalTime ; /// global/local time [ns] 00071 G4double fWeight ; /// weight 00072 00073 00074 public : 00075 00076 TStandard_SD ( G4String aSDName ) ; 00077 ~TStandard_SD () ; 00078 00079 void Initialize ( G4HCofThisEvent* aHCE ) ; 00080 G4bool ProcessHits ( G4Step* aStep , G4TouchableHistory* aTouchableHistory ) ; 00081 void EndOfEvent ( G4HCofThisEvent* aHCofThisEvent ) ; 00082 00083 } ; 00084 00085 00086 #endif