ACTARSim
ACTAR TPC Simulation Reference Guide
ActarSimSilRingGeantHit.cc
Go to the documentation of this file.
1 // - AUTHOR: Hector Alvarez-Pol 04/2008
2 /******************************************************************
3  * Copyright (C) 2005-2016, Hector Alvarez-Pol *
4  * All rights reserved. *
5  * *
6  * License according to GNU LESSER GPL (see lgpl-3.0.txt). *
7  * For the list of contributors see CREDITS. *
8  ******************************************************************/
9 //////////////////////////////////////////////////////////////////
10 /// \class ActarSimSilRingGeantHit
11 /// A Geant Hit in the Silicon volume. It represents
12 /// the information of each step with energy deposited.
13 /////////////////////////////////////////////////////////////////
14 
16 #include "G4UnitsTable.hh"
17 #include "G4VVisManager.hh"
18 #include "G4Circle.hh"
19 #include "G4Colour.hh"
20 #include "G4VisAttributes.hh"
21 
22 #include "G4PhysicalConstants.hh"
23 #include "G4SystemOfUnits.hh"
24 
25 G4Allocator<ActarSimSilRingGeantHit> ActarSimSilRingGeantHitAllocator;
26 
27 //////////////////////////////////////////////////////////////////
28 /// Constructor. Nothing to do.
30 }
31 
32 //////////////////////////////////////////////////////////////////
33 /// Destructor. Nothing to do.
35 }
36 
37 //////////////////////////////////////////////////////////////////
38 /// Copy constructor
40  edep = right.edep;
41  eBeforeSil = right.eBeforeSil;
42  eAfterSil = right.eAfterSil;
43  pos = right.pos;
44  prePos = right.prePos;
45  localPos = right.localPos;
46  localPrePos = right.localPrePos;
47  detName = right.detName;
48  postDetName = right.postDetName;
49  preDetName = right.preDetName;
50  detID = right.detID;
51  toF = right.toF;
52  trackID = right.trackID;
53  parentID = right.parentID;
54  particleID = right.particleID;
56  particleMass = right.particleMass;
57 }
58 
59 //////////////////////////////////////////////////////////////////
60 /// Operator =
62  edep = right.edep;
63  eBeforeSil = right.eBeforeSil;
64  eAfterSil = right.eAfterSil;
65  pos = right.pos;
66  prePos = right.prePos;
67  localPos = right.localPos;
68  localPrePos = right.localPrePos;
69  detName = right.detName;
70  postDetName = right.postDetName;
71  preDetName = right.preDetName;
72  detID = right.detID;
73  toF = right.toF;
74  trackID = right.trackID;
75  parentID = right.parentID;
76  particleID = right.particleID;
78  particleMass = right.particleMass;
79 
80  return *this;
81 }
82 
83 //////////////////////////////////////////////////////////////////
84 /// Operator ==
86  return (this==&right) ? 1 : 0;
87 }
88 
89 //////////////////////////////////////////////////////////////////
90 /// Draws the Hit. A clear red point on the Hit position
92  G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
93  if(pVVisManager) {
94  G4Circle circle(pos);
95  circle.SetScreenSize(4);
96  circle.SetFillStyle(G4Circle::filled);
97  G4Colour colour(1.,0.,0.);
98  G4VisAttributes attribs(colour);
99  circle.SetVisAttributes(attribs);
100  pVVisManager->Draw(circle);
101  }
102 }
103 
104 //////////////////////////////////////////////////////////////////
105 /// Prints full information about the calGeantHit
107  G4cout << "##################################################################"
108  << G4endl
109  << "############### ActarSimSilRingGeantHit::Print() ###################" << G4endl
110  << "trackID: " << trackID
111  << ", parentID: " << parentID
112  << ", particleID: " << particleID
113  << ", particleCharge: " << particleCharge << G4endl;
114  G4cout << "detID: " << detID
115  << ", detName: " << detName
116  << ", postDetName: " << postDetName
117  << ", preDetName: " << preDetName
118  << G4endl;
119  G4cout << "edep: " << edep / MeV << " MeV"
120  << ", pos: " << pos << " mm" << G4endl
121  << ", prePos: " << prePos << " mm" << G4endl;
122  G4cout << "toF: " << toF / ns << " ns" << ", localPos: " << localPos << " mm"
123  << ", localPrePos: " << localPrePos << " mm" << G4endl;
124  G4cout << "##################################################################"
125  << G4endl;
126 }
ActarSimSilRingGeantHit()
Constructor. Nothing to do.
const ActarSimSilRingGeantHit & operator=(const ActarSimSilRingGeantHit &)
Operator =.
G4ThreeVector prePos
PreStep position of the step.
void Draw()
Draws the Hit. A clear red point on the Hit position.
G4ThreeVector localPos
Local (for the given detName and detID) coordinates of interaction (postStep)
G4String detName
Name of the volume where the interaction takes place.
G4double particleCharge
Particle charge.
G4double eAfterSil
Energy when exiting silicon.
G4ThreeVector localPrePos
Local (for the given detName and detID) coordinates of interaction (postStep)
G4Allocator< ActarSimSilRingGeantHit > ActarSimSilRingGeantHitAllocator
G4double toF
ToF of the interaction (postStep)
G4int operator==(const ActarSimSilRingGeantHit &) const
Operator ==.
G4String preDetName
Name of the volume at the following step.
G4double particleMass
Particle mass.
G4double eBeforeSil
Energy before entering silicon.
G4double edep
Energy deposited in the step.
void Print()
Prints full information about the calGeantHit.
G4ThreeVector pos
PostStep position of the step.
G4String postDetName
Name of the volume at the previous step.
~ActarSimSilRingGeantHit()
Destructor. Nothing to do.
G4int detID
ID (copy) of the detector where the interaction takes place.