Geant4  10.00.p02
RE05TrackerHit.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: RE05TrackerHit.cc 69764 2013-05-14 09:59:36Z gcosmo $
27 //
30 //
31 
32 #include "RE05TrackerHit.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> RE05TrackerHit::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>* RE05TrackerHit::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>* RE05TrackerHit::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","RE05TrackerHit",""));
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()
void SetFillStyle(FillStyle)
Definition: G4VHit.hh:48
#define G4ThreadLocal
Definition: tls.hh:52
int G4int
Definition: G4Types.hh:78
Definition of the RE05TrackerHit class.
virtual std::vector< G4AttValue > * CreateAttValues() const
static std::map< G4String, G4AttDef > fAttDefs
G4int operator==(const RE05TrackerHit &right) const
virtual void Print()
G4ThreeVector pos
void SetVisAttributes(const G4VisAttributes *)
Definition: G4Visible.cc:80
const RE05TrackerHit & operator=(const RE05TrackerHit &right)
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual ~RE05TrackerHit()
virtual void Draw()
G4ThreadLocal G4Allocator< RE05TrackerHit > * RE05TrackerHitAllocator
void SetScreenSize(G4double)