VMC Examples
Version 6.6
Loading...
Searching...
No Matches
examples
E02
src
Ex02TrackerHit.cxx
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Virtual Monte Carlo examples
3
// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4
// All rights reserved.
5
//
6
// For the licensing terms see geant4_vmc/LICENSE.
7
// Contact: root-vmc@cern.ch
8
//-------------------------------------------------
9
10
/// \file Ex02TrackerHit.cxx
11
/// \brief Implementation of the Ex02TrackerHit class
12
///
13
/// Geant4 ExampleN02 adapted to Virtual Monte Carlo \n
14
/// Id: Ex02TrackerHit.cc,v 1.7 2002/01/09 17:24:10 ranjard Exp \n
15
/// GEANT4 tag Name: geant4-04-00-patch-02
16
///
17
/// \date 21/04/2002
18
/// \author I. Hrivnacova; IPN, Orsay
19
20
#include <iostream>
21
22
#include "
Ex02TrackerHit.h
"
23
24
/// \cond CLASSIMP
25
ClassImp(
Ex02TrackerHit
)
26
/// \endcond
27
28
using namespace
std;
29
30
//_____________________________________________________________________________
31
Ex02TrackerHit::Ex02TrackerHit
()
32
: fTrackID(-1), fChamberNb(-1), fEdep(0.), fPos()
33
{
34
/// Default constructor
35
}
36
37
//_____________________________________________________________________________
38
Ex02TrackerHit::~Ex02TrackerHit
()
39
{
40
/// Destructor
41
}
42
43
/*
44
//_____________________________________________________________________________
45
void Ex02TrackerHit::Draw()
46
{
47
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
48
if(pVVisManager)
49
{
50
G4Circle circle(pos);
51
circle.SetScreenSize(0.04);
52
circle.SetFillStyle(G4Circle::filled);
53
G4Colour colour(1.,0.,0.);
54
G4VisAttributes attribs(colour);
55
circle.SetVisAttributes(attribs);
56
pVVisManager->Draw(circle);
57
}
58
}
59
*/
60
61
//_____________________________________________________________________________
62
void
Ex02TrackerHit::Print
(
const
Option_t*
/*opt*/
)
const
63
{
64
/// Printing
65
66
cout <<
" trackID: "
<<
fTrackID
<<
" chamberNb: "
<<
fChamberNb
67
<<
" energy deposit (keV): "
<<
fEdep
* 1.0e06 <<
" position (cm): ("
68
<<
fPos
[0] <<
", "
<<
fPos
[1] <<
", "
<<
fPos
[2] <<
")"
<< endl;
69
}
Ex02TrackerHit.h
Definition of the Ex02TrackerHit class.
Ex02TrackerHit
The tracker hit.
Definition
Ex02TrackerHit.h:32
Ex02TrackerHit::fPos
TVector3 fPos
Track position.
Definition
Ex02TrackerHit.h:79
Ex02TrackerHit::Ex02TrackerHit
Ex02TrackerHit()
Definition
Ex02TrackerHit.cxx:31
Ex02TrackerHit::fTrackID
Int_t fTrackID
Track Id.
Definition
Ex02TrackerHit.h:76
Ex02TrackerHit::fChamberNb
Int_t fChamberNb
Chamber number.
Definition
Ex02TrackerHit.h:77
Ex02TrackerHit::fEdep
Double_t fEdep
Energy deposit.
Definition
Ex02TrackerHit.h:78
Ex02TrackerHit::Print
virtual void Print(const Option_t *option="") const
Definition
Ex02TrackerHit.cxx:62
Ex02TrackerHit::~Ex02TrackerHit
virtual ~Ex02TrackerHit()
Definition
Ex02TrackerHit.cxx:38
Generated on Thu Nov 28 2024 11:31:17 for VMC Examples by
1.12.0