|
||||
File indexing completed on 2025-01-18 09:16:57
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 // 0028 0029 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0030 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0031 0032 #include <iostream> 0033 0034 0035 #include "FCALHadModuleSD.hh" 0036 0037 #include "FCALCalorHit.hh" 0038 0039 #include "FCALTestbeamSetup.hh" 0040 #include "FCALHadModule.hh" 0041 0042 #include "G4SystemOfUnits.hh" 0043 #include "G4VPhysicalVolume.hh" 0044 #include "G4Step.hh" 0045 #include "G4Track.hh" 0046 #include "G4VTouchable.hh" 0047 #include "G4TouchableHistory.hh" 0048 #include "G4SDManager.hh" 0049 0050 #include "G4ios.hh" 0051 0052 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0053 0054 FCALHadModuleSD::FCALHadModuleSD(G4String name) : G4VSensitiveDetector(name), 0055 InitF2(0) 0056 { 0057 HadModule = new FCALHadModule(); 0058 } 0059 0060 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0061 0062 FCALHadModuleSD::~FCALHadModuleSD() 0063 { 0064 delete HadModule; 0065 } 0066 0067 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0068 0069 void FCALHadModuleSD::Initialize(G4HCofThisEvent*) 0070 { 0071 if(InitF2 == 0) { 0072 HadModule->InitializeGeometry(); 0073 InitF2++; 0074 } 0075 for (G4int j=0; j<2330; j++) { EvisF2Tile[j]=0.;} 0076 } 0077 0078 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0079 0080 G4bool FCALHadModuleSD::ProcessHits(G4Step* aStep,G4TouchableHistory*) 0081 { 0082 0083 G4double edep = aStep->GetTotalEnergyDeposit(); 0084 if (edep==0.) return false; 0085 0086 G4TouchableHistory* theTouchable 0087 = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable()); 0088 G4VPhysicalVolume* physVol = theTouchable->GetVolume(); 0089 0090 0091 if(strcmp(physVol->GetName(),"F2LArGapPhysical")==0){ 0092 G4int F2LArGapId = physVol->GetCopyNo(); 0093 G4int F2TileId = HadModule->GetF2TileID(F2LArGapId); 0094 EvisF2Tile[F2TileId] = EvisF2Tile[F2TileId] + edep; 0095 }; 0096 0097 return true; 0098 } 0099 0100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0101 0102 void FCALHadModuleSD::EndOfEvent(G4HCofThisEvent*) 0103 { 0104 G4int NF2Tile = 0; 0105 G4int i=0; 0106 for (i=0; i<2330; i++){ 0107 if(EvisF2Tile[i] > 0.) { 0108 NF2Tile++; 0109 };}; 0110 0111 G4cout << "Number of F2 tiles with Positive energy : " << NF2Tile << G4endl; 0112 0113 } 0114 0115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0116 0117 void FCALHadModuleSD::clear() 0118 {} 0119 0120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0121 0122 void FCALHadModuleSD::DrawAll() 0123 {} 0124 0125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0126 0127 void FCALHadModuleSD::PrintAll() 0128 {} 0129 0130 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0131
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |