|
|
|||
File indexing completed on 2026-05-18 07:54:14
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 ExN04TrackerSD.cc 0027 /// \brief Implementation of the ExN04TrackerSD class 0028 0029 #include "ExN04TrackerSD.hh" 0030 0031 #include "ExN04TrackerHit.hh" 0032 0033 #include "G4HCofThisEvent.hh" 0034 #include "G4Step.hh" 0035 #include "G4TouchableHistory.hh" 0036 0037 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0038 ExN04TrackerSD::ExN04TrackerSD(G4String name) : G4VSensitiveDetector(name) 0039 { 0040 G4String HCname; 0041 collectionName.insert(HCname = "trackerCollection"); 0042 } 0043 0044 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0045 ExN04TrackerSD::~ExN04TrackerSD() 0046 { 0047 ; 0048 } 0049 0050 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0051 void ExN04TrackerSD::Initialize(G4HCofThisEvent* HCE) 0052 { 0053 static int HCID = -1; 0054 fTrackerCollection = new ExN04TrackerHitsCollection(SensitiveDetectorName, collectionName[0]); 0055 if (HCID < 0) { 0056 HCID = GetCollectionID(0); 0057 } 0058 HCE->AddHitsCollection(HCID, fTrackerCollection); 0059 } 0060 0061 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0062 G4bool ExN04TrackerSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) 0063 { 0064 G4double edep = aStep->GetTotalEnergyDeposit(); 0065 if (edep == 0.) return false; 0066 0067 ExN04TrackerHit* newHit = new ExN04TrackerHit(); 0068 newHit->SetEdep(edep); 0069 newHit->SetPos(aStep->GetPreStepPoint()->GetPosition()); 0070 fTrackerCollection->insert(newHit); 0071 0072 return true; 0073 } 0074 0075 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0076 void ExN04TrackerSD::EndOfEvent(G4HCofThisEvent*) {} 0077 0078 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0079 void ExN04TrackerSD::clear() {} 0080 0081 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0082 void ExN04TrackerSD::DrawAll() {} 0083 0084 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0085 void ExN04TrackerSD::PrintAll() {}
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|