SToGS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
SToGS_G4_TrackerHit.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 
27 #include "SToGS_G4_TrackerHit.hh"
28 #include "G4VVisManager.hh"
29 #include "G4Circle.hh"
30 #include "G4Colour.hh"
31 #include "G4VisAttributes.hh"
32 #include "G4UnitsTable.hh"
33 
34 G4ThreadLocal G4Allocator<SToGS::TrackerHit> *SToGS::TrackerHitAllocator = 0x0;
35 
37 {
38  ;
39 }
40 
42 {
43  ;
44 }
45 
47 {
48  if ( this == &from )
49  return;
50 
51  edep = from.edep;
52  pos = from.pos;
53  trackID = from.trackID;
54  parentID = from.parentID;
55  primaryID = from.primaryID;
56  detID = from.detID;
57  motherID = from.motherID;
58 
59  ToF = from.ToF;
60  processName = from.processName;
61  particleName = from.particleName;
62  detName = from.detName;
63  motherDetName = from.motherDetName;
64  PDGcode = from.PDGcode;
65 }
66 
68 {
69  if ( this == &from )
70  return (*this);
71 
72  edep = from.edep;
73  pos = from.pos;
74  trackID = from.trackID;
75  parentID = from.parentID;
76  primaryID = from.primaryID;
77  detID = from.detID;
78  motherID = from.motherID;
79 
80  ToF = from.ToF;
81  processName = from.processName;
82  particleName = from.particleName;
83  detName = from.detName;
84  motherDetName = from.motherDetName;
85  PDGcode = from.PDGcode;
86 
87  return (*this);
88 }
89 
91 {
92  return (this==&from) ? 1 : 0;
93 }
94 
96 {
97  G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
98  if(pVVisManager)
99  {
100  G4Circle circle(pos);
101  circle.SetScreenSize(0.04); circle.SetFillStyle(G4Circle::filled);
102 
103  G4Colour colour(1.,0.,0.);
104  G4VisAttributes attribs(G4Colour(1.,0.,0.)); circle.SetVisAttributes(attribs);
105  pVVisManager->Draw(circle);
106  }
107 }
108 
110 {
111 
112  G4cout << "--------------- SToGS::TrackerHit::Print() --------------------- " << G4endl;
113  G4cout << "trackID: " << trackID
114  << ", parentID: " << parentID
115  << ", primaryID: " << primaryID
116  << ", particleName: " << particleName
117  << ", PDG: " << PDGcode
118  << ", processName: " << processName
119  << G4endl
120  << "detID: " << detID
121  << ", detName: " << detName
122  << ", motherID: " << motherID
123  << ", motherDetName: " << motherDetName << G4endl;
124  G4cout << "edep: " << edep / CLHEP::keV << " keV"
125  << ", pos: " << pos
126  << ", ToF: " << ToF / CLHEP::ns << " ns" << G4endl;
127  G4cout << "--------------------------------------------------------------" << G4endl;
128 }
129 
130 
G4int operator==(const TrackerHit &right) const
const TrackerHit & operator=(const TrackerHit &right)
#define G4ThreadLocal
G4ThreadLocal G4Allocator< TrackerHit > * TrackerHitAllocator
Informations to be kept at each step if a positive energy is deposited in a sensitive detector...