Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // 23 // 27 // ------------------------------------------- 24 // -------------------------------------------------------------- 28 // GEANT 4 - Underground Dark Matter Detecto 25 // GEANT 4 - Underground Dark Matter Detector Advanced Example 29 // 26 // 30 // For information related to this code c 27 // For information related to this code contact: Alex Howard 31 // e-mail: alexander.howard@cern.ch << 28 // e-mail: a.s.howard@ic.ac.uk 32 // ------------------------------------------- 29 // -------------------------------------------------------------- 33 // Comments 30 // Comments 34 // 31 // 35 // Underground Advanced 32 // Underground Advanced 36 // by A. Howard and H. Araujo 33 // by A. Howard and H. Araujo 37 // (27th November 2001) 34 // (27th November 2001) 38 // 35 // 39 // ScintHit (scintillator sensitive detector d 36 // ScintHit (scintillator sensitive detector definition) program 40 // ------------------------------------------- 37 // -------------------------------------------------------------- 41 38 42 #include "DMXScintHit.hh" 39 #include "DMXScintHit.hh" 43 #include "G4UnitsTable.hh" 40 #include "G4UnitsTable.hh" 44 #include "G4VVisManager.hh" 41 #include "G4VVisManager.hh" 45 #include "G4Circle.hh" 42 #include "G4Circle.hh" 46 #include "G4Colour.hh" 43 #include "G4Colour.hh" 47 #include "G4VisAttributes.hh" 44 #include "G4VisAttributes.hh" 48 #include <iomanip> 45 #include <iomanip> 49 46 50 G4ThreadLocal G4Allocator<DMXScintHit> *DMXSci << 47 G4Allocator<DMXScintHit> DMXScintHitAllocator; 51 48 52 //....oooOO0OOooo........oooOO0OOooo........oo 49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 53 50 54 DMXScintHit::DMXScintHit() 51 DMXScintHit::DMXScintHit() 55 { 52 { 56 edep=0.; 53 edep=0.; 57 pos = G4ThreeVector(0., 0., 0.); 54 pos = G4ThreeVector(0., 0., 0.); 58 time = 0.; 55 time = 0.; 59 particleEnergy = 0.; 56 particleEnergy = 0.; 60 } 57 } 61 58 62 //....oooOO0OOooo........oooOO0OOooo........oo 59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 63 60 64 DMXScintHit::~DMXScintHit() 61 DMXScintHit::~DMXScintHit() 65 {;} 62 {;} 66 63 67 //....oooOO0OOooo........oooOO0OOooo........oo 64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 68 65 69 DMXScintHit::DMXScintHit(const DMXScintHit& ri 66 DMXScintHit::DMXScintHit(const DMXScintHit& right) 70 : G4VHit(right) 67 : G4VHit(right) 71 { 68 { 72 edep = right.edep; 69 edep = right.edep; 73 pos = right.pos; 70 pos = right.pos; 74 time = right.time; 71 time = right.time; 75 particleName = right.particleName; 72 particleName = right.particleName; 76 particleEnergy = right.particleEnergy; 73 particleEnergy = right.particleEnergy; 77 } 74 } 78 75 79 //....oooOO0OOooo........oooOO0OOooo........oo 76 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 80 77 81 const DMXScintHit& DMXScintHit::operator=(cons 78 const DMXScintHit& DMXScintHit::operator=(const DMXScintHit& right) 82 { 79 { 83 edep = right.edep; 80 edep = right.edep; 84 pos = right.pos; 81 pos = right.pos; 85 time = right.time; 82 time = right.time; 86 particleName = right.particleName; 83 particleName = right.particleName; 87 particleEnergy = right.particleEnergy; 84 particleEnergy = right.particleEnergy; 88 return *this; 85 return *this; 89 } 86 } 90 87 91 //....oooOO0OOooo........oooOO0OOooo........oo 88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 92 89 93 G4bool DMXScintHit::operator==(const DMXScintH << 90 int DMXScintHit::operator==(const DMXScintHit& right) const 94 { 91 { 95 return (this==&right) ? true : false; << 92 return (this==&right) ? 1 : 0; 96 } 93 } 97 94 98 //....oooOO0OOooo........oooOO0OOooo........oo 95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 99 void DMXScintHit::Draw() 96 void DMXScintHit::Draw() 100 {;} 97 {;} 101 98 102 //....oooOO0OOooo........oooOO0OOooo........oo 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 103 100 104 void DMXScintHit::Print() 101 void DMXScintHit::Print() 105 { 102 { 106 103 107 G4cout << " LXe hit ENERGY: " << std::s 104 G4cout << " LXe hit ENERGY: " << std::setw(5) << G4BestUnit(edep,"Energy") 108 << ", at " << G4BestUnit(pos,"Length") << G 105 << ", at " << G4BestUnit(pos,"Length") << G4endl; 109 } 106 } 110 107 111 //....oooOO0OOooo........oooOO0OOooo........oo 108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 112 109 113 110 114 111