VMC Examples Version 6.6
Loading...
Searching...
No Matches
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
25ClassImp(Ex02TrackerHit)
26 /// \endcond
27
28 using namespace std;
29
30//_____________________________________________________________________________
32 : fTrackID(-1), fChamberNb(-1), fEdep(0.), fPos()
33{
34 /// Default constructor
35}
36
37//_____________________________________________________________________________
39{
40 /// Destructor
41}
42
43/*
44//_____________________________________________________________________________
45void 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//_____________________________________________________________________________
62void 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}
Definition of the Ex02TrackerHit class.
The tracker hit.
TVector3 fPos
Track position.
Int_t fTrackID
Track Id.
Int_t fChamberNb
Chamber number.
Double_t fEdep
Energy deposit.
virtual void Print(const Option_t *option="") const
virtual ~Ex02TrackerHit()