Geant4  10.02.p01
ExGflashHit.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: ExGflashHit.cc 94396 2015-11-13 13:37:16Z gcosmo $
27 //
30 //
31 
32 #include "ExGflashHit.hh"
33 
34 #include "G4VVisManager.hh"
35 #include "G4Colour.hh"
36 #include "G4VisAttributes.hh"
37 #include "G4LogicalVolume.hh"
38 #include "G4Transform3D.hh"
39 
40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41 
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 
47 : G4VHit(), fLogV(0)
48 {}
49 
50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
51 
53 : G4VHit(), fLogV(logVol)
54 {}
55 
56 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
57 
59 {}
60 
61 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
62 
64 : G4VHit(right)
65 //@@@ ExGflashHit:Is it right with the init?
66 {
67  fEdep = right.fEdep;
68  fPos = right.fPos;
69  fStart =right.fStart;
70  fRot = right.fRot;
71  fLogV = right.fLogV;
73 }
74 
75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76 
78 {
79  G4VHit::operator=(right);
80  fEdep = right.fEdep;
81  fStart =right.fStart;
82  fPos = right.fPos;
83  fRot = right.fRot;
84  fLogV = right.fLogV;
87  return *this;
88 }
89 
90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91 
93 {
94 // @@@@ return 0;
95  if ((fPos==right.fPos) && (fEdep == right.fEdep)) return true;
96  else return false;
97 
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101 
103 {
105  if(pVVisManager)
106  {
107  G4Transform3D trans(fRot,fPos);
108  G4VisAttributes attribs;
109  const G4VisAttributes* pVA = fLogV->GetVisAttributes();
110  if(pVA) attribs = *pVA;
111  G4Colour colour(1.,0.,0.);
112  attribs.SetColour(colour);
113  attribs.SetForceWireframe(false);
114  attribs.SetForceSolid(true);
115  pVVisManager->Draw(*fLogV,attribs,trans);
116  }
117 }
118 
119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
120 
122 {}
123 
124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
125 
126 
127 
128 
129 
130 
131 
132 
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
void SetColour(const G4Colour &)
void SetForceWireframe(G4bool)
int operator==(const ExGflashHit &right) const
Definition: ExGflashHit.cc:92
static G4VVisManager * GetConcreteInstance()
virtual void Draw()
Definition: ExGflashHit.cc:102
Definition: G4VHit.hh:48
G4ThreeVector fPos
Definition: ExGflashHit.hh:65
void SetForceSolid(G4bool)
#define G4ThreadLocal
Definition: tls.hh:89
const G4LogicalVolume * fLogV
Definition: ExGflashHit.hh:69
G4ThreadLocal G4Allocator< ExGflashHit > * ExGflashHitAllocator
Definition: ExGflashHit.cc:42
const G4VisAttributes * GetVisAttributes() const
HepGeom::Transform3D G4Transform3D
Definition of the ExGflashHit class.
virtual void Print()
Definition: ExGflashHit.cc:121
G4int fCrystalNumber
Definition: ExGflashHit.hh:66
const ExGflashHit & operator=(const ExGflashHit &right)
Definition: ExGflashHit.cc:77
G4double fEdep
Definition: ExGflashHit.hh:64
G4ThreeVector fStart
Definition: ExGflashHit.hh:67
G4RotationMatrix fRot
Definition: ExGflashHit.hh:68