Download
|
User Forum
|
Contact Us
|
Bug Reports
Home
>
Examples
Loading...
Searching...
No Matches
extended
parallel
TBB
B2b
src
B2TrackerHit.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
/// \file B2TrackerHit.cc
28
/// \brief Implementation of the B2TrackerHit class
29
30
#include "
B2TrackerHit.hh
"
31
#include "G4UnitsTable.hh"
32
#include "G4VVisManager.hh"
33
#include "G4Circle.hh"
34
#include "G4Colour.hh"
35
#include "G4VisAttributes.hh"
36
37
#include <iomanip>
38
39
G4ThreadLocal
G4Allocator<B2TrackerHit>
*
B2TrackerHitAllocator
=0;
40
41
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42
43
B2TrackerHit::B2TrackerHit
()
44
:
G4VHit
(),
45
fTrackID(-1),
46
fChamberNb(-1),
47
fEdep(0.),
48
fPos(G4ThreeVector())
49
{}
50
51
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
52
53
B2TrackerHit::~B2TrackerHit
() {}
54
55
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
56
57
B2TrackerHit::B2TrackerHit
(
const
B2TrackerHit
&
right
)
58
:
G4VHit
()
59
{
60
fTrackID
=
right
.fTrackID;
61
fChamberNb
=
right
.fChamberNb;
62
fEdep
=
right
.fEdep;
63
fPos
=
right
.fPos;
64
}
65
66
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
67
68
const
B2TrackerHit
&
B2TrackerHit::operator=
(
const
B2TrackerHit
&
right
)
69
{
70
fTrackID
=
right
.
fTrackID
;
71
fChamberNb
=
right
.fChamberNb;
72
fEdep
=
right
.fEdep;
73
fPos
=
right
.fPos;
74
75
return
*
this
;
76
}
77
78
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79
80
G4bool
B2TrackerHit::operator==
(
const
B2TrackerHit
&
right
)
const
81
{
82
return
(
this
== &
right
) ? true :
false
;
83
}
84
85
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
86
87
void
B2TrackerHit::Draw
()
88
{
89
G4VVisManager
* pVVisManager = G4VVisManager::GetConcreteInstance();
90
if
(pVVisManager)
91
{
92
G4Circle
circle(
fPos
);
93
circle.SetScreenSize(4.);
94
circle.SetFillStyle(G4Circle::filled);
95
G4Colour
colour(1.,0.,0.);
96
G4VisAttributes
attribs(colour);
97
circle.SetVisAttributes(attribs);
98
pVVisManager->Draw(circle);
99
}
100
}
101
102
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
103
104
void
B2TrackerHit::Print
()
105
{
106
G4cout
107
<<
" trackID: "
<<
fTrackID
<<
" chamberNb: "
<<
fChamberNb
108
<<
"Edep: "
109
<< std::setw(7) <<
G4BestUnit
(
fEdep
,
"Energy"
)
110
<<
" Position: "
111
<< std::setw(7) <<
G4BestUnit
(
fPos
,
"Length"
)
112
<< G4endl;
113
}
114
115
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B2TrackerHitAllocator
G4ThreadLocal G4Allocator< B2TrackerHit > * B2TrackerHitAllocator
Definition
B2TrackerHit.cc:39
B2TrackerHit.hh
Definition of the B2TrackerHit class.
right
@ right
Definition
F04UserTrackInformation.hh:36
B2TrackerHit
Tracker hit class.
Definition
Doxymodules_parallel.h:98
B2TrackerHit::Print
virtual void Print()
Definition
B2TrackerHit.cc:104
B2TrackerHit::Draw
virtual void Draw()
Definition
B2TrackerHit.cc:87
B2TrackerHit::~B2TrackerHit
virtual ~B2TrackerHit()
Definition
B2TrackerHit.cc:53
B2TrackerHit::fPos
G4ThreeVector fPos
Definition
B2TrackerHit.hh:80
B2TrackerHit::operator==
G4bool operator==(const B2TrackerHit &) const
Definition
B2TrackerHit.cc:80
B2TrackerHit::B2TrackerHit
B2TrackerHit()
Definition
B2TrackerHit.cc:43
B2TrackerHit::fEdep
G4double fEdep
Definition
B2TrackerHit.hh:79
B2TrackerHit::fChamberNb
G4int fChamberNb
Definition
B2TrackerHit.hh:78
B2TrackerHit::operator=
const B2TrackerHit & operator=(const B2TrackerHit &)
Definition
B2TrackerHit.cc:68
B2TrackerHit::fTrackID
G4int fTrackID
Definition
B2TrackerHit.hh:77
G4Allocator
G4BestUnit
G4Circle
G4Colour
G4VHit
G4VVisManager
G4VisAttributes
Generated on Tue Jan 30 2024 12:18:45 for Geant4 examples by
1.9.8
Applications
|
User Support
|
Publications
|
Collaboration