Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
parallel/TopC/ParN04/include/ExN04TrackerHit.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: ExN04TrackerHit.hh 66587 2012-12-21 11:06:44Z ihrivnac $
27 //
28 /// \file parallel/ParN04/include/ExN04TrackerHit.hh
29 /// \brief Definition of the ExN04TrackerHit class
30 //
31 //
32 // --------------------------------------------------------------
33 
34 #ifndef ExN04TrackerHit_h
35 #define ExN04TrackerHit_h 1
36 
37 
38 //MSH_include_begin
39 #include "MarshaledG4String.h"
40 //MSH_include_end
41 
42 #include "G4VHit.hh"
43 #include "G4THitsCollection.hh"
44 #include "G4Allocator.hh"
45 #include "G4ThreeVector.hh"
46 
47 
48 //MSH_BEGIN
49 class ExN04TrackerHit : public G4VHit
50 {
51  public:
52 
55 
58  G4int operator==(const ExN04TrackerHit &right) const;
59 
60  inline void* operator new(size_t);
61  inline void operator delete(void* aHit);
62 
63  void Draw();
64  void Print();
65 
66 
67  private:
68  G4ThreeVector pos; /*MSH: primitive
69  [elementGet: { $ELEMENT = $THIS->GetPos(); }]
70  [elementSet: { $THIS->SetPos($ELEMENT); }] */
71 
72  G4double edep; /*MSH: primitive
73  [elementGet: { $ELEMENT = $THIS->GetEdep(); }]
74  [elementSet: { $THIS->SetEdep($ELEMENT); }] */
75 
76 
77  public:
78 
79  inline void SetEdep(G4double de) {edep=de;}
80  inline void SetPos(G4ThreeVector xyz) {pos=xyz;}
81 
82  inline G4double GetEdep() const {return edep;}
83  inline G4ThreeVector GetPos() const {return pos;}
84 
85 };
86 //MSH_END
87 
88 // vector collection of one type of hits
90 
92 
93 inline void* ExN04TrackerHit::operator new(size_t)
94 {
95  void* aHit;
96  aHit = (void*) ExN04TrackerHitAllocator.MallocSingle();
97  return aHit;
98 }
99 
100 inline void ExN04TrackerHit::operator delete(void* aHit)
101 {
102  ExN04TrackerHitAllocator.FreeSingle((ExN04TrackerHit*) aHit);
103 }
104 
105 #endif
Type * MallocSingle()
Definition: G4Allocator.hh:191
void FreeSingle(Type *anElement)
Definition: G4Allocator.hh:201
G4Allocator< ExN04TrackerHit > ExN04TrackerHitAllocator
G4int operator==(const ExN04TrackerHit &right) const
Definition: G4VHit.hh:48
int G4int
Definition: G4Types.hh:78
const ExN04TrackerHit & operator=(const ExN04TrackerHit &right)
double G4double
Definition: G4Types.hh:76
G4THitsCollection< ExN04TrackerHit > ExN04TrackerHitsCollection