Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // 23 // >> 24 // $Id: XrayFluoAnalysisManager.hh >> 25 // GEANT4 tag $Name: xray_fluo-V03-02-00 27 // 26 // 28 // Author: Elena Guardincerri (Elena.Guardince 27 // Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) 29 // 28 // 30 // History: 29 // History: 31 // ----------- 30 // ----------- 32 // 11 Jul 2003 A.Mantero, code cleaning / Plo 31 // 11 Jul 2003 A.Mantero, code cleaning / Plotter-XML addiction 33 // Sep 2002 A.Mantero, AIDA3.0 Migration 32 // Sep 2002 A.Mantero, AIDA3.0 Migration 34 // 06 Dec 2001 A.Pfeiffer updated for singlet 33 // 06 Dec 2001 A.Pfeiffer updated for singleton 35 // 30 Nov 2001 Guy Barrand : migrate to AIDA- 34 // 30 Nov 2001 Guy Barrand : migrate to AIDA-2.2. 36 // 28 Nov 2001 Elena Guardincerri Created 35 // 28 Nov 2001 Elena Guardincerri Created 37 // 36 // 38 // ------------------------------------------- 37 // ------------------------------------------------------------------- 39 38 40 #ifndef G4PROCESSTESTANALYSIS_HH 39 #ifndef G4PROCESSTESTANALYSIS_HH 41 #define G4PROCESSTESTANALYSIS_HH 40 #define G4PROCESSTESTANALYSIS_HH 42 41 43 #include "globals.hh" 42 #include "globals.hh" 44 #include <vector> 43 #include <vector> 45 #include "G4ThreeVector.hh" 44 #include "G4ThreeVector.hh" 46 #include "XrayFluoDataSet.hh" 45 #include "XrayFluoDataSet.hh" >> 46 #include "AIDA/AIDA.h" // Headers for AIDA interfaces 47 #include "XrayFluoAnalysisMessenger.hh" 47 #include "XrayFluoAnalysisMessenger.hh" 48 48 49 class G4Step; 49 class G4Step; 50 class XrayFluoAnalysisMessenger; 50 class XrayFluoAnalysisMessenger; 51 51 52 //....oooOO0OOoo........oooOO0OOooo........ooo << 52 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 53 class XrayFluoAnalysisManager 53 class XrayFluoAnalysisManager 54 { 54 { 55 public: 55 public: 56 56 57 virtual ~XrayFluoAnalysisManager(); 57 virtual ~XrayFluoAnalysisManager(); 58 58 59 void book(); 59 void book(); 60 60 61 void finish(); 61 void finish(); 62 62 63 //fill histograms with data from XrayFluoSte 63 //fill histograms with data from XrayFluoSteppingAction 64 void analyseStepping(const G4Step* aStep); 64 void analyseStepping(const G4Step* aStep); 65 65 66 //fill histograms with data from XrayFluoEven 66 //fill histograms with data from XrayFluoEventAction 67 void analyseEnergyDep(G4double eDep); 67 void analyseEnergyDep(G4double eDep); 68 68 69 //fill histograms with data from XrayFluoPrim 69 //fill histograms with data from XrayFluoPrimarygeneratorAction 70 void analysePrimaryGenerator(G4double energy 70 void analysePrimaryGenerator(G4double energy); 71 71 72 //method to call to create an instance of th 72 //method to call to create an instance of this class 73 static XrayFluoAnalysisManager* getInstance( 73 static XrayFluoAnalysisManager* getInstance(); 74 74 75 // methods to set the flag for the storage o << 75 //method to create hbook or xml file for persistency 76 inline void PhaseSpaceOn(){phaseSpaceFlag = << 76 >> 77 void CreatePersistency(G4String fileName,G4String persistencyType, >> 78 G4bool readOnly = false, G4bool createNew = true); 77 79 78 inline void PhaseSpaceOff(){phaseSpaceFlag = << 80 inline void CreatePersistency() {CreatePersistency(outputFileName,persistencyType);} 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 //method to chenge the type of the output file >> 86 void SetOutputFileType(G4String); >> 87 >> 88 // method used by the messenger >> 89 G4bool GetDeletePersistencyFileFlag(); 84 90 85 void LoadGunData(G4String, G4bool); << 91 // methods used by RunManager and EvenManager to visualize partial results >> 92 // void InitializePlotter(); 86 93 87 void SetPhysicFlag(G4bool); << 94 // void PlotCurrentResults(); 88 95 89 private: 96 private: 90 //private constructor in order to create a s 97 //private constructor in order to create a singleton 91 XrayFluoAnalysisManager(); 98 XrayFluoAnalysisManager(); 92 99 93 G4String outputFileName; 100 G4String outputFileName; 94 101 95 G4bool phaseSpaceFlag; << 102 // G4bool visPlotter; 96 103 97 G4bool physicFlag; << 104 G4String persistencyType; 98 105 99 std::vector<G4double>* gunParticleEnergies; << 106 G4bool deletePersistencyFile; 100 std::vector<G4String>* gunParticleTypes; << 101 107 102 //Instance for singleton implementation this 108 //Instance for singleton implementation this is the returned 103 static XrayFluoAnalysisManager* instance; 109 static XrayFluoAnalysisManager* instance; 104 110 105 //pointer to the analysis messenger 111 //pointer to the analysis messenger 106 XrayFluoAnalysisMessenger* analisysMessenger 112 XrayFluoAnalysisMessenger* analisysMessenger; 107 113 108 G4bool dataLoaded; << 114 //XrayFluoEventAction* pEvent; 109 << 110 G4int fParticleEnergyAndTypeIndex; << 111 115 >> 116 // analysis data members >> 117 >> 118 AIDA::IAnalysisFactory* analysisFactory; >> 119 AIDA::ITree* tree; >> 120 AIDA::IHistogramFactory* histogramFactory; >> 121 // AIDA::IPlotterFactory* plotterFactory; >> 122 // AIDA::IPlotter* plotter; >> 123 >> 124 AIDA::IHistogram1D* histo_1; >> 125 AIDA::IHistogram1D* histo_2; >> 126 AIDA::IHistogram1D* histo_3; >> 127 AIDA::IHistogram1D* histo_4; >> 128 AIDA::IHistogram1D* histo_5; >> 129 AIDA::IHistogram1D* histo_6; >> 130 AIDA::IHistogram1D* histo_7; >> 131 AIDA::IHistogram1D* histo_8; >> 132 AIDA::IHistogram1D* histo_9; >> 133 //AIDA::IHistogram1D* histo_10; // >> 134 //AIDA::IHistogram1D* histo_12; // Created for debuggig purpose >> 135 //AIDA::IHistogram1D* histo_11; // 112 }; 136 }; >> 137 113 #endif 138 #endif 114 139 115 140 116 141 117 142