Geant4  10.02.p02
ExP01TrackerHit.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 //
28 //
29 //
30 // $Id: ExP01TrackerHit.cc 71791 2013-06-24 14:08:28Z gcosmo $
31 //
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 
35 #include "ExP01TrackerHit.hh"
36 #include "G4UnitsTable.hh"
37 #include "G4VVisManager.hh"
38 #include "G4Circle.hh"
39 #include "G4Colour.hh"
40 #include "G4VisAttributes.hh"
41 
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 
47 : G4VHit(), fTrackID(0), fChamberNb(0), fEdep(0), fPos(0,0,0) {}
48 
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50 
52 
53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
54 
56  : G4VHit()
57 {
58  fTrackID = right.fTrackID;
59  fChamberNb = right.fChamberNb;
60  fEdep = right.fEdep;
61  fPos = right.fPos;
62 }
63 
64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65 
67 {
68  fTrackID = right.fTrackID;
69  fChamberNb = right.fChamberNb;
70  fEdep = right.fEdep;
71  fPos = right.fPos;
72  return *this;
73 }
74 
75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76 
78 {
79  return (this==&right) ? 1 : 0;
80 }
81 
82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83 
85 {
87  if(pVVisManager)
88  {
89  G4Circle circle(fPos);
90  circle.SetScreenSize(2.);
92  G4Colour colour(1.,0.,0.);
93  G4VisAttributes attribs(colour);
94  circle.SetVisAttributes(attribs);
95  pVVisManager->Draw(circle);
96  }
97 }
98 
99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
100 
102 {
103  G4cout << " trackID: " << fTrackID << " chamberNb: " << fChamberNb
104  << " energy deposit[MeV]: " << fEdep
105  << " position[mm]: " << fPos << G4endl;
106 }
107 
108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109 
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
virtual void Print()
static G4VVisManager * GetConcreteInstance()
G4int operator==(const ExP01TrackerHit &) const
void SetFillStyle(FillStyle)
Definition: G4VHit.hh:48
int G4int
Definition: G4Types.hh:78
Hit implementation for the persistency example.
G4GLOB_DLL std::ostream G4cout
virtual void Draw()
G4Allocator< ExP01TrackerHit > ExP01TrackerHitAllocator
const ExP01TrackerHit & operator=(const ExP01TrackerHit &)
void SetVisAttributes(const G4VisAttributes *)
Definition: G4Visible.cc:80
G4ThreeVector fPos
#define G4endl
Definition: G4ios.hh:61
Definition of the ExP01TrackerHit class.
void SetScreenSize(G4double)