source: trunk/examples/advanced/raredecay_calorimetry/include/PhotInRun.hh @ 1309

Last change on this file since 1309 was 807, checked in by garnier, 16 years ago

update

File size: 4.0 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//
27// $Id: PhotInRun.hh,v 1.4 2006/06/29 16:24:55 gunter Exp $
28// GEANT4 tag $Name:  $
29//
30
31#ifndef PhotInRun_h
32#define PhotInRun_h 1
33
34#include "globals.hh"
35#include "G4Run.hh"
36#include "G4Allocator.hh"
37
38#include "PhotInConstants.hh"
39#include "PhotInCalorHit.hh"
40#include "PhotInStackingAction.hh"
41
42#include "G4Event.hh"
43#include "G4HCofThisEvent.hh"
44
45class PhotInRun : public G4Run
46{
47  public:
48    PhotInRun();
49    virtual ~PhotInRun();
50    void *operator new(size_t);
51    void operator delete(void* aRun);
52
53    G4double GetTotalE(G4int i) const       { return totE[i]; }
54    G4double GetTotalL(G4int i) const       { return totL[i]; }
55    G4int    GetNStep(G4int i) const        { return nStep[i]; }
56    G4int    GetNGamma(G4int i) const       { return nGamma[i]; }
57    G4int    GetNElectron(G4int i) const    { return nElectron[i]; }
58    G4int    GetNPositron(G4int i) const    { return nPositron[i]; }
59    G4double GetEMinGamma(G4int i) const    { return eMinGamma[i]; }
60    G4double GetEMinElectron(G4int i) const { return eMinElectron[i]; }
61    G4double GetEMinPositron(G4int i) const { return eMinPositron[i]; }
62
63    virtual void RecordEvent(const G4Event*);
64
65  private:
66    G4double totE[PhotInDiNSections];
67    G4double totL[PhotInDiNSections];
68    G4int nStep[PhotInDiNSections];
69    G4int nGamma[PhotInDiNSections];
70    G4int nElectron[PhotInDiNSections];
71    G4int nPositron[PhotInDiNSections];
72    G4int nProton[PhotInDiNSections];
73    G4int nNeutron[PhotInDiNSections];
74    G4int nPion[PhotInDiNSections];
75    G4int nKaon[PhotInDiNSections];
76    G4double eMinGamma[PhotInDiNSections];
77    G4double eMinElectron[PhotInDiNSections];
78    G4double eMinPositron[PhotInDiNSections];
79    G4double eMinProton[PhotInDiNSections];
80    G4double eMinNeutron[PhotInDiNSections];
81    G4double eMinPion[PhotInDiNSections];
82    G4double eMinKaon[PhotInDiNSections];
83    G4double eMaxGamma[PhotInDiNSections];
84    G4double eMaxElectron[PhotInDiNSections];
85    G4double eMaxPositron[PhotInDiNSections];
86    G4double eMaxProton[PhotInDiNSections];
87    G4double eMaxNeutron[PhotInDiNSections];
88    G4double eMaxPion[PhotInDiNSections];
89    G4double eMaxKaon[PhotInDiNSections];
90};
91
92extern G4Allocator<PhotInRun> anPhotInRunAllocator;
93
94inline void* PhotInRun::operator new(size_t)
95{
96  void* aRun;
97  aRun = (void*)anPhotInRunAllocator.MallocSingle();
98  return aRun;
99}
100
101inline void PhotInRun::operator delete(void* aRun)
102{
103  anPhotInRunAllocator.FreeSingle((PhotInRun*)aRun);
104}
105
106#endif
107
Note: See TracBrowser for help on using the repository browser.