Geant4  10.02.p02
F01CalorHit.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: F01CalorHit.hh 76248 2013-11-08 11:19:52Z gcosmo $
31 //
32 //
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
35 
36 #ifndef F01CalorHit_h
37 #define F01CalorHit_h 1
38 
39 #include "G4VHit.hh"
40 #include "G4THitsCollection.hh"
41 #include "G4Allocator.hh"
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 
45 class F01CalorHit : public G4VHit
46 {
47  public:
48 
49  F01CalorHit();
50  F01CalorHit(const F01CalorHit&);
51  virtual ~F01CalorHit();
52 
53  const F01CalorHit& operator=(const F01CalorHit&);
54  G4int operator==(const F01CalorHit&) 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* F01CalorHit::operator new(size_t)
89 {
92  return (void*) F01CalorHitAllocator->MallocSingle();
93 }
94 
95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
96 
97 inline void F01CalorHit::operator delete(void* aHit)
98 {
99  F01CalorHitAllocator->FreeSingle((F01CalorHit*) aHit);
100 }
101 
102 #endif
G4double GetEdepAbs()
Definition: F01CalorHit.hh:68
G4double fTrackLengthGap
Definition: F01CalorHit.hh:76
virtual void Print()
Definition: F01CalorHit.cc:83
G4double fTrackLengthAbs
Definition: F01CalorHit.hh:71
virtual ~F01CalorHit()
Definition: F01CalorHit.cc:52
G4double GetTrackAbs()
Definition: F01CalorHit.hh:69
G4double GetTrackGap()
Definition: F01CalorHit.hh:71
Definition: G4VHit.hh:48
G4THitsCollection< F01CalorHit > F01CalorHitsCollection
Definition: F01CalorHit.hh:82
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
void AddAbs(G4double de, G4double dl)
Definition: F01CalorHit.hh:63
G4ThreadLocal G4Allocator< F01CalorHit > * F01CalorHitAllocator
Definition: F01CalorHit.cc:38
G4int operator==(const F01CalorHit &) const
Definition: F01CalorHit.cc:76
G4double fEdepAbs
Definition: F01CalorHit.hh:71
G4double fEdepGap
Definition: F01CalorHit.hh:76
G4double GetEdepGap()
Definition: F01CalorHit.hh:70
void AddGap(G4double de, G4double dl)
Definition: F01CalorHit.hh:65
double G4double
Definition: G4Types.hh:76
const F01CalorHit & operator=(const F01CalorHit &)
Definition: F01CalorHit.cc:67