source: trunk/examples/advanced/xray_telescope/include/XrayTelAnalysis.hh@ 1313

Last change on this file since 1313 was 1230, checked in by garnier, 16 years ago

update to geant4.9.3

File size: 5.0 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: XrayTelAnalysis.hh,v 1.10 2006/06/29 16:29:39 gunter Exp $
[1230]28// GEANT4 tag $Name: geant4-09-03-cand-01 $
[807]29//
30// Author: A. Pfeiffer (Andreas.Pfeiffer@cern.ch)
31// (copy of his UserAnalyser class)
32//
33// History:
34// -----------
35// 7 Nov 2001 MGP Implemented according to A. Pfeiffer's instructions
36//
37// -------------------------------------------------------------------
38// Class description:
39// Example of analysis in a simulation application (histograms, ntuples etc.)
40// This class follows the singleton design pattern;
41// it is responsible for the analysis management and algorithms
42// Histograms are compliant with AIDA 1.0 (the header files are
43// copies from the Anaphe Interfaces directory), except for the usage of
44// IHistoManager which is Anaphe/Lizard-specific
45// For ntuples, for which the AIDA interfaces and compliant implementations
46// are still in progress at the time of the current Geant4 release,
47// an implementation with Anaphe/Lizard is shown
48// Other implementations specific to an analysis system are possible too
49// (see, for instance, JAS and OpenScientist documentation from the links
50// in http://aida.freehep.org/)
51// The implementation of the usage of ntuples shown in this example
52// is expected to change in future Geant4 releases, when AIDA interfaces
53// and related implementations would be available
54// Further documentation is available from: http://www.ge.infn.it/geant4/lowE/
55// http://aida.freehep.org/
56// http://cern.ch/anaphe/
57
58// -------------------------------------------------------------------
59
60#ifndef G4PROCESSTESTANALYSIS_HH
61#define G4PROCESSTESTANALYSIS_HH
62
63#include "globals.hh"
64#include "G4ios.hh"
65
66#ifdef G4ANALYSIS_USE
67#include "AIDA/IAnalysisFactory.h"
68
69#include "AIDA/ITreeFactory.h"
70#include "AIDA/ITree.h"
71
72#include "AIDA/IHistogramFactory.h"
73#include "AIDA/IHistogram1D.h"
74#include "AIDA/IHistogram2D.h"
75#include "AIDA/IHistogram3D.h"
76
77#include "AIDA/IPlotterFactory.h"
78#include "AIDA/IPlotterRegion.h"
79#include "AIDA/IPlotter.h"
80
81#include "AIDA/ITupleFactory.h"
82#include "AIDA/ITuple.h"
83
84#include "AIDA/IManagedObject.h"
85
86// Histogramming from AIDA
87class IAnalysisFactory;
88class ITree;
89class IHistogramFactory;
90class ITupleFactory;
91class ITuple;
92#endif
93
94class G4Track;
95
96class XrayTelAnalysis
97{
98public:
99
100 ~XrayTelAnalysis();
101
102 void book();
103
104 void finish();
105
106 void analyseStepping(const G4Track& track, G4bool entering);
107
108 static XrayTelAnalysis* getInstance();
109
110private:
111
112 XrayTelAnalysis();
113
114// #ifdef G4ANALYSIS_USE_PLOTTER
115// void plotAll();
116// #endif
117 static XrayTelAnalysis* instance;
118
119#ifdef G4ANALYSIS_USE
120 AIDA::IAnalysisFactory *analysisFactory;
121 AIDA::ITree *tree;
122 AIDA::IHistogramFactory *histoFactory;
123 AIDA::ITupleFactory *tupleFactory;
124// #ifdef G4ANALYSIS_USE_PLOTTER
125// AIDA::IPlotterFactory *plotterFactory;
126// AIDA::IPlotter *plotter;
127// #endif
128#endif
129 // Quantities for the ntuple
130 G4double eKin;
131 G4double x;
132 G4double y;
133 G4double z;
134 G4double dirX;
135 G4double dirY;
136 G4double dirZ;
137
138 G4String asciiFileName;
139 G4String histFileName;
140 G4String histFileType;
141
142#ifdef G4ANALYSIS_USE
143 AIDA::IHistogram1D *h1;
144 AIDA::IHistogram2D *h2;
145 AIDA::IHistogram1D *h3;
146 AIDA::IHistogram2D *h4;
147 AIDA::ITuple * ntuple;
148#endif
149 // std::ofstream asciiFile;
150
151};
152
153#endif
Note: See TracBrowser for help on using the repository browser.