Download
|
User Forum
|
Contact Us
|
Bug Reports
Home
>
Examples
Loading...
Searching...
No Matches
extended
eventgenerator
HepMC
HepMCEx01
src
ExN04CalorimeterHit.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
/// \file eventgenerator/HepMC/HepMCEx01/src/ExN04CalorimeterHit.cc
27
/// \brief Implementation of the ExN04CalorimeterHit class
28
//
29
//
30
31
#include "G4Colour.hh"
32
#include "G4LogicalVolume.hh"
33
#include "G4VisAttributes.hh"
34
#include "G4VVisManager.hh"
35
#include "
ExN04CalorimeterHit.hh
"
36
37
G4Allocator<ExN04CalorimeterHit>
ExN04CalorimeterHitAllocator
;
38
39
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
40
ExN04CalorimeterHit::ExN04CalorimeterHit
()
41
:
G4VHit
(), fpLogV(NULL)
42
{
43
}
44
45
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46
ExN04CalorimeterHit::ExN04CalorimeterHit
(
G4LogicalVolume
* logVol,
47
G4int z, G4int phi)
48
: fZCellID(z), fPhiCellID(phi), fpLogV(logVol)
49
{
50
}
51
52
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
53
ExN04CalorimeterHit::ExN04CalorimeterHit
(
const
ExN04CalorimeterHit
&
right
)
54
:
G4VHit
()
55
{
56
fZCellID
=
right
.fZCellID;
57
fPhiCellID
=
right
.fPhiCellID;
58
fedep
=
right
.fedep;
59
fpos
=
right
.fpos;
60
frot
=
right
.frot;
61
fpLogV
=
right
.fpLogV;
62
}
63
64
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65
ExN04CalorimeterHit::~ExN04CalorimeterHit
()
66
{
67
}
68
69
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70
const
ExN04CalorimeterHit
& ExN04CalorimeterHit::operator=
71
(
const
ExN04CalorimeterHit
&
right
)
72
{
73
fZCellID =
right
.
fZCellID
;
74
fPhiCellID =
right
.fPhiCellID;
75
fedep =
right
.fedep;
76
fpos =
right
.fpos;
77
frot =
right
.frot;
78
fpLogV =
right
.fpLogV;
79
80
return
*
this
;
81
}
82
83
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84
G4bool
ExN04CalorimeterHit::operator==
(
const
ExN04CalorimeterHit
&
right
)
const
85
{
86
return
( (
fZCellID
==
right
.fZCellID) &&
87
(
fPhiCellID
==
right
.fPhiCellID) );
88
}
89
90
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91
void
ExN04CalorimeterHit::Draw
()
92
{
93
G4VVisManager
* pVVisManager = G4VVisManager::GetConcreteInstance();
94
95
if
(pVVisManager) {
96
G4Transform3D trans(
frot
,
fpos
);
97
G4VisAttributes
attribs;
98
const
G4VisAttributes
* pVA =
fpLogV
-> GetVisAttributes();
99
if
( pVA ) attribs = *pVA;
100
G4Colour
colour(1., 0., 0.);
101
attribs.SetColour(colour);
102
attribs.SetForceWireframe(
false
);
103
attribs.SetForceSolid(
true
);
104
pVVisManager->
Draw
(*
fpLogV
, attribs, trans);
105
}
106
}
107
108
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109
void
ExN04CalorimeterHit::Print
()
110
{
111
}
ExN04CalorimeterHitAllocator
G4Allocator< ExN04CalorimeterHit > ExN04CalorimeterHitAllocator
Definition
ExN04CalorimeterHit.cc:37
ExN04CalorimeterHit.hh
Definition of the ExN04CalorimeterHit class.
right
@ right
Definition
F04UserTrackInformation.hh:36
ExN04CalorimeterHit
Definition
Doxymodules_eventgenerator.h:34
ExN04CalorimeterHit::frot
G4RotationMatrix frot
Definition
ExN04CalorimeterHit.hh:76
ExN04CalorimeterHit::fpos
G4ThreeVector fpos
Definition
ExN04CalorimeterHit.hh:75
ExN04CalorimeterHit::fPhiCellID
G4int fPhiCellID
Definition
ExN04CalorimeterHit.hh:73
ExN04CalorimeterHit::ExN04CalorimeterHit
ExN04CalorimeterHit()
Definition
ExN04CalorimeterHit.cc:40
ExN04CalorimeterHit::~ExN04CalorimeterHit
virtual ~ExN04CalorimeterHit()
Definition
ExN04CalorimeterHit.cc:65
ExN04CalorimeterHit::fedep
G4double fedep
Definition
ExN04CalorimeterHit.hh:74
ExN04CalorimeterHit::operator==
G4bool operator==(const ExN04CalorimeterHit &right) const
Definition
ExN04CalorimeterHit.cc:84
ExN04CalorimeterHit::fZCellID
G4int fZCellID
Definition
ExN04CalorimeterHit.hh:72
ExN04CalorimeterHit::fpLogV
const G4LogicalVolume * fpLogV
Definition
ExN04CalorimeterHit.hh:77
ExN04CalorimeterHit::Draw
virtual void Draw()
Definition
ExN04CalorimeterHit.cc:91
ExN04CalorimeterHit::Print
virtual void Print()
Definition
ExN04CalorimeterHit.cc:109
G4Allocator
G4Colour
G4LogicalVolume
G4VHit
G4VVisManager
G4VisAttributes
Generated on Tue Jan 30 2024 12:18:45 for Geant4 examples by
1.9.8
Applications
|
User Support
|
Publications
|
Collaboration