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 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/medical/dna/AuNP/src/HistoManager.cc (Version 11.3.0) and /examples/extended/medical/dna/AuNP/src/HistoManager.cc (Version 10.1.p3)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 /// \file medical/dna/range/src/HistoManager.c    
 27 /// \brief Implementation of the HistoManager     
 28 //                                                
 29 //                                                
 30 // $Id: HistoManager.cc 72238 2013-07-12 08:40    
 31 //                                                
 32 //....oooOO0OOooo........oooOO0OOooo........oo    
 33 //....oooOO0OOooo........oooOO0OOooo........oo    
 34                                                   
 35 #include "HistoManager.hh"                        
 36                                                   
 37 #include "DetectorConstruction.hh"                
 38                                                   
 39 #include "G4RunManager.hh"                        
 40 #include "G4UnitsTable.hh"                        
 41                                                   
 42 //....oooOO0OOooo........oooOO0OOooo........oo    
 43                                                   
 44 HistoManager::HistoManager() : fFileName("AuNP    
 45 {                                                 
 46   fpDetector = dynamic_cast<const DetectorCons    
 47     G4RunManager::GetRunManager()->GetUserDete    
 48                                                   
 49   Book();                                         
 50 }                                                 
 51                                                   
 52 //....oooOO0OOooo........oooOO0OOooo........oo    
 53                                                   
 54 HistoManager::~HistoManager() {}                  
 55                                                   
 56 //....oooOO0OOooo........oooOO0OOooo........oo    
 57                                                   
 58 void HistoManager::Book()                         
 59 {                                                 
 60   // Create or get analysis manager               
 61   G4AnalysisManager* analysisManager = G4Analy    
 62   analysisManager->SetDefaultFileType("root");    
 63   analysisManager->SetFileName(fFileName);        
 64   analysisManager->SetVerboseLevel(1);            
 65   analysisManager->SetActivation(true);           
 66                                                   
 67   // Define histograms start values               
 68   const G4String nameh1[] = {"h1Events",          
 69                              "h1Edep",            
 70                              "h1SecEnergyNP_ch    
 71                              "h1SecEnergyNP_nu    
 72                              "h1SecEnergyNPSur    
 73                              "h1SecEnergyNPSur    
 74                              "h1Sec_charged",     
 75                              "h1Sec_nutral",      
 76                              "h1Chem_0",          
 77                              "h1Chem_1",          
 78                              "h1Chem_2",          
 79                              "h1Chem_3",          
 80                              "h1Chem_4",          
 81                              "h1Chem_5",          
 82                              "h1Chem_6",          
 83                              "h1Chem_7",          
 84                              "h1IncEnergyNPSur    
 85                              "h1IncEnergyNPSur    
 86   const G4String nameh2[] = {"h2Edep", "h2SecE    
 87                                                   
 88   const G4String titleh1[] = {"Events",           
 89                               "Energy Deposit     
 90                               "Secondary Energ    
 91                               "Secondary Energ    
 92                               "Secondary Energ    
 93                               "Secondary Energ    
 94                               "Number of Secon    
 95                               "Number of Secon    
 96                               "Number of Chemi    
 97                               "Number of Chemi    
 98                               "Number of Chemi    
 99                               "Number of Chemi    
100                               "Number of Chemi    
101                               "Number of Chemi    
102                               "Number of Chemi    
103                               "Number of Chemi    
104                               "Energy of Incid    
105                               "Energy of Incid    
106   const G4String titleh2[] = {"Energy Deposit     
107                               "Secondary Energ    
108                               "Secondary Energ    
109                                                   
110   // for event counting                           
111   G4int nbin_eve = 1;                             
112   G4double vmin_eve = 0.;                         
113   G4double vmax_eve = 1.;                         
114                                                   
115   // for SecENP                                   
116   G4int nbin_senp = 1000;                         
117   G4double vmin_senp = 1.;                        
118   G4double vmax_senp = 1000000;                   
119                                                   
120   G4int NAzm = fpDetector->GetNReplicaAzm();      
121   G4int NR = fpDetector->GetNReplicaR();          
122   G4double Rmin = fpDetector->GetNPRadius() /     
123   G4double Rmax = fpDetector->GetAbsRadius() /    
124                                                   
125   G4int Runit = (G4int)(Rmax - Rmin) / NR;        
126   NR = NR + (G4int)(Rmin / Runit);                
127                                                   
128   // for dose distribution                        
129   G4int nbinAzm = NAzm;                           
130   G4double vminAzm = 0.;                          
131   G4double vmaxAzm = 360;                         
132   G4int nbinR2D = NR;                             
133   G4double vminR2D = 0.;                          
134   G4double vmaxR2D = 1000.;                       
135   G4int nbinR = NR;                               
136   G4double vminR_log = 10;                        
137   G4double vmaxR_log = Rmax;                      
138                                                   
139   analysisManager->CreateH1(nameh1[0], titleh1    
140   analysisManager->CreateH1(nameh1[1], titleh1    
141                             "log");               
142   analysisManager->CreateH1(nameh1[2], titleh1    
143                             "log");               
144   analysisManager->CreateH1(nameh1[3], titleh1    
145                             "log");               
146   analysisManager->CreateH1(nameh1[4], titleh1    
147                             "log");               
148   analysisManager->CreateH1(nameh1[5], titleh1    
149                             "log");               
150   analysisManager->CreateH1(nameh1[6], titleh1    
151                             "log");               
152   analysisManager->CreateH1(nameh1[7], titleh1    
153                             "log");               
154   analysisManager->CreateH1(nameh1[16], titleh    
155                             "none", "log");       
156   analysisManager->CreateH1(nameh1[17], titleh    
157                             "none", "log");       
158   analysisManager->CreateH1(nameh1[8], titleh1    
159                             "log");               
160   analysisManager->CreateH1(nameh1[9], titleh1    
161                             "log");               
162   analysisManager->CreateH1(nameh1[10], titleh    
163                             "log");               
164   analysisManager->CreateH1(nameh1[11], titleh    
165                             "log");               
166   analysisManager->CreateH1(nameh1[12], titleh    
167                             "log");               
168   analysisManager->CreateH1(nameh1[13], titleh    
169                             "log");               
170   analysisManager->CreateH1(nameh1[14], titleh    
171                             "log");               
172   analysisManager->CreateH1(nameh1[15], titleh    
173                             "log");               
174                                                   
175   analysisManager->CreateH2(nameh2[0], titleh2    
176                             vmaxR2D);             
177   analysisManager->CreateH2(nameh2[1], titleh2    
178                             vmax_senp, "none",    
179   analysisManager->CreateH2(nameh2[2], titleh2    
180                             vmax_senp, "none",    
181                                                   
182   analysisManager->SetH1Activation(0, true);      
183   analysisManager->SetH1Activation(1, true);      
184   analysisManager->SetH1Activation(2, true);      
185   analysisManager->SetH1Activation(3, true);      
186   analysisManager->SetH1Activation(4, true);      
187   analysisManager->SetH1Activation(5, true);      
188   analysisManager->SetH1Activation(6, true);      
189   analysisManager->SetH1Activation(7, true);      
190   analysisManager->SetH1Activation(8, true);      
191   analysisManager->SetH1Activation(9, true);      
192   analysisManager->SetH1Activation(10, true);     
193   analysisManager->SetH1Activation(11, true);     
194   analysisManager->SetH1Activation(12, true);     
195   analysisManager->SetH1Activation(13, true);     
196   analysisManager->SetH1Activation(14, true);     
197   analysisManager->SetH1Activation(15, true);     
198   analysisManager->SetH1Activation(16, true);     
199   analysisManager->SetH1Activation(17, true);     
200   analysisManager->SetH2Activation(0, true);      
201   analysisManager->SetH2Activation(1, true);      
202   analysisManager->SetH2Activation(2, true);      
203 }                                                 
204 //....oooOO0OOooo........oooOO0OOooo........oo    
205