Geant4  10.00.p01
Em10CalorHit.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: Em10CalorHit.hh 66241 2012-12-13 18:34:42Z gunter $
31 //
32 //
33 
34 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
35 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
36 
37 #ifndef Em10CalorHit_h
38 #define Em10CalorHit_h 1
39 
40 #include "G4VHit.hh"
41 #include "G4THitsCollection.hh"
42 #include "G4Allocator.hh"
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
45 
46 class Em10CalorHit : public G4VHit
47 {
48 public:
49 
50  Em10CalorHit();
51  ~Em10CalorHit();
52  Em10CalorHit(const Em10CalorHit&);
53 
54  void* operator new(size_t);
55  void operator delete(void*);
56 
57  const Em10CalorHit& operator=(const Em10CalorHit&);
58 
59  void Print();
60 
61 public:
62 
63  void AddAbs(G4double de, G4double dl) {EdepAbs += de; TrackLengthAbs += dl;};
64  void AddGap(G4double de, G4double dl) {EdepGap += de; TrackLengthGap += dl;};
65 
66  G4double GetEdepAbs() { return EdepAbs; };
68  G4double GetEdepGap() { return EdepGap; };
70 
71 private:
72 
75 };
76 
77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
78 
80 
82 
83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
84 
85 inline void* Em10CalorHit::operator new(size_t)
86 {
87  void* aHit;
88  aHit = (void*) Em10CalorHitAllocator.MallocSingle();
89  return aHit;
90 }
91 
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
93 
94 inline void Em10CalorHit::operator delete(void* aHit)
95 {
96  Em10CalorHitAllocator.FreeSingle((Em10CalorHit*) aHit);
97 }
98 
99 #endif
100 
101 
Type * MallocSingle()
Definition: G4Allocator.hh:191
G4double TrackLengthAbs
Definition: Em10CalorHit.hh:69
void FreeSingle(Type *anElement)
Definition: G4Allocator.hh:201
Definition: G4VHit.hh:48
G4double EdepGap
Definition: Em10CalorHit.hh:74
void AddAbs(G4double de, G4double dl)
Definition: Em10CalorHit.hh:63
const Em10CalorHit & operator=(const Em10CalorHit &)
Definition: Em10CalorHit.cc:64
G4double EdepAbs
Definition: Em10CalorHit.hh:69
G4double GetTrakGap()
Definition: Em10CalorHit.hh:69
G4Allocator< Em10CalorHit > Em10CalorHitAllocator
Definition: Em10CalorHit.cc:39
G4double GetEdepGap()
Definition: Em10CalorHit.hh:68
void AddGap(G4double de, G4double dl)
Definition: Em10CalorHit.hh:64
G4double TrackLengthGap
Definition: Em10CalorHit.hh:74
G4THitsCollection< Em10CalorHit > Em10CalorHitsCollection
Definition: Em10CalorHit.hh:79
G4double GetEdepAbs()
Definition: Em10CalorHit.hh:66
G4double GetTrakAbs()
Definition: Em10CalorHit.hh:67
double G4double
Definition: G4Types.hh:76