Changeset 1315 for trunk/source/processes/hadronic/models/incl
- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- Location:
- trunk/source/processes/hadronic/models/incl
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/incl/GNUmakefile
r962 r1315 1 # $Id: GNUmakefile,v 1. 8 2008/07/11 08:25:37 gcosmoExp $1 # $Id: GNUmakefile,v 1.9 2010/04/27 16:02:37 kaitanie Exp $ 2 2 # ----------------------------------------------------------- 3 3 # GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96. … … 11 11 12 12 include $(G4INSTALL)/config/architecture.gmk 13 14 # INCL_DEBUG_LOG : Produce an ASCII log that contains detailed avatar 15 # and particle information 16 ifdef G4INCL_DEBUG_LOG 17 CPPFLAGS += -DG4INCL_DEBUG_LOG 18 endif 13 19 14 20 CPPFLAGS += -I$(G4BASE)/global/management/include \ -
trunk/source/processes/hadronic/models/incl/History
r1228 r1315 4 4 Geant4 - an Object-Oriented Toolkit for Physics Simulation 5 5 ========================================================== 6 $Id: History,v 1.2 6 2009/12/09 10:36:40kaitanie Exp $6 $Id: History,v 1.27 2010/04/27 16:02:37 kaitanie Exp $ 7 7 --------------------------------------------------------------------- 8 8 … … 16 16 * Please list in reverse chronological order (last date on top) 17 17 --------------------------------------------------------------- 18 19 27 April 2010 - Pekka Kaitaniemi (hadr-incl-V09-03-00) 20 ------------------------------------------------------ 21 - Fix: Nuclear deformation and shell effect data reader now constructs 22 the corresponding data tables correctly. 23 - Added some internal logging facilities to INCL (disabled by default) 18 24 19 25 09 December 2009 - Pekka Kaitaniemi (hadr-incl-V09-02-08) -
trunk/source/processes/hadronic/models/incl/include/G4Incl.hh
r1196 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4Incl.hh,v 1.1 5 2009/11/18 10:43:14kaitanie Exp $26 // $Id: G4Incl.hh,v 1.16 2010/04/27 16:02:37 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 637 637 G4double w(G4double a, G4double b, G4double c, G4double d); 638 638 G4int idnint(G4double a); 639 640 void print_log_start_step(); 641 void print_log_end_step(); 642 void print_log_entry(G4int iavatars, G4int iselected, G4int iparticles, G4int imin); 643 void print_avatars(); 644 void print_one_avatar(G4int index); 645 void print_one_particle(G4int index); 646 void print_three_vector(G4double x, G4double y, G4double z); 647 void print_map(); 648 639 649 private: 640 650 … … 819 829 G4Abla *abla; 820 830 G4InclRandomInterface *randomGenerator; 831 832 G4int inside_step; // Flag to determine whether we are inside or outside a simulation step 821 833 }; 822 834 -
trunk/source/processes/hadronic/models/incl/src/G4Incl.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4Incl.cc,v 1. 29 2009/12/09 10:36:40kaitanie Exp $26 // $Id: G4Incl.cc,v 1.30 2010/04/27 16:02:37 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 3410 3410 bl9->l2 = bl2->jnd[imin]; //NOTE: l2 changed to bl9->l2. 3411 3411 3412 #ifdef G4INCL_DEBUG_LOG 3413 // Print the debug log 3414 print_log_start_step(); 3415 print_log_entry(1, 1, 1, imin); 3416 print_log_end_step(); 3417 #endif 3418 3412 3419 // test le 20/3/2003: tue sinon le dernier avatar? 3413 3420 if (bl2->k == 0) { … … 7767 7774 } 7768 7775 } 7776 7777 // C------------------------------------------------------------------------ 7778 // C Logging 7779 // C 7780 7781 // C Start a new simulation step log entry 7782 // subroutine print_log_start_step() 7783 void G4Incl::print_log_start_step() 7784 { 7785 if(inside_step != 1) { 7786 G4cout << "(simulation-step " << G4endl; 7787 inside_step = 1; 7788 } else { 7789 G4cout << ";; Error: Can not start a new step inside s step" << G4endl; 7790 } 7791 } 7792 7793 // C End a simulation step 7794 // subroutine print_log_end_step() 7795 void G4Incl::print_log_end_step() 7796 { 7797 if(inside_step == 1) { 7798 G4cout <<") ;;ENDSIMULATIONSTEP" << G4endl; 7799 inside_step = 0; 7800 } else { 7801 G4cout <<";; Error: Not inside a step" << G4endl; 7802 } 7803 } 7804 7805 // C The main logging routine 7806 // C Parameters are used to select what to print. Possible options are: 7807 // C list of avatars, selected avatar, list of particles and 7808 // C the index of the selected avatar 7809 // subroutine print_log_entry(iavatars, iselected, iparticles, imin) 7810 void G4Incl::print_log_entry(G4int iavatars, G4int iselected, G4int iparticles, G4int imin) 7811 { 7812 // COMMON/BL1/P1(300),P2(300),P3(300),EPS(300),IND1(300),IND2(300),TA 7813 // COMMON/BL2/CROIS(19900),K,IND(20000),JND(20000) 7814 // COMMON/BL3/R1,R2,X1(300),X2(300),X3(300),IA1,IA2,RAB2 P-N22270 7815 7816 if(iavatars == 1) { 7817 G4cout <<";; List of avatars" << G4endl; 7818 print_avatars(); 7819 } 7820 7821 if(iselected == 1) { 7822 G4cout <<";; Selected avatar" << G4endl; 7823 print_one_avatar(imin); // (avatar ...) ;; Selected avatar (index: imin) 7824 } 7825 7826 if(iparticles == 1) { 7827 G4cout <<";; Particle avatar map" << G4endl; 7828 print_map(); // ((list particle-avatar-map particle-avatar-map ...)) 7829 } 7830 } 7831 7832 // subroutine print_avatars(crois, k, ind, jnd, p1, p2, p3, eps, ind1 7833 // s,ind2, ta, r1, r2, x1, x2, x3, ia1, ia2, rab2) 7834 void G4Incl::print_avatars() 7835 { 7836 // C COMMON/BL1/P1(350),P2(350),P3(350),EPS(350),IND1(350),IND2(350),TA 7837 // C -,V(350) P-N22260 7838 // C COMMON/BL2/CROIS(19900),K,IND(20000),JND(20000) 7839 // C COMMON/BL3/R1,R2,X1(350),X2(350),X3(350),IA1,IA2,RAB2 P-N22270 7840 7841 G4cout <<"(list ;; List of avatars" << G4endl; 7842 for(int i = 1; i <= bl2->k; ++i) { //do i=1,k 7843 print_one_avatar(i); 7844 } 7845 G4cout << ")" << G4endl; 7846 } 7847 7848 // C Prints the information of one avatar (selected using the index 7849 // C (values between 1 and K) in BL2 common block. 7850 // subroutine print_one_avatar(index) 7851 void G4Incl::print_one_avatar(G4int index) 7852 { 7853 // COMMON/BL1/P1(300),P2(300),P3(300),EPS(300),IND1(300),IND2(300),TA 7854 // COMMON/BL2/CROIS(19900),K,IND(20000),JND(20000) 7855 // COMMON/BL3/R1,R2,X1(300),X2(300),X3(300),IA1,IA2,RAB2 P-N22270 7856 7857 G4int i_ind1 = bl1->ind1[bl2->ind[index]]; 7858 // G4int i_ind2 = bl1->ind2[bl2->ind[index]]; 7859 G4int j_ind1 = -1; 7860 G4int j_ind2 = -1; 7861 7862 if(bl2->jnd[index] != -1) { 7863 j_ind1 = bl1->ind1[bl2->jnd[index]]; 7864 j_ind2 = bl1->ind2[bl2->jnd[index]]; 7865 } else { 7866 j_ind1 = -1; 7867 j_ind2 = -1; 7868 } 7869 7870 G4cout <<"(avatar " << bl2->crois[index] << G4endl;// Create avatar with time crois(index) 7871 7872 // C Now we print the avatar type 7873 if(i_ind1 == 0 && j_ind2 == 0) { // NN collision 7874 G4cout <<"(quote nn-collision)" << G4endl; 7875 } else if(bl2->ind[index] != -1 && bl2->jnd[index] == -1) { 7876 G4cout <<"(quote reflection)" << G4endl; 7877 } else { 7878 G4cout <<"(quote unidentified-avatar)" << G4endl; 7879 } 7880 7881 // C Print the list of particles in the avatar 7882 G4cout <<"(list ;; List of particles in the avatar" << G4endl; 7883 print_one_particle(bl2->ind[index]); 7884 if(bl2->jnd[index] != -1) { 7885 print_one_particle(bl2->jnd[index]); 7886 } 7887 G4cout <<") ;; End of the particle list" << G4endl; 7888 7889 G4cout <<") ;; End of the avatar" << G4endl; 7890 } 7891 7892 // C Prints the information of one particle in common blocks BL1 and BL3. 7893 // C The particle is selected by giving the index of the particle entry 7894 // C as a parameter. 7895 // subroutine print_one_particle(index) 7896 void G4Incl::print_one_particle(G4int index) 7897 { 7898 // COMMON/BL1/P1(300),P2(300),P3(300),EPS(300),IND1(300),IND2(300),TA 7899 // COMMON/BL2/CROIS(19900),K,IND(20000),JND(20000) 7900 // COMMON/BL3/R1,R2,X1(300),X2(300),X3(300),IA1,IA2,RAB2 P-N22270 7901 7902 // C Particle knows its ID, type position, momentum and energy 7903 G4cout <<"(particle " << index << G4endl; 7904 if(bl1->ind1[index] == 0) { // Nucleon 7905 if(bl1->ind1[index] == 1) G4cout << "(quote proton)" << G4endl; 7906 else if(bl1->ind1[index] == -1) G4cout << "(quote neutron)" << G4endl; 7907 else G4cout << "(quote unidentified-nucleon)" << G4endl; 7908 } else if(bl1->ind1[index] == 1) { // Delta 7909 if(bl1->ind2[index] >= -2 && bl1->ind2[index] <= 2) G4cout << "(quote delta-" 7910 << bl1->ind2[index] 7911 << ")" << G4endl; 7912 else G4cout << "(quote unidentified-delta)" << G4endl; 7913 } else { 7914 G4cout <<"(quote unidentified-particle)" << G4endl; 7915 } 7916 7917 print_three_vector (bl3->x1[index], bl3->x2[index], bl3->x3[index]); 7918 print_three_vector (bl1->p1[index], bl1->p2[index], bl1->p3[index]); 7919 7920 G4cout << bl1->eps[index] << G4endl; 7921 7922 G4cout <<")" << G4endl; // Close the particle s-expression 7923 } 7924 7925 // subroutine print_three_vector(x, y, z) 7926 void G4Incl::print_three_vector(G4double x, G4double y, G4double z) 7927 { 7928 G4cout <<"(vector3 " << x << " " << y << " " << z << ")" << G4endl; 7929 } 7930 7931 // subroutine print_map() 7932 void G4Incl::print_map() 7933 { 7934 // COMMON/BL1/P1(300),P2(300),P3(300),EPS(300),IND1(300),IND2(300),TA 7935 // COMMON/BL2/CROIS(19900),K,IND(20000),JND(20000) 7936 // COMMON/BL3/R1,R2,X1(300),X2(300),X3(300),IA1,IA2,RAB2 P-N22270 7937 7938 G4cout <<"(list ;; Particles at the beginning of the avatar" << G4endl; 7939 G4int ia = bl3->ia1 + bl3->ia2; 7940 for(G4int i = 1; i != ia; ++i) { // do i=1,IA 7941 print_one_particle(i); 7942 } 7943 G4cout <<")" << G4endl; 7944 } -
trunk/source/processes/hadronic/models/incl/src/G4InclAblaDataFile.cc
r962 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclAblaDataFile.cc,v 1. 7 2008/06/25 17:20:04kaitanie Exp $26 // $Id: G4InclAblaDataFile.cc,v 1.8 2010/04/27 16:02:37 kaitanie Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 90 90 const G4int cols = 154; 91 91 const G4int massnumbers = 263; 92 for(int i = 0; i < cols; i++) {93 for(int j = 0; j < rows; j++) {92 for(int i = 0; i < rows; i++) { 93 for(int j = 0; j < cols; j++) { 94 94 setAlpha(j, i, 0.0); 95 95 setEcnz( j, i, 0.0); 96 setVgsld(j, i, 0.0); 96 setVgsld(j, i, 0.0); 97 97 } 98 98 } 99 99 100 for(int i = 0; i < cols; i++) {101 for(int j = 0; j < rows; j++) {100 for(int i = 0; i < rows; i++) { 101 for(int j = 0; j < cols; j++) { 102 102 flalphain >> flalpha; 103 103 frldmin >> frldm; 104 104 vgsldin >> vgsld; 105 setAlpha( i, j, flalpha);106 setEcnz( i, j, frldm);107 setVgsld( i, j, vgsld);105 setAlpha(j, i, flalpha); 106 setEcnz( j, i, frldm); 107 setVgsld(j, i, vgsld); 108 108 } 109 109 }
Note: See TracChangeset
for help on using the changeset viewer.