Loading...
Searching...
No Matches
B2TrackerHit.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//
26//
27/// \file B2TrackerHit.cc
28/// \brief Implementation of the B2TrackerHit class
29
30#include "B2TrackerHit.hh"
31#include "G4UnitsTable.hh"
32#include "G4VVisManager.hh"
33#include "G4Circle.hh"
34#include "G4Colour.hh"
35#include "G4VisAttributes.hh"
36
37#include <iomanip>
38
40
41//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42
44 : G4VHit(),
45 fTrackID(-1),
46 fChamberNb(-1),
47 fEdep(0.),
48 fPos(G4ThreeVector())
49{}
50
51//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
52
54
55//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
56
58 : G4VHit()
59{
60 fTrackID = right.fTrackID;
61 fChamberNb = right.fChamberNb;
62 fEdep = right.fEdep;
63 fPos = right.fPos;
64}
65
66//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
67
69{
71 fChamberNb = right.fChamberNb;
72 fEdep = right.fEdep;
73 fPos = right.fPos;
74
75 return *this;
76}
77
78//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79
81{
82 return ( this == &right ) ? true : false;
83}
84
85//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
86
88{
89 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
90 if(pVVisManager)
91 {
92 G4Circle circle(fPos);
93 circle.SetScreenSize(4.);
94 circle.SetFillStyle(G4Circle::filled);
95 G4Colour colour(1.,0.,0.);
96 G4VisAttributes attribs(colour);
97 circle.SetVisAttributes(attribs);
98 pVVisManager->Draw(circle);
99 }
100}
101
102//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
103
105{
106 G4cout
107 << " trackID: " << fTrackID << " chamberNb: " << fChamberNb
108 << "Edep: "
109 << std::setw(7) << G4BestUnit(fEdep,"Energy")
110 << " Position: "
111 << std::setw(7) << G4BestUnit( fPos,"Length")
112 << G4endl;
113}
114
115//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ThreadLocal G4Allocator< B2TrackerHit > * B2TrackerHitAllocator
Definition of the B2TrackerHit class.
Tracker hit class.
virtual void Print()
virtual void Draw()
virtual ~B2TrackerHit()
G4ThreeVector fPos
G4bool operator==(const B2TrackerHit &) const
G4double fEdep
const B2TrackerHit & operator=(const B2TrackerHit &)

Applications | User Support | Publications | Collaboration