Geant4  10.02.p01
F03CalorHit.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 //
28 //
29 //
30 // $Id: F03CalorHit.hh 76602 2013-11-13 08:33:35Z gcosmo $
31 //
32 //
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
35 
36 #ifndef F03CalorHit_h
37 #define F03CalorHit_h 1
38 
39 #include "G4VHit.hh"
40 #include "G4THitsCollection.hh"
41 #include "G4Allocator.hh"
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 
45 class F03CalorHit : public G4VHit
46 {
47  public:
48 
49  F03CalorHit();
50  F03CalorHit(const F03CalorHit&);
51  virtual ~F03CalorHit();
52 
53  const F03CalorHit& operator=(const F03CalorHit&);
54  G4int operator==(const F03CalorHit&) const;
55 
56  inline void* operator new(size_t);
57  inline void operator delete(void*);
58 
59  virtual void Print();
60 
61  public:
62 
63  void AddAbs(G4double de, G4double dl)
64  {fEdepAbs += de; fTrackLengthAbs += dl;};
65  void AddGap(G4double de, G4double dl)
66  {fEdepGap += de; fTrackLengthGap += dl;};
67 
68  G4double GetEdepAbs() { return fEdepAbs; };
70  G4double GetEdepGap() { return fEdepGap; };
72 
73  private:
74 
77 
78 };
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81 
83 
85 
86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
87 
88 inline void* F03CalorHit::operator new(size_t)
89 {
92  return (void*) F03CalorHitAllocator->MallocSingle();
93 }
94 
95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
96 
97 inline void F03CalorHit::operator delete(void* aHit)
98 {
99  F03CalorHitAllocator->FreeSingle((F03CalorHit*) aHit);
100 }
101 
102 #endif
void AddAbs(G4double de, G4double dl)
Definition: F03CalorHit.hh:63
void AddGap(G4double de, G4double dl)
Definition: F03CalorHit.hh:65
G4double fTrackLengthGap
Definition: F03CalorHit.hh:76
G4ThreadLocal G4Allocator< F03CalorHit > * F03CalorHitAllocator
Definition: F03CalorHit.cc:38
G4double fEdepAbs
Definition: F03CalorHit.hh:71
G4THitsCollection< F03CalorHit > F03CalorHitsCollection
Definition: F03CalorHit.hh:82
const F03CalorHit & operator=(const F03CalorHit &)
Definition: F03CalorHit.cc:67
G4double GetEdepGap()
Definition: F03CalorHit.hh:70
Definition: G4VHit.hh:48
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
virtual ~F03CalorHit()
Definition: F03CalorHit.cc:52
G4double GetTrackAbs()
Definition: F03CalorHit.hh:69
G4double GetEdepAbs()
Definition: F03CalorHit.hh:68
G4double GetTrackGap()
Definition: F03CalorHit.hh:71
G4int operator==(const F03CalorHit &) const
Definition: F03CalorHit.cc:76
G4double fTrackLengthAbs
Definition: F03CalorHit.hh:71
G4double fEdepGap
Definition: F03CalorHit.hh:76
double G4double
Definition: G4Types.hh:76
virtual void Print()
Definition: F03CalorHit.cc:83