Geant4  10.02
RE05MuonHit.cc
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: RE05MuonHit.cc 69764 2013-05-14 09:59:36Z 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 
45 {;}
46 
48 {;}
49 
51  : G4VHit()
52 {
53  edep = right.edep;
54  pos = right.pos;
55 }
56 
58 {
59  edep = right.edep;
60  pos = right.pos;
61  return *this;
62 }
63 
65 {
66  return (this==&right) ? 1 : 0;
67 }
68 
69 std::map<G4String,G4AttDef> RE05MuonHit::fAttDefs;
70 
72 {
74  if(pVVisManager)
75  {
76  G4Circle circle(pos);
77  circle.SetScreenSize(0.04);
79  G4Colour colour(1.,0.,0.);
80  G4VisAttributes attribs(colour);
81  circle.SetVisAttributes(attribs);
82  pVVisManager->Draw(circle);
83  }
84 }
85 
86 const std::map<G4String,G4AttDef>* RE05MuonHit::GetAttDefs() const
87 {
88  // G4AttDefs have to have long life. Use static member...
89  if (fAttDefs.empty()) {
90  fAttDefs["HitType"] =
91  G4AttDef("HitType","Type of hit","Physics","","G4String");
92  }
93  return &fAttDefs;
94 }
95 
96 std::vector<G4AttValue>* RE05MuonHit::CreateAttValues() const
97 {
98  // Create expendable G4AttsValues for picking...
99  std::vector<G4AttValue>* attValues = new std::vector<G4AttValue>;
100  attValues->push_back
101  (G4AttValue("HitType","RE05MuonHit",""));
102  //G4cout << "Checking...\n" << G4AttCheck(attValues, GetAttDefs());
103  return attValues;
104 }
105 
107 {;}
108 
109 
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
static G4VVisManager * GetConcreteInstance()
G4int operator==(const RE05MuonHit &right) const
Definition: RE05MuonHit.cc:64
static std::map< G4String, G4AttDef > fAttDefs
Definition: RE05MuonHit.hh:65
G4double edep
Definition: RE05MuonHit.hh:63
Definition of the RE05MuonHit class.
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
Definition: RE05MuonHit.cc:86
void SetFillStyle(FillStyle)
G4ThreadLocal G4Allocator< RE05MuonHit > * RE05MuonHitAllocator
Definition: RE05MuonHit.cc:42
Definition: G4VHit.hh:48
virtual void Print()
Definition: RE05MuonHit.cc:106
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
G4ThreeVector pos
Definition: RE05MuonHit.hh:64
virtual void Draw()
Definition: RE05MuonHit.cc:71
virtual ~RE05MuonHit()
Definition: RE05MuonHit.cc:47
virtual std::vector< G4AttValue > * CreateAttValues() const
Definition: RE05MuonHit.cc:96
void SetVisAttributes(const G4VisAttributes *)
Definition: G4Visible.cc:80
const RE05MuonHit & operator=(const RE05MuonHit &right)
Definition: RE05MuonHit.cc:57
void SetScreenSize(G4double)