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 >> 41 #ifdef G4ANALYSIS_USE 42 42 43 #include "globals.hh" 43 #include "globals.hh" 44 #include <vector> 44 #include <vector> 45 #include "G4ThreeVector.hh" 45 #include "G4ThreeVector.hh" 46 #include "XrayFluoDataSet.hh" 46 #include "XrayFluoDataSet.hh" >> 47 #include "AIDA/AIDA.h" // Headers for AIDA interfaces 47 #include "XrayFluoAnalysisMessenger.hh" 48 #include "XrayFluoAnalysisMessenger.hh" 48 49 49 class G4Step; 50 class G4Step; 50 class XrayFluoAnalysisMessenger; 51 class XrayFluoAnalysisMessenger; 51 52 52 //....oooOO0OOoo........oooOO0OOooo........ooo 53 //....oooOO0OOoo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 53 class XrayFluoAnalysisManager 54 class XrayFluoAnalysisManager 54 { 55 { 55 public: 56 public: 56 57 57 virtual ~XrayFluoAnalysisManager(); 58 virtual ~XrayFluoAnalysisManager(); 58 59 59 void book(); 60 void book(); 60 61 61 void finish(); 62 void finish(); 62 63 63 //fill histograms with data from XrayFluoSte 64 //fill histograms with data from XrayFluoSteppingAction 64 void analyseStepping(const G4Step* aStep); 65 void analyseStepping(const G4Step* aStep); 65 66 66 //fill histograms with data from XrayFluoEven 67 //fill histograms with data from XrayFluoEventAction 67 void analyseEnergyDep(G4double eDep); 68 void analyseEnergyDep(G4double eDep); 68 69 69 //fill histograms with data from XrayFluoPrim 70 //fill histograms with data from XrayFluoPrimarygeneratorAction 70 void analysePrimaryGenerator(G4double energy 71 void analysePrimaryGenerator(G4double energy); 71 72 72 //method to call to create an instance of th 73 //method to call to create an instance of this class 73 static XrayFluoAnalysisManager* getInstance( 74 static XrayFluoAnalysisManager* getInstance(); 74 75 >> 76 //method to create hbook or xml file for persistency >> 77 >> 78 void CreatePersistency(G4String fileName,G4String persistencyType, >> 79 G4bool readOnly = false, G4bool createNew = true); >> 80 >> 81 inline void CreatePersistency() {CreatePersistency(outputFileName,persistencyType);} >> 82 75 // methods to set the flag for the storage o 83 // methods to set the flag for the storage of the space of phases into ntuple 76 inline void PhaseSpaceOn(){phaseSpaceFlag = 84 inline void PhaseSpaceOn(){phaseSpaceFlag = true;} 77 85 78 inline void PhaseSpaceOff(){phaseSpaceFlag = 86 inline void PhaseSpaceOff(){phaseSpaceFlag = false;} 79 87 >> 88 void ExtractData(); >> 89 80 //method to chenge the name of the output fi 90 //method to chenge the name of the output file 81 void SetOutputFileName(G4String); 91 void SetOutputFileName(G4String); 82 92 83 const std::pair<G4double,G4String> GetEmitte << 93 //method to chenge the type of the output file >> 94 void SetOutputFileType(G4String); >> 95 >> 96 // method used by the messenger >> 97 G4bool GetDeletePersistencyFileFlag(); 84 98 >> 99 // methods used by RunManager and EvenManager to visualize partial results >> 100 void InitializePlotter(); >> 101 >> 102 void PlotCurrentResults(); >> 103 >> 104 std::vector<G4double>* GetEmittedParticleEnergies(); >> 105 std::vector<G4String>* GetEmittedParticleTypes(); 85 void LoadGunData(G4String, G4bool); 106 void LoadGunData(G4String, G4bool); 86 107 87 void SetPhysicFlag(G4bool); 108 void SetPhysicFlag(G4bool); 88 109 89 private: 110 private: 90 //private constructor in order to create a s 111 //private constructor in order to create a singleton 91 XrayFluoAnalysisManager(); 112 XrayFluoAnalysisManager(); 92 113 93 G4String outputFileName; 114 G4String outputFileName; 94 115 >> 116 G4bool visPlotter; >> 117 95 G4bool phaseSpaceFlag; 118 G4bool phaseSpaceFlag; 96 119 97 G4bool physicFlag; 120 G4bool physicFlag; 98 121 >> 122 G4String persistencyType; >> 123 >> 124 G4bool deletePersistencyFile; >> 125 >> 126 99 std::vector<G4double>* gunParticleEnergies; 127 std::vector<G4double>* gunParticleEnergies; 100 std::vector<G4String>* gunParticleTypes; 128 std::vector<G4String>* gunParticleTypes; 101 129 102 //Instance for singleton implementation this 130 //Instance for singleton implementation this is the returned 103 static XrayFluoAnalysisManager* instance; 131 static XrayFluoAnalysisManager* instance; 104 132 105 //pointer to the analysis messenger 133 //pointer to the analysis messenger 106 XrayFluoAnalysisMessenger* analisysMessenger 134 XrayFluoAnalysisMessenger* analisysMessenger; 107 135 108 G4bool dataLoaded; << 136 //XrayFluoEventAction* pEvent; 109 << 137 110 G4int fParticleEnergyAndTypeIndex; << 138 // analysis data members >> 139 >> 140 AIDA::IAnalysisFactory* analysisFactory; >> 141 AIDA::ITree* tree; >> 142 AIDA::ITree* treeDet; >> 143 >> 144 AIDA::IHistogramFactory* histogramFactory; >> 145 AIDA::IHistogram1D* histo_1; >> 146 AIDA::IHistogram1D* histo_2; >> 147 AIDA::IHistogram1D* histo_3; >> 148 AIDA::IHistogram1D* histo_4; >> 149 AIDA::IHistogram1D* histo_5; >> 150 AIDA::IHistogram1D* histo_6; >> 151 AIDA::IHistogram1D* histo_7; >> 152 AIDA::IHistogram1D* histo_8; >> 153 AIDA::IHistogram1D* histo_9; >> 154 //AIDA::IHistogram1D* histo_10; // >> 155 //AIDA::IHistogram1D* histo_12; // Created for debuggig purpose >> 156 //AIDA::IHistogram1D* histo_11; // >> 157 >> 158 AIDA::ICloud1D* beamCloud; >> 159 AIDA::ICloud1D* cloud_1; >> 160 AIDA::ICloud1D* cloud_2; >> 161 AIDA::ICloud1D* cloud_3; >> 162 >> 163 AIDA::ITupleFactory* tupleFactory; >> 164 AIDA::ITupleFactory* tupleDetFactory; >> 165 >> 166 AIDA::ITuple* tupleFluo; >> 167 AIDA::ITuple* tupleDetFluo; >> 168 >> 169 AIDA::IPlotterFactory* plotterFactory; >> 170 AIDA::IPlotter* plotter; 111 171 112 }; 172 }; >> 173 #endif 113 #endif 174 #endif 114 175 115 176 116 177 117 178