Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 98775 2016-08-09 14:30:39Z 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 std::map<G4String,G4AttDef> RE05TrackerHit::fAttDefs;
44 
45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46 
48 : G4VHit(),
49  fEdep(0.),fPos()
50 {}
51 
52 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
53 
55 {}
56 
57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58 
60  : G4VHit()
61 {
62  fEdep = right.fEdep;
63  fPos = right.fPos;
64 }
65 
66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
67 
69 {
70  fEdep = right.fEdep;
71  fPos = right.fPos;
72  return *this;
73 }
74 
75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76 
78 {
79  return (this==&right) ? 1 : 0;
80 }
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>* RE05TrackerHit::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>* RE05TrackerHit::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","RE05TrackerHit",""));
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......
129 
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:89
int G4int
Definition: G4Types.hh:78
Definition of the RE05TrackerHit class.
virtual std::vector< G4AttValue > * CreateAttValues() const
G4int operator==(const RE05TrackerHit &right) const
virtual void Print()
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)