Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
RE05MuonHit.cc
이 파일의 문서화 페이지로 가기
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: RE05MuonHit.cc 98775 2016-08-09 14:30:39Z gcosmo $
27 //
30 //
31 
32 #include "RE05MuonHit.hh"
33 #include "G4VVisManager.hh"
34 #include "G4Circle.hh"
35 #include "G4Colour.hh"
36 #include "G4VisAttributes.hh"
37 #include "G4UnitsTable.hh"
38 #include "G4AttValue.hh"
39 #include "G4AttDef.hh"
40 #include "G4AttCheck.hh"
41 
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 
47 : G4VHit(),fEdep(0.),fPos()
48 {}
49 
50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
51 
53 {}
54 
55 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
56 
58  : G4VHit()
59 {
60  fEdep = right.fEdep;
61  fPos = right.fPos;
62 }
63 
64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65 
67 {
68  fEdep = right.fEdep;
69  fPos = right.fPos;
70  return *this;
71 }
72 
73 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
74 
76 {
77  return (this==&right) ? 1 : 0;
78 }
79 
80 std::map<G4String,G4AttDef> RE05MuonHit::fAttDefs;
81 
82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83 
85 {
87  if(pVVisManager)
88  {
89  G4Circle circle(fPos);
90  circle.SetScreenSize(0.04);
92  G4Colour colour(1.,0.,0.);
93  G4VisAttributes attribs(colour);
94  circle.SetVisAttributes(attribs);
95  pVVisManager->Draw(circle);
96  }
97 }
98 
99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
100 
101 const std::map<G4String,G4AttDef>* RE05MuonHit::GetAttDefs() const
102 {
103  // G4AttDefs have to have long life. Use static member...
104  if (fAttDefs.empty()) {
105  fAttDefs["HitType"] =
106  G4AttDef("HitType","Type of hit","Physics","","G4String");
107  }
108  return &fAttDefs;
109 }
110 
111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
112 
113 std::vector<G4AttValue>* RE05MuonHit::CreateAttValues() const
114 {
115  // Create expendable G4AttsValues for picking...
116  std::vector<G4AttValue>* attValues = new std::vector<G4AttValue>;
117  attValues->push_back
118  (G4AttValue("HitType","RE05MuonHit",""));
119  //G4cout << "Checking...\n" << G4AttCheck(attValues, GetAttDefs());
120  return attValues;
121 }
122 
123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
124 
126 {}
127 
128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4int operator==(const RE05MuonHit &right) const
Definition: RE05MuonHit.cc:75
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
G4ThreadLocal G4Allocator< RE05MuonHit > * RE05MuonHitAllocator
Definition: RE05MuonHit.cc:42
Definition: G4VHit.hh:48
virtual void Draw()
Definition: RE05MuonHit.cc:84
Definition of the RE05MuonHit class.
G4double fEdep
Definition: RE05MuonHit.hh:62
#define G4ThreadLocal
Definition: tls.hh:69
static G4VVisManager * GetConcreteInstance()
void SetScreenSize(G4double)
G4ThreeVector fPos
Definition: RE05MuonHit.hh:63
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
Definition: RE05MuonHit.cc:101
virtual ~RE05MuonHit()
Definition: RE05MuonHit.cc:52
virtual void Print()
Definition: RE05MuonHit.cc:125
int G4int
Definition: G4Types.hh:78
virtual std::vector< G4AttValue > * CreateAttValues() const
Definition: RE05MuonHit.cc:113
static std::map< G4String, G4AttDef > fAttDefs
Definition: RE05MuonHit.hh:64
void SetVisAttributes(const G4VisAttributes *)
Definition: G4Visible.cc:80
void SetFillStyle(FillStyle)
const RE05MuonHit & operator=(const RE05MuonHit &right)
Definition: RE05MuonHit.cc:66