Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // 26 // >> 27 // $Id: XrayFluoAnalysisManager.hh >> 28 // GEANT4 tag $Name: 27 // 29 // 28 // Author: Elena Guardincerri (Elena.Guardince 30 // Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) 29 // 31 // 30 // History: 32 // History: 31 // ----------- 33 // ----------- 32 // 11 Jul 2003 A.Mantero, code cleaning / Plo 34 // 11 Jul 2003 A.Mantero, code cleaning / Plotter-XML addiction 33 // Sep 2002 A.Mantero, AIDA3.0 Migration 35 // Sep 2002 A.Mantero, AIDA3.0 Migration 34 // 06 Dec 2001 A.Pfeiffer updated for singlet 36 // 06 Dec 2001 A.Pfeiffer updated for singleton 35 // 30 Nov 2001 Guy Barrand : migrate to AIDA- 37 // 30 Nov 2001 Guy Barrand : migrate to AIDA-2.2. 36 // 28 Nov 2001 Elena Guardincerri Created 38 // 28 Nov 2001 Elena Guardincerri Created 37 // 39 // 38 // ------------------------------------------- 40 // ------------------------------------------------------------------- 39 41 40 #ifndef G4PROCESSTESTANALYSIS_HH 42 #ifndef G4PROCESSTESTANALYSIS_HH 41 #define G4PROCESSTESTANALYSIS_HH 43 #define G4PROCESSTESTANALYSIS_HH 42 44 43 #include "globals.hh" 45 #include "globals.hh" 44 #include <vector> 46 #include <vector> 45 #include "G4ThreeVector.hh" 47 #include "G4ThreeVector.hh" 46 #include "XrayFluoDataSet.hh" 48 #include "XrayFluoDataSet.hh" 47 #include "XrayFluoAnalysisMessenger.hh" 49 #include "XrayFluoAnalysisMessenger.hh" 48 50 49 class G4Step; 51 class G4Step; 50 class XrayFluoAnalysisMessenger; 52 class XrayFluoAnalysisMessenger; 51 53 52 //....oooOO0OOoo........oooOO0OOooo........ooo 54 //....oooOO0OOoo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 53 class XrayFluoAnalysisManager 55 class XrayFluoAnalysisManager 54 { 56 { 55 public: 57 public: 56 58 57 virtual ~XrayFluoAnalysisManager(); 59 virtual ~XrayFluoAnalysisManager(); 58 60 59 void book(); 61 void book(); 60 62 61 void finish(); 63 void finish(); 62 64 63 //fill histograms with data from XrayFluoSte 65 //fill histograms with data from XrayFluoSteppingAction 64 void analyseStepping(const G4Step* aStep); 66 void analyseStepping(const G4Step* aStep); 65 67 66 //fill histograms with data from XrayFluoEven 68 //fill histograms with data from XrayFluoEventAction 67 void analyseEnergyDep(G4double eDep); 69 void analyseEnergyDep(G4double eDep); 68 70 69 //fill histograms with data from XrayFluoPrim 71 //fill histograms with data from XrayFluoPrimarygeneratorAction 70 void analysePrimaryGenerator(G4double energy 72 void analysePrimaryGenerator(G4double energy); 71 73 72 //method to call to create an instance of th 74 //method to call to create an instance of this class 73 static XrayFluoAnalysisManager* getInstance( 75 static XrayFluoAnalysisManager* getInstance(); 74 76 75 // methods to set the flag for the storage o 77 // methods to set the flag for the storage of the space of phases into ntuple 76 inline void PhaseSpaceOn(){phaseSpaceFlag = 78 inline void PhaseSpaceOn(){phaseSpaceFlag = true;} 77 79 78 inline void PhaseSpaceOff(){phaseSpaceFlag = 80 inline void PhaseSpaceOff(){phaseSpaceFlag = false;} 79 81 80 //method to chenge the name of the output fi 82 //method to chenge the name of the output file 81 void SetOutputFileName(G4String); 83 void SetOutputFileName(G4String); 82 84 83 const std::pair<G4double,G4String> GetEmitte 85 const std::pair<G4double,G4String> GetEmittedParticleEnergyAndType(); 84 86 85 void LoadGunData(G4String, G4bool); 87 void LoadGunData(G4String, G4bool); 86 88 87 void SetPhysicFlag(G4bool); 89 void SetPhysicFlag(G4bool); 88 90 89 private: 91 private: 90 //private constructor in order to create a s 92 //private constructor in order to create a singleton 91 XrayFluoAnalysisManager(); 93 XrayFluoAnalysisManager(); 92 94 93 G4String outputFileName; 95 G4String outputFileName; 94 96 95 G4bool phaseSpaceFlag; 97 G4bool phaseSpaceFlag; 96 98 97 G4bool physicFlag; 99 G4bool physicFlag; 98 100 99 std::vector<G4double>* gunParticleEnergies; 101 std::vector<G4double>* gunParticleEnergies; 100 std::vector<G4String>* gunParticleTypes; 102 std::vector<G4String>* gunParticleTypes; 101 103 102 //Instance for singleton implementation this 104 //Instance for singleton implementation this is the returned 103 static XrayFluoAnalysisManager* instance; 105 static XrayFluoAnalysisManager* instance; 104 106 105 //pointer to the analysis messenger 107 //pointer to the analysis messenger 106 XrayFluoAnalysisMessenger* analisysMessenger 108 XrayFluoAnalysisMessenger* analisysMessenger; 107 109 108 G4bool dataLoaded; 110 G4bool dataLoaded; 109 111 110 G4int fParticleEnergyAndTypeIndex; 112 G4int fParticleEnergyAndTypeIndex; 111 113 112 }; 114 }; 113 #endif 115 #endif 114 116 115 117 116 118 117 119