source: trunk/examples/advanced/xray_fluorescence/include/XrayFluoAnalysisManager.hh@ 1209

Last change on this file since 1209 was 807, checked in by garnier, 17 years ago

update

File size: 5.6 KB
RevLine 
[807]1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id: XrayFluoAnalysisManager.hh
28// GEANT4 tag $Name: xray_fluo-V03-02-00
29//
30// Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
31//
32// History:
33// -----------
34// 11 Jul 2003 A.Mantero, code cleaning / Plotter-XML addiction
35// Sep 2002 A.Mantero, AIDA3.0 Migration
36// 06 Dec 2001 A.Pfeiffer updated for singleton
37// 30 Nov 2001 Guy Barrand : migrate to AIDA-2.2.
38// 28 Nov 2001 Elena Guardincerri Created
39//
40// -------------------------------------------------------------------
41
42#ifndef G4PROCESSTESTANALYSIS_HH
43#define G4PROCESSTESTANALYSIS_HH
44#ifdef G4ANALYSIS_USE
45
46#include "globals.hh"
47#include <vector>
48#include "G4ThreeVector.hh"
49#include "XrayFluoDataSet.hh"
50#include "AIDA/AIDA.h" // Headers for AIDA interfaces
51#include "XrayFluoAnalysisMessenger.hh"
52
53class G4Step;
54class XrayFluoAnalysisMessenger;
55
56//....oooOO0OOoo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
57class XrayFluoAnalysisManager
58{
59public:
60
61 virtual ~XrayFluoAnalysisManager();
62
63 void book();
64
65 void finish();
66
67 //fill histograms with data from XrayFluoSteppingAction
68 void analyseStepping(const G4Step* aStep);
69
70 //fill histograms with data from XrayFluoEventAction
71 void analyseEnergyDep(G4double eDep);
72
73 //fill histograms with data from XrayFluoPrimarygeneratorAction
74 void analysePrimaryGenerator(G4double energy);
75
76 //method to call to create an instance of this class
77 static XrayFluoAnalysisManager* getInstance();
78
79 //method to create hbook or xml file for persistency
80
81 void CreatePersistency(G4String fileName,G4String persistencyType,
82 G4bool readOnly = false, G4bool createNew = true);
83
84 inline void CreatePersistency() {CreatePersistency(outputFileName,persistencyType);}
85
86 // methods to set the flag for the storage of the space of phases into ntuple
87 inline void PhaseSpaceOn(){phaseSpaceFlag = true;}
88
89 inline void PhaseSpaceOff(){phaseSpaceFlag = false;}
90
91 void ExtractData();
92
93 //method to chenge the name of the output file
94 void SetOutputFileName(G4String);
95
96 //method to chenge the type of the output file
97 void SetOutputFileType(G4String);
98
99 // method used by the messenger
100 G4bool GetDeletePersistencyFileFlag();
101
102 // methods used by RunManager and EvenManager to visualize partial results
103 void InitializePlotter();
104
105 void PlotCurrentResults();
106
107 std::vector<G4double>* GetEmittedParticleEnergies();
108 std::vector<G4String>* GetEmittedParticleTypes();
109 void LoadGunData(G4String, G4bool);
110
111 void SetPhysicFlag(G4bool);
112
113private:
114 //private constructor in order to create a singleton
115 XrayFluoAnalysisManager();
116
117 G4String outputFileName;
118
119 G4bool visPlotter;
120
121 G4bool phaseSpaceFlag;
122
123 G4bool physicFlag;
124
125 G4String persistencyType;
126
127 G4bool deletePersistencyFile;
128
129
130 std::vector<G4double>* gunParticleEnergies;
131 std::vector<G4String>* gunParticleTypes;
132
133 //Instance for singleton implementation this is the returned
134 static XrayFluoAnalysisManager* instance;
135
136 //pointer to the analysis messenger
137 XrayFluoAnalysisMessenger* analisysMessenger;
138
139 //XrayFluoEventAction* pEvent;
140
141 // analysis data members
142
143 AIDA::IAnalysisFactory* analysisFactory;
144 AIDA::ITree* tree;
145 AIDA::ITree* treeDet;
146
147 AIDA::IHistogramFactory* histogramFactory;
148 AIDA::IHistogram1D* histo_1;
149 AIDA::IHistogram1D* histo_2;
150 AIDA::IHistogram1D* histo_3;
151 AIDA::IHistogram1D* histo_4;
152 AIDA::IHistogram1D* histo_5;
153 AIDA::IHistogram1D* histo_6;
154 AIDA::IHistogram1D* histo_7;
155 AIDA::IHistogram1D* histo_8;
156 AIDA::IHistogram1D* histo_9;
157 //AIDA::IHistogram1D* histo_10; //
158 //AIDA::IHistogram1D* histo_12; // Created for debuggig purpose
159 //AIDA::IHistogram1D* histo_11; //
160
161 AIDA::ICloud1D* beamCloud;
162 AIDA::ICloud1D* cloud_1;
163 AIDA::ICloud1D* cloud_2;
164 AIDA::ICloud1D* cloud_3;
165
166 AIDA::ITupleFactory* tupleFactory;
167 AIDA::ITupleFactory* tupleDetFactory;
168
169 AIDA::ITuple* tupleFluo;
170 AIDA::ITuple* tupleDetFluo;
171
172 AIDA::IPlotterFactory* plotterFactory;
173 AIDA::IPlotter* plotter;
174
175};
176#endif
177#endif
178
179
180
Note: See TracBrowser for help on using the repository browser.