Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:22:45

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 /// \file RE05/src/RE05TrackerSD.cc
0028 /// \brief Implementation of the RE05TrackerSD class
0029 //
0030 
0031 #include "RE05TrackerSD.hh"
0032 
0033 #include "RE05TrackerHit.hh"
0034 
0035 #include "G4HCofThisEvent.hh"
0036 #include "G4Step.hh"
0037 #include "G4TouchableHistory.hh"
0038 #include "G4ios.hh"
0039 
0040 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0041 
0042 RE05TrackerSD::RE05TrackerSD(G4String name) : G4VSensitiveDetector(name), fTrackerCollection(0)
0043 {
0044   G4String HCname;
0045   collectionName.insert(HCname = "trackerCollection");
0046 }
0047 
0048 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0049 
0050 RE05TrackerSD::~RE05TrackerSD() {}
0051 
0052 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0053 
0054 void RE05TrackerSD::Initialize(G4HCofThisEvent* HCE)
0055 {
0056   static int HCID = -1;
0057   fTrackerCollection = new RE05TrackerHitsCollection(SensitiveDetectorName, collectionName[0]);
0058   if (HCID < 0) {
0059     HCID = GetCollectionID(0);
0060   }
0061   HCE->AddHitsCollection(HCID, fTrackerCollection);
0062 }
0063 
0064 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0065 
0066 G4bool RE05TrackerSD::ProcessHits(G4Step* aStep, G4TouchableHistory*)
0067 {
0068   G4double edep = aStep->GetTotalEnergyDeposit();
0069   if (edep == 0.) return false;
0070 
0071   RE05TrackerHit* newHit = new RE05TrackerHit();
0072   newHit->SetEdep(edep);
0073   newHit->SetPos(aStep->GetPreStepPoint()->GetPosition());
0074   fTrackerCollection->insert(newHit);
0075 
0076   return true;
0077 }
0078 
0079 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0080 
0081 void RE05TrackerSD::EndOfEvent(G4HCofThisEvent*) {}
0082 
0083 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0084 
0085 void RE05TrackerSD::clear() {}
0086 
0087 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0088 
0089 void RE05TrackerSD::DrawAll() {}
0090 
0091 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0092 
0093 void RE05TrackerSD::PrintAll() {}
0094 
0095 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......