Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExN05CalorimeterHit.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 //
26 //
27 // $Id$
28 //
29 
30 #ifndef ExN05CalorimeterHit_h
31 #define ExN05CalorimeterHit_h 1
32 
33 #include "G4VHit.hh"
34 #include "G4THitsCollection.hh"
35 #include "G4Allocator.hh"
36 #include "G4ThreeVector.hh"
37 #include "G4LogicalVolume.hh"
38 #include "G4Transform3D.hh"
39 #include "G4RotationMatrix.hh"
40 
42 {
43  public:
44 
50  G4int operator==(const ExN05CalorimeterHit &right) const;
51 
52 
53  inline void *operator new(size_t);
54  inline void operator delete(void *aHit);
55  void *operator new(size_t,void*p){return p;}
56 #ifndef G4NOT_ISO_DELETES
57  void operator delete(void *,void*){}
58 #endif
59 
60  void Draw();
61  void Print();
62 
63  private:
64  G4double edep;
65  G4ThreeVector pos;
66  G4RotationMatrix rot;
67  const G4LogicalVolume* pLogV;
68 
69  public:
70  inline void SetEdep(G4double de)
71  { edep = de; };
72  inline void AddEdep(G4double de)
73  { edep += de; };
74  inline G4double GetEdep()
75  { return edep; };
76  inline void SetPos(G4ThreeVector xyz)
77  { pos = xyz; };
79  { return pos; };
80  inline void SetRot(G4RotationMatrix rmat)
81  { rot = rmat; };
83  { return rot; };
84  inline const G4LogicalVolume * GetLogV()
85  { return pLogV; };
86 
87 };
88 
90 
92 
93 inline void* ExN05CalorimeterHit::operator new(size_t)
94 {
95  void *aHit;
96  aHit = (void *) ExN05CalorimeterHitAllocator.MallocSingle();
97  return aHit;
98 }
99 
100 inline void ExN05CalorimeterHit::operator delete(void *aHit)
101 {
102  ExN05CalorimeterHitAllocator.FreeSingle((ExN05CalorimeterHit*) aHit);
103 }
104 
105 #endif