|
|
|||
File indexing completed on 2026-06-24 07:53:49
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 /// \file ExTGTrackerHit.cc 0027 /// \brief Implementation of the ExTGTrackerHit class 0028 0029 #include "ExTGTrackerHit.hh" 0030 0031 #include "G4Circle.hh" 0032 #include "G4Colour.hh" 0033 #include "G4UnitsTable.hh" 0034 #include "G4VVisManager.hh" 0035 #include "G4VisAttributes.hh" 0036 0037 G4ThreadLocal G4Allocator<ExTGTrackerHit>* ExTGTrackerHitAllocator = 0; 0038 0039 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0040 ExTGTrackerHit::ExTGTrackerHit() {} 0041 0042 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0043 ExTGTrackerHit::~ExTGTrackerHit() {} 0044 0045 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0046 ExTGTrackerHit::ExTGTrackerHit(const ExTGTrackerHit& right) : G4VHit() 0047 { 0048 fTrackID = right.fTrackID; 0049 fChamberNb = right.fChamberNb; 0050 fEdep = right.fEdep; 0051 fPos = right.fPos; 0052 } 0053 0054 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0055 const ExTGTrackerHit& ExTGTrackerHit::operator=(const ExTGTrackerHit& right) 0056 { 0057 fTrackID = right.fTrackID; 0058 fChamberNb = right.fChamberNb; 0059 fEdep = right.fEdep; 0060 fPos = right.fPos; 0061 return *this; 0062 } 0063 0064 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0065 G4bool ExTGTrackerHit::operator==(const ExTGTrackerHit& right) const 0066 { 0067 return (this == &right) ? true : false; 0068 } 0069 0070 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0071 void ExTGTrackerHit::Draw() 0072 { 0073 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance(); 0074 if (pVVisManager) { 0075 G4Circle circle(fPos); 0076 circle.SetScreenSize(2.); 0077 circle.SetFillStyle(G4Circle::filled); 0078 G4Colour colour(1., 0., 0.); 0079 G4VisAttributes attribs(colour); 0080 circle.SetVisAttributes(attribs); 0081 pVVisManager->Draw(circle); 0082 } 0083 } 0084 0085 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0086 void ExTGTrackerHit::Print() 0087 { 0088 G4cout << " trackID: " << fTrackID << " chamberNb: " << fChamberNb 0089 << " energy deposit: " << G4BestUnit(fEdep, "Energy") 0090 << " position: " << G4BestUnit(fPos, "Length") << G4endl; 0091 }
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|