|
|
|||
File indexing completed on 2026-03-30 07:50:13
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 ExN04CalorimeterHit.cc 0027 /// \brief Implementation of the ExN04CalorimeterHit class 0028 0029 #include "ExN04CalorimeterHit.hh" 0030 0031 #include "G4Colour.hh" 0032 #include "G4LogicalVolume.hh" 0033 #include "G4VVisManager.hh" 0034 #include "G4VisAttributes.hh" 0035 0036 G4Allocator<ExN04CalorimeterHit> ExN04CalorimeterHitAllocator; 0037 0038 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0039 ExN04CalorimeterHit::ExN04CalorimeterHit() : G4VHit(), fpLogV(NULL) {} 0040 0041 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0042 ExN04CalorimeterHit::ExN04CalorimeterHit(G4LogicalVolume* logVol, G4int z, G4int phi) 0043 : fZCellID(z), fPhiCellID(phi), fpLogV(logVol) 0044 {} 0045 0046 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0047 ExN04CalorimeterHit::ExN04CalorimeterHit(const ExN04CalorimeterHit& right) : G4VHit() 0048 { 0049 fZCellID = right.fZCellID; 0050 fPhiCellID = right.fPhiCellID; 0051 fedep = right.fedep; 0052 fpos = right.fpos; 0053 frot = right.frot; 0054 fpLogV = right.fpLogV; 0055 } 0056 0057 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0058 ExN04CalorimeterHit::~ExN04CalorimeterHit() {} 0059 0060 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0061 const ExN04CalorimeterHit& ExN04CalorimeterHit::operator=(const ExN04CalorimeterHit& right) 0062 { 0063 fZCellID = right.fZCellID; 0064 fPhiCellID = right.fPhiCellID; 0065 fedep = right.fedep; 0066 fpos = right.fpos; 0067 frot = right.frot; 0068 fpLogV = right.fpLogV; 0069 0070 return *this; 0071 } 0072 0073 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0074 G4bool ExN04CalorimeterHit::operator==(const ExN04CalorimeterHit& right) const 0075 { 0076 return ((fZCellID == right.fZCellID) && (fPhiCellID == right.fPhiCellID)); 0077 } 0078 0079 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0080 void ExN04CalorimeterHit::Draw() 0081 { 0082 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance(); 0083 0084 if (pVVisManager) { 0085 G4Transform3D trans(frot, fpos); 0086 G4VisAttributes attribs; 0087 const G4VisAttributes* pVA = fpLogV->GetVisAttributes(); 0088 if (pVA) attribs = *pVA; 0089 G4Colour colour(1., 0., 0.); 0090 attribs.SetColour(colour); 0091 attribs.SetForceWireframe(false); 0092 attribs.SetForceSolid(true); 0093 pVVisManager->Draw(*fpLogV, attribs, trans); 0094 } 0095 } 0096 0097 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0098 void ExN04CalorimeterHit::Print() {}
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|