Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
ExN02TrackerHit.hh
이 파일의 문서화 페이지로 가기
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: ExN02TrackerHit.hh 66241 2012-12-13 18:34:42Z gunter $
31 //
32 // --------------------------------------------------------------
33 
34 #ifndef ExN02TrackerHit_h
35 #define ExN02TrackerHit_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 ExN02TrackerHit : public G4VHit
50 {
51  public:
52 
55 
58  G4int operator==(const ExN02TrackerHit&) const;
59 
60  inline void* operator new(size_t);
61  inline void operator delete(void*);
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  G4int trackID; /*MSH: primitive
77  [elementGet: { $ELEMENT = $THIS->GetTrackID(); }]
78  [elementSet: { $THIS->SetTrackID($ELEMENT); }] */
79 
80  G4int chamberNb; /*MSH: primitive
81  [elementGet: { $ELEMENT = $THIS->GetChamberNb(); }]
82  [elementSet: { $THIS->SetChamberNb($ELEMENT); }] */
83 
84 
85  public:
86 
87  inline void SetTrackID (G4int track) {trackID = track; }
88  inline void SetChamberNb(G4int chamb) {chamberNb = chamb; }
89  inline void SetEdep(G4double de) {edep=de;}
90  inline void SetPos(G4ThreeVector xyz) {pos=xyz;}
91 
92  inline G4int GetTrackID() const {return trackID; }
93  inline G4int GetChamberNb() const {return chamberNb; }
94  inline G4double GetEdep() const {return edep;}
95  inline G4ThreeVector GetPos() const {return pos;}
96 
97 };
98 //MSH_END
99 
100 // vector collection of one type of hits
102 
104 
105 inline void* ExN02TrackerHit::operator new(size_t)
106 {
107  void* aHit;
108  aHit = (void*) ExN02TrackerHitAllocator.MallocSingle();
109  return aHit;
110 }
111 
112 inline void ExN02TrackerHit::operator delete(void* aHit)
113 {
114  ExN02TrackerHitAllocator.FreeSingle((ExN02TrackerHit*) aHit);
115 }
116 
117 #endif
G4double GetEdep() const
Definition: G4VHit.hh:48
Type * MallocSingle()
Definition: G4Allocator.hh:202
void FreeSingle(Type *anElement)
Definition: G4Allocator.hh:212
const ExN02TrackerHit & operator=(const ExN02TrackerHit &)
G4ThreeVector pos
void SetPos(G4ThreeVector xyz)
double G4double
Definition: G4Types.hh:76
G4int GetTrackID() const
void SetEdep(G4double de)
G4THitsCollection< ExN02TrackerHit > ExN02TrackerHitsCollection
int G4int
Definition: G4Types.hh:78
void SetChamberNb(G4int chamb)
void SetTrackID(G4int track)
G4Allocator< ExN02TrackerHit > ExN02TrackerHitAllocator
G4int GetChamberNb() const
G4ThreeVector GetPos() const
G4int operator==(const ExN02TrackerHit &) const