|
|
|||
File indexing completed on 2026-03-28 07:49:53
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 GB03HodoHit.cc 0027 /// \brief Implementation of the GB03HodoHit class 0028 0029 #include "GB03HodoHit.hh" 0030 0031 #include "G4Circle.hh" 0032 #include "G4Colour.hh" 0033 #include "G4UnitsTable.hh" 0034 #include "G4VVisManager.hh" 0035 #include "G4VisAttributes.hh" 0036 0037 #include <iomanip> 0038 0039 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0040 0041 G4ThreadLocal G4Allocator<GB03HodoHit>* GB03HodoHitAllocator = nullptr; 0042 0043 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0044 0045 GB03HodoHit::GB03HodoHit(const GB03HodoHit& right) : G4VHit() 0046 { 0047 fEkin = right.fEkin; 0048 fWeight = right.fWeight; 0049 fEncoding = right.fEncoding; 0050 fPos = right.fPos; 0051 } 0052 0053 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0054 0055 const GB03HodoHit& GB03HodoHit::operator=(const GB03HodoHit& right) 0056 { 0057 fEkin = right.fEkin; 0058 fWeight = right.fWeight; 0059 fEncoding = right.fEncoding; 0060 fPos = right.fPos; 0061 return *this; 0062 } 0063 0064 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0065 0066 G4bool GB03HodoHit::operator==(const GB03HodoHit& right) const 0067 { 0068 return (this == &right); 0069 } 0070 0071 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0072 0073 void GB03HodoHit::Print() 0074 { 0075 G4cout << "PDGid " << std::setw(7) << fEncoding << " Ekin: " << std::setw(7) 0076 << G4BestUnit(fEkin, "Energy") << " Hit pos: " << std::setw(7) 0077 << G4BestUnit(fPos.x(), "Length") << ", " << std::setw(7) << G4BestUnit(fPos.y(), "Length") 0078 << ", " << std::setw(7) << G4BestUnit(fPos.z(), "Length") << " Weight " << fWeight 0079 << G4endl; 0080 } 0081 0082 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0083 0084 void GB03HodoHit::Draw() 0085 { 0086 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance(); 0087 if (pVVisManager != nullptr) { 0088 G4Circle circle(fPos); 0089 circle.SetScreenSize(0.04); 0090 circle.SetFillStyle(G4Circle::filled); 0091 G4Colour colour(1., 1., 0.); // Yellow 0092 G4VisAttributes attribs(colour); 0093 circle.SetVisAttributes(attribs); 0094 pVVisManager->Draw(circle); 0095 } 0096 } 0097 0098 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|