Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
parallel/TopC/ParN04/include/ExN04CalorimeterHit.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 // $Id: ExN04CalorimeterHit.hh 66587 2012-12-21 11:06:44Z ihrivnac $
27 //
28 /// \file parallel/ParN04/include/ExN04CalorimeterHit.hh
29 /// \brief Definition of the ExN04CalorimeterHit class
30 //
31 
32 #ifndef ExN04CalorimeterHit_h
33 #define ExN04CalorimeterHit_h 1
34 
35 
36 //MSH_include_begin
37 #include "MarshaledG4String.h"
38 //MSH_include_end
39 
40 
41 #include "G4VHit.hh"
42 #include "G4THitsCollection.hh"
43 #include "G4Allocator.hh"
44 #include "G4ThreeVector.hh"
45 #include "G4LogicalVolume.hh"
46 #include "G4Transform3D.hh"
47 #include "G4RotationMatrix.hh"
48 
49 
50 //MSH_BEGIN
51 class ExN04CalorimeterHit : public G4VHit
52 {
53  public:
54 
61 
62  inline void *operator new(size_t);
63  inline void operator delete(void *aHit);
64 
65  void Draw();
66  void Print();
67 
68  private:
69 
70  G4int ZCellID; /*MSH: primitive
71  [elementGet: { $ELEMENT = $THIS->GetZ(); }]
72  [elementSet: { $THIS->SetCellID($ELEMENT, $THIS->GetPhi()); }] */
73 
74  G4int PhiCellID; /*MSH: primitive
75  [elementGet: { $ELEMENT = $THIS->GetPhi(); }]
76  [elementSet: { $THIS->SetCellID($THIS->GetZ(), $ELEMENT); }] */
77 
78 
79  G4double edep; /*MSH: primitive
80  [elementGet: { $ELEMENT = $THIS->GetEdep(); }]
81  [elementSet: { $THIS->SetEdep($ELEMENT); }] */
82 
83  G4ThreeVector pos; /*MSH: primitive
84  [elementGet: { $ELEMENT = $THIS->GetPos(); }]
85  [elementSet: { $THIS->SetPos($ELEMENT); }] */
86 
87  G4RotationMatrix rot;
88  const G4LogicalVolume* pLogV;
89 
90 
91 
92  public:
93  inline void SetCellID(G4int z,G4int phi)
94  {
95  ZCellID = z;
96  PhiCellID = phi;
97  }
98  inline G4int GetZ() { return ZCellID; }
99  inline G4int GetPhi() { return PhiCellID; }
100  inline void SetEdep(G4double de)
101  { edep = de; }
102  inline void AddEdep(G4double de)
103  { edep += de; }
104  inline G4double GetEdep()
105  { return edep; }
106  inline void SetPos(G4ThreeVector xyz)
107  { pos = xyz; }
109  { return pos; }
110  inline void SetRot(G4RotationMatrix rmat)
111  { rot = rmat; }
113  { return rot; }
114  inline const G4LogicalVolume * GetLogV()
115  { return pLogV; }
116 
117 };
118 //MSH_END
119 
121 
123 
124 inline void* ExN04CalorimeterHit::operator new(size_t)
125 {
126  void *aHit;
127  aHit = (void *) ExN04CalorimeterHitAllocator.MallocSingle();
128  return aHit;
129 }
130 
131 inline void ExN04CalorimeterHit::operator delete(void *aHit)
132 {
133  ExN04CalorimeterHitAllocator.FreeSingle((ExN04CalorimeterHit*) aHit);
134 }
135 
136 #endif
137 
138 
Type * MallocSingle()
Definition: G4Allocator.hh:191
G4THitsCollection< ExN04CalorimeterHit > ExN04CalorimeterHitsCollection
G4double z
Definition: TRTMaterials.hh:39
void FreeSingle(Type *anElement)
Definition: G4Allocator.hh:201
Definition: G4VHit.hh:48
int G4int
Definition: G4Types.hh:78
G4int operator==(const ExN04CalorimeterHit &right) const
const ExN04CalorimeterHit & operator=(const ExN04CalorimeterHit &right)
G4Allocator< ExN04CalorimeterHit > ExN04CalorimeterHitAllocator
double G4double
Definition: G4Types.hh:76