VMC Examples
Version 6.6
Loading...
Searching...
No Matches
examples
A01
src
A01DriftChamberHit.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 A01DriftChamberHit.cxx
11
/// \brief Implementation of the A01DriftChamberHit class
12
///
13
/// Geant4 example A01 adapted to Virtual Monte Carlo
14
///
15
/// \date 12/05/2012
16
/// \author I. Hrivnacova; IPN, Orsay
17
18
#include <Riostream.h>
19
20
#include "
A01DriftChamberHit.h
"
21
22
using namespace
std;
23
24
/// \cond CLASSIMP
25
ClassImp(
A01DriftChamberHit
)
26
/// \endcond
27
28
//_____________________________________________________________________________
29
A01DriftChamberHit
::
A01DriftChamberHit
(Int_t z)
30
:
TObject
(), fLayerID(z), fTime(0.), fLocalPos(), fWorldPos()
31
{
32
/// Standard constructor
33
/// \param z The layer id
34
}
35
36
//_____________________________________________________________________________
37
A01DriftChamberHit::A01DriftChamberHit
()
38
:
TObject
(), fLayerID(-1), fTime(0.), fLocalPos(), fWorldPos()
39
{
40
/// Default constructor
41
}
42
43
//_____________________________________________________________________________
44
A01DriftChamberHit::~A01DriftChamberHit
()
45
{
46
/// Destructor
47
}
48
49
//_____________________________________________________________________________
50
void
A01DriftChamberHit::Print
(Option_t*
/*option*/
)
const
51
{
52
/// Print hit info
53
54
cout <<
" Layer["
<<
fLayerID
<<
"] : time "
<<
fTime
* 1e+09
55
<<
" (nsec) --- local (x,y) "
<<
fLocalPos
.X() * 10. <<
", "
56
<<
fLocalPos
.Y() * 10 <<
" (mm)"
<< endl;
57
}
58
59
//_____________________________________________________________________________
60
void
A01DriftChamberHit::Reset
()
61
{
62
/// Reset all accounted values.
63
64
fLayerID
= -1;
65
fTime
= 0.;
66
fLocalPos
= TVector3();
67
fWorldPos
= TVector3();
68
}
A01DriftChamberHit.h
Definition of the A01DriftChamberHit class.
A01DriftChamberHit
The drift chamber hit.
Definition
A01DriftChamberHit.h:31
A01DriftChamberHit::~A01DriftChamberHit
virtual ~A01DriftChamberHit()
Definition
A01DriftChamberHit.cxx:44
A01DriftChamberHit::Reset
void Reset()
Definition
A01DriftChamberHit.cxx:60
A01DriftChamberHit::A01DriftChamberHit
A01DriftChamberHit()
Definition
A01DriftChamberHit.cxx:37
A01DriftChamberHit::Print
virtual void Print(Option_t *option="") const
Definition
A01DriftChamberHit.cxx:50
A01DriftChamberHit::fLayerID
Int_t fLayerID
The layer ID.
Definition
A01DriftChamberHit.h:54
A01DriftChamberHit::fTime
Double_t fTime
The hit time.
Definition
A01DriftChamberHit.h:55
A01DriftChamberHit::fLocalPos
TVector3 fLocalPos
The local hit position.
Definition
A01DriftChamberHit.h:56
A01DriftChamberHit::fWorldPos
TVector3 fWorldPos
The global hit position.
Definition
A01DriftChamberHit.h:57
TObject
Generated on Thu Oct 17 2024 08:29:51 for VMC Examples by
1.12.0