Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CCalAnalysis.hh
Go to the documentation of this file.
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 // File: CCalAnalysis.hh
28 // Description: CCalAnalysis is a singleton class and interfaces all user
29 // analysis code
30 ///////////////////////////////////////////////////////////////////////////////
31 
32 #ifdef G4ANALYSIS_USE
33 
34 #ifndef CCalAnalysis_h
35 #define CCalAnalysis_h 1
36 
37 #include "G4ThreeVector.hh"
38 #include "globals.hh"
39 #include <vector>
40 
41 namespace AIDA {
42  class IAnalysisFactory;
43  class IHistogramFactory;
44  class ITree;
45  class IHistogram1D;
46  class IHistogram2D;
47  class ITuple;
48  class IPlotter;
49 }
50 
51 
52 class CCalAnalysis {
53 public:
54  virtual ~CCalAnalysis();
55 
56 public:
57  void BeginOfRun(G4int n);
58  void EndOfRun(G4int n);
59  void EndOfEvent(G4int flag);
60 
61  void Init();
62  void Finish();
63 
64  int maxbin() {return numberOfTimeSlices;}
65 
66  void InsertEnergyHcal(float*);
67  void InsertEnergyEcal(float*);
68  void InsertEnergy(float v);
69  void InsertLateralProfile(float*);
70  void InsertTime(float*);
71  void InsertTimeProfile(int, double, double);
72 
73  void setNtuple(float* hcalE, float* ecalE, float elab, float x, float y,
74  float z, float edep, float edec, float edhc);
75 
76  static CCalAnalysis* getInstance();
77 
78 private:
79  CCalAnalysis();
80 private:
81  static CCalAnalysis* instance;
82 
83  AIDA::IAnalysisFactory* analysisFactory;
84  AIDA::ITree* tree;
85  AIDA::ITuple* tuple;
86 
87  enum {numberOfTimeSlices = 200};
88 
89  AIDA::IHistogram1D* energy;
90  AIDA::IHistogram1D* hcalE[28]; // 28 hadronic modules
91  AIDA::IHistogram1D* ecalE[49]; // 49 crystal towers
92  AIDA::IHistogram1D* timeHist[200]; // 200 nanoseconds time window
93  AIDA::IHistogram1D* lateralProfile[70]; // 70 centimeters lateral window
94  // (indeed 64 should be enough)
95  AIDA::IHistogram1D* timeProfile[2]; // at step and in sensitive detector
96 };
97 
98 
99 #endif
100 
101 #endif
void Init()
Definition: G4IonTable.cc:89
G4double z
Definition: TRTMaterials.hh:39
int G4int
Definition: G4Types.hh:78
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
tuple tree
Definition: gammaraytel.py:4
const G4int n