Geant4  10.02
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 //
27 // File: CCalAnalysis.hh
28 // Description: CCalAnalysis is a singleton class and interfaces all user
29 // analysis code
31 
32 #ifndef CCalAnalysis_h
33 #define CCalAnalysis_h 1
34 
35 #include "globals.hh"
36 
40 #include "g4root.hh"
42 //#include "g4xml.hh"
43 
44 class CCalAnalysis {
45 public:
46  virtual ~CCalAnalysis();
47 
48 public:
49  void BeginOfRun(G4int n);
50  void EndOfRun(G4int n);
51  void EndOfEvent(G4int flag);
52 
53  void Init();
54  void Finish();
55 
56  int maxbin() {return numberOfTimeSlices;}
57 
58  void InsertEnergyHcal(float*);
59  void InsertEnergyEcal(float*);
60  void InsertEnergy(float v);
61  void InsertLateralProfile(float*);
62  void InsertTime(float*);
63  void InsertTimeProfile(int, double, double);
64 
65  void setNtuple(float* hcalE, float* ecalE, float elab, float x, float y,
66  float z, float edep, float edec, float edhc);
67 
68  static CCalAnalysis* getInstance();
69 
70 private:
71  CCalAnalysis();
72 
73 private:
75 
77 
79  //enum {numberOfTimeSlices = 200};
80 
81  //
82  //Id of the histograms (first of each block). Used internally for a
83  //quick mapping of the proper histoID
84  //
86  G4int hcalE; // 28 hadronic modules
87  G4int ecalE; // 49 crystal towers
88  G4int timeHist; // 200 nanoseconds time window
89  G4int lateralProfile;// 70 centimeters lateral window
90  // (indeed 64 should be enough)
91  G4int timeProfile; // at step and in sensitive detector
92 };
93 
94 
95 #endif
virtual ~CCalAnalysis()
void setNtuple(float *hcalE, float *ecalE, float elab, float x, float y, float z, float edep, float edec, float edhc)
G4int timeProfile
Definition: CCalAnalysis.hh:91
G4double z
Definition: TRTMaterials.hh:39
void InsertEnergyHcal(float *)
G4int fVerbosity
Definition: CCalAnalysis.hh:76
int G4int
Definition: G4Types.hh:78
void InsertEnergyEcal(float *)
G4int numberOfTimeSlices
Definition: CCalAnalysis.hh:78
const G4int n
void InsertEnergy(float v)
void InsertLateralProfile(float *)
void EndOfEvent(G4int flag)
Defines the format which is used for the output file default is a ROOT file. Comment the g4root and u...
Definition: CCalAnalysis.hh:44
void BeginOfRun(G4int n)
static CCalAnalysis * getInstance()
const G4double x[NPOINTSGL]
void EndOfRun(G4int n)
static CCalAnalysis * instance
Definition: CCalAnalysis.hh:74
G4int lateralProfile
Definition: CCalAnalysis.hh:89
void InsertTimeProfile(int, double, double)
void InsertTime(float *)