Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
FCALHadModuleSD.cc
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: FCALHadModuleSD.cc 84602 2014-10-17 07:46:09Z gcosmo $
27 //
28 //
29 
30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
32 
33 #include <iostream>
34 
35 
36 #include "FCALHadModuleSD.hh"
37 
38 #include "FCALCalorHit.hh"
39 
40 #include "FCALTestbeamSetup.hh"
41 #include "FCALHadModule.hh"
42 
43 #include "G4SystemOfUnits.hh"
44 #include "G4VPhysicalVolume.hh"
45 #include "G4Step.hh"
46 #include "G4Track.hh"
47 #include "G4VTouchable.hh"
48 #include "G4TouchableHistory.hh"
49 #include "G4SDManager.hh"
50 
51 #include "G4ios.hh"
52 
53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
54 
56  InitF2(0)
57 {
58  HadModule = new FCALHadModule();
59 }
60 
61 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
62 
64 {
65  delete HadModule;
66 }
67 
68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
69 
71 {
72  if(InitF2 == 0) {
74  InitF2++;
75  }
76  for (G4int j=0; j<2330; j++) { EvisF2Tile[j]=0.;}
77 }
78 
79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
80 
82 {
83 
85  if (edep==0.) return false;
86 
87  G4TouchableHistory* theTouchable
89  G4VPhysicalVolume* physVol = theTouchable->GetVolume();
90 
91 
92  if(strcmp(physVol->GetName(),"F2LArGapPhysical")==0){
93  G4int F2LArGapId = physVol->GetCopyNo();
94  G4int F2TileId = HadModule->GetF2TileID(F2LArGapId);
95  EvisF2Tile[F2TileId] = EvisF2Tile[F2TileId] + edep;
96  };
97 
98  return true;
99 }
100 
101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
102 
104 {
105  G4int NF2Tile = 0;
106  G4int i=0;
107  for (i=0; i<2330; i++){
108  if(EvisF2Tile[i] > 0.) {
109  NF2Tile++;
110  };};
111 
112  G4cout << "Number of F2 tiles with Positive energy : " << NF2Tile << G4endl;
113 
114 }
115 
116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
117 
119 {}
120 
121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
122 
124 {}
125 
126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
127 
129 {}
130 
131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
132 
const XML_Char * name
Definition: expat.h:151
const G4VTouchable * GetTouchable() const
G4StepPoint * GetPreStepPoint() const
#define G4endl
Definition: G4ios.hh:61
void EndOfEvent(G4HCofThisEvent *)
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4VPhysicalVolume * GetVolume(G4int depth=0) const
void InitializeGeometry()
G4double GetTotalEnergyDeposit() const
virtual G4int GetCopyNo() const =0
Definition: G4Step.hh:76
G4bool ProcessHits(G4Step *, G4TouchableHistory *)
Double_t edep
G4double EvisF2Tile[2330]
void Initialize(G4HCofThisEvent *)
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
FCALHadModule * HadModule
FCALHadModuleSD(G4String)
G4int GetF2TileID(G4int)
const G4String & GetName() const