VMC Examples Version 6.6
Loading...
Searching...
No Matches
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
22using namespace std;
23
24/// \cond CLASSIMP
25ClassImp(A01DriftChamberHit)
26 /// \endcond
27
28 //_____________________________________________________________________________
30 : TObject(), fLayerID(z), fTime(0.), fLocalPos(), fWorldPos()
31{
32 /// Standard constructor
33 /// \param z The layer id
34}
35
36//_____________________________________________________________________________
38 : TObject(), fLayerID(-1), fTime(0.), fLocalPos(), fWorldPos()
39{
40 /// Default constructor
41}
42
43//_____________________________________________________________________________
45{
46 /// Destructor
47}
48
49//_____________________________________________________________________________
50void 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//_____________________________________________________________________________
61{
62 /// Reset all accounted values.
63
64 fLayerID = -1;
65 fTime = 0.;
66 fLocalPos = TVector3();
67 fWorldPos = TVector3();
68}
Definition of the A01DriftChamberHit class.
The drift chamber hit.
virtual void Print(Option_t *option="") const
Int_t fLayerID
The layer ID.
Double_t fTime
The hit time.
TVector3 fLocalPos
The local hit position.
TVector3 fWorldPos
The global hit position.