Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
FCALEMModuleSD.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: FCALEMModuleSD.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 "FCALEMModuleSD.hh"
37 
38 #include "FCALCalorHit.hh"
39 
40 #include "FCALTestbeamSetup.hh"
41 #include "FCALEMModule.hh"
42 #include "FCALSteppingAction.hh"
43 
44 #include "G4SystemOfUnits.hh"
45 #include "G4VPhysicalVolume.hh"
46 #include "G4Step.hh"
47 #include "G4Track.hh"
48 #include "G4VTouchable.hh"
49 #include "G4TouchableHistory.hh"
50 #include "G4SDManager.hh"
51 
52 #include "G4ios.hh"
53 
54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
55 
57  Init_state(0)
58 {
59  EmModule = new FCALEMModule();
60 }
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
63 
65 {
66  delete EmModule;
67 }
68 
69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
70 
72 {
73  if (Init_state==0)
74  {
76  Init_state++;
77  };
78 
79  for (G4int j=0 ; j<1131 ; j++) {EvisF1Tile[j] = 0.;}
80 }
81 
82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
83 
85 {
86 
88  if (edep==0.) return false;
89 
90  G4TouchableHistory* theTouchable
92  G4VPhysicalVolume* physVol = theTouchable->GetVolume();
93 
94 
95  if(strcmp(physVol->GetName(),"F1LArGapPhysical")==0){
96  G4int F1LArGapId = physVol->GetCopyNo();
97  G4int F1TileId = EmModule->GetF1TileID(F1LArGapId);
98  EvisF1Tile[F1TileId] = EvisF1Tile[F1TileId] + edep;
99  };
100 
101  return true;
102 }
103 
104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
105 
107 {
108  G4int NF1Tile = 0;
109  G4int i=0;
110  for (i=1; i <= 1130; i++){
111  if(EvisF1Tile[i] > 0.) {
112  NF1Tile++;
113  }
114  }
115 
116  G4cout << "Number of F1 Tiles with Positive energy : " << NF1Tile << G4endl;
117 
118 
119 }
120 
121 
122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
123 
125 {}
126 
127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
128 
130 {}
131 
132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
133 
135 {}
136 
137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
138 
const XML_Char * name
Definition: expat.h:151
G4int GetF1TileID(G4int)
G4double EvisF1Tile[1131]
const G4VTouchable * GetTouchable() const
G4bool ProcessHits(G4Step *, G4TouchableHistory *)
G4StepPoint * GetPreStepPoint() const
#define G4endl
Definition: G4ios.hh:61
void EndOfEvent(G4HCofThisEvent *)
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
FCALEMModule * EmModule
G4VPhysicalVolume * GetVolume(G4int depth=0) const
void Initialize(G4HCofThisEvent *)
G4double GetTotalEnergyDeposit() const
virtual G4int GetCopyNo() const =0
Definition: G4Step.hh:76
Double_t edep
int G4int
Definition: G4Types.hh:78
void InitializeGeometry()
Definition: FCALEMModule.cc:83
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
FCALEMModuleSD(G4String)