|
||||
File indexing completed on 2025-01-31 09:22:04
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 0027 #include "AnalysisManager.hh" 0028 #include "eRositaTrackerHit.hh" 0029 0030 #include "G4Circle.hh" 0031 #include "G4Colour.hh" 0032 #include "G4ios.hh" 0033 #include "G4UnitsTable.hh" 0034 #include "G4VisAttributes.hh" 0035 #include "G4VVisManager.hh" 0036 0037 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0038 0039 G4ThreadLocal G4Allocator<eRositaTrackerHit> *trackerHitAllocator{nullptr}; 0040 0041 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0042 0043 eRositaTrackerHit::eRositaTrackerHit() 0044 { 0045 } 0046 0047 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0048 0049 eRositaTrackerHit::~eRositaTrackerHit() 0050 { 0051 } 0052 0053 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0054 0055 eRositaTrackerHit::eRositaTrackerHit(const eRositaTrackerHit& right) : 0056 trackIdentifier(right.trackIdentifier), 0057 chamberNumber(right.chamberNumber), 0058 depositedEnergy(right.depositedEnergy), 0059 position(right.position) 0060 { 0061 } 0062 0063 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0064 0065 auto eRositaTrackerHit::operator=(const eRositaTrackerHit& right) -> const eRositaTrackerHit& 0066 { 0067 trackIdentifier = right.trackIdentifier; 0068 chamberNumber = right.chamberNumber; 0069 depositedEnergy = right.depositedEnergy; 0070 position = right.position; 0071 0072 return *this; 0073 } 0074 0075 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0076 0077 auto eRositaTrackerHit::operator==(const eRositaTrackerHit& right) const -> G4bool 0078 { 0079 return this == &right; 0080 } 0081 0082 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0083 0084 void eRositaTrackerHit::Draw() 0085 { 0086 auto *visualizationManager = G4VVisManager::GetConcreteInstance(); 0087 if (visualizationManager != nullptr) { 0088 constexpr auto CIRCLE_SCREEN_SIZE = 2.; 0089 0090 G4Circle circle(position); 0091 circle.SetScreenSize(CIRCLE_SCREEN_SIZE); 0092 circle.SetFillStyle(G4Circle::filled); 0093 G4Colour colour(1., 0., 0.); 0094 G4VisAttributes attributes(colour); 0095 circle.SetVisAttributes(attributes); 0096 visualizationManager->Draw(circle); 0097 } 0098 } 0099 0100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0101 0102 void eRositaTrackerHit::Print() 0103 { 0104 G4cout << " track identifier: " << trackIdentifier 0105 << " deposited energy: " << G4BestUnit(depositedEnergy, "Energy") 0106 << " position: " << G4BestUnit(position, "Length") << G4endl; 0107 } 0108 0109 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0110 0111 void eRositaTrackerHit::PrintToFile() const 0112 { 0113 // dataFile << trackIdentifier 0114 // << " " << depositedEnergy 0115 // << " " << position.x() 0116 // << " " << position.y() 0117 // << " " << position.z() 0118 // << std::endl; 0119 AnalysisManager::Instance()->Score(depositedEnergy); 0120 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |