source: trunk/examples/advanced/gammaray_telescope/include/GammaRayTelAnalysis.hh @ 1282

Last change on this file since 1282 was 1230, checked in by garnier, 14 years ago

update to geant4.9.3

File size: 4.1 KB
Line 
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#ifdef G4ANALYSIS_USE
27//
28// $Id: GammaRayTelAnalysis.hh,v 1.18 2006/06/29 15:54:51 gunter Exp $
29// GEANT4 tag $Name: geant4-09-03-cand-01 $
30// ------------------------------------------------------------
31//      GEANT 4 class header file
32//      CERN Geneva Switzerland
33//     
34//
35//      ------------ GammaRayTelAnalysis  ------
36//           by R.Giannitrapani, F. Longo & G.Santin (30 nov 2000)
37//
38// 07.12.2001 A.Pfeiffer
39// - integrated Guy's addition of the ntuple
40//
41// 06.12.2001 A.Pfeiffer
42// - updating to new design (singleton)
43//
44// 22.11.2001 G.Barrand
45// - Adaptation to AIDA
46//
47// ************************************************************
48
49#ifndef GammaRayTelAnalysis_h
50#define GammaRayTelAnalysis_h 1
51
52#include "globals.hh"
53#include <vector>
54#include "G4ThreeVector.hh"
55
56#include <AIDA/AIDA.h>
57
58using namespace AIDA;
59
60class GammaRayTelAnalysisMessenger;
61class GammaRayTelDetectorConstruction;
62
63class AIDA::IAnalysisFactory;
64class AIDA::ITree;
65class AIDA::IHistogramFactory;
66class AIDA::ITupleFactory;
67//class AIDA::IPlotter;
68class AIDA::IHistogram1D;
69class AIDA::IHistogram2D;
70
71class GammaRayTelAnalysis {
72public:
73  virtual ~GammaRayTelAnalysis();
74 
75public:
76
77
78  //  void BeginOfRun(G4int n);
79
80  void BeginOfRun();
81  void EndOfRun(G4int n);
82  void EndOfEvent(G4int flag);
83
84  void Init();
85  void Finish();
86
87  void SetHisto1DDraw(G4String str) {histo1DDraw = str;};
88  void SetHisto1DSave(G4String str) {histo1DSave = str;};
89  void SetHisto2DDraw(G4String str) {histo2DDraw = str;};
90  void SetHisto2DSave(G4String str) {histo2DSave = str;};
91  void SetHisto2DMode(G4String str) {histo2DMode = str;};
92
93  G4String GetHisto2DMode() {return histo2DMode;};
94
95  void InsertPositionXZ(double x, double z);
96  void InsertPositionYZ(double y, double z);
97  void InsertEnergy(double en);
98  void InsertHits(int nplane);
99
100  void setNtuple(float E, float p, float x, float y, float z);
101
102  static GammaRayTelAnalysis* getInstance();
103
104private:
105
106  GammaRayTelAnalysis();
107
108  void plot1D(IHistogram1D* histo);
109  void plot2D(IHistogram2D* histo);
110  void Plot();
111
112private:
113  static GammaRayTelAnalysis* instance;
114
115  GammaRayTelDetectorConstruction*    GammaRayTelDetector;
116
117  IAnalysisFactory* analysisFactory;
118  ITree* tree;
119  //IPlotter* plotter;
120  ITuple* tuple;
121
122  IHistogram1D* energy;
123  IHistogram1D* hits;
124  IHistogram2D* posXZ;
125  IHistogram2D* posYZ;
126
127  G4String histo1DDraw;
128  G4String histo1DSave;
129  G4String histo2DDraw;
130  G4String histo2DSave;
131  G4String histo2DMode;
132
133  GammaRayTelAnalysisMessenger* analysisMessenger;
134};
135
136
137#endif
138#endif
Note: See TracBrowser for help on using the repository browser.