diff --git a/HOWTO b/HOWTO index 4eb80a248efe7c050a16c7b25a356c00ab39990a..a4a3a4a4adb950cd36aad437ea88907b3ca7a352 100644 --- a/HOWTO +++ b/HOWTO @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/INSTALL b/INSTALL index 5f4fa705f21ec3375cb06ba952f17382b93c083a..f712ec176f846e67e5bf78f5fdb42feb40503747 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -54,7 +54,9 @@ III) INSTALLATION b) First, you need to define some environment variables. You can source the NPEnvironment.bash or NPEnvironment.tchrc file - depending on your shell. + depending on your shell or include the relevant lines in your + .bashrc or .tcshrc file. Don't forget to customize these file + with the relevant path to your NPTool installation. This step is mandatory since the Makefiles used to build the package depend on some of these environment variables. @@ -76,3 +78,6 @@ III) INSTALLATION cd Template make This step is not mandatory for the G4 simulation to work. + If you want to use the ROOT macros in the $NPAnalysis/macros + directory you should execute in a ROOT terminal the commands + you can find in rootlogon.C diff --git a/Inputs/CrossSection/132Sndp_10A_MeV_2f7_ZR_FRC.lis b/Inputs/CrossSection/132Sndp_10A_MeV_2f7_ZR_FRC.lis new file mode 100644 index 0000000000000000000000000000000000000000..ce79c97691b6bff13341633e0a0d80ac4aa318d0 --- /dev/null +++ b/Inputs/CrossSection/132Sndp_10A_MeV_2f7_ZR_FRC.lis @@ -0,0 +1,180 @@ + 0.00 1.3462E+00 + 1.00 1.3514E+00 + 2.00 1.3667E+00 + 3.00 1.3912E+00 + 4.00 1.4235E+00 + 5.00 1.4617E+00 + 6.00 1.5036E+00 + 7.00 1.5465E+00 + 8.00 1.5880E+00 + 9.00 1.6253E+00 + 10.00 1.6560E+00 + 11.00 1.6779E+00 + 12.00 1.6892E+00 + 13.00 1.6883E+00 + 14.00 1.6745E+00 + 15.00 1.6475E+00 + 16.00 1.6074E+00 + 17.00 1.5550E+00 + 18.00 1.4916E+00 + 19.00 1.4189E+00 + 20.00 1.3388E+00 + 21.00 1.2537E+00 + 22.00 1.1659E+00 + 23.00 1.0778E+00 + 24.00 9.9188E-01 + 25.00 9.1010E-01 + 26.00 8.3436E-01 + 27.00 7.6610E-01 + 28.00 7.0638E-01 + 29.00 6.5580E-01 + 30.00 6.1451E-01 + 31.00 5.8225E-01 + 32.00 5.5836E-01 + 33.00 5.4186E-01 + 34.00 5.3155E-01 + 35.00 5.2602E-01 + 36.00 5.2380E-01 + 37.00 5.2344E-01 + 38.00 5.2353E-01 + 39.00 5.2283E-01 + 40.00 5.2029E-01 + 41.00 5.1508E-01 + 42.00 5.0664E-01 + 43.00 4.9465E-01 + 44.00 4.7904E-01 + 45.00 4.5999E-01 + 46.00 4.3784E-01 + 47.00 4.1310E-01 + 48.00 3.8641E-01 + 49.00 3.5846E-01 + 50.00 3.2997E-01 + 51.00 3.0165E-01 + 52.00 2.7416E-01 + 53.00 2.4807E-01 + 54.00 2.2388E-01 + 55.00 2.0195E-01 + 56.00 1.8253E-01 + 57.00 1.6576E-01 + 58.00 1.5166E-01 + 59.00 1.4015E-01 + 60.00 1.3106E-01 + 61.00 1.2416E-01 + 62.00 1.1916E-01 + 63.00 1.1574E-01 + 64.00 1.1356E-01 + 65.00 1.1229E-01 + 66.00 1.1162E-01 + 67.00 1.1124E-01 + 68.00 1.1090E-01 + 69.00 1.1037E-01 + 70.00 1.0950E-01 + 71.00 1.0815E-01 + 72.00 1.0624E-01 + 73.00 1.0374E-01 + 74.00 1.0063E-01 + 75.00 9.6948E-02 + 76.00 9.2758E-02 + 77.00 8.8137E-02 + 78.00 8.3179E-02 + 79.00 7.7987E-02 + 80.00 7.2667E-02 + 81.00 6.7326E-02 + 82.00 6.2064E-02 + 83.00 5.6972E-02 + 84.00 5.2130E-02 + 85.00 4.7608E-02 + 86.00 4.3458E-02 + 87.00 3.9720E-02 + 88.00 3.6417E-02 + 89.00 3.3560E-02 + 90.00 3.1146E-02 + 91.00 2.9158E-02 + 92.00 2.7571E-02 + 93.00 2.6351E-02 + 94.00 2.5456E-02 + 95.00 2.4840E-02 + 96.00 2.4455E-02 + 97.00 2.4249E-02 + 98.00 2.4174E-02 + 99.00 2.4181E-02 + 100.00 2.4225E-02 + 101.00 2.4267E-02 + 102.00 2.4271E-02 + 103.00 2.4208E-02 + 104.00 2.4056E-02 + 105.00 2.3799E-02 + 106.00 2.3426E-02 + 107.00 2.2933E-02 + 108.00 2.2323E-02 + 109.00 2.1602E-02 + 110.00 2.0782E-02 + 111.00 1.9876E-02 + 112.00 1.8903E-02 + 113.00 1.7882E-02 + 114.00 1.6834E-02 + 115.00 1.5778E-02 + 116.00 1.4735E-02 + 117.00 1.3723E-02 + 118.00 1.2758E-02 + 119.00 1.1856E-02 + 120.00 1.1029E-02 + 121.00 1.0284E-02 + 122.00 9.6287E-03 + 123.00 9.0660E-03 + 124.00 8.5967E-03 + 125.00 8.2187E-03 + 126.00 7.9277E-03 + 127.00 7.7175E-03 + 128.00 7.5802E-03 + 129.00 7.5067E-03 + 130.00 7.4870E-03 + 131.00 7.5108E-03 + 132.00 7.5676E-03 + 133.00 7.6472E-03 + 134.00 7.7401E-03 + 135.00 7.8375E-03 + 136.00 7.9313E-03 + 137.00 8.0149E-03 + 138.00 8.0825E-03 + 139.00 8.1299E-03 + 140.00 8.1539E-03 + 141.00 8.1527E-03 + 142.00 8.1255E-03 + 143.00 8.0728E-03 + 144.00 7.9958E-03 + 145.00 7.8968E-03 + 146.00 7.7786E-03 + 147.00 7.6444E-03 + 148.00 7.4980E-03 + 149.00 7.3433E-03 + 150.00 7.1843E-03 + 151.00 7.0249E-03 + 152.00 6.8691E-03 + 153.00 6.7204E-03 + 154.00 6.5822E-03 + 155.00 6.4574E-03 + 156.00 6.3484E-03 + 157.00 6.2573E-03 + 158.00 6.1857E-03 + 159.00 6.1345E-03 + 160.00 6.1042E-03 + 161.00 6.0948E-03 + 162.00 6.1056E-03 + 163.00 6.1357E-03 + 164.00 6.1836E-03 + 165.00 6.2475E-03 + 166.00 6.3252E-03 + 167.00 6.4144E-03 + 168.00 6.5123E-03 + 169.00 6.6163E-03 + 170.00 6.7236E-03 + 171.00 6.8313E-03 + 172.00 6.9367E-03 + 173.00 7.0369E-03 + 174.00 7.1296E-03 + 175.00 7.2123E-03 + 176.00 7.2829E-03 + 177.00 7.3397E-03 + 178.00 7.3814E-03 + 179.00 7.4068E-03 diff --git a/Inputs/CrossSection/132Sndp_10A_MeV_3p3_ZR_FRC.lis b/Inputs/CrossSection/132Sndp_10A_MeV_3p3_ZR_FRC.lis new file mode 100644 index 0000000000000000000000000000000000000000..e88fba66aa295f22c1acd9fc5fe3b5dc3318ea6f --- /dev/null +++ b/Inputs/CrossSection/132Sndp_10A_MeV_3p3_ZR_FRC.lis @@ -0,0 +1,180 @@ + 0.00 1.0371E+00 + 1.00 1.0303E+00 + 2.00 1.0103E+00 + 3.00 9.7770E-01 + 4.00 9.3402E-01 + 5.00 8.8111E-01 + 6.00 8.2140E-01 + 7.00 7.5780E-01 + 8.00 6.9354E-01 + 9.00 6.3199E-01 + 10.00 5.7645E-01 + 11.00 5.2991E-01 + 12.00 4.9476E-01 + 13.00 4.7268E-01 + 14.00 4.6444E-01 + 15.00 4.6984E-01 + 16.00 4.8774E-01 + 17.00 5.1611E-01 + 18.00 5.5220E-01 + 19.00 5.9279E-01 + 20.00 6.3440E-01 + 21.00 6.7364E-01 + 22.00 7.0747E-01 + 23.00 7.3337E-01 + 24.00 7.4958E-01 + 25.00 7.5507E-01 + 26.00 7.4961E-01 + 27.00 7.3360E-01 + 28.00 7.0807E-01 + 29.00 6.7443E-01 + 30.00 6.3445E-01 + 31.00 5.9000E-01 + 32.00 5.4304E-01 + 33.00 4.9542E-01 + 34.00 4.4879E-01 + 35.00 4.0454E-01 + 36.00 3.6378E-01 + 37.00 3.2725E-01 + 38.00 2.9542E-01 + 39.00 2.6851E-01 + 40.00 2.4648E-01 + 41.00 2.2916E-01 + 42.00 2.1623E-01 + 43.00 2.0724E-01 + 44.00 2.0168E-01 + 45.00 1.9899E-01 + 46.00 1.9856E-01 + 47.00 1.9981E-01 + 48.00 2.0215E-01 + 49.00 2.0506E-01 + 50.00 2.0808E-01 + 51.00 2.1079E-01 + 52.00 2.1283E-01 + 53.00 2.1391E-01 + 54.00 2.1378E-01 + 55.00 2.1227E-01 + 56.00 2.0927E-01 + 57.00 2.0476E-01 + 58.00 1.9876E-01 + 59.00 1.9139E-01 + 60.00 1.8280E-01 + 61.00 1.7318E-01 + 62.00 1.6276E-01 + 63.00 1.5176E-01 + 64.00 1.4042E-01 + 65.00 1.2899E-01 + 66.00 1.1771E-01 + 67.00 1.0680E-01 + 68.00 9.6462E-02 + 69.00 8.6886E-02 + 70.00 7.8213E-02 + 71.00 7.0542E-02 + 72.00 6.3934E-02 + 73.00 5.8409E-02 + 74.00 5.3950E-02 + 75.00 5.0511E-02 + 76.00 4.8019E-02 + 77.00 4.6380E-02 + 78.00 4.5481E-02 + 79.00 4.5196E-02 + 80.00 4.5387E-02 + 81.00 4.5913E-02 + 82.00 4.6637E-02 + 83.00 4.7429E-02 + 84.00 4.8173E-02 + 85.00 4.8774E-02 + 86.00 4.9153E-02 + 87.00 4.9254E-02 + 88.00 4.9035E-02 + 89.00 4.8474E-02 + 90.00 4.7562E-02 + 91.00 4.6306E-02 + 92.00 4.4724E-02 + 93.00 4.2850E-02 + 94.00 4.0726E-02 + 95.00 3.8402E-02 + 96.00 3.5934E-02 + 97.00 3.3382E-02 + 98.00 3.0803E-02 + 99.00 2.8253E-02 + 100.00 2.5780E-02 + 101.00 2.3430E-02 + 102.00 2.1240E-02 + 103.00 1.9241E-02 + 104.00 1.7454E-02 + 105.00 1.5893E-02 + 106.00 1.4565E-02 + 107.00 1.3469E-02 + 108.00 1.2595E-02 + 109.00 1.1931E-02 + 110.00 1.1458E-02 + 111.00 1.1157E-02 + 112.00 1.1003E-02 + 113.00 1.0973E-02 + 114.00 1.1040E-02 + 115.00 1.1179E-02 + 116.00 1.1365E-02 + 117.00 1.1574E-02 + 118.00 1.1785E-02 + 119.00 1.1977E-02 + 120.00 1.2137E-02 + 121.00 1.2253E-02 + 122.00 1.2316E-02 + 123.00 1.2321E-02 + 124.00 1.2265E-02 + 125.00 1.2147E-02 + 126.00 1.1968E-02 + 127.00 1.1729E-02 + 128.00 1.1436E-02 + 129.00 1.1094E-02 + 130.00 1.0711E-02 + 131.00 1.0295E-02 + 132.00 9.8568E-03 + 133.00 9.4050E-03 + 134.00 8.9484E-03 + 135.00 8.4946E-03 + 136.00 8.0503E-03 + 137.00 7.6215E-03 + 138.00 7.2132E-03 + 139.00 6.8301E-03 + 140.00 6.4764E-03 + 141.00 6.1557E-03 + 142.00 5.8708E-03 + 143.00 5.6235E-03 + 144.00 5.4145E-03 + 145.00 5.2436E-03 + 146.00 5.1096E-03 + 147.00 5.0109E-03 + 148.00 4.9455E-03 + 149.00 4.9113E-03 + 150.00 4.9062E-03 + 151.00 4.9279E-03 + 152.00 4.9741E-03 + 153.00 5.0421E-03 + 154.00 5.1293E-03 + 155.00 5.2327E-03 + 156.00 5.3496E-03 + 157.00 5.4772E-03 + 158.00 5.6132E-03 + 159.00 5.7552E-03 + 160.00 5.9014E-03 + 161.00 6.0497E-03 + 162.00 6.1984E-03 + 163.00 6.3455E-03 + 164.00 6.4894E-03 + 165.00 6.6287E-03 + 166.00 6.7622E-03 + 167.00 6.8891E-03 + 168.00 7.0088E-03 + 169.00 7.1210E-03 + 170.00 7.2252E-03 + 171.00 7.3209E-03 + 172.00 7.4075E-03 + 173.00 7.4842E-03 + 174.00 7.5504E-03 + 175.00 7.6056E-03 + 176.00 7.6498E-03 + 177.00 7.6833E-03 + 178.00 7.7065E-03 + 179.00 7.7201E-03 diff --git a/Inputs/CrossSection/132Sndp_5A_MeV_2f7_ZR_FRC.lis b/Inputs/CrossSection/132Sndp_5A_MeV_2f7_ZR_FRC.lis new file mode 100644 index 0000000000000000000000000000000000000000..66b1787a9500d27c0ea263fa9d85a46acb855d41 --- /dev/null +++ b/Inputs/CrossSection/132Sndp_5A_MeV_2f7_ZR_FRC.lis @@ -0,0 +1,180 @@ + 0.00 7.9396E-02 + 1.00 7.9415E-02 + 2.00 7.9475E-02 + 3.00 7.9581E-02 + 4.00 7.9747E-02 + 5.00 7.9991E-02 + 6.00 8.0337E-02 + 7.00 8.0821E-02 + 8.00 8.1489E-02 + 9.00 8.2399E-02 + 10.00 8.3625E-02 + 11.00 8.5256E-02 + 12.00 8.7401E-02 + 13.00 9.0184E-02 + 14.00 9.3746E-02 + 15.00 9.8242E-02 + 16.00 1.0384E-01 + 17.00 1.1070E-01 + 18.00 1.1899E-01 + 19.00 1.2887E-01 + 20.00 1.4046E-01 + 21.00 1.5387E-01 + 22.00 1.6916E-01 + 23.00 1.8635E-01 + 24.00 2.0541E-01 + 25.00 2.2626E-01 + 26.00 2.4875E-01 + 27.00 2.7269E-01 + 28.00 2.9782E-01 + 29.00 3.2387E-01 + 30.00 3.5050E-01 + 31.00 3.7737E-01 + 32.00 4.0410E-01 + 33.00 4.3032E-01 + 34.00 4.5568E-01 + 35.00 4.7983E-01 + 36.00 5.0246E-01 + 37.00 5.2329E-01 + 38.00 5.4208E-01 + 39.00 5.5866E-01 + 40.00 5.7287E-01 + 41.00 5.8463E-01 + 42.00 5.9391E-01 + 43.00 6.0072E-01 + 44.00 6.0510E-01 + 45.00 6.0716E-01 + 46.00 6.0703E-01 + 47.00 6.0486E-01 + 48.00 6.0083E-01 + 49.00 5.9514E-01 + 50.00 5.8800E-01 + 51.00 5.7962E-01 + 52.00 5.7022E-01 + 53.00 5.6000E-01 + 54.00 5.4917E-01 + 55.00 5.3792E-01 + 56.00 5.2642E-01 + 57.00 5.1484E-01 + 58.00 5.0333E-01 + 59.00 4.9201E-01 + 60.00 4.8101E-01 + 61.00 4.7041E-01 + 62.00 4.6029E-01 + 63.00 4.5073E-01 + 64.00 4.4176E-01 + 65.00 4.3343E-01 + 66.00 4.2574E-01 + 67.00 4.1872E-01 + 68.00 4.1235E-01 + 69.00 4.0663E-01 + 70.00 4.0153E-01 + 71.00 3.9701E-01 + 72.00 3.9304E-01 + 73.00 3.8958E-01 + 74.00 3.8658E-01 + 75.00 3.8398E-01 + 76.00 3.8173E-01 + 77.00 3.7977E-01 + 78.00 3.7805E-01 + 79.00 3.7650E-01 + 80.00 3.7507E-01 + 81.00 3.7370E-01 + 82.00 3.7233E-01 + 83.00 3.7092E-01 + 84.00 3.6941E-01 + 85.00 3.6776E-01 + 86.00 3.6592E-01 + 87.00 3.6387E-01 + 88.00 3.6156E-01 + 89.00 3.5898E-01 + 90.00 3.5610E-01 + 91.00 3.5290E-01 + 92.00 3.4938E-01 + 93.00 3.4553E-01 + 94.00 3.4135E-01 + 95.00 3.3685E-01 + 96.00 3.3204E-01 + 97.00 3.2694E-01 + 98.00 3.2157E-01 + 99.00 3.1594E-01 + 100.00 3.1010E-01 + 101.00 3.0406E-01 + 102.00 2.9786E-01 + 103.00 2.9154E-01 + 104.00 2.8513E-01 + 105.00 2.7867E-01 + 106.00 2.7219E-01 + 107.00 2.6572E-01 + 108.00 2.5932E-01 + 109.00 2.5299E-01 + 110.00 2.4679E-01 + 111.00 2.4073E-01 + 112.00 2.3485E-01 + 113.00 2.2916E-01 + 114.00 2.2370E-01 + 115.00 2.1848E-01 + 116.00 2.1351E-01 + 117.00 2.0880E-01 + 118.00 2.0437E-01 + 119.00 2.0022E-01 + 120.00 1.9636E-01 + 121.00 1.9278E-01 + 122.00 1.8948E-01 + 123.00 1.8645E-01 + 124.00 1.8369E-01 + 125.00 1.8119E-01 + 126.00 1.7894E-01 + 127.00 1.7691E-01 + 128.00 1.7511E-01 + 129.00 1.7350E-01 + 130.00 1.7209E-01 + 131.00 1.7084E-01 + 132.00 1.6974E-01 + 133.00 1.6877E-01 + 134.00 1.6793E-01 + 135.00 1.6718E-01 + 136.00 1.6651E-01 + 137.00 1.6592E-01 + 138.00 1.6538E-01 + 139.00 1.6487E-01 + 140.00 1.6439E-01 + 141.00 1.6393E-01 + 142.00 1.6347E-01 + 143.00 1.6300E-01 + 144.00 1.6253E-01 + 145.00 1.6203E-01 + 146.00 1.6150E-01 + 147.00 1.6095E-01 + 148.00 1.6036E-01 + 149.00 1.5973E-01 + 150.00 1.5907E-01 + 151.00 1.5837E-01 + 152.00 1.5764E-01 + 153.00 1.5687E-01 + 154.00 1.5607E-01 + 155.00 1.5524E-01 + 156.00 1.5438E-01 + 157.00 1.5350E-01 + 158.00 1.5260E-01 + 159.00 1.5170E-01 + 160.00 1.5078E-01 + 161.00 1.4987E-01 + 162.00 1.4896E-01 + 163.00 1.4806E-01 + 164.00 1.4717E-01 + 165.00 1.4631E-01 + 166.00 1.4547E-01 + 167.00 1.4467E-01 + 168.00 1.4390E-01 + 169.00 1.4318E-01 + 170.00 1.4250E-01 + 171.00 1.4187E-01 + 172.00 1.4130E-01 + 173.00 1.4078E-01 + 174.00 1.4033E-01 + 175.00 1.3994E-01 + 176.00 1.3962E-01 + 177.00 1.3937E-01 + 178.00 1.3919E-01 + 179.00 1.3908E-01 diff --git a/Inputs/CrossSection/132Sndp_5A_MeV_3p3_ZR_FRC.lis b/Inputs/CrossSection/132Sndp_5A_MeV_3p3_ZR_FRC.lis new file mode 100644 index 0000000000000000000000000000000000000000..67be2eea7cddf2271cddabf64fcb0e2ecfb0af84 --- /dev/null +++ b/Inputs/CrossSection/132Sndp_5A_MeV_3p3_ZR_FRC.lis @@ -0,0 +1,180 @@ + 0.00 2.7754E-01 + 1.00 2.7835E-01 + 2.00 2.8077E-01 + 3.00 2.8484E-01 + 4.00 2.9057E-01 + 5.00 2.9801E-01 + 6.00 3.0720E-01 + 7.00 3.1816E-01 + 8.00 3.3091E-01 + 9.00 3.4542E-01 + 10.00 3.6166E-01 + 11.00 3.7953E-01 + 12.00 3.9889E-01 + 13.00 4.1958E-01 + 14.00 4.4134E-01 + 15.00 4.6393E-01 + 16.00 4.8701E-01 + 17.00 5.1025E-01 + 18.00 5.3330E-01 + 19.00 5.5580E-01 + 20.00 5.7741E-01 + 21.00 5.9782E-01 + 22.00 6.1680E-01 + 23.00 6.3419E-01 + 24.00 6.4991E-01 + 25.00 6.6398E-01 + 26.00 6.7651E-01 + 27.00 6.8769E-01 + 28.00 6.9777E-01 + 29.00 7.0702E-01 + 30.00 7.1572E-01 + 31.00 7.2416E-01 + 32.00 7.3257E-01 + 33.00 7.4116E-01 + 34.00 7.5012E-01 + 35.00 7.5956E-01 + 36.00 7.6959E-01 + 37.00 7.8028E-01 + 38.00 7.9167E-01 + 39.00 8.0374E-01 + 40.00 8.1648E-01 + 41.00 8.2982E-01 + 42.00 8.4365E-01 + 43.00 8.5785E-01 + 44.00 8.7226E-01 + 45.00 8.8670E-01 + 46.00 9.0100E-01 + 47.00 9.1499E-01 + 48.00 9.2850E-01 + 49.00 9.4139E-01 + 50.00 9.5353E-01 + 51.00 9.6480E-01 + 52.00 9.7510E-01 + 53.00 9.8435E-01 + 54.00 9.9247E-01 + 55.00 9.9939E-01 + 56.00 1.0050E+00 + 57.00 1.0094E+00 + 58.00 1.0123E+00 + 59.00 1.0139E+00 + 60.00 1.0140E+00 + 61.00 1.0127E+00 + 62.00 1.0100E+00 + 63.00 1.0059E+00 + 64.00 1.0004E+00 + 65.00 9.9367E-01 + 66.00 9.8565E-01 + 67.00 9.7645E-01 + 68.00 9.6613E-01 + 69.00 9.5476E-01 + 70.00 9.4242E-01 + 71.00 9.2918E-01 + 72.00 9.1512E-01 + 73.00 9.0030E-01 + 74.00 8.8481E-01 + 75.00 8.6873E-01 + 76.00 8.5213E-01 + 77.00 8.3510E-01 + 78.00 8.1773E-01 + 79.00 8.0011E-01 + 80.00 7.8231E-01 + 81.00 7.6444E-01 + 82.00 7.4658E-01 + 83.00 7.2880E-01 + 84.00 7.1120E-01 + 85.00 6.9384E-01 + 86.00 6.7680E-01 + 87.00 6.6014E-01 + 88.00 6.4392E-01 + 89.00 6.2818E-01 + 90.00 6.1297E-01 + 91.00 5.9833E-01 + 92.00 5.8428E-01 + 93.00 5.7085E-01 + 94.00 5.5804E-01 + 95.00 5.4586E-01 + 96.00 5.3433E-01 + 97.00 5.2342E-01 + 98.00 5.1314E-01 + 99.00 5.0347E-01 + 100.00 4.9439E-01 + 101.00 4.8588E-01 + 102.00 4.7792E-01 + 103.00 4.7046E-01 + 104.00 4.6350E-01 + 105.00 4.5698E-01 + 106.00 4.5088E-01 + 107.00 4.4516E-01 + 108.00 4.3979E-01 + 109.00 4.3473E-01 + 110.00 4.2994E-01 + 111.00 4.2539E-01 + 112.00 4.2105E-01 + 113.00 4.1688E-01 + 114.00 4.1285E-01 + 115.00 4.0894E-01 + 116.00 4.0511E-01 + 117.00 4.0134E-01 + 118.00 3.9762E-01 + 119.00 3.9391E-01 + 120.00 3.9020E-01 + 121.00 3.8648E-01 + 122.00 3.8273E-01 + 123.00 3.7895E-01 + 124.00 3.7512E-01 + 125.00 3.7124E-01 + 126.00 3.6732E-01 + 127.00 3.6334E-01 + 128.00 3.5931E-01 + 129.00 3.5523E-01 + 130.00 3.5111E-01 + 131.00 3.4695E-01 + 132.00 3.4276E-01 + 133.00 3.3854E-01 + 134.00 3.3431E-01 + 135.00 3.3007E-01 + 136.00 3.2584E-01 + 137.00 3.2161E-01 + 138.00 3.1741E-01 + 139.00 3.1324E-01 + 140.00 3.0911E-01 + 141.00 3.0503E-01 + 142.00 3.0100E-01 + 143.00 2.9705E-01 + 144.00 2.9317E-01 + 145.00 2.8937E-01 + 146.00 2.8566E-01 + 147.00 2.8205E-01 + 148.00 2.7854E-01 + 149.00 2.7513E-01 + 150.00 2.7184E-01 + 151.00 2.6865E-01 + 152.00 2.6559E-01 + 153.00 2.6264E-01 + 154.00 2.5982E-01 + 155.00 2.5711E-01 + 156.00 2.5453E-01 + 157.00 2.5207E-01 + 158.00 2.4974E-01 + 159.00 2.4753E-01 + 160.00 2.4544E-01 + 161.00 2.4347E-01 + 162.00 2.4161E-01 + 163.00 2.3988E-01 + 164.00 2.3826E-01 + 165.00 2.3675E-01 + 166.00 2.3536E-01 + 167.00 2.3407E-01 + 168.00 2.3289E-01 + 169.00 2.3181E-01 + 170.00 2.3083E-01 + 171.00 2.2996E-01 + 172.00 2.2918E-01 + 173.00 2.2850E-01 + 174.00 2.2791E-01 + 175.00 2.2742E-01 + 176.00 2.2702E-01 + 177.00 2.2671E-01 + 178.00 2.2648E-01 + 179.00 2.2635E-01 diff --git a/Inputs/CrossSection/CS_Ep10MeV_sn134pt_gs_1h9demi.dat b/Inputs/CrossSection/CS_Ep10MeV_sn134pt_gs_1h9demi.dat new file mode 100644 index 0000000000000000000000000000000000000000..8525bb649edfebe52f67d34135b6c9366d3e262b --- /dev/null +++ b/Inputs/CrossSection/CS_Ep10MeV_sn134pt_gs_1h9demi.dat @@ -0,0 +1,90 @@ + 0.00 0.16569E-06 + 2.00 0.16942E-06 + 4.00 0.18063E-06 + 6.00 0.19928E-06 + 8.00 0.22517E-06 + 10.00 0.25765E-06 + 12.00 0.29547E-06 + 14.00 0.33661E-06 + 16.00 0.37833E-06 + 18.00 0.41727E-06 + 20.00 0.44978E-06 + 22.00 0.47231E-06 + 24.00 0.48189E-06 + 26.00 0.47646E-06 + 28.00 0.45530E-06 + 30.00 0.41908E-06 + 32.00 0.36999E-06 + 34.00 0.31146E-06 + 36.00 0.24791E-06 + 38.00 0.18432E-06 + 40.00 0.12569E-06 + 42.00 0.76637E-07 + 44.00 0.40899E-07 + 46.00 0.21007E-07 + 48.00 0.18072E-07 + 50.00 0.31701E-07 + 52.00 0.60080E-07 + 54.00 0.10018E-06 + 56.00 0.14810E-06 + 58.00 0.19942E-06 + 60.00 0.24972E-06 + 62.00 0.29489E-06 + 64.00 0.33156E-06 + 66.00 0.35735E-06 + 68.00 0.37099E-06 + 70.00 0.37239E-06 + 72.00 0.36249E-06 + 74.00 0.34313E-06 + 76.00 0.31677E-06 + 78.00 0.28621E-06 + 80.00 0.25427E-06 + 82.00 0.22360E-06 + 84.00 0.19639E-06 + 86.00 0.17431E-06 + 88.00 0.15835E-06 + 90.00 0.14892E-06 + 92.00 0.14581E-06 + 94.00 0.14834E-06 + 96.00 0.15548E-06 + 98.00 0.16599E-06 + 100.00 0.17853E-06 + 102.00 0.19180E-06 + 104.00 0.20464E-06 + 106.00 0.21608E-06 + 108.00 0.22541E-06 + 110.00 0.23215E-06 + 112.00 0.23609E-06 + 114.00 0.23723E-06 + 116.00 0.23576E-06 + 118.00 0.23202E-06 + 120.00 0.22642E-06 + 122.00 0.21944E-06 + 124.00 0.21156E-06 + 126.00 0.20325E-06 + 128.00 0.19492E-06 + 130.00 0.18692E-06 + 132.00 0.17954E-06 + 134.00 0.17299E-06 + 136.00 0.16740E-06 + 138.00 0.16285E-06 + 140.00 0.15935E-06 + 142.00 0.15687E-06 + 144.00 0.15536E-06 + 146.00 0.15472E-06 + 148.00 0.15483E-06 + 150.00 0.15559E-06 + 152.00 0.15687E-06 + 154.00 0.15855E-06 + 156.00 0.16052E-06 + 158.00 0.16267E-06 + 160.00 0.16491E-06 + 162.00 0.16716E-06 + 164.00 0.16934E-06 + 166.00 0.17138E-06 + 168.00 0.17325E-06 + 170.00 0.17489E-06 + 172.00 0.17628E-06 + 174.00 0.17738E-06 + 176.00 0.17818E-06 + 178.00 0.17867E-06 diff --git a/Inputs/CrossSection/CS_Ep15MeV_sn134pt_gs_1h9demi.dat b/Inputs/CrossSection/CS_Ep15MeV_sn134pt_gs_1h9demi.dat new file mode 100644 index 0000000000000000000000000000000000000000..a49524dc707c8af175e271d7730c11a9ba292093 --- /dev/null +++ b/Inputs/CrossSection/CS_Ep15MeV_sn134pt_gs_1h9demi.dat @@ -0,0 +1,90 @@ + 0.00 0.74986E-06 + 2.00 0.72457E-06 + 4.00 0.65371E-06 + 6.00 0.55132E-06 + 8.00 0.43767E-06 + 10.00 0.33534E-06 + 12.00 0.26506E-06 + 14.00 0.24199E-06 + 16.00 0.27332E-06 + 18.00 0.35716E-06 + 20.00 0.48312E-06 + 22.00 0.63395E-06 + 24.00 0.78829E-06 + 26.00 0.92376E-06 + 28.00 0.10203E-05 + 30.00 0.10631E-05 + 32.00 0.10449E-05 + 34.00 0.96677E-06 + 36.00 0.83837E-06 + 38.00 0.67611E-06 + 40.00 0.50059E-06 + 42.00 0.33336E-06 + 44.00 0.19355E-06 + 46.00 0.95102E-07 + 48.00 0.44996E-07 + 50.00 0.42738E-07 + 52.00 0.81134E-07 + 54.00 0.14805E-06 + 56.00 0.22881E-06 + 58.00 0.30865E-06 + 60.00 0.37494E-06 + 62.00 0.41876E-06 + 64.00 0.43567E-06 + 66.00 0.42567E-06 + 68.00 0.39261E-06 + 70.00 0.34296E-06 + 72.00 0.28456E-06 + 74.00 0.22530E-06 + 76.00 0.17196E-06 + 78.00 0.12955E-06 + 80.00 0.10083E-06 + 82.00 0.86394E-07 + 84.00 0.84918E-07 + 86.00 0.93674E-07 + 88.00 0.10914E-06 + 90.00 0.12757E-06 + 92.00 0.14556E-06 + 94.00 0.16034E-06 + 96.00 0.17009E-06 + 98.00 0.17389E-06 + 100.00 0.17174E-06 + 102.00 0.16432E-06 + 104.00 0.15283E-06 + 106.00 0.13871E-06 + 108.00 0.12345E-06 + 110.00 0.10841E-06 + 112.00 0.94699E-07 + 114.00 0.83117E-07 + 116.00 0.74118E-07 + 118.00 0.67843E-07 + 120.00 0.64166E-07 + 122.00 0.62763E-07 + 124.00 0.63175E-07 + 126.00 0.64884E-07 + 128.00 0.67365E-07 + 130.00 0.70138E-07 + 132.00 0.72798E-07 + 134.00 0.75033E-07 + 136.00 0.76634E-07 + 138.00 0.77491E-07 + 140.00 0.77577E-07 + 142.00 0.76937E-07 + 144.00 0.75666E-07 + 146.00 0.73887E-07 + 148.00 0.71735E-07 + 150.00 0.69340E-07 + 152.00 0.66816E-07 + 154.00 0.64254E-07 + 156.00 0.61722E-07 + 158.00 0.59262E-07 + 160.00 0.56902E-07 + 162.00 0.54656E-07 + 164.00 0.52535E-07 + 166.00 0.50553E-07 + 168.00 0.48728E-07 + 170.00 0.47089E-07 + 172.00 0.45670E-07 + 174.00 0.44511E-07 + 176.00 0.43650E-07 + 178.00 0.43119E-07 diff --git a/Inputs/CrossSection/CS_Ep20MeV_sn134pt_gs_1h9demi.dat b/Inputs/CrossSection/CS_Ep20MeV_sn134pt_gs_1h9demi.dat new file mode 100644 index 0000000000000000000000000000000000000000..8766e1fe9ddb616136779e1b5f22e6ca7abcd51a --- /dev/null +++ b/Inputs/CrossSection/CS_Ep20MeV_sn134pt_gs_1h9demi.dat @@ -0,0 +1,90 @@ + 0.00 0.32271E-05 + 2.00 0.31495E-05 + 4.00 0.29259E-05 + 6.00 0.25828E-05 + 8.00 0.21597E-05 + 10.00 0.17028E-05 + 12.00 0.12592E-05 + 14.00 0.87079E-06 + 16.00 0.56980E-06 + 18.00 0.37542E-06 + 20.00 0.29185E-06 + 22.00 0.30811E-06 + 24.00 0.39985E-06 + 26.00 0.53346E-06 + 28.00 0.67184E-06 + 30.00 0.78100E-06 + 32.00 0.83609E-06 + 34.00 0.82530E-06 + 36.00 0.75101E-06 + 38.00 0.62785E-06 + 40.00 0.47846E-06 + 42.00 0.32808E-06 + 44.00 0.19927E-06 + 46.00 0.10786E-06 + 48.00 0.60824E-07 + 50.00 0.56181E-07 + 52.00 0.84677E-07 + 54.00 0.13263E-06 + 56.00 0.18522E-06 + 58.00 0.22945E-06 + 60.00 0.25634E-06 + 62.00 0.26191E-06 + 64.00 0.24710E-06 + 66.00 0.21667E-06 + 68.00 0.17755E-06 + 70.00 0.13712E-06 + 72.00 0.10164E-06 + 74.00 0.75298E-07 + 76.00 0.59816E-07 + 78.00 0.54627E-07 + 80.00 0.57467E-07 + 82.00 0.65166E-07 + 84.00 0.74426E-07 + 86.00 0.82450E-07 + 88.00 0.87327E-07 + 90.00 0.88163E-07 + 92.00 0.84998E-07 + 94.00 0.78573E-07 + 96.00 0.70036E-07 + 98.00 0.60642E-07 + 100.00 0.51524E-07 + 102.00 0.43529E-07 + 104.00 0.37160E-07 + 106.00 0.32574E-07 + 108.00 0.29655E-07 + 110.00 0.28097E-07 + 112.00 0.27507E-07 + 114.00 0.27486E-07 + 116.00 0.27687E-07 + 118.00 0.27854E-07 + 120.00 0.27826E-07 + 122.00 0.27528E-07 + 124.00 0.26951E-07 + 126.00 0.26122E-07 + 128.00 0.25090E-07 + 130.00 0.23902E-07 + 132.00 0.22601E-07 + 134.00 0.21225E-07 + 136.00 0.19809E-07 + 138.00 0.18389E-07 + 140.00 0.17013E-07 + 142.00 0.15735E-07 + 144.00 0.14618E-07 + 146.00 0.13719E-07 + 148.00 0.13087E-07 + 150.00 0.12743E-07 + 152.00 0.12683E-07 + 154.00 0.12864E-07 + 156.00 0.13213E-07 + 158.00 0.13633E-07 + 160.00 0.14018E-07 + 162.00 0.14267E-07 + 164.00 0.14306E-07 + 166.00 0.14095E-07 + 168.00 0.13638E-07 + 170.00 0.12986E-07 + 172.00 0.12225E-07 + 174.00 0.11465E-07 + 176.00 0.10819E-07 + 178.00 0.10386E-07 diff --git a/Inputs/DetectorConfiguration/Riken_65mm.detector b/Inputs/DetectorConfiguration/Riken_65mm.detector index bee456b3d8bd5104bcb017232ee3a0cc5bc03615..2cace566d03d4546598209b313a2100903f7e81a 100644 --- a/Inputs/DetectorConfiguration/Riken_65mm.detector +++ b/Inputs/DetectorConfiguration/Riken_65mm.detector @@ -17,12 +17,12 @@ GeneralTarget Z= 0 CryoTarget - THICKNESS= 3000 + THICKNESS= 3 RADIUS= 45 TEMPERATURE= 26 PRESSURE= 1 MATERIAL= D2 - WINDOWSTHICKNESS= 15 + WINDOWSTHICKNESS= 0 WINDOWSMATERIAL= Mylar X= 0 Y= 0 @@ -149,6 +149,28 @@ D= 17.61 -9.85 104.11 ScintillatorPlastic %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Plastic + X= 0 + Y= -15 + Z= 318 + Shape= Square + Height= 70 + Width= 40 + Thickness= 20 + Scintillator= BC400 + LeadThickness= 0 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Plastic + X= 0 + Y= -15 + Z= 343 + Thickness= 30 + Shape= Square + Height= 70 + Width= 40 + Scintillator= BC400 + LeadThickness= 2 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%Plastic THETA= 0 PHI= 0 R= 318 @@ -157,7 +179,7 @@ Plastic Scintillator= BC400 LeadThickness= 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Plastic +%Plastic THETA= 0 PHI= 0 R= 343 diff --git a/Inputs/DetectorConfiguration/gaspardTestSpheric.detector b/Inputs/DetectorConfiguration/gaspardTestSpheric.detector index 91d535366e794c964708febb232c9fa41ad4ed2c..fb396b487b5987f3e61a9627e6b73ef5a64c061a 100644 --- a/Inputs/DetectorConfiguration/gaspardTestSpheric.detector +++ b/Inputs/DetectorConfiguration/gaspardTestSpheric.detector @@ -1,4 +1,3 @@ -%Fichier de configuration manip E225 %%%%%%%%%%%Target%%%%%%%%%%%%%%%%%%%1 %Thickness in micrometer %Radius in mm @@ -9,14 +8,16 @@ GeneralTarget %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Target - THICKNESS= 10.3 + THICKNESS= 1.0 ANGLE= 0 RADIUS= 12 - MATERIAL= CD2 + MATERIAL= CH2 NBLAYERS= 50 X= 0 Y= 0 Z= 0 + + %%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%% %%Position and R given in mm %%Angle given in degree diff --git a/Inputs/EventGenerator/10He.reaction b/Inputs/EventGenerator/10He.reaction index 1987df73649f40bdf632faad34251b0c2a9d64b3..9b71622344f5ef1e607ba911c66cf308cd444332 100644 --- a/Inputs/EventGenerator/10He.reaction +++ b/Inputs/EventGenerator/10He.reaction @@ -7,7 +7,7 @@ TransfertToResonance Target= 2H Light= 3He Heavy= 10He - ExcitationEnergy= 0.0 + ExcitationEnergy= 1.0 BeamEnergy= 550 BeamEnergySpread= 0 SigmaThetaX= 0.6921330164 diff --git a/Inputs/EventGenerator/11Li.beam b/Inputs/EventGenerator/11Li.beam index 5a06c27989f836364fc4ee579144f4e531185245..c32a2702bc904b44898f856c982c038e5fdda9a2 100644 --- a/Inputs/EventGenerator/11Li.beam +++ b/Inputs/EventGenerator/11Li.beam @@ -6,8 +6,8 @@ Beam ParticleZ= 3 ParticleA= 11 - BeamEnergy= 550 - BeamEnergySpread= 10 + BeamEnergy= 500 + BeamEnergySpread= 50 SigmaX= 6.232 SigmaY= 9.069 SigmaThetaX= 0.6921330164 diff --git a/Inputs/EventGenerator/132Sndp.reaction b/Inputs/EventGenerator/132Sndp.reaction index fd88541645b7aa52806ca9d3908786444a3768b9..6507dc83e390319a9d86f2e4dcf55c9ab6f25533 100644 --- a/Inputs/EventGenerator/132Sndp.reaction +++ b/Inputs/EventGenerator/132Sndp.reaction @@ -14,7 +14,8 @@ Transfert SigmaY= 0 SigmaThetaX= 0 SigmaPhiY= 0 - CrossSectionPath= sn132dp_gs_10AMeV.txt + CrossSectionPath= 132Sndp_10A_MeV_2f7_ZR_FRC.lis +% CrossSectionPath= flat.txt ShootLight= 1 ShootHeavy= 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Inputs/EventGenerator/134Snpt.reaction b/Inputs/EventGenerator/134Snpt.reaction new file mode 100644 index 0000000000000000000000000000000000000000..6ff89b7fe5c5750df094da8717258743867915b8 --- /dev/null +++ b/Inputs/EventGenerator/134Snpt.reaction @@ -0,0 +1,21 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%% Reaction file for 60Fe(d,p)61Fe reaction %%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%Beam energy given in MeV ; Excitation in MeV ; emmitance in rad +Transfert + Beam= 134Sn + Target= 1H + Light= 3H + Heavy= 132Sn + ExcitationEnergy= 0.0 + BeamEnergy= 1340 + BeamEnergySpread= 0 + SigmaX= 0 + SigmaY= 0 + SigmaThetaX= 0 + SigmaPhiY= 0 + CrossSectionPath= CS_Ep10MeV_sn134pt_gs_1h9demi.dat + ShootLight= 1 + ShootHeavy= 0 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + diff --git a/Inputs/EventGenerator/34Si.reaction b/Inputs/EventGenerator/34Si.reaction index edecfe2aa56337481e8871aedf2e9e364b0ce9cc..41a35ec8e0a24a92782a3bf5202d1700d4c628ac 100644 --- a/Inputs/EventGenerator/34Si.reaction +++ b/Inputs/EventGenerator/34Si.reaction @@ -1,21 +1,37 @@ +Transfert + Beam= 19C + Target= 208Pb + Light= 208Pb + Heavy= 19C + ExcitationEnergy= 5.9 + BeamEnergy= 722 + BeamEnergySpread= 0 + SigmaThetaX= 0.6921330164 + SigmaPhiY= 0.963142053 + SigmaX= 6.232 + SigmaY= 9.069 + CrossSectionPath= flat.txt + ShootLight= 0 + ShootHeavy= 1 + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%% Reaction file for 11Li(d,3He)10He reaction %%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Beam energy given in MeV ; Excitation in MeV 748 612 -Transfert - Beam= 34Si - Target= 2H - Light= 1H - Heavy= 35Si - ExcitationEnergy= 2.0 - BeamEnergy= 748 - BeamEnergySpread= 0 - SigmaX= 0.5 - SigmaY= 0.5 - SigmaThetaX= 0 - SigmaPhiY= 0 - BeamSpreadX= 0 - CrossSectionPath= ni69_g7_01.n - ShootLight= 1 - ShootHeavy= 0 +%Transfert +% Beam= 34Si +% Target= 2H +% Light= 1H +% Heavy= 35Si +% ExcitationEnergy= 2.0 +% BeamEnergy= 748 +% BeamEnergySpread= 0 +% SigmaX= 0.5 +% SigmaY= 0.5 +% SigmaThetaX= 0 +% SigmaPhiY= 0 +% CrossSectionPath= flat.txt +% ShootLight= 1 +% ShootHeavy= 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Inputs/EventGenerator/3He.source b/Inputs/EventGenerator/3He.source index 8fa0b8698412b53f993a685d44e12862aabcb8ff..22957a57d0c16cf6c69813e071d726986534ad59 100644 --- a/Inputs/EventGenerator/3He.source +++ b/Inputs/EventGenerator/3He.source @@ -5,7 +5,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Isotropic EnergyLow= 0 - EnergyHigh= 21.6 + EnergyHigh= 300 HalfOpenAngleMin= 0 HalfOpenAngleMax= 90 x0= 0 diff --git a/Inputs/EventGenerator/60Fe.reaction b/Inputs/EventGenerator/60Fe.reaction index 467bd51d9509590ead464e0f56adc36d461b14b9..ea0874438d3a70b841bdbd8852d269b7e4d3e949 100644 --- a/Inputs/EventGenerator/60Fe.reaction +++ b/Inputs/EventGenerator/60Fe.reaction @@ -10,10 +10,10 @@ Transfert ExcitationEnergy= 2.0 BeamEnergy= 1200 BeamEnergySpread= 0 - SigmaX= 1 - SigmaY= 1 - SigmaThetaX= 2 - SigmaPhiY= 2 + SigmaX= 3 + SigmaY= 3 + SigmaThetaX= 0.5 + SigmaPhiY= 0.5 CrossSectionPath= ni69_g7_01.n ShootLight= 1 ShootHeavy= 0 diff --git a/Inputs/EventGenerator/alpha.source b/Inputs/EventGenerator/alpha.source index fd5f19e5259addc2b6bbccaeb2e2bcb97b08b3e1..343524fe6bf0f84f05874a7e5090b5475ba93b40 100644 --- a/Inputs/EventGenerator/alpha.source +++ b/Inputs/EventGenerator/alpha.source @@ -5,7 +5,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Isotropic EnergyLow= 0 - EnergyHigh= 21.6 + EnergyHigh= 25 HalfOpenAngleMin= 0 HalfOpenAngleMax= 90 x0= 0 diff --git a/NPEnvironment.bash b/Misc/NPEnvironment.bash similarity index 100% rename from NPEnvironment.bash rename to Misc/NPEnvironment.bash diff --git a/NPEnvironment.tchrc b/Misc/NPEnvironment.tchrc similarity index 100% rename from NPEnvironment.tchrc rename to Misc/NPEnvironment.tchrc diff --git a/Misc/rootlogon.C b/Misc/rootlogon.C new file mode 100644 index 0000000000000000000000000000000000000000..aba6d28ada6fc76f9e069f5d9a20d6a9caa46a6d --- /dev/null +++ b/Misc/rootlogon.C @@ -0,0 +1,5 @@ +{ + gROOT->ProcessLine(".include /YourPathToNPTool/NPTool/NPLib/include"); + gSystem->Load("/YourPathToNPTool/NPTool/NPLib/lib/libInitialConditions.so"); + gSystem->Load("/YourPathToNPTool/NPTool/NPLib/lib/libInteractionCoordinates.so"); +} diff --git a/NPAnalysis/10He_Riken/include/ObjectManager.hh b/NPAnalysis/10He_Riken/include/ObjectManager.hh index 336fb8c7142848ae3f053a591911a9684948e3f2..47e09a3cb2df16b98579a2ef3f7a8f651ef9c268 100644 --- a/NPAnalysis/10He_Riken/include/ObjectManager.hh +++ b/NPAnalysis/10He_Riken/include/ObjectManager.hh @@ -31,6 +31,7 @@ #include "RootInput.h" #include "RootOutput.h" #include "TInitialConditions.h" +#include "TInteractionCoordinates.h" #include "TMust2Physics.h" #include "TSSSDPhysics.h" #include "TPlasticPhysics.h" @@ -74,7 +75,7 @@ namespace GRAPH { // Declare your Spectra here: - TH1F *myHist1D = new TH1F("Hist1D","Histogramm 1D ; x ; count", 1000 , -5 , 5 ) ; + TH1F* myHist1D = new TH1F("Hist1D","Histogramm 1D ; x ; count", 100 , -40 , 40 ) ; TH2F *myHist2D = new TH2F("Hist2D","Histogramm 2D ; x ; y ", 128 , 1 , 128 , 128 , 1 , 128 ) ; @@ -110,58 +111,56 @@ namespace ENERGYLOSS // 3He Energy Loss EnergyLoss He3TargetWind = EnergyLoss ( "He3_Mylar.G4table" , "G4Table", - 10000 ); + 1000, + 3 ); EnergyLoss He3TargetGaz = EnergyLoss ( "He3_D2.G4table" , "G4Table", - 10000 ); + 1000, + 3 ); - EnergyLoss He3StripAl = EnergyLoss ( "3He_Al.txt" , - "LISE", - 10000 , - 1 , - 3 ); - - EnergyLoss He3StripSi = EnergyLoss ( "3He_Si.txt" , - "LISE", - 10000 , - 1 , + EnergyLoss He3StripAl = EnergyLoss ( "He3_Aluminium.G4table" , + "G4Table", + 1000, 3 ); - - -// // 3He Energy Loss // EnergyLoss He3TargetWind = EnergyLoss ( "3He_Mylar.txt" , -// 10000 , -// 1 , -// 3 ); +// "LISE", +// 10000 , +// 1 , +// 3 ); // -// EnergyLoss He3TargetGaz = EnergyLoss ( "3He_D2gaz_1b_26K.txt" , -// 10000 , -// 1 , -// 3 ); +// EnergyLoss He3TargetGaz = EnergyLoss ( "3He_D2gaz_1b_26K.txt" , +// "LISE", +// 10000 , +// 1 , +// 3 ); // -// EnergyLoss He3StripAl = EnergyLoss ( "3He_Al.txt" , -// 10000 , -// 1 , -// 3 ); -// -// EnergyLoss He3StripSi = EnergyLoss ( "3He_Si.txt" , -// 10000 , -// 1 , -// 3 ); +// EnergyLoss He3StripAl = EnergyLoss ( "3He_Al.txt" , +// "LISE", +// 10000 , +// 1 , +// 3 ); + + + + EnergyLoss He3StripSi = EnergyLoss ( "3He_Si.txt" , + "LISE", + 100 , + 3 , + 1 ); // proton Energy Loss EnergyLoss protonTargetWind = EnergyLoss ( "proton_Mylar.txt" , "LISE", - 1000 , + 100 , 1 , 1 ); EnergyLoss protonTargetGaz = EnergyLoss ( "proton_D2gaz_1b_26K.txt" , "LISE", - 1000 , + 100 , 1 , 1 ); diff --git a/NPAnalysis/10He_Riken/macro/CrossSection.c b/NPAnalysis/10He_Riken/macro/CrossSection.c index 5640efb446f5464a98882b5a40ea015ef2745171..56e071c820cdedaccfe71c6e3a1a7894070474cf 100644 --- a/NPAnalysis/10He_Riken/macro/CrossSection.c +++ b/NPAnalysis/10He_Riken/macro/CrossSection.c @@ -11,16 +11,8 @@ double DegToRad = Pi/180. ; // 2Pi/360 = Pi/180 double RadToDeg = 180./Pi ; // 360/2Pi = 180/Pi -TFile *file0 = TFile::Open("./Result/myResult.root"); - - cEA = new TCanvas("cEA","Kinematic Line" ,100,100,900,900); - hEA->Draw("COLZ"); - cEx = new TCanvas("cEx","Excitation Energy" ,100,100,600,600); - hEx->Draw(); - - cEHexa = new TCanvas("cEHexa","Hexaneutron bound Energy" ,100,100,600,600); - hEHexa->Draw(); - +TFile *file0 = TFile::Open("./Result/thetaCM.root"); + cCM = new TCanvas("cCm" , "Cross Section (CM)" , 100 , 100 , 900, 900) ; hThetaCM->Draw(); @@ -79,8 +71,7 @@ TFile *file0 = TFile::Open("./Result/myResult.root"); //Normalisation: - //Int_t Maximum_Bin = hCrossSection->GetMaximumBin() ; - Int_t Maximum_Bin = 3 ; + Int_t Maximum_Bin = hCrossSection->GetMaximumBin() ; Double_t Maximum_theta = hCrossSection->GetBinCenter(Maximum_Bin) ; Double_t Bin_Width = hCrossSection->GetBinWidth(Maximum_Bin) ; Double_t Maximum = hCrossSection->GetBinContent(Maximum_Bin) ; diff --git a/NPAnalysis/10He_Riken/src/Analysis.cc b/NPAnalysis/10He_Riken/src/Analysis.cc index ed1a372c4b79fa6f9a43e552785d8beb9bd4eb98..bebe502b09a365729d464274121a6f8c7965f70a 100644 --- a/NPAnalysis/10He_Riken/src/Analysis.cc +++ b/NPAnalysis/10He_Riken/src/Analysis.cc @@ -34,13 +34,14 @@ int main(int argc,char** argv) myDetector -> ReadConfigurationFile(detectorfileName) ; // Instantiate the Calibration Manger using a file - CalibrationManager* myCalibration = new CalibrationManager(calibrationfileName) ; + CalibrationManager* myCalibration = CalibrationManager::getInstance(calibrationfileName) ; // Attach more branch to the output double ELab[2], ExcitationEnergy[2] ; double ThetaLab[2] , ThetaCM[2] ; double X[2] , Y[2] ; + double EventWeight=0; // Exitation Energy RootOutput::getInstance()->GetTree()->Branch("ExcitationEnergy",ExcitationEnergy,"ExcitationEnergy[2]/D") ; @@ -52,38 +53,76 @@ int main(int argc,char** argv) RootOutput::getInstance()->GetTree()->Branch("X",X,"X/D[2]") ; RootOutput::getInstance()->GetTree()->Branch("Y",Y,"Y/D[2]") ; + // For phasespace event + RootOutput::getInstance()->GetTree()->Branch("EventWeight",&EventWeight,"EventWeight/D") ; // Get the formed Chained Tree and Treat it TChain* Chain = RootInput:: getInstance() -> GetChain() ; // Open the ThinSi Branch + Chain->SetBranchStatus("EventWeight",true); + Chain->SetBranchAddress("EventWeight" ,&EventWeight ); + Chain->SetBranchStatus("InitialConditions",true) ; Chain->SetBranchStatus("fIC_*",true) ; TInitialConditions* Init = new TInitialConditions(); Chain->SetBranchAddress("InitialConditions" ,&Init ); - double XTarget=0 ; double YTarget=0; double BeamTheta = 0 ; double BeamPhi = 0 ; double E=-1000; + TInteractionCoordinates* ICoord = new TInteractionCoordinates(); + Chain->SetBranchAddress("InteractionCoordinates" ,&ICoord ); + + + + double XTarget=0 ; double YTarget=0; double ZTarget = 0 ; double BeamTheta = 0 ; double BeamPhi = 0 ; double E=-1000; // Get Detector Pointer: TMust2Physics* M2 = (TMust2Physics*) myDetector -> m_Detector["MUST2"] ; TPlasticPhysics* Pl = (TPlasticPhysics*) myDetector -> m_Detector["Plastic"] ; TSSSDPhysics* ThinSi = (TSSSDPhysics*) myDetector -> m_Detector["SSSD"] ; - cout << " ///////// Starting Analysis ///////// "<< endl << endl ; - + + +RootOutput::getInstance()->GetList()->Add(myHist1D); + + TCutG *cut3He_MUST2 = new TCutG("Cut3HeMUST2",11); + cut3He_MUST2->SetPoint(0,-1.49426,24.2781); + cut3He_MUST2->SetPoint(1,15.3161,14.3151); + cut3He_MUST2->SetPoint(2,47.069,7.6732); + cut3He_MUST2->SetPoint(3,110.575,4.35222); + cut3He_MUST2->SetPoint(4,308.563,2.25477); + cut3He_MUST2->SetPoint(5,310.431,1.20604); + cut3He_MUST2->SetPoint(6,232.917,1.11864); + cut3He_MUST2->SetPoint(7,89.0948,2.42955); + cut3He_MUST2->SetPoint(8,32.1264,6.71186); + cut3He_MUST2->SetPoint(9,1.30747,11.9555); + cut3He_MUST2->SetPoint(10,-1.49426,24.2781); + + TCutG *cut3He_M2_SSSD = new TCutG("Cut3HeM2SSSD",11); + cut3He_M2_SSSD->SetPoint(0,7.44252,1.45432); + cut3He_M2_SSSD->SetPoint(1,40.6322,0.684984); + cut3He_M2_SSSD->SetPoint(2,95.9483,0.406912); + cut3He_M2_SSSD->SetPoint(3,218.649,0.216896); + cut3He_M2_SSSD->SetPoint(4,362.471,0.101033); + cut3He_M2_SSSD->SetPoint(5,355.431,0.0315148); + cut3He_M2_SSSD->SetPoint(6,100.977,0.0315148); + cut3He_M2_SSSD->SetPoint(7,25.546,0.314221); + cut3He_M2_SSSD->SetPoint(8,3.41954,0.995498); + cut3He_M2_SSSD->SetPoint(9,3.41954,1.40797); + cut3He_M2_SSSD->SetPoint(10,7.44252,1.45432); + + cout << " ///////// Starting Analysis ///////// "<< endl << endl ; int i ,N=Chain -> GetEntries(); cout << " Number of Event to be treated : " << N << endl ; - clock_t begin=clock(); clock_t end=begin; - for ( i = 0 ; i < N ; i ++ ) + for ( i = 0 ; i < N ; i ++ ) { // Clear local branch for(int hh = 0 ; hh <2 ; hh++) { - ELab[hh] = -1 ; ExcitationEnergy[hh] = -1 ; ThetaLab[hh] = -1 ; - X[hh] = -1000 ; Y[hh] = -1000 ; ThetaCM[hh] = -1 ; + ELab[hh] = -10000 ; ExcitationEnergy[hh] = -10000 ; ThetaLab[hh] = -10000 ; + X[hh] = -10000 ; Y[hh] = -10000 ; ThetaCM[hh] = -10000 ; } // Minimum code @@ -107,65 +146,73 @@ int main(int argc,char** argv) // Build the new one myDetector -> BuildPhysicalEvent() ; //// - - - - // Target (from initial condition) XTarget = Init->GetICPositionX(0); YTarget = Init->GetICPositionY(0); + ZTarget = Init->GetICPositionZ(0); // XTarget = RandomEngine.Gaus(Init->GetICPositionX(0),1); // YTarget = RandomEngine.Gaus(Init->GetICPositionY(0),1); BeamTheta = Init->GetICIncidentAngleTheta(0)*deg ; BeamPhi = Init->GetICIncidentAnglePhi(0)*deg ; TVector3 BeamDirection = TVector3(cos(BeamPhi)*sin(BeamTheta) , sin(BeamPhi)*sin(BeamTheta) , cos(BeamTheta)) ; - //// + //// + // Must 2 And ThinSi // - //for(int hit = 0; hit < M2 -> GetEventMultiplicity() ; hit ++) for(int hit = 0; hit < M2 -> Si_E.size() ; hit ++) { - ELab[hit] = -1 ; ThetaLab[hit] = -1; // Get Hit Direction TVector3 HitDirection = M2 -> GetPositionOfInteraction(hit) - TVector3(XTarget,YTarget,0); - // Angle between beam and particle - ThetaLab[hit] = ThetaCalculation ( HitDirection , BeamDirection ) ; + ThetaLab[hit] = ThetaCalculation ( HitDirection , BeamDirection ) ; + + double Xint = ICoord-> GetDetectedPositionX(hit) - M2 -> GetPositionOfInteraction(hit).X(); + double Yint = ICoord-> GetDetectedPositionY(hit) - M2 -> GetPositionOfInteraction(hit).Y(); + double Zint = ICoord-> GetDetectedPositionZ(hit) - M2 -> GetPositionOfInteraction(hit).Z(); + + +// cout << Xint << " " << Yint << " " << Zint << endl; + // Angle between particule and z axis (target Normal) double ThetaN = ThetaCalculation ( HitDirection , TVector3(0,0,1) ) ; - // ANgle between particule and Must2 Si surface + // Angle between particule and Must2 Si surface double ThetaMM2Surface = ThetaCalculation ( HitDirection , M2 -> GetTelescopeNormal(hit) ); if(M2 -> GetPositionOfInteraction(hit).Z() > 0) { - if( M2 -> CsI_E[hit] == 0 && M2 -> Si_E[hit] > 0) + if( M2 -> CsI_E[hit] < 0 && M2 -> Si_E[hit] > 0 ) { ELab[hit] = M2 -> Si_E[hit] ; - ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 2*0.4*micrometer , // Target Thickness at 0 degree - ThetaMM2Surface ); - - -// ELab[hit]= He3StripSi.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle -// 20*micrometer , // Target Thickness at 0 degree -// ThetaMM2Surface ); - - if(ThinSi -> Energy.size() > 0)ELab[hit] += ThinSi-> Energy[hit]; + ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle + 0.4*micrometer , // Target Thickness at 0 degree + ThetaMM2Surface ); - ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 0.4*micrometer , // Target Thickness at 0 degree - ThetaMM2Surface ); + if(ThinSi -> Energy.size() > 0) + { + ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle + 0.4*micrometer , // Target Thickness at 0 degree + ThetaMM2Surface ); + ELab[hit] += ThinSi-> Energy[hit]; + ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle + 0.4*micrometer , // Target Thickness at 0 degree + ThetaMM2Surface ); + } - ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 15*micrometer , // Target Thickness at 0 degree - ThetaN ); + ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle + 0*micrometer , // Target Thickness at 0 degree + ThetaN ); - ELab[hit]= He3TargetGaz.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 1.5*mm , // Target Thickness at 0 degree - ThetaN ); + ELab[hit]= He3TargetGaz.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle + 3*micrometer , // Target Thickness at 0 degree + ThetaN ); ThetaCM[hit] = He10Reaction -> EnergyLabToThetaCM( ELab[hit] ) /deg ; ExcitationEnergy[hit] = He10Reaction -> ReconstructRelativistic( ELab[hit] , ThetaLab[hit] ) ; + + if(ThinSi -> Energy.size() > 0 ) + if(cut3He_M2_SSSD->IsInside(ThinSi -> Energy[hit], M2 -> Si_E[hit]) ) + myHist1D->Fill(ExcitationEnergy[hit],EventWeight); + X[hit] = HitDirection . X(); Y[hit] = HitDirection . Y(); ThetaLab[hit] = ThetaLab[hit] / deg ; @@ -176,36 +223,44 @@ int main(int argc,char** argv) ELab[hit]= M2 ->CsI_E[hit] ; - ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 3*micrometer , // Target Thickness at 0 degree - ThetaMM2Surface ); + ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle + 3*micrometer , // Target Thickness at 0 degree + ThetaMM2Surface ); - ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 0.4*micrometer , // Target Thickness at 0 degree - ThetaMM2Surface ); + ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle + 0.4*micrometer , // Target Thickness at 0 degree + ThetaMM2Surface ); ELab[hit]+= M2 ->Si_E[hit]; - ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 0.4*micrometer , // Target Thickness at 0 degree - ThetaMM2Surface ); + ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle + 0.4*micrometer , // Target Thickness at 0 degree + ThetaMM2Surface ); - if(ThinSi -> Energy.size() > 0)ELab[hit] += ThinSi-> Energy[hit]; + if(ThinSi -> Energy.size() > 0) + { + ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle + 0.4*micrometer , // Target Thickness at 0 degree + ThetaMM2Surface ); + ELab[hit] += ThinSi-> Energy[hit]; + ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle + 0.4*micrometer , // Target Thickness at 0 degree + ThetaMM2Surface ); + } + + ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle + 0*micrometer , // Target Thickness at 0 degree + ThetaN ); - - ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 0.4*micrometer , // Target Thickness at 0 degree - ThetaMM2Surface ); - - ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 15*micrometer , // Target Thickness at 0 degree - ThetaN ); - - ELab[hit]= He3TargetGaz.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 1.5*mm , // Target Thickness at 0 degree - ThetaN ); - + ELab[hit]= He3TargetGaz.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle + 3*micrometer , // Target Thickness at 0 degree + ThetaN ); + ThetaCM[hit]= He10Reaction -> EnergyLabToThetaCM( ELab[hit] ) /deg ; - ExcitationEnergy[hit] = He10Reaction -> ReconstructRelativistic( ELab[hit], ThetaLab[hit] ) ; + ExcitationEnergy[hit] = He10Reaction -> ReconstructRelativistic( ELab[hit], ThetaLab[hit]) ; + + if( cut3He_MUST2->IsInside(M2 -> Si_E[hit], M2 -> CsI_E[hit]) ) + myHist1D->Fill(ExcitationEnergy[hit],EventWeight); + X[hit] = HitDirection . X(); Y[hit] = HitDirection . Y(); ThetaLab[hit] = ThetaLab[hit] / deg ; @@ -216,47 +271,15 @@ int main(int argc,char** argv) } /*else if(M2 -> GetPositionOfInteraction(hit).Z()<0) - { - - if(ELab[hit]>-1000 ) - { - if(ELab[hit]>18) - { - ELab[hit]= protonStripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 0.4*micrometer , // Target Thickness at 0 degree - ThetaMM2Surface ); - } - - ELab[hit]= protonStripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 0.4*micrometer , // Target Thickness at 0 degree - ThetaMM2Surface ); - - ELab[hit]= protonTargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 15*micrometer , // Target Thickness at 0 degree - ThetaN ); - - ELab[hit]= protonTargetGaz.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 1.5*mm , // Target Thickness at 0 degree - ThetaN ); - ThetaCM[hit] = myReaction -> EnergyLabToThetaCM( ELab[hit] , 1 ) /deg ; - ExcitationEnergy[hit] = myReaction -> ReconstructRelativistic( ELab[hit], ThetaLab[hit] ) ; - X[hit] = HitDirection . X(); - Y[hit] = HitDirection . Y(); - ThetaLab[hit] = ThetaLab[hit] / deg ; - } - - else {ExcitationEnergy[hit]=-100 ; X[hit] = -100 ; Y[hit] = -100 ;ThetaLab[hit]=-100; ThetaCM[hit]=-100 ;} - - } */ - + {} */ } - RootOutput::getInstance()->GetTree()->Fill() ; } cout << " A total of " << i << " event has been annalysed " << endl ; - cout << endl << " ///////////////////////////////////// "<< endl<< endl ; + cout << endl << "/////////////////////////////////"<< endl<< endl ; + myHist1D->Write(); RootOutput::getInstance()->Destroy(); return 0 ; } @@ -264,6 +287,6 @@ int main(int argc,char** argv) double ThetaCalculation (TVector3 A , TVector3 B) { double Theta = acos( (A.Dot(B)) / (A.Mag()*B.Mag()) ) ; - return Theta*rad ; + return Theta ; } diff --git a/NPAnalysis/Gaspard/RunToTreat.txt b/NPAnalysis/Gaspard/RunToTreat.txt index 5e6a3389381c7b3d88643f0ffc3311d201f72d07..60cc476706f59ff7125e8fc6d1aec2e062d9f711 100644 --- a/NPAnalysis/Gaspard/RunToTreat.txt +++ b/NPAnalysis/Gaspard/RunToTreat.txt @@ -2,4 +2,6 @@ TTreeName SimulatedTree RootFileName ../../Outputs/Simulation/mySimul.root -% ../../Outputs/Simulation/sn132dp_10MeVA_T1_B0_E0.root +% ../../Outputs/Simulation/134Snpt_1h9_10MeVA_T0_B0_E0_S2mm.root +% ../../Outputs/Simulation/132Sndp_3p3_10MeVA_T0_B1_E0_S05mm.root +% ../../Outputs/Simulation/134Snpt_1h9_10MeVA_T1_B1_E0_S05mm.root diff --git a/NPAnalysis/Gaspard/include/ObjectManager.hh b/NPAnalysis/Gaspard/include/ObjectManager.hh index c1a4d0cb2f862efe906208f311a9735b3c616095..467f5e45e5248c2a7560cd7747a42c2904d5951c 100644 --- a/NPAnalysis/Gaspard/include/ObjectManager.hh +++ b/NPAnalysis/Gaspard/include/ObjectManager.hh @@ -23,7 +23,7 @@ #include <TFile.h> #include <TLeaf.h> #include <TVector3.h> -#include <TRandom.h> +#include <TRandom3.h> // NPL #include "TMust2Data.h" @@ -32,6 +32,7 @@ #include "RootInput.h" #include "RootOutput.h" #include "TInteractionCoordinates.h" +#include "TInitialConditions.h" // Use CLHEP System of unit and Physical Constant #include "CLHEP/Units/GlobalSystemOfUnits.h" @@ -105,8 +106,23 @@ namespace ENERGYLOSS { // Declare your Energy loss here // EnergyLoss LightTargetCD2 = EnergyLoss("proton_cd2.txt", 100, 1, 1); // LISE++ - EnergyLoss LightTarget = EnergyLoss("proton_CD2.G4table", "G4Table", 1000); // G4 - EnergyLoss BeamTarget = EnergyLoss("Sn132[0.0]_CD2.G4table", "G4Table", 1000); // G4 + // For 132Sn(d,p) + // CD2 +// EnergyLoss LightTarget = EnergyLoss("proton_CD2.G4table", "G4Table", 1000); // G4 +// EnergyLoss BeamTarget = EnergyLoss("Sn132[0.0]_CD2.G4table", "G4Table", 1000); // G4 + // solid D2 +// EnergyLoss LightTarget = EnergyLoss("proton_D2_solid.G4table", "G4Table", 1000); // G4 +// EnergyLoss BeamTarget = EnergyLoss("Sn132[0.0]_D2_solid.G4table", "G4Table", 1000); // G4 + // For 134Sn(p,t) + // CH2 +// EnergyLoss LightTarget = EnergyLoss("triton_CH2.G4table", "G4Table", 1000); // G4 +// EnergyLoss BeamTarget = EnergyLoss("Sn134[0.0]_CH2.G4table", "G4Table", 1000); // G4 + // solid H2 + EnergyLoss LightTarget = EnergyLoss("triton_H2_solid.G4table", "G4Table", 1000); // G4 + EnergyLoss BeamTarget = EnergyLoss("Sn134[0.0]_H2_solid.G4table", "G4Table", 1000); // G4 + // For 132Sn(d,t) +// EnergyLoss LightTarget = EnergyLoss("triton_CD2.G4table", "G4Table", 1000); // G4 +// EnergyLoss BeamTarget = EnergyLoss("Sn132[0.0]_CD2.G4table", "G4Table", 1000); // G4 } using namespace ENERGYLOSS ; diff --git a/NPAnalysis/Gaspard/macros/DisplayInputCrossSection.C b/NPAnalysis/Gaspard/macros/DisplayInputCrossSection.C new file mode 100644 index 0000000000000000000000000000000000000000..8f2725bdee1df41051f6b461059aaa6e9f27d5b6 --- /dev/null +++ b/NPAnalysis/Gaspard/macros/DisplayInputCrossSection.C @@ -0,0 +1,148 @@ +void DisplayInputCrossSection() +{ + // Path to cross-section files + TString path = gSystem->Getenv("NPTOOL"); + path += "/Inputs/CrossSection/"; + + // Read cross-sections 132Sn(d,p) +/* TGraph *gr1 = new TGraph(path + "132Sndp_5A_MeV_3p3_ZR_FRC.lis"); + TGraph *gr2 = new TGraph(path + "132Sndp_5A_MeV_2f7_ZR_FRC.lis"); + TGraph *gr3 = new TGraph(path + "132Sndp_10A_MeV_3p3_ZR_FRC.lis"); + TGraph *gr4 = new TGraph(path + "132Sndp_10A_MeV_2f7_ZR_FRC.lis");*/ + // Jacques + TGraph *gr1 = ReadCrossSection("132Sndp_5A_MeV_3p3_ZR_FRC.lis"); + TGraph *gr2 = ReadCrossSection("132Sndp_5A_MeV_2f7_ZR_FRC.lis"); + TGraph *gr3 = ReadCrossSection("132Sndp_10A_MeV_3p3_ZR_FRC.lis"); + TGraph *gr4 = ReadCrossSection("132Sndp_10A_MeV_2f7_ZR_FRC.lis"); + // Didier + TGraph *gr5 = new TGraph(path + "sn132dp_gs_10AMeV.txt"); + + // Read cross-section 134Sn(p,t) + // Didier + TGraph *grpt1 = ReadCrossSectionPT("CS_Ep10MeV_sn134pt_gs_1h9demi.dat"); + TGraph *grpt2 = ReadCrossSectionPT("CS_Ep15MeV_sn134pt_gs_1h9demi.dat"); + TGraph *grpt3 = ReadCrossSectionPT("CS_Ep20MeV_sn134pt_gs_1h9demi.dat"); + + // Read cross-section 132Sn(d,d) + // Angel + TGraph *grdd = new TGraph(path + "132Sndd_10A_MeV_ruth.dat"); + TGraph *grpp = new TGraph(path + "132Snpp_10A_MeV_ruth.dat"); + + // Draw cross-sections + TCanvas *can = new TCanvas("can"); + can->SetLogy(); + can->Draw(); +// TH2F *hframe = new TH2F("hframe", "^{2}H(^{132}Sn,p)^{133}Sn", 180, 0, 180, 100, 1e-2, 100); +// TH2F *hframe = new TH2F("hframe", "", 180, 0, 180, 100, 1e-2, 100); +// TH2F *hframe = new TH2F("hframe", "^{1}H(^{134}Sn,t)^{132}Sn_{g.s.}", 180, 0, 180, 100, 1e-8, 1e-5); +// TH2F *hframe = new TH2F("hframe", "", 180, 0, 180, 100, 1e-8, 1e-5); + TH2F *hframe = new TH2F("hframe", "", 180, 0, 180, 100, 1e-3, 10); + hframe->Draw(); + hframe->SetXTitle("#Theta_{c.m.} [deg]"); +// hframe->SetYTitle("d#sigma/d#Omega [mb/sr]"); + hframe->SetYTitle("d#sigma/d#Omega / (d#sigma/d#Omega)_{R}"); +// hframe->SetYTitle("#propto d#sigma/d#Omega"); +/* grpt1->SetLineColor(kRed); grpt1->Draw("l"); + grpt2->SetLineColor(kMagenta); grpt2->Draw("l"); + grpt3->SetLineColor(kBlue); grpt3->Draw("l");*/ +/* gr1->SetLineColor(kRed); gr1->SetLineStyle(2); gr1->Draw("l"); + gr2->SetLineColor(kRed); gr2->Draw("l"); + gr3->SetLineColor(kBlue); gr3->SetLineStyle(2); gr3->Draw("l"); + gr4->SetLineColor(kBlue); gr4->Draw("l");*/ +// gr5->Draw("l"); +// grdd->Draw("l"); + grpp->Draw("l"); + + // TLegend + TLegend *leg = new TLegend(0.50, 0.64, 0.82, 0.84); +// leg->AddEntry(grdd, "10 MeV/u", "l"); + leg->AddEntry(grpp, "10 MeV/u", "l"); +/* TLegend *leg = new TLegend(0.50, 0.64, 0.82, 0.84); + leg->AddEntry(grpt1, "1h9/2 10 MeV/u", "l"); + leg->AddEntry(grpt2, "1h9/2 15 MeV/u", "l"); + leg->AddEntry(grpt3, "1h9/2 20 MeV/u", "l");*/ +/* TLegend *leg = new TLegend(0.16, 0.17, 0.48, 0.37); + leg->AddEntry(gr1, "3p3/2 5 MeV/u", "l"); + leg->AddEntry(gr2, "2f7/2 5 MeV/u", "l"); + leg->AddEntry(gr3, "3p3/2 10 MeV/u", "l"); + leg->AddEntry(gr4, "2f7/2 10 MeV/u", "l");*/ + leg->SetBorderSize(1); + leg->Draw(); + +/* TMultiGraph *mgr = new TMultiGraph(); + mgr->Add(gr1, "lp"); + mgr->Add(gr2, "lp"); + mgr->Add(gr3, "lp"); + mgr->Add(gr4, "lp"); + mgr->Draw("a*");*/ +// gr1->Draw("alp"); +} + + + +TGraph* ReadCrossSection(const char* fname) +{ + // Path to cross-section files + TString path = gSystem->Getenv("NPTOOL"); + path += "/Inputs/CrossSection/"; + + // Open file + ifstream fich; + fich.open(path + fname); + if (!fich) cout << "Probleme d'ouverture dans le fichier " << fname << endl; + + // Read file + Double_t angle, sigma; + Int_t nlines = 0; + TGraph *gr = new TGraph(); + while (fich >> angle >> sigma) { + gr->SetPoint(nlines++, angle, sigma * 15); // 15: fm^2 -> mb + D0^2 + } + + // Close file + fich.close(); + + // TGraph name + gr->SetTitle(fname); + + // test pour savoir si on a bien rempli le TGraph + if (gr->GetN() == 0) + cout << "Mauvaise lecture du fichier --> probablement mauvais format" << endl; + + return gr; +} + + + +TGraph* ReadCrossSectionPT(const char* fname) +{ + // Path to cross-section files + TString path = gSystem->Getenv("NPTOOL"); + path += "/Inputs/CrossSection/"; + + // Open file + ifstream fich; + fich.open(path + fname); + if (!fich) cout << "Probleme d'ouverture dans le fichier " << fname << endl; + + // Read file + Double_t angle, sigma, dum; + Int_t nlines = 0; + TGraph *gr = new TGraph(); +// while (fich >> angle >> sigma >> dum >> dum >> dum >> dum >> dum >> dum >> dum >> dum >> dum) { + while (fich >> angle >> sigma) { + gr->SetPoint(nlines++, angle, sigma); + } + + // Close file + fich.close(); + + // TGraph name + gr->SetTitle(fname); + + // test pour savoir si on a bien rempli le TGraph + if (gr->GetN() == 0) + cout << "Mauvaise lecture du fichier --> probablement mauvais format" << endl; + + return gr; +} diff --git a/NPAnalysis/Gaspard/src/Analysis.cc b/NPAnalysis/Gaspard/src/Analysis.cc index 9239da4a9b48fd1cb0ab68758d86146c590a6bc7..6d46e9a27a3575d3593fc0e69e68e19848ca9989 100644 --- a/NPAnalysis/Gaspard/src/Analysis.cc +++ b/NPAnalysis/Gaspard/src/Analysis.cc @@ -30,6 +30,17 @@ int main(int argc,char** argv) NPA::DetectorManager* myDetector = new DetectorManager; myDetector->ReadConfigurationFile(detectorfileName); + // Calculate beam energy at target middle + // Get nominal beam energy + Double_t BeamEnergyNominal = myReaction->GetBeamEnergy() * MeV; + cout << BeamEnergyNominal << endl; + // Slow beam at target middle + Double_t BeamEnergy = BeamEnergyNominal - BeamTarget.Slow(BeamEnergyNominal, myDetector->GetTargetThickness()/2 * micrometer, 0); +// Double_t BeamEnergy = 1293.56 * MeV; + cout << BeamEnergy << endl; + // Set energy beam at target middle + myReaction->SetBeamEnergy(BeamEnergy); + // nominal beam energy Double_t BeamEnergyNominal = myReaction->GetBeamEnergy() * MeV; cout << BeamEnergyNominal << endl; @@ -51,9 +62,14 @@ int main(int argc,char** argv) // Get GaspardTracker pointer GaspardTracker* GPDTrack = (GaspardTracker*) myDetector->m_Detector["GASPARD"]; - // Get the TChain and treat it + // Get the input TChain and treat it TChain* chain = RootInput:: getInstance() -> GetChain(); + // Connect TInitialConditions branch + TInitialConditions *initCond = 0; + chain->SetBranchAddress("InitialConditions", &initCond); + chain->SetBranchStatus("InitialConditions", 1); + // Connect TInteractionCoordinates branch TInteractionCoordinates *interCoord = 0; chain->SetBranchAddress("InteractionCoordinates", &interCoord); @@ -63,6 +79,16 @@ int main(int argc,char** argv) int nentries = chain->GetEntries(); cout << "Number of entries to be analysed: " << nentries << endl; + // Default initialization + double XTarget = 0; + double YTarget = 0; + double BeamTheta = 0; + double BeamPhi = 0; + + // random generator + TRandom3 *gene = new TRandom3(); + + // Loop on all events for (int i = 0; i < nentries; i ++) { if (i%10000 == 0 && i!=0) cout << "\r" << i << " analyzed events" << flush; chain -> GetEntry(i); @@ -75,22 +101,62 @@ int main(int argc,char** argv) double E = GPDTrack->GetEnergyDeposit(); // if there is a hit in the detector array, treat it. - double Theta, ThetaStrip; + double Theta, ThetaStrip, angle, ThetaCM; + double DetecX, DetecY, DetecZ; + double r; TVector3 A; if (E > -1000) { - // Get exact scattering angle from TInteractionCoordinates object - Theta = interCoord->GetDetectedAngleTheta(0) * deg; + // Get c.m. angle + ThetaCM = initCond->GetICEmittedAngleThetaCM(0) * deg; - // Get interaction coordinates taking into account the strips + // Get exact scattering angle from TInteractionCoordinates object +// Theta = interCoord->GetDetectedAngleTheta(0) * deg; + DetecX = interCoord->GetDetectedPositionX(0); + DetecY = interCoord->GetDetectedPositionY(0); + DetecZ = interCoord->GetDetectedPositionZ(0); + TVector3 Detec(DetecX, DetecY, DetecZ); + + // Get interaction position in detector + // This takes into account the strips A = GPDTrack->GetPositionOfInteraction(); - // Calculate scattering angle - ThetaStrip = ThetaCalculation (A ,TVector3(0,0,1)); + // Get beam interaction coordinates on target (from initial condition) + XTarget = initCond->GetICPositionX(0); + YTarget = initCond->GetICPositionY(0); +// cout << XTarget << " " << YTarget << endl; + BeamTheta = initCond->GetICIncidentAngleTheta(0)*deg; + BeamPhi = initCond->GetICIncidentAnglePhi(0)*deg; + TVector3 BeamDirection = TVector3(cos(BeamPhi)*sin(BeamTheta), sin(BeamPhi)*sin(BeamTheta), cos(BeamTheta)); +// cout << BeamDirection.X() << " " << BeamDirection.Y() << " " << BeamDirection.Z() << endl; + + // Hit direction taking into account beam position on target + TVector3 HitDirection = A - TVector3(XTarget, YTarget, 0); +// cout << "A: " << A.X() << " " << A.Y() << " " << A.Z() << endl; +// cout << "HitDirection: " << HitDirection.X() << " " << HitDirection.Y() << " " << HitDirection.Z() << endl; + + // Calculate scattering angle w.r.t. optical beam axis (do not take into account beam position on target) + ThetaStrip = ThetaCalculation(A, TVector3(0,0,1)); + Theta = ThetaCalculation(Detec, TVector3(0, 0, 1)); + // Calculate scattering angle w.r.t. beam (ideal case) +// ThetaStrip = ThetaCalculation(HitDirection, BeamDirection); +// Theta = ThetaCalculation(Detec - TVector3(XTarget, YTarget, 0), BeamDirection); + // Calculate scattering angle w.r.t. beam (finite spatial resolution) +/* double resol = 800; // in micrometer + angle = gene->Rndm() * 2*3.14; + r = fabs(gene->Gaus(0, resol)) * micrometer; + ThetaStrip = ThetaCalculation(A - TVector3(XTarget + r*cos(angle), YTarget + r*sin(angle), 0), BeamDirection); + Theta = ThetaCalculation(Detec - TVector3(XTarget + r*cos(angle), YTarget + r*sin(angle), 0), BeamDirection); +*/ // Correct for energy loss in the target E = LightTarget.EvaluateInitialEnergy(E, myDetector->GetTargetThickness()/2 * micrometer, ThetaStrip); // Calculate excitation energy - if (Theta/deg > 90) { +// if (Theta/deg > 150 && Theta/deg < 180) { +// if (Theta/deg < 60 && ThetaCM/deg < 90) { +// if (Theta/deg > 35 && Theta/deg < 45 && E/MeV < 17) { +// if (Theta/deg < 45) { + if (E/MeV < 38) { // for (p,t) reaction +// if (Theta/deg > 90) { // for (d,p) reaction ExNoStrips = myReaction->ReconstructRelativistic(E, Theta / rad); Ex = myReaction->ReconstructRelativistic(E, ThetaStrip); } diff --git a/NPAnalysis/e530/Makefile b/NPAnalysis/e530/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..f5bfeb69ffd25b28c9ccb8a81eebb1b66664dfa2 --- /dev/null +++ b/NPAnalysis/e530/Makefile @@ -0,0 +1,6 @@ + +Analyse: + make -C ./src + +clean: + make clean -C ./src diff --git a/NPAnalysis/e530/RunToTreat.txt b/NPAnalysis/e530/RunToTreat.txt new file mode 100644 index 0000000000000000000000000000000000000000..c56d1ce44cd471573db652b261e0f3be3adc4cd8 --- /dev/null +++ b/NPAnalysis/e530/RunToTreat.txt @@ -0,0 +1,7 @@ +TTreeName + SimulatedTree +RootFileName + %../../Outputs/Simulation/3He_source.root + %../../Outputs/Simulation/alpha_source.root + %../../Outputs/Simulation/REALIST_DATA.root + ../../Outputs/Simulation/mySimul.root diff --git a/NPAnalysis/e530/include/ObjectManager.hh b/NPAnalysis/e530/include/ObjectManager.hh new file mode 100644 index 0000000000000000000000000000000000000000..036e1a34f65df03c02e04424554c6185972b913c --- /dev/null +++ b/NPAnalysis/e530/include/ObjectManager.hh @@ -0,0 +1,194 @@ +// You can use this file to declare your spectra, file, energy loss , ... and whatever you want. +// This way you can remove all unnecessary declaration in the main programm. +// In order to help debugging and organizing we use Name Space. + +///////////////////////////////////////////////////////////////////////////////////////////////// +// -------------------------------------- VARIOUS INCLUDE --------------------------------------- + +// NPA +#include "DetectorManager.h" + +// STL C++ +#include <iostream> +#include <fstream> +#include <sstream> +#include <string> +#include <cmath> +#include <cstdlib> +#include <time.h> + +// ROOT +#include <TROOT.h> +#include <TChain.h> +#include <TFile.h> +#include <TLeaf.h> +#include <TVector3.h> +#include <TRandom.h> + +// NPL +#include "TPlasticData.h" +#include "NPReaction.h" +#include "RootInput.h" +#include "RootOutput.h" +#include "TInitialConditions.h" +#include "TMust2Physics.h" +#include "TSSSDPhysics.h" +#include "TPlasticPhysics.h" + +// Use CLHEP System of unit and Physical Constant +#include "CLHEP/Units/GlobalSystemOfUnits.h" +#include "CLHEP/Units/PhysicalConstants.h" + + +// ---------------------------------------------------------------------------------------------- +double ThetaCalculation (TVector3 A , TVector3 B) ; +///////////////////////////////////////////////////////////////////////////////////////////////// +// ----------------------------------- DOUBLE, INT, BOOL AND MORE ------------------------------- +namespace VARIABLE + { + // Declare your Variable here: + + double X1,Y1,Z1 ; + int N1,N2 = 0 ; + bool check= false ; + + // A Usefull Simple Random Generator + TRandom Rand; + } + +using namespace VARIABLE ; +// ---------------------------------------------------------------------------------------------- + + + +///////////////////////////////////////////////////////////////////////////////////////////////// +// -----------------------------------GRAPH------------------------------------------------------ +#include <TObject.h> +#include <TH1.h> +#include <TH1F.h> +#include <TH2.h> +#include <TH2F.h> +#include <TGraph2D.h> + +namespace GRAPH + { + // Declare your Spectra here: + + TH1F *myHist1D = new TH1F("Hist1D","Histogramm 1D ; x ; count", 1000 , -5 , 5 ) ; + + TH2F *myHist2D = new TH2F("Hist2D","Histogramm 2D ; x ; y ", 128 , 1 , 128 , 128 , 1 , 128 ) ; + + } + +using namespace GRAPH ; +// -------------------------------------------------------------------------------------------- + + + +/////////////////////////////////////////////////////////////////////////////////////////////// +// -----------------------------------CUT------------------------------------------------------ +#include <TCutG.h> +namespace CUT + { + // Declare your Cut here: + + } + +using namespace CUT ; +// -------------------------------------------------------------------------------------------- + + + +//////////////////////////////////////////////////////////////////////////////////////////////// +// -----------------------------------ENERGY LOSS---------------------------------------------- +#include "NPEnergyLoss.h" +using namespace NPL ; +namespace ENERGYLOSS + { + + + // 3He Energy Loss + /* + EnergyLoss He3TargetWind = EnergyLoss ("He3_Mylar.G4table", + "G4Table" , + 10000 ); + + EnergyLoss He3TargetGaz = EnergyLoss ("He3_D2.G4table" , + "G4Table" , + 10000 ); + + EnergyLoss He3StripAl = EnergyLoss ("3He_Al.txt" , + "LISE" , + 10000 , + 1 , + 3 ); + + EnergyLoss He3StripSi = EnergyLoss ("3He_Si.txt" , + "LISE" , + 10000 , + 1 , + 3 ); + + */ + + // // 3He Energy Loss + // EnergyLoss He3TargetWind = EnergyLoss ( "3He_Mylar.txt" , + // 10000 , + // 1 , + // 3 ); + // + // EnergyLoss He3TargetGaz = EnergyLoss ( "3He_D2gaz_1b_26K.txt" , + // 10000 , + // 1 , + // 3 ); + // + // EnergyLoss He3StripAl = EnergyLoss ( "3He_Al.txt" , + // 10000 , + // 1 , + // 3 ); + // + // EnergyLoss He3StripSi = EnergyLoss ( "3He_Si.txt" , + // 10000 , + // 1 , + // 3 ); + + + // proton Energy Loss + EnergyLoss protonTargetWind = EnergyLoss ("proton_Mylar.txt", + "LISE" , + 1000 , + 1 , + 1 ); + + EnergyLoss protonTargetGaz = EnergyLoss ("proton_D2gaz_1b_26K.txt" , + "LISE" , + 1000 , + 1 , + 1 ); + + EnergyLoss protonStripAl = EnergyLoss ("proton_Al.txt" , + "LISE" , + 100 , + 1 , + 1 ); + + + } + +using namespace ENERGYLOSS ; +// ---------------------------------------------------------------------------------------------- + +///////////////////////////////////////////////////////////////////////////////////////////////// +// -----------------------------------Random Engine---------------------------------------------- +#include "TRandom3.h" +namespace RANDOMENGINE + { + + TRandom3 RandomEngine = TRandom3(); + + } + +using namespace RANDOMENGINE ; +// ---------------------------------------------------------------------------------------------- +///////////////////////////////////////////////////////////////////////////////////////////////// + diff --git a/NPAnalysis/e530/macro/CrossSection.c b/NPAnalysis/e530/macro/CrossSection.c new file mode 100644 index 0000000000000000000000000000000000000000..5640efb446f5464a98882b5a40ea015ef2745171 --- /dev/null +++ b/NPAnalysis/e530/macro/CrossSection.c @@ -0,0 +1,121 @@ +{ + gROOT->Reset(); + gStyle->SetOptStat(1); + gStyle->SetPalette(51,0); + /////////////////////// + /////////////////////// + + double Pi = 3.141592654 ; + +///Usefull myAngleInRad * RadToDeg = myAngle In deg :p + double DegToRad = Pi/180. ; // 2Pi/360 = Pi/180 + double RadToDeg = 180./Pi ; // 360/2Pi = 180/Pi + +TFile *file0 = TFile::Open("./Result/myResult.root"); + + cEA = new TCanvas("cEA","Kinematic Line" ,100,100,900,900); + hEA->Draw("COLZ"); + cEx = new TCanvas("cEx","Excitation Energy" ,100,100,600,600); + hEx->Draw(); + + cEHexa = new TCanvas("cEHexa","Hexaneutron bound Energy" ,100,100,600,600); + hEHexa->Draw(); + + cCM = new TCanvas("cCm" , "Cross Section (CM)" , 100 , 100 , 900, 900) ; + hThetaCM->Draw(); + + vector<double> relative_error; + double NumberOfHitX=0; + ifstream efficFile; + efficFile.open("./17cm.efficiency"); + string EffString, ThetaString; + double xxx = hThetaLabCM->GetNbinsY(); + + for(Int_t i = 1 ; i < hThetaLabCM->GetNbinsX() ; i++) + { + // Calculate Relative error + NumberOfHitX=hThetaLabCM->Integral(i, i, 1, xxx ); + if(NumberOfHitX!=0)relative_error.push_back( 1. / ( sqrt(NumberOfHitX) ) ); + else {relative_error.push_back(0) ;} + } + + for(Int_t j = 1 ; j < hThetaLabCM->GetNbinsY() ; j++) + { + //Efficacity correction + efficFile >> ThetaString >> EffString; + double Eff = atoi(EffString.c_str()); + for(Int_t i = 1 ; i < hThetaLabCM->GetNbinsX() ; i++) + { + if (Eff!=0) + { + double pipo = (hThetaLabCM->GetCellContent(i,j))/(Eff) ; + hThetaLabCM->SetCellContent( i, j, pipo ); + } + else hThetaLabCM->SetCellContent( i, j, 0 ); + } + } + + TH1D* hCrossSection = new TH1D(); + hCrossSection = hThetaLabCM->ProjectionX("Cross Section", 0, -1, "") ; + + for(Int_t i = 1 ; i < hCrossSection->GetNbinsX() ; i++) + { + // Calculate Error + hCrossSection->SetBinContent(i, + NumberOfHitX=hCrossSection->GetBinContent(i)/(sin(hCrossSection->GetBinCenter(i)*DegToRad) )); + double error=NumberOfHitX*relative_error[i]; + hCrossSection->SetBinError(i,error); + } + + hCrossSection->Draw(); + + string Path="../Data/CrossSection/11Li(d,3He)10He.txt"; + ifstream CrossSectionFile; + CrossSectionFile.open(Path.c_str()); + if( CrossSectionFile.is_open() ) + cout << " file " << Path << " loading " << endl; + else{ + cout << " Error, no file " << Path << " found" << endl; return;} + + + //Normalisation: + //Int_t Maximum_Bin = hCrossSection->GetMaximumBin() ; + Int_t Maximum_Bin = 3 ; + Double_t Maximum_theta = hCrossSection->GetBinCenter(Maximum_Bin) ; + Double_t Bin_Width = hCrossSection->GetBinWidth(Maximum_Bin) ; + Double_t Maximum = hCrossSection->GetBinContent(Maximum_Bin) ; + + Double_t Normalisation_Factor = 0 ; + Double_t ThetaVal = 0 ; + Double_t CSVal = 0 ; + TMarker marker ; + string theta,CS ; + + while( !CrossSectionFile.eof() && ThetaVal<60) + { + CrossSectionFile >> theta >> CS ; + + ThetaVal=atof(theta.c_str()) ; + + if(ThetaVal>(Maximum_theta-Bin_Width/1000) && ThetaVal<(Maximum_theta+Bin_Width/1000) ) + { + CSVal=atof(CS.c_str()) ; + Normalisation_Factor = Maximum/CSVal; + } + } + CrossSectionFile.close(); + CrossSectionFile.open(Path.c_str()); + + //Reading Cross Section + + ThetaVal=0; + while( !CrossSectionFile.eof() && ThetaVal<60) + { + + CrossSectionFile >> theta >> CS ; + CSVal=atof(CS.c_str()) ; + ThetaVal=atof(theta.c_str()) ; + marker->DrawMarker(ThetaVal,CSVal*Normalisation_Factor ) ; + } + +} diff --git a/NPAnalysis/e530/macro/TimeOfFlight.c b/NPAnalysis/e530/macro/TimeOfFlight.c new file mode 100644 index 0000000000000000000000000000000000000000..916932fc04c540832f14c0c4cf14b4889d8972be --- /dev/null +++ b/NPAnalysis/e530/macro/TimeOfFlight.c @@ -0,0 +1,14 @@ +{ + + gROOT->Reset(); + gStyle->SetOptStat(1); + gStyle->SetPalette(51,0); + //gStyle->SetPalette(1); + /////////////////////// + /////////////////////// +TFile *file0 = TFile::Open("./Result/myResult.root"); + + TCanvas* cTOF = new TCanvas("cTOF","Time of Flight" ,10,10,800,800); + hTOF1234->Draw("COLZ"); + +} diff --git a/NPAnalysis/e530/macro/affich.c b/NPAnalysis/e530/macro/affich.c new file mode 100644 index 0000000000000000000000000000000000000000..2c8537ea62be3b91ec797d490b630dd8f4ecc6eb --- /dev/null +++ b/NPAnalysis/e530/macro/affich.c @@ -0,0 +1,291 @@ +{ + + gROOT->Reset(); + gStyle->SetOptStat(1); + //gStyle->SetPalette(51,0); + gStyle->SetPalette(1); + /////////////////////// + /////////////////////// +TFile *file0 = TFile::Open("./Result/myResult.root"); + +/* TCanvas* cTOF = new TCanvas("cTOF","Time of Flight" ,10,10,800,800); + cTOF->Divide(3,2); + + cTOF->cd(1); + hTOF1->Draw("COLZ"); + + cTOF->cd(2); + hTOF2->Draw("COLZ"); + + cTOF->cd(3); + hTOF3->Draw("COLZ"); + + cTOF->cd(4); + hTOF4->Draw("COLZ"); + + cTOF->cd(5); + hTOF5->Draw("COLZ"); */ + + double Pi = 3.141592654 ; + double DegToRad = Pi/180. ; // 2Pi/360 = Pi/180 + +/* vector<double> relative_error; + double NumberOfHitX=0; + cTheta2D = new TCanvas("cTheta2d","Cross Section" ,100,100,900,900); + hThetaLabCM->Draw("COLZ");*/ + cTheta = new TCanvas("cTheta","Cross Section" ,100,100,900,900); + hTheta->Draw(); +/* ifstream efficFile; + + efficFile.open("./efficiency/20cm2.efficiency"); + string EffString, ThetaString; + double xxx = hThetaLabCM->GetNbinsY(); + + for(Int_t i = 1 ; i < hThetaLabCM->GetNbinsX() ; i++) + { + // Calculate Relative error + NumberOfHitX=hThetaLabCM->Integral(i, i, 1, xxx ); + if(NumberOfHitX!=0)relative_error.push_back( ( sqrt(NumberOfHitX) ) / (NumberOfHitX) ); + else {relative_error.push_back(0) ;} + } + + for(Int_t j = 1 ; j < hThetaLabCM->GetNbinsY() ; j++) + { + //Efficacity correction + efficFile >> ThetaString >> EffString; + double Eff = atoi(EffString.c_str()); + for(Int_t i = 1 ; i < hThetaLabCM->GetNbinsX() ; i++) + { + if (Eff!=0) + { + double pipo = (hThetaLabCM->GetCellContent(i,j))/(Eff/100) ; + hThetaLabCM->SetCellContent( i, j, pipo ); + } + else hThetaLabCM->SetCellContent( i, j, 0 ); + } + } + + + TH1D* hCrossSection = new TH1D(); + hCrossSection = hThetaLabCM->ProjectionX("Cross Section", 0, -1, "") ; + + + for(Int_t i = 1 ; i < hCrossSection->GetNbinsX() ; i++) + { + // Calculate Error + NumberOfHitX=hCrossSection->GetBinContent(i); + double error=NumberOfHitX*relative_error[i]; + hCrossSection->SetBinError(i,error); + } + + hCrossSection->Draw(); + +/* ofstream efficFile; + efficFile.open("20cm.efficiency"); + + for(Int_t i = 1 ; i < hTheta->GetNbinsX() ; i++) + { + + Double_t Flux = 100000*sin(hTheta->GetBinCenter(i)*DegToRad)*2*DegToRad/2; + + if(Flux!=0) + { + Double_t Efficiency = ( ( Flux - hTheta->GetBinContent(i) ) / Flux ) * 100 ; + + hTheta->SetBinContent(i, 100-Efficiency ) ; + + efficFile << hTheta->GetBinCenter(i) << " " << 100-Efficiency << endl; + } + + else hTheta->SetBinContent(i, 0 ); + } + + + //hTheta->Draw();*/ + + //efficiency correction and error bar calculation +/* ifstream efficFile; + efficFile.open("./efficiency/20cmCM.efficiency"); + string EffString, ThetaString; + double Eff, relative_error, error, toto ; + + for(Int_t i = 1 ; i < hThetaCM->GetNbinsX() ; i++) + { + + efficFile >> ThetaString >> EffString; + Eff = atoi(EffString.c_str()); + if(hThetaCM->GetBinContent(i)!=0)relative_error = sqrt(hThetaCM->GetBinContent(i))/(hThetaCM->GetBinContent(i)); + + toto=hThetaCM->GetBinContent(i)*(100-Eff) ; + hThetaCM->SetBinContent(i, toto) ; + + error=hThetaCM->GetBinContent(i)*relative_error; + hThetaCM->SetBinError(i,error); + }*/ + + + + + //hThetaCM->Draw(); + +/* string Path="/home/Adrien/Desktop/geant/Simulation/Data/CrossSection/11Li(d,3He)10He.txt"; + ifstream CrossSectionFile; + CrossSectionFile.open(Path.c_str()); + if( CrossSectionFile.is_open() ) + cout << " file " << Path << " loading " << endl; + else{ + cout << " Error, no file " << Path << " found" << endl; return;} + + + //Normalisation: + Int_t Maximum_Bin = hCrossSection->GetMaximumBin() ; + Double_t Maximum_theta = hCrossSection->GetBinCenter(Maximum_Bin) ; + Double_t Bin_Width = hCrossSection->GetBinWidth(Maximum_Bin) ; + Double_t Maximum = hCrossSection->GetBinContent(Maximum_Bin) ; + + Double_t Normalisation_Factor=0; + + + + Double_t ThetaVal=0 ; + Double_t CSVal=0 ; + TMarker marker ; + string theta,CS ; + + while( !CrossSectionFile.eof() && ThetaVal<60) + { + CrossSectionFile >> theta >> CS ; + + ThetaVal=atof(theta.c_str()) ; + + if(ThetaVal>(Maximum_theta-Bin_Width/4) && ThetaVal<(Maximum_theta+Bin_Width/4) ) + { + CSVal=atof(CS.c_str()) ; + Normalisation_Factor = Maximum/CSVal; + } + } + CrossSectionFile.close(); + CrossSectionFile.open(Path.c_str()); + + //Reading Cross Section + + ThetaVal=0; + while( !CrossSectionFile.eof() && ThetaVal<60) + { + + CrossSectionFile >> theta >> CS ; + CSVal=atof(CS.c_str()) ; + ThetaVal=atof(theta.c_str()) ; + marker->DrawMarker(ThetaVal,CSVal*Normalisation_Factor) ; + } + + + +/* + //Normalisation: + Double_t Maximum_Bin = hTheta->GetMaximumBin() ; + Double_t Maximum = hTheta->GetBinContent(Maximum_Bin) ; + + Double_t Normalisation_Factor = Maximum/3.; + + + + //Reading Cross Section + Double_t ThetaVal=0 ; + Double_t CSVal=0 ; + TMarker marker ; + string theta,CS ; + + while( !CrossSectionFile.eof() && ThetaVal<60) + { + + CrossSectionFile >> theta >> CS ; + CSVal=atof(CS.c_str()) ; + ThetaVal=atof(theta.c_str()) ; + + ThetaVal=0.000479597*pow(ThetaVal,3)-0.0670771*pow(ThetaVal,2)+3.08149*ThetaVal-0.339958 ; + + marker->DrawMarker(ThetaVal,CSVal*Normalisation_Factor) ; + } +// cTheta->SetLogy(1); + + + + + /* + cKine = new TCanvas("cKine","Kinematics lines" ,10,10,800,800); + hKine->Draw("COLZ");*/ + +/* cKineInit = new TCanvas("cKineInit","Initial Kinematics lines" ,100,100,600,600); + hKineInit->Draw("COLZ"); + + cEDE = new TCanvas("EDE","EDE add Strip" ,100,100,600,600); + hEDEAddStrip->Draw("COLZ"); +/* cG = new TCanvas("cG","Strip position",500,100,800,600); + cG->Divide(3,2); + + cG->cd(1); + Agraph2D->Draw("P0") ; + cG->cd(2); + Bgraph2D->Draw("P0") ; + cG->cd(3); + Cgraph2D->Draw("P0") ; + cG->cd(4); + Dgraph2D->Draw("P0") ; + cG->cd(5); + Egraph2D->Draw("P0") ; + + cG2 = new TCanvas("cG2","all Strip position",500,100,800,600); + TOTgraph2D->Draw("P0") ; + */ + cH = new TCanvas("cH","Hit density",500,100,1000,800); + cH->Divide(3,2); + + cH->cd(1); + hHIT4->Draw("COLZ"); + cH->cd(2); + hHIT2->Draw("COLZ"); + cH->cd(3); + hHIT5->Draw("COLZ"); + cH->cd(4); + hHIT1->Draw("COLZ"); + cH->cd(5); + hHIT3->Draw("COLZ"); + cH->cd(6); + hThetaHeavy->Draw(); + +/* cH->cd(5); + hXZ->Draw("COLZ"); + cH->cd(6); + hXY->Draw("COLZ"); + + cEDE = new TCanvas("cEDE","EDE indentification Spectra",500,100,1000,800); + cEDE->Divide(3,2); + + cEDE->cd(1); + hEDE1->Draw("COLZ"); + cEDE->cd(2); + hEDE2->Draw("COLZ"); + cEDE->cd(3); + hEDE3->Draw("COLZ"); + cEDE->cd(4); + hEDE4->Draw("COLZ"); + cEDE->cd(5); + hEDE5->Draw("COLZ"); + cEDE->cd(6); + TH2F* hEDET= new TH2F("hEDET","",4000,-1,600, 400, -1, 25) ; + hEDET->Add(hEDE1); + hEDET->Add(hEDE2); + hEDET->Add(hEDE3); + hEDET->Add(hEDE4); + hEDET->Draw("CLOZ");*/ + + cEx = new TCanvas("cEx","Excitation Energy" ,100,100,600,600); + hEx->Draw(); + /*cE = new TCanvas("cE","Light Energy" ,500,100,1000,800); + cE->Divide(2); + cE->cd(1); + hE1234->Draw(); + cE->cd(2); + hE5->Draw();*/ +} diff --git a/NPAnalysis/e530/macro/efficiency.c b/NPAnalysis/e530/macro/efficiency.c new file mode 100644 index 0000000000000000000000000000000000000000..9a04af185f75853d0bce5bae2009cd8cd01cae1a --- /dev/null +++ b/NPAnalysis/e530/macro/efficiency.c @@ -0,0 +1,58 @@ +{ + gROOT->Reset(); + gStyle->SetOptStat(1); + gStyle->SetPalette(51,0); + /////////////////////// + /////////////////////// +TFile *file0 = TFile::Open("./Result/myResult.root"); + + double Pi = 3.141592654 ; + double DegToRad = Pi/180. ; // 2Pi/360 = Pi/180 + + + ofstream efficFile; + efficFile.open("12cm.efficiency"); + + for(Int_t i = 1 ; i < hTheta->GetNbinsX() ; i++) + { + Double_t Flux = 1000000./2. * sin(hTheta->GetBinCenter(i)*DegToRad) * (2*DegToRad) ; + + if(Flux!=0) + { + Double_t Efficiency = 100*( (hTheta->GetBinContent(i)) / Flux ); + hTheta->SetBinContent(i, Efficiency ) ; + } + + else hTheta->SetBinContent(i, 0 ); + + efficFile << hTheta->GetBinCenter(i) << " " << Efficiency << endl; + } + + cEff = new TCanvas("cEff","Efficiency" ,100,100,600,600); + hTheta->Draw(); + + cHit = new TCanvas("cHit","Hit" ,100,100,600,600); + hXY->Draw("COLZ"); + + cHit2 = new TCanvas("cHit2","Hit" ,100,100,600,600); + cHit2->Divide(3,2); + + cHit2->cd(1); + hXY1->Draw("COLZ"); + + cHit2->cd(2); + hXY2->Draw("COLZ"); + + cHit2->cd(3); + hXY3->Draw("COLZ"); + + cHit2->cd(4); + hXY4->Draw("COLZ"); + + cHit2->cd(5); + hXY5->Draw("COLZ"); + + cHit2->cd(6); + hXY6->Draw("COLZ"); + +} diff --git a/NPAnalysis/e530/macro/hit.c b/NPAnalysis/e530/macro/hit.c new file mode 100644 index 0000000000000000000000000000000000000000..50db19da5e7c54b1cba977ffe34232fb328dcdd0 --- /dev/null +++ b/NPAnalysis/e530/macro/hit.c @@ -0,0 +1,44 @@ +{ + gROOT->Reset(); + gStyle->SetOptStat(1); + gStyle->SetPalette(51,0); + /////////////////////// + /////////////////////// +TFile *file0 = TFile::Open("./Result/myResult.root"); + + cEff = new TCanvas("cEff","Theta Distribution" ,100,100,600,600); + hTheta->Draw(); + + + cCM = new TCanvas("cCm" , "ThetaCM" , 100 , 100 , 600, 600) ; + hThetaCM->Draw(); + + cHit = new TCanvas("cHit","Hit" ,100,100,600,600); + hXY->Draw("COLZ"); + + + cHit2 = new TCanvas("cHit2","Hit" ,100,100,600,600); + cHit2->Divide(3,2); + + cHit2->cd(1); + hXY1->Draw("COLZ"); + + cHit2->cd(2); + hXY2->Draw("COLZ"); + + cHit2->cd(3); + hXY3->Draw("COLZ"); + + cHit2->cd(4); + hXY4->Draw("COLZ"); + + cHit2->cd(5); + hXY5->Draw("COLZ"); + + cHit2->cd(6); + hXY6->Draw("COLZ"); + + cEx = new TCanvas("cEx","Excitation Energy" ,100,100,300,300); + hEx->Draw(); + +} diff --git a/NPAnalysis/e530/pipo.txt b/NPAnalysis/e530/pipo.txt new file mode 100644 index 0000000000000000000000000000000000000000..a6ffecd1bfe9a754e329aa65d0f5fedaec9284f8 --- /dev/null +++ b/NPAnalysis/e530/pipo.txt @@ -0,0 +1,2 @@ +CalibrationFilePath + /home/Adrien/Desktop/NPTool/NPTool.dev.CalibMust2/NPAnalysis/e530/calibrrrPipo.txt diff --git a/NPAnalysis/e530/src/Analysis.cc b/NPAnalysis/e530/src/Analysis.cc new file mode 100644 index 0000000000000000000000000000000000000000..2561d14e48382f007406e0f1693d80867e5e0aaa --- /dev/null +++ b/NPAnalysis/e530/src/Analysis.cc @@ -0,0 +1,111 @@ +#include "ObjectManager.hh" + +using namespace std; + +int main(int argc,char** argv) +{ + + if(argc!=5) + { + cout << + "you need to specify both a Reaction file and a Detector file such as : "<< endl; + cout << + "Analysis myReaction.reaction myDetector.detector runToRead.run" << endl; + return 0; + } + + string reactionfileName = argv[1] ; + string detectorfileName = argv[2] ; + string calibrationfileName = argv[3] ; + string runToTreatFileName = argv[4] ; + + ///////////////////////////////////////////////////////////////////////////////////////////////////// + // First of All instantiate RootInput and Output + // Detector will be attached later + RootInput:: getInstance(runToTreatFileName) ; + RootOutput::getInstance("Analysis/60Fe_AnalyzedData", "AnalyzedTree") ; + + // Instantiate some Reaction + NPL::Reaction* e530Reaction = new Reaction ; + e530Reaction -> ReadConfigurationFile(reactionfileName) ; + + // Instantiate the Calibration Manger using a file (WARNING:prior to the detector instantiation) + CalibrationManager* myCalibration = CalibrationManager::getInstance(calibrationfileName) ; + + // Instantiate the detector using a file + NPA::DetectorManager* myDetector = new DetectorManager ; + myDetector -> ReadConfigurationFile(detectorfileName) ; + + // Ask the detector manager to load the parameter added by the detector in the calibrationfileName + myCalibration->LoadParameterFromFile() ; + ///////////////////////////////////////////////////////////////////////////////////////////////////// + + // Attach more branch to the output + double ELab=0,ThetaLab=0,ExcitationEnergy=0; + RootOutput::getInstance()->GetTree()->Branch("ELab",&ELab,"ELab/D") ; + RootOutput::getInstance()->GetTree()->Branch("ThetaLab",&ThetaLab,"ThetaLab/D") ; + RootOutput::getInstance()->GetTree()->Branch("ExcitationEnergy",&ExcitationEnergy,"ExcitationEnergy/D") ; + // Get the formed Chained Tree and Treat it + TChain* Chain = RootInput:: getInstance() -> GetChain() ; + + TMust2Physics* M2 = (TMust2Physics*) myDetector -> m_Detector["MUST2"] ; + cout << " ///////// Starting Analysis ///////// "<< endl << endl ; + + int i ,N=Chain -> GetEntries(); + + //N = 1000; + cout << " Number of Event to be treated : " << N << endl ; + + clock_t begin=clock(); + clock_t end=begin; + for ( i = 0 ; i < N ; i ++ ) + { + // Minimum code + if( i%10000 == 0 && i!=0) { + cout.precision(5); + end=clock(); + double TimeElapsed = (end-begin)/CLOCKS_PER_SEC; + double percent = (double)i/N ; + double TimeToWait = (TimeElapsed/percent) - TimeElapsed ; + cout << "\r Progression:" << percent*100 + << " % \t | \t Remaining time : ~" + << TimeToWait <<"s"<< flush; + } + + else if (i==N-1) cout << "\r Progression:" + << " 100% " <<endl; + + Chain -> GetEntry(i); + // Clear Previous Event + myDetector -> ClearEventPhysics() ; + // Build the new one + myDetector -> BuildPhysicalEvent() ; + //// + + + // Must 2 + for(int hit = 0; hit < M2 -> Si_E.size() ; hit ++) + { + ELab = -1 ; ThetaLab = -1; + // Get Hit Direction + TVector3 HitDirection = M2 -> GetPositionOfInteraction(hit) - TVector3(0,0,-40); + // Angle between beam and particle + ThetaLab = ThetaCalculation ( HitDirection , TVector3(0,0,1) ) ; + ELab = M2 -> Si_E[hit] + M2 -> SiLi_E[hit] ; + } + + RootOutput::getInstance()->GetTree()->Fill() ; + } + + cout << " A total of " << i << " event has been annalysed " << endl ; + cout << endl << " ///////////////////////////////////// "<< endl<< endl ; + RootOutput::getInstance()->Destroy(); + return 0 ; +} + +double ThetaCalculation (TVector3 A , TVector3 B) +{ + double Theta = acos( (A.Dot(B)) / (A.Mag()*B.Mag()) ) ; + return Theta*rad ; +} + diff --git a/NPAnalysis/e530/src/GNUmakefile b/NPAnalysis/e530/src/GNUmakefile new file mode 100644 index 0000000000000000000000000000000000000000..28c404622cec4d40b2e93aa0009fc4fc4fa97d26 --- /dev/null +++ b/NPAnalysis/e530/src/GNUmakefile @@ -0,0 +1,42 @@ +###Make file made by Adrien MATTA/ Institut de Physique Nucleaire d'Orsay IPNO### +# Made to compile the ROOT Analyser for MUST2 experiment + +CPP=g++ +EXEC=Analysis + +# local includes +NPAINCLUDES = ../include + +# ROOT includes +CXXFLAGS += `root-config --cflags` + +# CLHEP includes +CXXFLAGS += -I$(CLHEP_INCLUDE_DIR) +CXXFLAGS += -I$(NPAINCLUDES) +CXXFLAGS += -I$(NPLIB)/include + +LDFLAGS = `root-config --libs` -lMathMore +LDFLAGS+= `$(NPLIB)/liblist` +LDFLAGS+= -L$(CLHEP_LIB_DIR) -l$(CLHEP_LIB) + +SRC= $(wildcard *.cc) +INC= $(wildcard $(NPAINCLUDES)/*.hh) +OBJ=$(SRC:.cc=.o) + +#all:$(EXEC) +# @$(CPP) -o $@ -c $< $(CXXFLAGS) + +Analysis:$(OBJ) $(INC) + @$(CPP) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) + mv Analysis ../Analysis + +%.o: %.cc + @$(CPP) $(CXXFLAGS) -o $@ -c $< + +.PHONY: clean mrproper + +clean: + rm -rf *.o + +mrproper: clean + rm -rf $(EXEC) diff --git a/NPAnalysis/macros/ControlSimu.C b/NPAnalysis/macros/ControlSimu.C index 9717f67cf6c6a80bcb11cb07e53e9babbd14e3c7..eec45423908cd0114eb2fb2d800dbd42df0f5d82 100644 --- a/NPAnalysis/macros/ControlSimu.C +++ b/NPAnalysis/macros/ControlSimu.C @@ -37,7 +37,6 @@ #include "TH1F.h" #include "TH2F.h" -#include "TGaspardTrackerData.h" #include "TInitialConditions.h" #include "TInteractionCoordinates.h" @@ -91,7 +90,7 @@ void ControlSimu(const char * fname = "mySimul") hEmittanceXY -> Fill(initCond->GetICPositionX(0), initCond->GetICPositionY(0)); hIncidentZ -> Fill(initCond->GetICPositionZ(0)); hEmittanceXTheta -> Fill(initCond->GetICPositionX(0), initCond->GetICIncidentEmittanceTheta(0)); - hEmittanceYPhi -> Fill(initCond->GetICPositionX(0), initCond->GetICIncidentEmittancePhi(0)); + hEmittanceYPhi -> Fill(initCond->GetICPositionY(0), initCond->GetICIncidentEmittancePhi(0)); hIncidentTheta -> Fill(initCond->GetICIncidentAngleTheta(0)); hIncidentPhi -> Fill(initCond->GetICIncidentAnglePhi(0)); // ejected particle @@ -141,4 +140,18 @@ void ControlSimu(const char * fname = "mySimul") hEmittedPhiWF->Draw(); // hControlPhi->SetLineColor(kRed); // hControlPhi->Draw("same"); + + // Display histograms + TCanvas *canvasxi32 = new TCanvas("canvas3", "Emitted particle properties", 300, 600); + canvas3->Divide(1,3); + canvas3->cd(1); + hEmittedThetaCM->SetXTitle("#Theta_{c.m.}"); + hEmittedThetaCM->Draw(); + canvas3->cd(2); + hEmittedThetaWF->Draw(); + hEmittedThetaWF->SetXTitle("#Theta_{lab}"); + canvas3->cd(3); + hEmittedETheta->SetXTitle("#Theta_{lab}"); + hEmittedETheta->SetYTitle("E [MeV]"); + hEmittedETheta->Draw(); } diff --git a/NPAnalysis/macros/GeometricalEfficiency.C b/NPAnalysis/macros/GeometricalEfficiency.C index c2e43a82ad2a6150cd92bb2f6437d6572948e1fe..fed847d8c3c780e8d9b2248eb12cd5c62049a2c3 100644 --- a/NPAnalysis/macros/GeometricalEfficiency.C +++ b/NPAnalysis/macros/GeometricalEfficiency.C @@ -36,6 +36,9 @@ #include "TBranch.h" #include "TH1F.h" +#include "TInitialConditions.h" +#include "TInteractionCoordinates.h" + using namespace std ; @@ -75,11 +78,20 @@ void GeometricalEfficiency(const char * fname = "mySimul") hDetecTheta->Fill(interCoord->GetDetectedAngleTheta(0)); } + TCanvas *c1 = new TCanvas("c1", "c1"); + c1->Draw(); // Compute relative efficiency in % TH1F *efficiency = new TH1F("hEfficiency", "Efficiency", 180, 0, 180); - efficiency->SetTitle("Efficiency GASPARD (Spheric version);#Theta [deg];#epsilon [%]"); -// efficiency->SetTitle("Efficiency e530;#Theta [deg];#epsilon [%]"); +// efficiency->SetTitle("Efficiency GASPARD (Spheric version);#Theta [deg];#epsilon [%]"); + efficiency->SetTitle("Efficiency GASPARD;#Theta [deg];#epsilon [%]"); efficiency->Divide(hDetecTheta,hEmittTheta,100); efficiency->SetMaximum(110); efficiency->Draw(); + + + TCanvas *c2 = new TCanvas("c2", "c2"); + c2->Draw(); + hEmittTheta->Draw(); + hDetecTheta->SetLineColor(kRed); + hDetecTheta->Draw("same"); } diff --git a/NPDocumentation/Gaspard.tex b/NPDocumentation/Gaspard.tex index e486f4bc743e576454702cc44f370f8a31e6e8ae..67d4b1ac1206f1123b1d37ec0f044cbe49abbec8 100755 --- a/NPDocumentation/Gaspard.tex +++ b/NPDocumentation/Gaspard.tex @@ -240,10 +240,35 @@ directory. For the moment the main feature is the reconstruction of the excitati energy. \subsubsection{Running the analysis} -******* to be documented ********* +To run NPAnalysis the following command line should be executed: + +\begin{verbatim} + ./Analysis xxx.reaction yyy.detector RunToTreat.txt +\end{verbatim} + +where xxx.reaction is the input file describing the event generator used in +NPSimulation and yyy.detector is the input file describing the detector geometry +used in NPSimulation. All these input files are based on keywords and can be found +in the \$NPTool/Inputs subdirectories. The RunToTreat.txt file contains the +name of the files (either from NPSimulation or from real experiment) which should +be analysed. The name of the tree should also be specified. An example +of such a file is given here: + +\begin{verbatim} + TTreeName + SimulatedTree + RootFileName + % ../../Outputs/Simulation/mySimul.root + ../../Outputs/Simulation/132Sndp_3p3_10MeVA_T0_B1_E0_S05mm.root + % ../../Outputs/Simulation/134Snpt_1h9_10MeVA_T1_B1_E0_S05mm.root +\end{verbatim} + + +\subsubsection{Results of the analysis} +The results of the anaysis are stored in a ROOT file in the \$NPTool/Output/Analysis +directory. For the moment the main feature available is the reconstructionof the +excitation energy. -\subsubsection{Results the analysis} -******* to be documented ********* \subsubsection{Structure of the analysis} ******* to be documented ********* diff --git a/NPDocumentation/NPTool_UserGuide.tex b/NPDocumentation/NPTool_UserGuide.tex index 1d9e94b71907bf95457147a170af10c43b55b7ae..c271e02a4470d049256f83d481d8865be91fb32f 100755 --- a/NPDocumentation/NPTool_UserGuide.tex +++ b/NPDocumentation/NPTool_UserGuide.tex @@ -33,7 +33,7 @@ \begin{document} -\title{\emph{NPTool 1.0 User Guide}} +\title{\emph{NPTool 1.2 User Guide}} \author{Adrien MATTA} \maketitle @@ -113,13 +113,20 @@ It also help to understand what happen during analysis. \end{itemize} \section{Step by step from TDUMMYDetectorData class} - \subsection{step 1} + \subsection{step 1: copying and editing file} First, go to your consol and open the NPLib folder, there type \begin{verbatim}make distclean\end{verbatim} This command will remove all the compilation generated file and only the source will remain. - Copy the DummyDetector folder and rename it, let's say, WonderdullDetector. - Ebter the directory and rename the TDummyDetectorData.h and .cxx with your detector name, you should have now only three file: Makefile, TWonderfullDetectorData.h and TWonderfullDetectorData.cxx + Copy the DummyDetector folder and rename it, let's say, WonderfullDetector. + Enter the directory and rename the TDummyDetectorData.h and .cxx with your detector name, you should have now only three files: Makefile, TWonderfullDetectorData.h and TWonderfullDetectorData.cxx If any other file remain, just remove it. - No open the .h and .cxx file with your favorite editor (gedit or vim for instance). Replace the the DUMMYDetector by your detector name. Just have look in the .h file, the class is very basic, a couple of value are stored in stl vector (allowing smaller tree and increasing speed access). A few methods allowed to set or get those value and to know the size of the different vector. + No open the .h and .cxx file with your favorite editor (gedit or vim for instance). Replace the the DUMMYDetector by your detector name. Just have look in the .h file, the class is very basic, a couple of value are stored in stl vector (allowing smaller tree and increasing speed access). A few methods allowed to set or get those value and to know the size of the different vector. Simply rename, add or remove needed value for your detector and update Set and Get methods as well. Please keep minde that longer and explicit name are better for understanding by other users than short not explicit name. Also note that all the private member named start with letter f (following the ROOT naming convention), followed by a few letter (2 or 3) related to your detector (fMM for MUST2 for instance). This point is of importance for enabling and disabling branches during analysis. It also avoid confusion when using cint to plote histogramm from the tree. + + \subsection{step 2: changing detector makefile} + Open the GNUMakefile in your detector directoy and edit it so it compile your file and produce a libWonderfullDetectorData.so library. Do not forget to edit the clean and distclean command as well. + + \subsection{step 3: changing NPL makefile} + Open the makefile in the NPLib directory and edit it to add a new target for your detector. Do not forget to add libWonderfullDetectorData.so in the list of target librari and edit clean and distclean target as well. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter[NPSimulation]{NPSimulation} diff --git a/NPDocumentation/logo/NPTool1.0.jpg b/NPDocumentation/logo/NPTool1.0.jpg deleted file mode 100644 index 51a84c0ae6f32640d982334e10cfa33dd79963ea..0000000000000000000000000000000000000000 Binary files a/NPDocumentation/logo/NPTool1.0.jpg and /dev/null differ diff --git a/NPDocumentation/logo/NPTool1.0.png b/NPDocumentation/logo/NPTool1.0.png deleted file mode 100644 index 6f0828efd3a830f908ef0dec4e3704b253d6be0e..0000000000000000000000000000000000000000 Binary files a/NPDocumentation/logo/NPTool1.0.png and /dev/null differ diff --git a/NPDocumentation/logo/NPTool1.0.xcf b/NPDocumentation/logo/NPTool1.0.xcf deleted file mode 100644 index 58666892c100d9693adba9a7cc3c557194f3a0be..0000000000000000000000000000000000000000 Binary files a/NPDocumentation/logo/NPTool1.0.xcf and /dev/null differ diff --git a/NPDocumentation/logo/NPTool1.jpg b/NPDocumentation/logo/NPTool1.jpg deleted file mode 100644 index f7bafe380a0af9d524eabfaabf0981d71efbe033..0000000000000000000000000000000000000000 Binary files a/NPDocumentation/logo/NPTool1.jpg and /dev/null differ diff --git a/NPDocumentation/logo/NPTool1.xcf b/NPDocumentation/logo/NPTool1.xcf deleted file mode 100644 index dbb7447173bcbcfdeb9957a7c3eecc1f0417f81a..0000000000000000000000000000000000000000 Binary files a/NPDocumentation/logo/NPTool1.xcf and /dev/null differ diff --git a/NPDocumentation/logo/NPToolgen.xcf b/NPDocumentation/logo/NPToolgen.xcf deleted file mode 100644 index 19e293e3263e39fdd489cb4af9f25bcf8fc71677..0000000000000000000000000000000000000000 Binary files a/NPDocumentation/logo/NPToolgen.xcf and /dev/null differ diff --git a/NPDocumentation/pictures/nptool_scheme_Ana.png b/NPDocumentation/pictures/nptool_scheme_Ana.png index b30c35fc9c2c367c23edc409a8cc92d38c660f46..7d8e979b0125b95a921106151e597e008b222122 100644 Binary files a/NPDocumentation/pictures/nptool_scheme_Ana.png and b/NPDocumentation/pictures/nptool_scheme_Ana.png differ diff --git a/NPDocumentation/pictures/nptool_scheme_Sim.png b/NPDocumentation/pictures/nptool_scheme_Sim.png index 56f517dfd174d3a86a0c87c90270acd904645b0b..54b55b3fc90e4b94f8548be9788fa700ee3789bc 100644 Binary files a/NPDocumentation/pictures/nptool_scheme_Sim.png and b/NPDocumentation/pictures/nptool_scheme_Sim.png differ diff --git a/NPLib/AnnularS1/TS1Data.cxx b/NPLib/AnnularS1/TS1Data.cxx index e5224851600abf587d58a78e8cbce7909926d20d..6ac39c0919556ad3ff100df324b51ee6d6a8253f 100644 --- a/NPLib/AnnularS1/TS1Data.cxx +++ b/NPLib/AnnularS1/TS1Data.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/AnnularS1/TS1Data.h b/NPLib/AnnularS1/TS1Data.h index 225f6e714cbbb9ec411a9c56f71b76378bbf0eda..934581f4f74de532b9e16f6a8dcf81926fbf6d93 100644 --- a/NPLib/AnnularS1/TS1Data.h +++ b/NPLib/AnnularS1/TS1Data.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/CalibrationManager/CalibrationManager.cxx b/NPLib/CalibrationManager/CalibrationManager.cxx index 085c08285c60962b323ad2a89135c9683dd309bb..49fe4db9f20e8711784d7230d9e148132dfe9eea 100644 --- a/NPLib/CalibrationManager/CalibrationManager.cxx +++ b/NPLib/CalibrationManager/CalibrationManager.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -25,6 +25,7 @@ #include <cstdlib> #include <limits> #include <cmath> +#include <sstream> ////////////////////////////////////////////////////////////////// CalibrationManager* CalibrationManager::instance = 0; @@ -58,15 +59,17 @@ CalibrationManager::CalibrationManager(string configFileName) return; } - else { + else + { + cout << "Reading list of file from :" << configFileName << endl; while (!inputConfigFile.eof()) { getline(inputConfigFile, lineBuffer); // search for token giving the list of Root files to treat - if ( lineBuffer.compare(0, 12, "CalibrationFilePath") == 0 ) { + if ( lineBuffer.compare(0, 19, "CalibrationFilePath") == 0 ) { while (!inputConfigFile.eof()) { inputConfigFile >> dataBuffer; - + // ignore comment Line if (dataBuffer.compare(0, 1, "%") == 0) { inputConfigFile.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); @@ -76,11 +79,12 @@ CalibrationManager::CalibrationManager(string configFileName) AddFile(dataBuffer); cout << "Adding file " << dataBuffer << " to Calibration" << endl; } - } - } - } + } + } + } + } + cout << "/////////////////////////////////" << endl; } - cout << "/////////////////////////////////" << endl;} ////////////////////////////////////////////////////////////////// CalibrationManager::~CalibrationManager() @@ -99,49 +103,56 @@ void CalibrationManager::LoadParameterFromFile() { ifstream CalibFile ; string DataBuffer ; + string LineBuffer ; for(unsigned int i = 0 ; i < fFileList.size() ; i++) { CalibFile.open( fFileList[i].c_str() ); - vector<double> Coeff ; map<string,string>::iterator it ; if(!CalibFile) { cout << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX " << endl ; - cout << " WARNING: FILE " << fFileList[i] << " IS MISSING " << endl ; + cout << " WARNING: FILE " << fFileList[i] << " IS MISSING " << endl ; cout << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX " << endl ; - } else while( !CalibFile.eof() ) + { + // Read the file Line by line + getline(CalibFile, LineBuffer); + + // Create a istringstream to manipulate the line easely + istringstream theLine (LineBuffer,istringstream::in); + theLine >> DataBuffer ; + + // Comment support, comment symbole is % + if(DataBuffer.compare(0, 1, "%") == 0) { + CalibFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );} + + // Search word in the token list + it=fToken.find(DataBuffer); + + // if the word is find, values are read + if( it!=fToken.end() ) { - CalibFile >> DataBuffer ; - - // Search word in the token list - it=fToken.find(DataBuffer); - - // if the word is find, values are read - if( it!=fToken.end() ) + vector<double> Coeff ; + while( !theLine.eof() ) { - - Coeff.clear(); - while(DataBuffer!="\n") - { - CalibFile >> DataBuffer ; Coeff.push_back( atof(DataBuffer.c_str()) ) ; - } + theLine >> DataBuffer ; Coeff.push_back( atof(DataBuffer.c_str()) ) ; + } - // Check this parameter is not already define - if( fCalibrationCoeff.find(it->second) != fCalibrationCoeff.end() ) cout << "WARNING: Parameter " << it->second << " Already found. It will be rewritted " << endl; + // Check this parameter is not already define + if( fCalibrationCoeff.find(it->second) != fCalibrationCoeff.end() ) + cout << "WARNING: Parameter " << it->second << " Already found. It will be rewritted " << endl; - // Add the list of Coeff to the Coeff map using Parameter Path as index - fCalibrationCoeff[ it->second ] = Coeff ; - } - + // Add the list of Coeff to the Coeff map using Parameter Path as index + fCalibrationCoeff[ it->second ] = Coeff ; } - CalibFile.close() ; + + } + CalibFile.close() ; } - } ////////////////////////////////////////////////////////////////// @@ -149,8 +160,12 @@ double CalibrationManager::ApplyCalibration(string ParameterPath , double RawVal { double CalibratedValue = 0 ; map< string , vector<double> >::iterator it ; + + // Find the good parameter in the Map + // Using Find method of stl is the fastest way it = fCalibrationCoeff.find(ParameterPath) ; + // If the find methods return the end iterator it's mean the parameter was not found if(it == fCalibrationCoeff.end() ) { /* cout << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX " << endl ; @@ -160,8 +175,13 @@ double CalibrationManager::ApplyCalibration(string ParameterPath , double RawVal return RawValue ; } + // Else we take the second part of the element (first is index, ie: parameter path) + // Second is the vector of Coeff vector<double> Coeff = it->second ; + // The vector size give the degree of calibration + // We just apply the coeff and returned the calibrated value + for(unsigned int i = 0 ; i < Coeff.size() ; i++) { CalibratedValue += Coeff[i]*pow(RawValue, (double)i); diff --git a/NPLib/CalibrationManager/CalibrationManager.h b/NPLib/CalibrationManager/CalibrationManager.h index 69df3a9f7f5e1ed8ee4519c1dbeaaa488cdd128d..9472a3123a1b70717593901ffe294a8c82cb853e 100644 --- a/NPLib/CalibrationManager/CalibrationManager.h +++ b/NPLib/CalibrationManager/CalibrationManager.h @@ -1,7 +1,7 @@ #ifndef ConfigManager_h #define ConfigManager_h 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -33,7 +33,7 @@ using namespace std ; class CalibrationManager { - public: // Constructor and Destructor + protected: // Constructor and Destructor are protected because the class is a singleton CalibrationManager(string configFileName); ~CalibrationManager(); @@ -50,20 +50,20 @@ class CalibrationManager inline void AddFile(string Path) { fFileList.push_back(Path) ;} ; - public: // Declaration of Calibration - + public: // Calibration Parameter Related + // call like : myCalibrationManager->AddParameter( "MUST2" ,"Telescope5_Si_X38_E", "T5_Si_X38_E" ) // return false if the token is not found in the file list - bool AddParameter(string DetectorName , string ParameterName , string Token ) ; + bool AddParameter(string DetectorName , string ParameterName , string Token) ; // call like : myCalibrationManager->ApplyCalibration( "MUST2/Telescope5_Si_X38_E" , RawEnergy ) // return the Calibrated value double ApplyCalibration(string ParameterPath , double RawValue); - public: // To be called after initialisation - // Loop over the file list and catch the file used for calibration - void LoadParameterFromFile(); + public: // To be called after initialisation + // Loop over the file list and catch the file used for calibration + void LoadParameterFromFile(); private: diff --git a/NPLib/DummyDetector/TDUMMYDetectorData.cxx b/NPLib/DummyDetector/TDUMMYDetectorData.cxx index 1c15b58bdaa04b846a331cac3de2a18b26d11ee0..e1b58093152f087ab5427260393a7e89481f4045 100755 --- a/NPLib/DummyDetector/TDUMMYDetectorData.cxx +++ b/NPLib/DummyDetector/TDUMMYDetectorData.cxx @@ -1,7 +1,7 @@ #include <iostream> #include "TDUMMYDetectorData.h" /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/DummyDetector/TDUMMYDetectorData.h b/NPLib/DummyDetector/TDUMMYDetectorData.h index cc5c29fa18c8300f629b2c221e06e6d60d6e5d0e..e340a207342c71299d248d65c604b1a8b3d9124c 100755 --- a/NPLib/DummyDetector/TDUMMYDetectorData.h +++ b/NPLib/DummyDetector/TDUMMYDetectorData.h @@ -1,7 +1,7 @@ #ifndef __DUMMYDetectorDATA__ #define __DUMMYDetectorDATA__ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/GASPARD/GaspardTracker.cxx b/NPLib/GASPARD/GaspardTracker.cxx index ee430b6cd09f6f03198c8e9429eff559047ded2f..b43e899f317ddd4535482fa5076b8b85929bdece 100644 --- a/NPLib/GASPARD/GaspardTracker.cxx +++ b/NPLib/GASPARD/GaspardTracker.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -802,7 +802,7 @@ void GaspardTracker::AddModuleDummyShape(double theta, V.Rotate( beta_w * Pi/180. , W ) ; double Face = 50; // mm - double NumberOfStrip = 25; + double NumberOfStrip = 100; double StripPitch = Face/NumberOfStrip; // mm vector<double> lineX; diff --git a/NPLib/GASPARD/GaspardTracker.h b/NPLib/GASPARD/GaspardTracker.h index 5de55bd49c53f3840d85969093c612f39452aa8c..346728d1b9858cac48786d5b56d03760680ad5a4 100644 --- a/NPLib/GASPARD/GaspardTracker.h +++ b/NPLib/GASPARD/GaspardTracker.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/GASPARD/TGaspardTrackerData.cxx b/NPLib/GASPARD/TGaspardTrackerData.cxx index 97ae3e74d203491dc7d409247d6830ea36f23385..dc88e6ab2f47cda90860540082cfc499d91250b8 100644 --- a/NPLib/GASPARD/TGaspardTrackerData.cxx +++ b/NPLib/GASPARD/TGaspardTrackerData.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/GASPARD/TGaspardTrackerData.h b/NPLib/GASPARD/TGaspardTrackerData.h index 3be1dc39375ce6418a552254a29d82d12df23bbc..bc45afa51b5a681629536f305c28da662e9a9ff3 100644 --- a/NPLib/GASPARD/TGaspardTrackerData.h +++ b/NPLib/GASPARD/TGaspardTrackerData.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/GASPARD/TGaspardTrackerPhysics.cxx b/NPLib/GASPARD/TGaspardTrackerPhysics.cxx index 8487f87751da5c57a52d2567d234347d9f7714bd..09c69515c360efc13d32aab0106566ece3f2976d 100644 --- a/NPLib/GASPARD/TGaspardTrackerPhysics.cxx +++ b/NPLib/GASPARD/TGaspardTrackerPhysics.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/GASPARD/TGaspardTrackerPhysics.h b/NPLib/GASPARD/TGaspardTrackerPhysics.h index 425d5e601e76a95d638d894893fa6492fc23cabd..0e9d115c39be1c0554ca118ef509fae0f20fac44 100644 --- a/NPLib/GASPARD/TGaspardTrackerPhysics.h +++ b/NPLib/GASPARD/TGaspardTrackerPhysics.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/INSTALL b/NPLib/INSTALL index b93077b70d97a8fa963e57928a130d76561fd0b8..ab085fec55c70335fa113f662cd9deb55755fad2 100644 --- a/NPLib/INSTALL +++ b/NPLib/INSTALL @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/IORoot/RootInput.cxx b/NPLib/IORoot/RootInput.cxx index 327343c5ff756da039a2ace4878c0dd9c14f4b1e..146c604482d17d2aa261040d91e09dc6e3ef0b1d 100644 --- a/NPLib/IORoot/RootInput.cxx +++ b/NPLib/IORoot/RootInput.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/IORoot/RootInput.h b/NPLib/IORoot/RootInput.h index 4a05b604704f8a417bb0d250573ad0b4887749b9..776b0d3b1879f3f7533583b2a5892e7a5ebafe20 100644 --- a/NPLib/IORoot/RootInput.h +++ b/NPLib/IORoot/RootInput.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/IORoot/RootOutput.cxx b/NPLib/IORoot/RootOutput.cxx index 625edb299312ab1829bc9feebe92a41f891850e2..f3b03096f2b656936164741e6b5bc084f520f789 100644 --- a/NPLib/IORoot/RootOutput.cxx +++ b/NPLib/IORoot/RootOutput.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/IORoot/RootOutput.h b/NPLib/IORoot/RootOutput.h index 0a56bf7cd93497b8c3c94acd8266debae152bf98..4d25455b13c31ce31af69276cfaa06ca4218f7da 100644 --- a/NPLib/IORoot/RootOutput.h +++ b/NPLib/IORoot/RootOutput.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/InitialConditions/TInitialConditions.cxx b/NPLib/InitialConditions/TInitialConditions.cxx index be597460ded1fc13e750111c15194a477cbf6d22..6dbd3411f69fa17165421413b996a5899f6dcfe0 100644 --- a/NPLib/InitialConditions/TInitialConditions.cxx +++ b/NPLib/InitialConditions/TInitialConditions.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/InitialConditions/TInitialConditions.h b/NPLib/InitialConditions/TInitialConditions.h index 468e941d2ea92152d55524ceccf0cda2e1089a47..67430e715990e4f61e8b006a8088f4c600e0f03a 100644 --- a/NPLib/InitialConditions/TInitialConditions.h +++ b/NPLib/InitialConditions/TInitialConditions.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/InteractionCoordinates/TInteractionCoordinates.cxx b/NPLib/InteractionCoordinates/TInteractionCoordinates.cxx index 624060e12b144eb54f64a5aeffbd5adcbba363eb..df7705ad5a909a40d2de9e7cd0706c5f283e1439 100644 --- a/NPLib/InteractionCoordinates/TInteractionCoordinates.cxx +++ b/NPLib/InteractionCoordinates/TInteractionCoordinates.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/InteractionCoordinates/TInteractionCoordinates.h b/NPLib/InteractionCoordinates/TInteractionCoordinates.h index ffd1fcc3c2eb4b0c10da88bdf23081d88802e64f..c3668039d9b5146942689c92086f95b0ff820aa6 100644 --- a/NPLib/InteractionCoordinates/TInteractionCoordinates.h +++ b/NPLib/InteractionCoordinates/TInteractionCoordinates.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/MUST2/TMust2Data.cxx b/NPLib/MUST2/TMust2Data.cxx index 308e52a0b8d581e4b55d819dd2cd584245e767f3..50fc48303522d333d30489dff7fe3db2cade995d 100644 --- a/NPLib/MUST2/TMust2Data.cxx +++ b/NPLib/MUST2/TMust2Data.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/MUST2/TMust2Data.h b/NPLib/MUST2/TMust2Data.h index 654e999cdb441c7e62ae992f3b80cef83acd05fd..f8540176b29b00d75b3a97567d3f8114a78f0bed 100644 --- a/NPLib/MUST2/TMust2Data.h +++ b/NPLib/MUST2/TMust2Data.h @@ -1,7 +1,7 @@ #ifndef __MUST2DATA__ #define __MUST2DATA__ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -151,7 +151,7 @@ class TMust2Data : public TObject { // CsI //(E) - UShort_t GetMMCsIEMult() {return fMM_CsIE_DetectorNbr.size();} + UShort_t GetMMCsIEMult() {return fMM_CsIE_DetectorNbr.size();} UShort_t GetMMCsIEDetectorNbr(Int_t i) {return fMM_CsIE_DetectorNbr.at(i);} UShort_t GetMMCsIECristalNbr(Int_t i) {return fMM_CsIE_CristalNbr.at(i);} Double_t GetMMCsIEEnergy(Int_t i) {return fMM_CsIE_Energy.at(i);} diff --git a/NPLib/MUST2/TMust2Physics.cxx b/NPLib/MUST2/TMust2Physics.cxx index 4cd918223b2ae842225aa0c02b6217b5b48634cd..e64af68be2201350914283bb6ff10005ced77d27 100644 --- a/NPLib/MUST2/TMust2Physics.cxx +++ b/NPLib/MUST2/TMust2Physics.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -16,8 +16,6 @@ * * *---------------------------------------------------------------------------* * Comment: * - * Only multiplicity one and multiplicity 2 are down. * - * Improvment needed * * * *****************************************************************************/ #include "TMust2Physics.h" @@ -40,17 +38,17 @@ using namespace LOCAL; ClassImp(TMust2Physics) /////////////////////////////////////////////////////////////////////////// TMust2Physics::TMust2Physics() - { - EventMultiplicity = 0 ; - EventData = new TMust2Data ; - EventPhysics = this ; + { + EventMultiplicity = 0 ; + EventData = new TMust2Data ; + EventPhysics = this ; + NumberOfTelescope = 0 ; } /////////////////////////////////////////////////////////////////////////// void TMust2Physics::BuildSimplePhysicalEvent() { BuildPhysicalEvent(); - } /////////////////////////////////////////////////////////////////////////// @@ -95,14 +93,24 @@ void TMust2Physics::BuildPhysicalEvent() { if(EventData->GetMMSiLiEDetectorNbr(j)==N) { - // if SiLi energy is above threshold check the compatibility + // SiLi energy is above threshold check the compatibility if( fSiLi_E(EventData , j)>SiLi_E_Threshold ) { + // pad vs strip number match if( Match_Si_SiLi( X, Y , EventData->GetMMSiLiEPadNbr(j) ) ) { SiLi_N.push_back(EventData->GetMMSiLiEPadNbr(j)) ; - SiLi_E.push_back(fSiLi_E(EventData , j)) ; - SiLi_T.push_back(fSiLi_T(EventData , j)) ; + SiLi_E.push_back(fSiLi_E(EventData , j)) ; + + // Look for associate energy + // Note: in case of use of SiLi "Orsay" time is not coded. + for(int k =0 ; k < EventData->GetMMSiLiTMult() ; k ++) + { + // Same Pad, same Detector + if( EventData->GetMMSiLiEPadNbr(j)==EventData->GetMMSiLiEPadNbr(k) && EventData->GetMMSiLiEDetectorNbr(j)==EventData->GetMMSiLiTDetectorNbr(k) ) + {SiLi_T.push_back(fSiLi_T(EventData , k)) ; break ;} + } + check_SILI = true ; } @@ -114,14 +122,20 @@ void TMust2Physics::BuildPhysicalEvent() { if(EventData->GetMMCsIEDetectorNbr(j)==N) { - // ifCsI energy is above threshold check the compatibility + // CsI energy is above threshold check the compatibility if( fCsI_T(EventData , j)>CsI_E_Threshold ) { - if( Match_Si_CsI( X, Y , EventData->GetMMCsIECristalNbr(j) ) ) + if(Match_Si_CsI( X, Y , EventData->GetMMCsIECristalNbr(j) ) ) { CsI_N.push_back(EventData->GetMMCsIECristalNbr(j)) ; - CsI_E.push_back(fCsI_E(EventData , j)) ; - CsI_T.push_back(fCsI_T(EventData , j)) ; + CsI_E.push_back(fCsI_E(EventData , j)) ; + + for(int k =0 ; k < EventData->GetMMCsITMult() ; k ++) + { + if( EventData->GetMMCsIECristalNbr(j)==EventData->GetMMCsITCristalNbr(k) && EventData->GetMMCsIEDetectorNbr(j)==EventData->GetMMCsITDetectorNbr(k) ) + {CsI_T.push_back(fCsI_T(EventData , k)) ; break ;} + } + check_CSI = true ; } } @@ -132,15 +146,15 @@ void TMust2Physics::BuildPhysicalEvent() if(!check_SILI) { SiLi_N.push_back(0) ; - SiLi_E.push_back(0) ; - SiLi_T.push_back(0) ; + SiLi_E.push_back(-10000) ; + SiLi_T.push_back(-10000) ; } if(!check_CSI) { CsI_N.push_back(0) ; - CsI_E.push_back(0) ; - CsI_T.push_back(0) ; + CsI_E.push_back(-10000) ; + CsI_T.push_back(-10000) ; } } @@ -177,6 +191,11 @@ vector < TVector2 > TMust2Physics :: Match_X_Y() { vector < TVector2 > ArrayOfGoodCouple ; + // Prevent code from treating very high multiplicity Event + // Those event are not physical anyway and that improve speed. + if( EventData->GetMMStripXEMult()>6 || EventData->GetMMStripYEMult()>6 ) + return ArrayOfGoodCouple; + for(int i = 0 ; i < EventData->GetMMStripXEMult(); i++) { // if X value is above threshold, look at Y value @@ -191,7 +210,7 @@ vector < TVector2 > TMust2Physics :: Match_X_Y() // if same detector check energy if ( EventData->GetMMStripXEDetectorNbr(i) == EventData->GetMMStripYEDetectorNbr(j) ) { - // Look if energy match + // Look if energy match (within 10%) if( ( fSi_X_E(EventData , i) - fSi_Y_E(EventData , j) ) / fSi_X_E(EventData , i) < 0.1 ) ArrayOfGoodCouple . push_back ( TVector2(i,j) ) ; } @@ -744,10 +763,12 @@ void TMust2Physics::AddTelescope( TVector3 C_X1_Y1 , NumberOfTelescope++; // Vector U on Telescope Face (paralelle to Y Strip) (NB: remember that Y strip are allong X axis) - TVector3 U = C_X1_Y1 - C_X128_Y1 ; + TVector3 U = C_X128_Y1 - C_X1_Y1 ; + double Ushift = (U.Mag()-98)/2. ; U = U.Unit() ; // Vector V on Telescope Face (parallele to X Strip) - TVector3 V = C_X128_Y128 - C_X128_Y1 ; + TVector3 V = C_X1_Y128 - C_X1_Y1 ; + double Vshift = (V.Mag() -98)/2. ; V = V.Unit() ; // Position Vector of Strip Center @@ -756,10 +777,9 @@ void TMust2Physics::AddTelescope( TVector3 C_X1_Y1 , TVector3 Strip_1_1 ; // Geometry Parameter - double Face = 98 ; //mm - double NumberOfStrip = 128 ; + double Face = 98 ; //mm + double NumberOfStrip = 128 ; double StripPitch = Face/NumberOfStrip ; //mm - // Buffer object to fill Position Array vector<double> lineX ; vector<double> lineY ; vector<double> lineZ ; @@ -768,8 +788,9 @@ void TMust2Physics::AddTelescope( TVector3 C_X1_Y1 , vector< vector< double > > OneTelescopeStripPositionZ ; // Moving StripCenter to 1.1 corner: - Strip_1_1 = C_X128_Y1 + (U+V) * (StripPitch/2.) ; - + Strip_1_1 = C_X1_Y1 + (U+V) * (StripPitch/2.) ; + Strip_1_1+= U*Ushift+V*Vshift ; + for( int i = 0 ; i < 128 ; i++ ) { lineX.clear() ; @@ -780,7 +801,6 @@ void TMust2Physics::AddTelescope( TVector3 C_X1_Y1 , { StripCenter = Strip_1_1 + StripPitch*( i*U + j*V ) ; //StripCenter += -TargetPosition ; - lineX.push_back( StripCenter.X() ) ; lineY.push_back( StripCenter.Y() ) ; lineZ.push_back( StripCenter.Z() ) ; @@ -791,8 +811,6 @@ void TMust2Physics::AddTelescope( TVector3 C_X1_Y1 , OneTelescopeStripPositionZ.push_back(lineZ) ; } - - StripPositionX.push_back( OneTelescopeStripPositionX ) ; StripPositionY.push_back( OneTelescopeStripPositionY ) ; StripPositionZ.push_back( OneTelescopeStripPositionZ ) ; @@ -835,7 +853,7 @@ void TMust2Physics::AddTelescope( double theta , W = C.Unit() ; U = W .Cross ( P ) ; - V = W .Cross ( U ); + V = W .Cross ( U ); U = U.Unit(); V = V.Unit(); diff --git a/NPLib/MUST2/TMust2Physics.h b/NPLib/MUST2/TMust2Physics.h index 1f649c60c2ae4298b4a44380e7fdb5bf7a9d903e..67cb9c31633b521d3ce59a5f0852baf9a329c7ec 100644 --- a/NPLib/MUST2/TMust2Physics.h +++ b/NPLib/MUST2/TMust2Physics.h @@ -1,7 +1,7 @@ #ifndef TMUST2PHYSICS_H #define TMUST2PHYSICS_H /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/Plastic/TPlasticPhysics.cxx b/NPLib/Plastic/TPlasticPhysics.cxx index 093f1ee58f6e74d8d2d0b1353c2b662821bfcbe0..394c52311177561dfeb8c4a3c9909f4dcbe0c119 100644 --- a/NPLib/Plastic/TPlasticPhysics.cxx +++ b/NPLib/Plastic/TPlasticPhysics.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -76,18 +76,20 @@ void TPlasticPhysics::ReadConfiguration(string Path) string LineBuffer ; string DataBuffer ; - double Theta = 0 , Phi = 0 , R = 0 , Thickness = 0 , Radius = 0 , LeadThickness = 0; - string Scintillator ; - - bool check_Theta = false ; - bool check_Phi = false ; - bool check_R = false ; + bool check_Theta = false ; + bool check_Phi = false ; + bool check_R = false ; bool check_Thickness = false ; - bool check_Radius = false ; - bool check_LeadThickness = false ; + bool check_Radius = false ; + bool check_LeadThickness = false ; bool check_Scintillator = false ; - bool ReadingStatus = false ; - + bool check_Height = false ; + bool check_Width = false ; + bool check_Shape = false ; + bool check_X = false ; + bool check_Y = false ; + bool check_Z = false ; + bool ReadingStatus = false ; while (!ConfigFile.eof()) { @@ -117,54 +119,96 @@ void TPlasticPhysics::ReadConfiguration(string Path) // Finding another telescope (safety), toggle out else if (DataBuffer.compare(0, 6, "Plastic") == 0) { - cout << "WARNING: Another Telescope is find before standard sequence of Token, Error may occured in Telecope definition" << endl ; + cout << "WARNING: Another Detector is find before standard sequence of Token, Error may occured in Telecope definition" << endl ; ReadingStatus = false ; } - //Angle method + //Angle method else if (DataBuffer.compare(0, 6, "THETA=") == 0) { check_Theta = true; ConfigFile >> DataBuffer ; - Theta = atof(DataBuffer.c_str()) ; + cout << "Theta: " << atof(DataBuffer.c_str()) << "deg" << endl; } else if (DataBuffer.compare(0, 4, "PHI=") == 0) { check_Phi = true; ConfigFile >> DataBuffer ; - Phi = atof(DataBuffer.c_str()) ; + cout << "Phi: " << atof( DataBuffer.c_str() ) << "deg" << endl; } else if (DataBuffer.compare(0, 2, "R=") == 0) { check_R = true; ConfigFile >> DataBuffer ; - R = atof(DataBuffer.c_str()) ; + cout << "R: " << atof( DataBuffer.c_str() ) << "mm" << endl; + } + + //Position method + else if (DataBuffer.compare(0, 2, "X=") == 0) { + check_X = true; + ConfigFile >> DataBuffer ; + cout << "X: " << atof( DataBuffer.c_str() ) << "mm" << endl; + } + + else if (DataBuffer.compare(0, 2, "Y=") == 0) { + check_Y = true; + ConfigFile >> DataBuffer ; + cout << "Y: " << atof( DataBuffer.c_str() ) << "mm"<< endl; + } + + else if (DataBuffer.compare(0, 2, "Z=") == 0) { + check_Z = true; + ConfigFile >> DataBuffer ; + cout << "Z: " << atof( DataBuffer.c_str() ) << "mm" << endl; } + + //General + else if (DataBuffer.compare(0, 6, "Shape=") == 0) { + check_Shape = true; + ConfigFile >> DataBuffer ; + cout << "Shape: " << DataBuffer << endl; + } + + // Cylindrical shape else if (DataBuffer.compare(0, 7, "Radius=") == 0) { check_Radius = true; ConfigFile >> DataBuffer ; - Radius = atof(DataBuffer.c_str()) ; + cout << "Plastic Radius: " << atof( DataBuffer.c_str() ) << "mm" << endl; + } + + // Squared shape + else if (DataBuffer.compare(0, 7, "Width=") == 0) { + check_Width = true; + ConfigFile >> DataBuffer ; + cout << "Plastic Width: " <<atof( DataBuffer.c_str() ) << "mm" << endl; + } + + else if (DataBuffer.compare(0, 7, "Height=") == 0) { + check_Height = true; + ConfigFile >> DataBuffer ; + cout << "Plastic Height: " << atof( DataBuffer.c_str() ) << "mm" << endl; } + // Common else if (DataBuffer.compare(0, 10, "Thickness=") == 0) { check_Thickness = true; ConfigFile >> DataBuffer ; - Thickness = atof(DataBuffer.c_str()) ; + cout << "Plastic Thickness: " << atof( DataBuffer.c_str() ) << "mm" << endl; } else if (DataBuffer.compare(0, 13, "Scintillator=") == 0) { check_Scintillator = true ; ConfigFile >> DataBuffer ; - Scintillator = DataBuffer ; + cout << "Plastic Scintillator type: " << DataBuffer << endl; } else if (DataBuffer.compare(0, 14, "LeadThickness=") == 0) { check_LeadThickness = true; ConfigFile >> DataBuffer ; - LeadThickness = atof(DataBuffer.c_str()) ; + cout << "Lead Thickness : " << atof( DataBuffer.c_str() ) << "mm" << endl; } - - /////////////////////////////////////////////////// + + /////////////////////////////////////////////////// // If no Detector Token and no comment, toggle out else {ReadingStatus = false; cout << "Wrong Token Sequence: Getting out " << DataBuffer << endl ;} @@ -172,21 +216,26 @@ void TPlasticPhysics::ReadConfiguration(string Path) ///////////////////////////////////////////////// // If All necessary information there, toggle out - if ( check_Theta && check_Phi && check_R && check_Thickness && check_Radius && check_LeadThickness && check_Scintillator) + if ( check_Theta && check_Phi && check_R && check_Thickness && check_Radius && check_LeadThickness && check_Scintillator && check_Height && check_Width && check_Shape && check_X && check_Y && check_Z ) { NumberOfDetector++; - // Reinitialisation of Check Boolean - - check_Theta = false ; - check_Phi = false ; - check_R = false ; - check_Thickness = false ; - check_Radius = false ; - check_LeadThickness = false ; - check_Scintillator = false ; - ReadingStatus = false ; - cout << "///"<< endl ; + // Reinitialisation of Check Boolean + check_Theta = false ; + check_Phi = false ; + check_R = false ; + check_Thickness = false ; + check_Radius = false ; + check_LeadThickness = false ; + check_Scintillator = false ; + check_Height = false ; + check_Width = false ; + check_Shape = false ; + check_X = false ; + check_Y = false ; + check_Z = false ; + ReadingStatus = false ; + cout << "///"<< endl ; } } diff --git a/NPLib/Plastic/TPlasticPhysics.h b/NPLib/Plastic/TPlasticPhysics.h index a00c34437ad3ac4caa7aee9195a241ec42fd6fdf..9bf4f9af0a4a093ca78c4284e44a84b352f1a2ca 100644 --- a/NPLib/Plastic/TPlasticPhysics.h +++ b/NPLib/Plastic/TPlasticPhysics.h @@ -1,7 +1,7 @@ #ifndef __PlasticPhysics__ #define __PlasticPhysics__ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/README b/NPLib/README index cca2d1981101fa4a344e52fe3fb822cce147d28d..1204aad4f136906e62ef16289113ed47c55c6101 100644 --- a/NPLib/README +++ b/NPLib/README @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/SSSD/TSSSDData.cxx b/NPLib/SSSD/TSSSDData.cxx index 66d7b22393986cb749027650c8e7f102f822905d..f672bae35865888cdc0de6885006fd4ae62e91dd 100644 --- a/NPLib/SSSD/TSSSDData.cxx +++ b/NPLib/SSSD/TSSSDData.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/SSSD/TSSSDData.h b/NPLib/SSSD/TSSSDData.h index 7e90e7f0515b029ea4799ac39516cd4d5c6980c5..85de5af28b45547d82b15aa7b8d1cee23046bc65 100644 --- a/NPLib/SSSD/TSSSDData.h +++ b/NPLib/SSSD/TSSSDData.h @@ -1,7 +1,7 @@ #ifndef __SSSDDATA__ #define __SSSDDATA__ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/SSSD/TSSSDPhysics.cxx b/NPLib/SSSD/TSSSDPhysics.cxx index 63be1855e636503767ddc451f875d8821984c922..9ba970a25192fdd0ecb925002a526f0fee21e616 100644 --- a/NPLib/SSSD/TSSSDPhysics.cxx +++ b/NPLib/SSSD/TSSSDPhysics.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/SSSD/TSSSDPhysics.h b/NPLib/SSSD/TSSSDPhysics.h index 21bc790fb7067a44b6beef2e3f1da94890a10b97..fa341dc97e52f53da1a3e3d424a379b76a656cc0 100644 --- a/NPLib/SSSD/TSSSDPhysics.h +++ b/NPLib/SSSD/TSSSDPhysics.h @@ -1,7 +1,7 @@ #ifndef __SSSDPhysics__ #define __SSSDPhysics__ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/Tools/NPNucleus.cxx b/NPLib/Tools/NPNucleus.cxx index 6e59692165907d6b360039e897b1cea54318fee9..3deac59b33a5cf9a866b451374397f7532d44757 100644 --- a/NPLib/Tools/NPNucleus.cxx +++ b/NPLib/Tools/NPNucleus.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/Tools/NPNucleus.h b/NPLib/Tools/NPNucleus.h index a56d946777fbb02dfb09f251b2831b71268b45da..79142544abe6e77ad0d78e706f35e762d72541fe 100644 --- a/NPLib/Tools/NPNucleus.h +++ b/NPLib/Tools/NPNucleus.h @@ -1,7 +1,7 @@ #ifndef __NUCLEUS__ #define __NUCLEUS__ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPLib/Tools/NPReaction.cxx b/NPLib/Tools/NPReaction.cxx index 13121b3ec5736bede26ffdb8bb3803707e436e9b..140776985584bc51f8edf0efd4e200a838f9108f 100644 --- a/NPLib/Tools/NPReaction.cxx +++ b/NPLib/Tools/NPReaction.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -54,15 +54,15 @@ Reaction::Reaction() { //------------- Default Constructor ------------- - fNoy1 = new Nucleus(); - fNoy2 = new Nucleus(); - fNoy3 = new Nucleus(); - fNoy4 = new Nucleus(); - fBeamEnergy = 0; - fThetaCM = 0; - fExcitation = 0; - fQValue = 0; - initializePrecomputeVariable(); + fNuclei1 = new Nucleus() ; + fNuclei2 = new Nucleus() ; + fNuclei3 = new Nucleus() ; + fNuclei4 = new Nucleus() ; + fBeamEnergy = 0 ; + fThetaCM = 0 ; + fExcitation = 0 ; + fQValue = 0 ; + initializePrecomputeVariable() ; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -76,18 +76,18 @@ void Reaction::SetEveryThing(string name1, string name2, string name3, string na { //------------- Constructor with nuclei names and beam energy ------------ - fNoy1 = new Nucleus(name1); - fNoy2 = new Nucleus(name2); - fNoy3 = new Nucleus(name3); - fNoy4 = new Nucleus(name4); + fNuclei1 = new Nucleus(name1); + fNuclei2 = new Nucleus(name2); + fNuclei3 = new Nucleus(name3); + fNuclei4 = new Nucleus(name4); fBeamEnergy = BeamEnergy; fThetaCM = 0; fExcitation = ExcitationEnergy; - fQValue = ( fNoy1->GetMassExcess() + fNoy2->GetMassExcess() - - fNoy3->GetMassExcess() - fNoy4->GetMassExcess()) / 1000; + fQValue = ( fNuclei1->GetMassExcess() + fNuclei2->GetMassExcess() + - fNuclei3->GetMassExcess() - fNuclei4->GetMassExcess()) / 1000; - int masse = fNoy1->GetA() + fNoy2->GetA() - fNoy3->GetA() - fNoy4->GetA(); - int charge = fNoy1->GetZ() + fNoy2->GetZ() - fNoy3->GetZ() - fNoy4->GetZ(); + int masse = fNuclei1->GetA() + fNuclei2->GetA() - fNuclei3->GetA() - fNuclei4->GetA(); + int charge = fNuclei1->GetZ() + fNuclei2->GetZ() - fNuclei3->GetZ() - fNuclei4->GetZ(); if (masse || charge) cout << "Problem with charge or mass conservation" << endl; ///Read the differential cross section @@ -122,14 +122,31 @@ Reaction::~Reaction() { //------------- Default Destructor ------------ - delete fNoy1; - delete fNoy2; - delete fNoy3; - delete fNoy4; + delete fNuclei1; + delete fNuclei2; + delete fNuclei3; + delete fNuclei4; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +bool Reaction::CheckKinematic() + { + // Check if kinematics is allowed + + // case of inverse kinematics + double theta = fThetaCM; + if (m1 > m2) theta = M_PI - fThetaCM; + + // total and kinetic energies in the lab + double W3lab = W3cm * G * (1 + B*beta3cm*cos(theta)); + double W4lab = W4cm * G * (1 + B*beta4cm*cos(theta + M_PI)); + // test for total energy conversion + if (fabs(WtotLab - (W3lab+W4lab)) > 1e-6) + return false ; + + else return true ; + } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void Reaction::KineRelativistic(double &ThetaLab3, double &EnergieLab3, @@ -138,7 +155,7 @@ void Reaction::KineRelativistic(double &ThetaLab3, double &EnergieLab3, // 2-body relativistic kinematics: direct + inverse // EnergieLab3,4 : lab energy in MeV of the 2 ejectiles // ThetaLab3,4 : angles in rad - + // case of inverse kinematics double theta = fThetaCM; if (m1 > m2) theta = M_PI - fThetaCM; @@ -168,36 +185,15 @@ double Reaction::ReconstructRelativistic(double EnergyLab, double ThetaLab) cons { // EnergyLab in MeV // ThetaLab in rad - double P1 = sqrt(2*m1*fBeamEnergy+(fBeamEnergy*fBeamEnergy)) ; double P3 = sqrt(2*m3*EnergyLab+(EnergyLab*EnergyLab)) ; double P4 = sqrt(P1*P1+P3*P3-(2*P1*P3*cos(ThetaLab))) ; double E4 = fBeamEnergy+m1+m2-(EnergyLab+m3) ; double m4e = sqrt((E4*E4)-(P4*P4)) ; - double Eex= m4e-m4 ; + double Eex= m4e-fNuclei4->Mass() ; return Eex; } - -/*double Reaction::ReconstructThetaHeavy(double EnergyLab, double ThetaLab) - { - // EnergyLab in MeV - // ThetaLab in rad - - double m1 = fNoy1->Mass() ; - double m2 = fNoy2->Mass() ; - double m3 = fNoy3->Mass() ; - double m4 = fNoy4->Mass() ; - - double P1 = sqrt(2*m1*fBeamEnergy+(fBeamEnergy*fBeamEnergy)) ; - double P3 = sqrt(2*m3*EnergyLab+(EnergyLab*EnergyLab)) ; - double P4 = sqrt(P1*P1+P3*P3-(2*P1*P3*cos(ThetaLab))) ; - - - double cosThetaHeavy = (P1 - P4cos(hetaLab))/P3 ; - - }*/ - //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //Return ThetaCM @@ -234,8 +230,8 @@ void Reaction::Print() const { // Print informations concerning the reaction - cout << "Reaction : " << fNoy2->GetName() << "(" << fNoy1->GetName() - << "," << fNoy3->GetName() << ")" << fNoy4->GetName() << " @ " + cout << "Reaction : " << fNuclei2->GetName() << "(" << fNuclei1->GetName() + << "," << fNuclei3->GetName() << ")" << fNuclei4->GetName() << " @ " << fBeamEnergy << " MeV" << endl ; @@ -365,11 +361,11 @@ void Reaction::ReadConfigurationFile(string Path) void Reaction::initializePrecomputeVariable() - { - m1 = fNoy1->Mass(); - m2 = fNoy2->Mass(); - m3 = fNoy3->Mass(); - m4 = fNoy4->Mass() + fExcitation; + { + m1 = fNuclei1->Mass(); + m2 = fNuclei2->Mass(); + m3 = fNuclei3->Mass(); + m4 = fNuclei4->Mass() + fExcitation; // center-of-mass velocity WtotLab = (fBeamEnergy + m1) + m2; @@ -390,7 +386,6 @@ void Reaction::initializePrecomputeVariable() // Constants of the kinematics K3 = B / beta3cm; K4 = B / beta4cm; - } diff --git a/NPLib/Tools/NPReaction.h b/NPLib/Tools/NPReaction.h index bb8f8932e62016176f8bd959bb94d29374da07af..771aedbea5e67073f181fcc4fed4424199a0fede 100644 --- a/NPLib/Tools/NPReaction.h +++ b/NPLib/Tools/NPReaction.h @@ -54,10 +54,10 @@ namespace NPL void ReadConfigurationFile(string Path) ; private: - Nucleus *fNoy1 ; // Beam - Nucleus *fNoy2 ; // Target - Nucleus *fNoy3 ; // Light ejectile - Nucleus *fNoy4 ; // Heavy ejectile + Nucleus *fNuclei1 ; // Beam + Nucleus *fNuclei2 ; // Target + Nucleus *fNuclei3 ; // Light ejectile + Nucleus *fNuclei4 ; // Heavy ejectile double fQValue ; // Q-value in MeV double fBeamEnergy ; // Beam energy in MeV double fThetaCM ; // Center-of-mass angle in radian @@ -67,19 +67,19 @@ namespace NPL public: // Getters and Setters - void SetBeamEnergy (double efais) {fBeamEnergy = efais;initializePrecomputeVariable();} - void SetThetaCM (double angle) {fThetaCM = angle;} - void SetExcitation (double exci) {fExcitation = exci;initializePrecomputeVariable();} - double GetBeamEnergy() const {return fBeamEnergy;} - double GetThetaCM() const {return fThetaCM;} - double GetExcitation() const {return fExcitation;} - double GetQValue() const {return fQValue;} - Nucleus* GetNucleus1() const {return fNoy1;} - Nucleus* GetNucleus2() const {return fNoy2;} - Nucleus* GetNucleus3() const {return fNoy3;} - Nucleus* GetNucleus4() const {return fNoy4;} - double* GetCrossSection() const {return CrossSection;} - int GetCrossSectionSize() const {return CrossSectionSize;} + void SetBeamEnergy (double eBeam) {fBeamEnergy = eBeam;initializePrecomputeVariable();} + void SetThetaCM (double angle) {fThetaCM = angle;initializePrecomputeVariable();} + void SetExcitation (double exci) {fExcitation = exci;initializePrecomputeVariable();} + double GetBeamEnergy() const {return fBeamEnergy;} + double GetThetaCM() const {return fThetaCM;} + double GetExcitation() const {return fExcitation;} + double GetQValue() const {return fQValue;} + Nucleus* GetNucleus1() const {return fNuclei1;} + Nucleus* GetNucleus2() const {return fNuclei2;} + Nucleus* GetNucleus3() const {return fNuclei3;} + Nucleus* GetNucleus4() const {return fNuclei4;} + double* GetCrossSection() const {return CrossSection;} + int GetCrossSectionSize() const {return CrossSectionSize;} @@ -111,6 +111,10 @@ namespace NPL public: // Kinematics + // Check that the reaction is alowed + bool CheckKinematic(); + + // Compute ThetaLab and EnergyLab for product of reaction void KineRelativistic( double &ThetaLab3 , double &EnergieLab3 , diff --git a/NPLib/VDetector/DetectorManager.cxx b/NPLib/VDetector/DetectorManager.cxx index fab8655d8d2a38688bb5b4a5e5190927b271c5f5..a1cd19be3844e516e5a678780bf621630e46bb56 100644 --- a/NPLib/VDetector/DetectorManager.cxx +++ b/NPLib/VDetector/DetectorManager.cxx @@ -341,6 +341,7 @@ void DetectorManager::InitializeRootOutput() void DetectorManager::AddDetector(string DetectorName , VDetector* newDetector) { m_Detector[DetectorName] = newDetector; + newDetector->AddParameterToCalibrationManager(); } diff --git a/NPSimulation/include/AnnularS1.hh b/NPSimulation/include/AnnularS1.hh index 2f5ffb7dd9fa31ac91cd13e32770daa10e164328..71e6c97b25b052f8d40163e76d27177f99d239f4 100644 --- a/NPSimulation/include/AnnularS1.hh +++ b/NPSimulation/include/AnnularS1.hh @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/AnnularS1Scorers.hh b/NPSimulation/include/AnnularS1Scorers.hh index c38cdb2fd0ec21eb90bdc58162b3a78b8748bedf..d689a2c86dd83fca1a455275cbd47f785039c55e 100644 --- a/NPSimulation/include/AnnularS1Scorers.hh +++ b/NPSimulation/include/AnnularS1Scorers.hh @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/DetectorConstruction.hh b/NPSimulation/include/DetectorConstruction.hh index 1fa245f23a1f03a7d63282aae9a7a166e607e317..e34f8d012833f9536781f1949315e0c178b2352c 100644 --- a/NPSimulation/include/DetectorConstruction.hh +++ b/NPSimulation/include/DetectorConstruction.hh @@ -1,7 +1,7 @@ #ifndef DetectorConstruction_H #define DetectorConstruction_H 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/DummyDetector.hh b/NPSimulation/include/DummyDetector.hh index 700cec3a1a6302d36d641aa99178eb9d128f8f49..21b01f77daed6aea31d55bf7b239ff780b4ceed7 100755 --- a/NPSimulation/include/DummyDetector.hh +++ b/NPSimulation/include/DummyDetector.hh @@ -1,7 +1,7 @@ #ifndef DUMMYDetector_h #define DUMMYDetector_h 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/EventAction.hh b/NPSimulation/include/EventAction.hh index cbcf323de4775ea4f09a745dfc09ec96b4140cbb..6cc16bd694b129b740b733a9d4a792945f27b21b 100644 --- a/NPSimulation/include/EventAction.hh +++ b/NPSimulation/include/EventAction.hh @@ -1,7 +1,7 @@ #ifndef EventAction_h #define EventAction_h 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/EventGeneratorBeam.hh b/NPSimulation/include/EventGeneratorBeam.hh index ed5de49b6ff184d4ec702a3442c7bda4e0d9fe09..e18dba96b3f3f5a5573acc982280f4011999cb8f 100644 --- a/NPSimulation/include/EventGeneratorBeam.hh +++ b/NPSimulation/include/EventGeneratorBeam.hh @@ -1,7 +1,7 @@ #ifndef EventGeneratorBeam_h #define EventGeneratorBeam_h /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -57,6 +57,8 @@ private: // TTree to store initial value of beam and reaction private: // Source parameter G4ParticleDefinition* m_particle; // Kind of particle to shoot + G4int m_beamA; + G4int m_beamZ; G4double m_BeamEnergy; G4double m_BeamEnergySpread; G4double m_SigmaX; diff --git a/NPSimulation/include/EventGeneratorIsotropic.hh b/NPSimulation/include/EventGeneratorIsotropic.hh index 79afda20a127333131ac42d94e41481f14e8043a..f6653d17a3bd2dfd2a4174cd1528a9b1596b7722 100644 --- a/NPSimulation/include/EventGeneratorIsotropic.hh +++ b/NPSimulation/include/EventGeneratorIsotropic.hh @@ -1,7 +1,7 @@ #ifndef EventGeneratorIsotropic_h #define EventGeneratorIsotropic_h /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/EventGeneratorPhaseSpace.hh b/NPSimulation/include/EventGeneratorPhaseSpace.hh new file mode 100755 index 0000000000000000000000000000000000000000..600d6cae02c9b4293c595b42d054807c4fdad850 --- /dev/null +++ b/NPSimulation/include/EventGeneratorPhaseSpace.hh @@ -0,0 +1,106 @@ +#ifndef EventGeneratorPhaseSpace_H +#define EventGeneratorPhaseSpace_H +/***************************************************************************** + * Copyright (C) 2009-2010 this file is part of the NPTool Project * + * * + * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * + * For the list of contributors see $NPTOOL/Licence/Contributors * + *****************************************************************************/ + +/***************************************************************************** + * Original Author: Adrien MATTA contact address: matta@ipno.in2p3.fr * + * * + * Creation Date : Feb 2010 * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * This event Generator is used to simulated pure phase space event and * + * especially evaluate the background contribution of different phase space * + * channel during an experiment. Manage up to 18 body phase space * + *---------------------------------------------------------------------------* + * Comment: * + * * + * * + *****************************************************************************/ +// C++ header +#include <string> + +// G4 headers +#include "G4ParticleDefinition.hh" + +// NPSimulation +#include "VEventGenerator.hh" +#include "Target.hh" + +// NPLib +#include "TInitialConditions.h" + +using namespace std; + +class EventGeneratorPhaseSpace : public VEventGenerator +{ + public: // Constructors and Destructors + + // Default constructor used to allocate memory + EventGeneratorPhaseSpace(); + + // This is the constructor to be used + EventGeneratorPhaseSpace( G4ParticleDefinition* BeamParticle , + G4ParticleDefinition* TargetParticle , + vector<G4ParticleDefinition*> ReactionProducts , + double BeamEnergy , + double BeamEnergySpread , + double SigmaX , + double SigmaY , + double SigmaThetaX , + double SigmaPhiY ); + + // Default Destructor + virtual ~EventGeneratorPhaseSpace(); + + public: // Inherit from VEventGenerator class + void ReadConfiguration(string) ; + void GenerateEvent(G4Event*, G4ParticleGun*) ; + void SetTarget(Target* Target); + + private: // Particle Shoot Option + bool m_ShootLight ; + bool m_ShootHeavy ; + bool m_ShootDecayProduct ; + + private: // Value to store in the output tree : initial value of beam and reaction and phase space event weight + TInitialConditions* m_InitConditions; + // When the Phase Space Generator is called, the weight of the current configuration is return and stored in this variable + // Spectrum then need to be weighted by this paramater to be realistic + // NB: This procedure avoid long calculation time of the rejection methods previously instantiate and therefore allow simulation of manybody phase space decay + double m_EventWeight ; + + private: // Target Parameter + Target* m_Target; + + private: // Experimental Parameter + G4ParticleDefinition* m_BeamParticle ; + G4ParticleDefinition* m_TargetParticle ; + double m_BeamEnergy ; + double m_BeamEnergySpread ; + double m_SigmaX ; + double m_SigmaY ; + double m_SigmaThetaX ; + double m_SigmaPhiY ; + vector<G4ParticleDefinition*> m_ReactionProducts ; + + private: //Other + void InitializeRootOutput() ; + + void SetEverything( G4ParticleDefinition* BeamParticle , + G4ParticleDefinition* TargetParticle , + vector<G4ParticleDefinition*> ReactionProducts , + double BeamEnergy , + double BeamEnergySpread , + double SigmaX , + double SigmaY , + double SigmaThetaX , + double SigmaPhiY ); +}; + +#endif diff --git a/NPSimulation/include/EventGeneratorTransfert.hh b/NPSimulation/include/EventGeneratorTransfert.hh index 8c570880d17397018574fe2784c2d97d24adc9a5..1239a93946a42db217d393342365100505065c77 100644 --- a/NPSimulation/include/EventGeneratorTransfert.hh +++ b/NPSimulation/include/EventGeneratorTransfert.hh @@ -1,7 +1,7 @@ #ifndef EventGeneratorTransfert_H #define EventGeneratorTransfert_H /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/EventGeneratorTransfertToResonance.hh b/NPSimulation/include/EventGeneratorTransfertToResonance.hh index 2a5f1c30f8c822ffae01140825a6fbd6c346b0fe..dbc1873691d164432e23386a1e73f77c03dc4b62 100644 --- a/NPSimulation/include/EventGeneratorTransfertToResonance.hh +++ b/NPSimulation/include/EventGeneratorTransfertToResonance.hh @@ -1,7 +1,7 @@ #ifndef EventGeneratorTransfertToResonance_H #define EventGeneratorTransfertToResonance_H /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -99,13 +99,17 @@ class EventGeneratorTransfertToResonance : public VEventGenerator Reaction* m_Reaction ; private: // Resonance decay channel - double m_ResonanceWidth ; - double m_ResonanceMean ; - int m_ResonanceDecayZ ; - int m_ResonanceDecayA ; + double m_ResonanceWidth ; + double m_ResonanceMean ; + int m_ResonanceDecayZ ; + int m_ResonanceDecayA ; + + // When the Phase Space Generator is called, the weight of the current configuration is return and stored in this variable + // Spectrum then need to be weighted by this paramater to be realistic + // NB: This procedure avoid long calculation time of the rejection methods previously instantiate and therefore allow simulation of manybody phase space decay + double m_EventWeight ; //Other - void Print() const ; void InitializeRootOutput() ; void ResonanceDecay( G4double EnergyHeavy , G4double ThetaHeavy , diff --git a/NPSimulation/include/GaspardScorers.hh b/NPSimulation/include/GaspardScorers.hh index e009528060643ba63a34595355439f353ea93703..00ea23df1dc2153c239dd368a86a3293837cea99 100644 --- a/NPSimulation/include/GaspardScorers.hh +++ b/NPSimulation/include/GaspardScorers.hh @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/GaspardTracker.hh b/NPSimulation/include/GaspardTracker.hh index 0f094da67b2d45360570f61e480a214a809dfb20..4ca87d728a57b715068469d799170ceb8ebe89d8 100644 --- a/NPSimulation/include/GaspardTracker.hh +++ b/NPSimulation/include/GaspardTracker.hh @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/GaspardTrackerAnnular.hh b/NPSimulation/include/GaspardTrackerAnnular.hh index 0437e4bad965c6ca04d1738e511046f5594fa643..a07513fd035fc4cb2c4dd51452778bb6f0e4289d 100644 --- a/NPSimulation/include/GaspardTrackerAnnular.hh +++ b/NPSimulation/include/GaspardTrackerAnnular.hh @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/GaspardTrackerDummyShape.hh b/NPSimulation/include/GaspardTrackerDummyShape.hh index 79e282b2e75fa9c6a430b08a2045ea043dacf4a8..cb7c3501587c4b5ba885871a0e5421ad869c0cac 100644 --- a/NPSimulation/include/GaspardTrackerDummyShape.hh +++ b/NPSimulation/include/GaspardTrackerDummyShape.hh @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -143,15 +143,15 @@ namespace GPDDUMMYSHAPE // Resolution // const G4double ResoFirstStage = 0; // = 50 keV of Resolution // Unit is MeV/2.35 const G4double ResoFirstStage = 0.0213; // = 50 keV of Resolution // Unit is MeV/2.35 - const G4double ResoSecondStage = 0.0213; // = 50 keV of resolution // Unit is MeV/2.35 - const G4double ResoThirdStage = 0.0213; // = 50 keV of resolution // Unit is MeV/2.35 + const G4double ResoSecondStage = 0.0426; // = 100 keV of resolution // Unit is MeV/2.35 + const G4double ResoThirdStage = 0.0426; // = 100 keV of resolution // Unit is MeV/2.35 const G4double ResoTimeGpd = 0.212765957;// = 500ps // Unit is ns/2.35 // Geometry for the mother volume containing the different layers of your dummy shape module const G4double FaceFront = 5.1*cm; const G4double FaceBack = 5.1*cm; const G4double Length = 1.5*cm; - const G4double InterStageDistance = 5*mm; + const G4double InterStageDistance = 7*mm; // for testing the excitation energy reconstruction // const G4double Length = 4*cm; // const G4double InterStageDistance = 15*mm; @@ -162,15 +162,19 @@ namespace GPDDUMMYSHAPE // const G4double FirstStageThickness = 2*mm; // for testing the excitation energy reconstruction // const G4double FirstStageThickness = 1.3*cm; - const G4int NumberOfStrips = 25; // 2mm strip pitch +// const G4int NumberOfStrips = 10; // 5 mm strip pitch +// const G4int NumberOfStrips = 25; // 2 mm strip pitch +// const G4int NumberOfStrips = 50; // 1 mm strip pitch + const G4int NumberOfStrips = 100; // 0.5 mm strip pitch +// const G4int NumberOfStrips = 500; // 0.1 mm strip pitch // Second stage const G4double SecondStageFace = FirstStageFace; - const G4double SecondStageThickness = 1*mm; + const G4double SecondStageThickness = 1.5*mm; // Third stage const G4double ThirdStageFace = FirstStageFace; - const G4double ThirdStageThickness = 1*mm; + const G4double ThirdStageThickness = 1.5*mm; // Starting at the front of the first stage and going to the third stage const G4double FirstStage_PosZ = Length* -0.5 + 0.5*FirstStageThickness; diff --git a/NPSimulation/include/GaspardTrackerModule.hh b/NPSimulation/include/GaspardTrackerModule.hh index 0281068851aaeece058d182987dbb7edebf66a97..489643a65c76c8eba02955a0c85c1e46d5245fbb 100644 --- a/NPSimulation/include/GaspardTrackerModule.hh +++ b/NPSimulation/include/GaspardTrackerModule.hh @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/GaspardTrackerSquare.hh b/NPSimulation/include/GaspardTrackerSquare.hh index 672ba89cf76b64fa4af9ca51cb2bfbe19eaec560..2e2f64978574fc2cd85647aeaf9fcc8d064bf586 100644 --- a/NPSimulation/include/GaspardTrackerSquare.hh +++ b/NPSimulation/include/GaspardTrackerSquare.hh @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/GaspardTrackerTrapezoid.hh b/NPSimulation/include/GaspardTrackerTrapezoid.hh index c7224df3b91d120b7e23ea7bfbcb0c737b080bff..ac0c728ca17de05491e96f08e4921253f7afe114 100644 --- a/NPSimulation/include/GaspardTrackerTrapezoid.hh +++ b/NPSimulation/include/GaspardTrackerTrapezoid.hh @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -155,18 +155,29 @@ namespace GPDTRAP const G4double ResoTimePPAC = 0.106382979 ;// = 250ps // Unit is ns/2.35 // Geometry - const G4double Height = 90*mm; + // gaspard Trapezoid +/* const G4double Height = 90*mm; const G4double BaseLarge = 85*mm; const G4double BaseSmall = 35*mm; - const G4double Length = 20*mm; + const G4double Length = 20*mm;*/ + // gaspHyde + const G4double Height = 115*mm; + const G4double BaseLarge = 98*mm; + const G4double BaseSmall = 30*mm; + const G4double Length = 20*mm; // First stage // const G4double AluStripThickness = 0.00000001*micrometer; const G4double AluStripThickness = 0.4*micrometer; const G4double FirstStageThickness = 300*micrometer; - const G4double FirstStageHeight = 81*mm; + // gaspard Trapezoid +/* const G4double FirstStageHeight = 81*mm; const G4double FirstStageBaseLarge = 78*mm; - const G4double FirstStageBaseSmall = 29*mm; + const G4double FirstStageBaseSmall = 29*mm;*/ + // gaspHyde + const G4double FirstStageHeight = 113.5*mm; + const G4double FirstStageBaseLarge = 97.5*mm; + const G4double FirstStageBaseSmall = 28.5*mm; // const G4double VacBoxThickness = 3*cm ; const G4double VacBoxThickness = 0.5*cm; const G4int NumberOfStripsX = 128; diff --git a/NPSimulation/include/GeneralScorers.hh b/NPSimulation/include/GeneralScorers.hh index 70dcc65e51c9bfd69172aa7eb0e40f22a49492f0..063db646c24ce97ffbf86aa089dca1d42eef9d31 100644 --- a/NPSimulation/include/GeneralScorers.hh +++ b/NPSimulation/include/GeneralScorers.hh @@ -1,7 +1,7 @@ #ifndef GeneralScorers_h #define GeneralScorers_h 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/MUST2Array.hh b/NPSimulation/include/MUST2Array.hh index 71196c2f5cb5c84244ea51df37bf401b7d8fe128..b2d794b383625789c9748755ee72c6ff045a1e9a 100644 --- a/NPSimulation/include/MUST2Array.hh +++ b/NPSimulation/include/MUST2Array.hh @@ -1,7 +1,7 @@ #ifndef MUST2Array_h #define MUST2Array_h 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/Must2Scorers.hh b/NPSimulation/include/Must2Scorers.hh index f5867f6ad489637d7873d74f84b84cfcd55c66df..2eb5431d8dfceb91e36736a76959945e9ae986d9 100644 --- a/NPSimulation/include/Must2Scorers.hh +++ b/NPSimulation/include/Must2Scorers.hh @@ -1,7 +1,7 @@ #ifndef Must2Scorers_h #define Must2Scorers_h 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/PhysicsList.hh b/NPSimulation/include/PhysicsList.hh index 79ecf3f40f302ea681fafb9e65692a0652cd9454..9c8e3b55d398b21a7cddfc6879d3fcf3f497b20f 100644 --- a/NPSimulation/include/PhysicsList.hh +++ b/NPSimulation/include/PhysicsList.hh @@ -1,7 +1,7 @@ #ifndef PhysicsList_h #define PhysicsList_h 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/Plastic.hh b/NPSimulation/include/Plastic.hh index 46f3b24fa967e0deed01cfe842a230783326a32f..02f2020db831720ef16a52c84de051b2b506bf36 100644 --- a/NPSimulation/include/Plastic.hh +++ b/NPSimulation/include/Plastic.hh @@ -1,7 +1,7 @@ #ifndef Plastic_h #define Plastic_h 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -54,14 +54,24 @@ public: //////// Specific Function of this Class /////////// //////////////////////////////////////////////////// public: - // By Angle Method - void AddPlastic( G4double R , - G4double Theta , - G4double Phi , - G4double PlasticThickness , - G4double PlasticRadius , - G4String Scintillator , - G4double LeadThickness ); + // Cylindric plastic + void AddPlastic( G4double R , + G4double Theta , + G4double Phi , + G4double PlasticThickness , + G4double PlasticRadius , + G4String Scintillator , + G4double LeadThickness ); + + // Squared Plastic + void AddPlastic( G4double R , + G4double Theta , + G4double Phi , + G4double Height , + G4double Width , + G4double Thickness , + G4String Scintillator , + G4double LeadThickness ); void VolumeMaker(G4ThreeVector Det_pos, int DetNumber,G4LogicalVolume* world) ; //////////////////////////////////////////////////// @@ -111,12 +121,16 @@ private: //////////////////////////////////////////////////// private: - // if true a Lead plate is added in front or back of the detector + + + // Lead plate is added in front or back of the detector vector<double> m_LeadThickness ; vector<double> m_PlasticThickness ; - vector<double> m_PlasticRadius ; - + vector<double> m_PlasticRadius ; // cylindrical shape + vector<double> m_PlasticHeight ; // squared shape + vector<double> m_PlasticWidth ; // squared shape + // Used for "By Angle Definition" vector<G4double> m_R ; // | vector<G4double> m_Theta ; // > Spherical coordinate plastic volume center diff --git a/NPSimulation/include/PrimaryGeneratorAction.hh b/NPSimulation/include/PrimaryGeneratorAction.hh index 97475ec1b592513574e707656d59d8f2c53fe100..9638cea6a00e59c86cd7f1cab1e9870b70c9bdf6 100644 --- a/NPSimulation/include/PrimaryGeneratorAction.hh +++ b/NPSimulation/include/PrimaryGeneratorAction.hh @@ -1,7 +1,7 @@ #ifndef PrimaryGeneratorAction_h #define PrimaryGeneratorAction_h 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/SteppingVerbose.hh b/NPSimulation/include/SteppingVerbose.hh index c9ab7c53e5614b6c3810817c8ed213cbbe43b435..fc8ec37052dc529edb38ef0a50b8e61a4a29081f 100644 --- a/NPSimulation/include/SteppingVerbose.hh +++ b/NPSimulation/include/SteppingVerbose.hh @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/Target.hh b/NPSimulation/include/Target.hh index 170f7394cb4769e9fc416af1668266d5d88841ba..285b175e29b80b444057b0976ad6d2c623c63f25 100644 --- a/NPSimulation/include/Target.hh +++ b/NPSimulation/include/Target.hh @@ -1,7 +1,7 @@ #ifndef Target2Array_h #define Target2Array_h 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/ThinSi.hh b/NPSimulation/include/ThinSi.hh index 48febf6c21ae00357bf7ab0ddbe10d0ca78a48f3..562c0d4d7577850786f28d23791c76bf3cdd7985 100644 --- a/NPSimulation/include/ThinSi.hh +++ b/NPSimulation/include/ThinSi.hh @@ -1,7 +1,7 @@ #ifndef ThinSi_h #define ThinSi_h 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/ThinSiScorers.hh b/NPSimulation/include/ThinSiScorers.hh index 9449cffa80c1396dc988e3899c951de766a70bba..a2dc8630b4fdcddcd38f27773435446aa9dd6974 100644 --- a/NPSimulation/include/ThinSiScorers.hh +++ b/NPSimulation/include/ThinSiScorers.hh @@ -1,7 +1,7 @@ #ifndef ThinSiScorers_h #define ThinSiScorers_h 1 /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/VDetector.hh b/NPSimulation/include/VDetector.hh index dd98b31e4954b4c0f6a82c41319822d163db637d..4b05066eb9d6405e7ebe372e210238d115446900 100644 --- a/NPSimulation/include/VDetector.hh +++ b/NPSimulation/include/VDetector.hh @@ -1,7 +1,7 @@ #ifndef VDectector_H #define VDectector_H /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/include/VEventGenerator.hh b/NPSimulation/include/VEventGenerator.hh index 59bbd3bca32a6e67823c58929591f519637b554c..b158b6ae8490ef4cefb120166a8605cd39d85004 100644 --- a/NPSimulation/include/VEventGenerator.hh +++ b/NPSimulation/include/VEventGenerator.hh @@ -1,7 +1,7 @@ #ifndef VEventGenerator_h #define VEventGenerator_h /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/AnnularS1.cc b/NPSimulation/src/AnnularS1.cc index c5fb036b41be93b6215c973a1288b2b59773d4c7..6b3426484162d020a23fb354701b3eca186b079c 100644 --- a/NPSimulation/src/AnnularS1.cc +++ b/NPSimulation/src/AnnularS1.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/AnnularS1Scorers.cc b/NPSimulation/src/AnnularS1Scorers.cc index 3e566c8c91a741be8b51fc267d66aafadcc51edd..c8a03e3b7b856c6df8726deafc6be4bbfe1c87b2 100644 --- a/NPSimulation/src/AnnularS1Scorers.cc +++ b/NPSimulation/src/AnnularS1Scorers.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/DetectorConstruction.cc b/NPSimulation/src/DetectorConstruction.cc index 07b02e0b83c0f83c3308d501176eb40f461e2bca..cbe0026f6e6fc155eea2638102c82c18b4ca7883 100644 --- a/NPSimulation/src/DetectorConstruction.cc +++ b/NPSimulation/src/DetectorConstruction.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/DummyDetector.cc b/NPSimulation/src/DummyDetector.cc index 0e4e17d8586e596d56a245c48bd8055fb29c3140..bf79671be489264c32293b2edd725569a39cf672 100644 --- a/NPSimulation/src/DummyDetector.cc +++ b/NPSimulation/src/DummyDetector.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/EventAction.cc b/NPSimulation/src/EventAction.cc index c370fd39479cd49197bf418c082be2bff02cb6c3..4692e969b094550dcd5ca17ee430f2f62f53e8d4 100644 --- a/NPSimulation/src/EventAction.cc +++ b/NPSimulation/src/EventAction.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/EventGeneratorBeam.cc b/NPSimulation/src/EventGeneratorBeam.cc index a8c8db2784d1220bd6c98a6e5744e76339d8e86f..5d263936109277fc965f0ec36e28c2c0aeb9ebda 100644 --- a/NPSimulation/src/EventGeneratorBeam.cc +++ b/NPSimulation/src/EventGeneratorBeam.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -42,7 +42,10 @@ using namespace CLHEP; EventGeneratorBeam::EventGeneratorBeam() { m_InitConditions = new TInitialConditions(); - m_Target = 0; + m_Target = NULL ; + m_beamA = 0 ; + m_beamZ = 0 ; + m_particle = NULL ; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -57,7 +60,6 @@ void EventGeneratorBeam::SetTarget(Target* Target) if(Target!=0) { m_Target = Target; - m_Target->WriteDEDXTable(m_particle ,0, m_BeamEnergy); } } @@ -68,8 +70,6 @@ void EventGeneratorBeam::ReadConfiguration(string Path) string LineBuffer; string DataBuffer; - ////////Reaction Setting needs/////// - G4double particleZ = 0 , particleA = 0 ; ////////////////////////////////////////////////////////////////////////////////////////// ifstream ReactionFile; ReactionFile.open(Path.c_str()); @@ -92,14 +92,11 @@ void EventGeneratorBeam::ReadConfiguration(string Path) //Pick-up next line getline(ReactionFile, LineBuffer); - - if (LineBuffer.compare(0, 4, "Beam") == 0) { G4cout << "Beam Found" << G4endl ; ReadingStatus = true ; } - while(ReadingStatus){ ReactionFile >> DataBuffer; @@ -110,16 +107,22 @@ void EventGeneratorBeam::ReadConfiguration(string Path) else if (DataBuffer.compare(0, 10, "ParticleZ=") == 0) { check_Z = true ; ReactionFile >> DataBuffer; - particleZ = atof(DataBuffer.c_str()); + m_beamZ = atof(DataBuffer.c_str()); + + if(check_A) + G4cout << "Beam Particle: Z:" << m_beamZ << " A:" << m_beamA << G4endl; + } else if (DataBuffer.compare(0, 10, "ParticleA=") == 0) { check_A = true ; ReactionFile >> DataBuffer; - particleA = atof(DataBuffer.c_str()); - G4cout << "Beam Particle: Z:" << particleZ << " A:" << particleA << G4endl; - m_particle = G4ParticleTable::GetParticleTable()->GetIon(particleZ, particleA, 0.); + m_beamA = atof(DataBuffer.c_str()); + + if(check_Z) + G4cout << "Beam Particle: Z:" << m_beamZ << " A:" << m_beamA << G4endl; + } else if (DataBuffer.compare(0, 11, "BeamEnergy=") == 0) { @@ -185,11 +188,15 @@ void EventGeneratorBeam::ReadConfiguration(string Path) //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void EventGeneratorBeam::GenerateEvent(G4Event* anEvent, G4ParticleGun* particleGun) { - //--------------write the DeDx Table ------------------- - if(m_Target!=0) - m_Target->WriteDEDXTable(m_particle ,0, m_BeamEnergy+4*m_BeamEnergySpread); - - + //--------------write the DeDx Table ------------------- + if( anEvent->GetEventID()==0) + { + m_particle = G4ParticleTable::GetParticleTable()->GetIon(m_beamZ, m_beamA , 0.); + + if(m_Target!=0 ) + m_Target->WriteDEDXTable(m_particle ,0, m_BeamEnergy+4*m_BeamEnergySpread); + } + m_InitConditions->Clear(); /////////////////////////////////////////////////////////////////////// diff --git a/NPSimulation/src/EventGeneratorIsotropic.cc b/NPSimulation/src/EventGeneratorIsotropic.cc index df410a4273e9c094eb32e8c30095c8806bec6c95..e2e9b384be677fa8b7159bca56a072cecc92f2cf 100644 --- a/NPSimulation/src/EventGeneratorIsotropic.cc +++ b/NPSimulation/src/EventGeneratorIsotropic.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/EventGeneratorPhaseSpace.cc b/NPSimulation/src/EventGeneratorPhaseSpace.cc new file mode 100644 index 0000000000000000000000000000000000000000..ed612b9adef5a5aeec3d7f4077247ca93788a707 --- /dev/null +++ b/NPSimulation/src/EventGeneratorPhaseSpace.cc @@ -0,0 +1,437 @@ +/***************************************************************************** + * Copyright (C) 2009-2010 this file is part of the NPTool Project * + * * + * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * + * For the list of contributors see $NPTOOL/Licence/Contributors * + *****************************************************************************/ + +/***************************************************************************** + * Original Author: Adrien MATTA contact address: matta@ipno.in2p3.fr * + * * + * Creation Date : Feb 2010 * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * This event Generator is used to simulated pure phase space event and * + * especially evaluate the background contribution of different phase space * + * channel during an experiment. Manage up to 18 body phase space * + *---------------------------------------------------------------------------* + * Comment: * + * * + * * + *****************************************************************************/ + +// C++ headers +#include <iostream> +#include <fstream> +#include <limits> + +// G4 header defining G4 types +#include "globals.hh" + +// G4 headers +#include "G4ParticleTable.hh" +#include "G4ParticleGun.hh" +#include "G4RotationMatrix.hh" + +// G4 headers including CLHEP headers +// for generating random numbers +#include "Randomize.hh" + +// NPTool headers +#include "EventGeneratorPhaseSpace.hh" +#include "RootOutput.h" + +//Root Headers +#include "TGenPhaseSpace.h" + +using namespace std; +using namespace CLHEP; + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +EventGeneratorPhaseSpace::EventGeneratorPhaseSpace() +{ + //------------- Default Constructor ------------- + m_InitConditions = new TInitialConditions() ; + m_Target = new Target() ; + m_SigmaX = 0 ; + m_SigmaY = 0 ; + m_SigmaThetaX = 0 ; + m_SigmaPhiY = 0 ; + m_EventWeight = 0 ; +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +EventGeneratorPhaseSpace::~EventGeneratorPhaseSpace() +{ + //------------- Default Destructor ------------ + delete m_InitConditions ; +} +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +void EventGeneratorPhaseSpace::SetTarget(Target* Target) + { + if(Target!=0) + m_Target = Target; + } +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +EventGeneratorPhaseSpace::EventGeneratorPhaseSpace( G4ParticleDefinition* BeamParticle , + G4ParticleDefinition* TargetParticle , + vector<G4ParticleDefinition*> ReactionProducts , + double BeamEnergy , + double BeamEnergySpread , + double SigmaX , + double SigmaY , + double SigmaThetaX , + double SigmaPhiY ) +{ + //------------- Constructor with nuclei names and beam energy ------------ + + SetEverything( BeamParticle , + TargetParticle , + ReactionProducts , + BeamEnergy , + BeamEnergySpread , + SigmaX , + SigmaY , + SigmaThetaX , + SigmaPhiY ); + + m_EventWeight = 0 ; + +} + + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +void EventGeneratorPhaseSpace::InitializeRootOutput() +{ + RootOutput *pAnalysis = RootOutput::getInstance(); + TTree *pTree = pAnalysis->GetTree(); + pTree->Branch("InitialConditions", "TInitialConditions", &m_InitConditions); + pTree->Branch("EventWeight",&m_EventWeight,"EventWeigt/D"); +} + + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +// Inherit from VEventGenerator + +void EventGeneratorPhaseSpace::ReadConfiguration(string Path) +{ +////////General Reading needs//////// + string LineBuffer; + string DataBuffer; + +////////Reaction Setting needs/////// + string Beam, Target, Heavy, Light, CrossSectionPath ; + G4double BeamEnergy = 0 , BeamEnergySpread = 0 , SigmaX = 0 , SigmaY = 0 , SigmaThetaX = 0 , SigmaPhiY=0; + vector<G4ParticleDefinition*> ReactionProducts; + G4ParticleDefinition* BeamParticle = NULL ; + G4ParticleDefinition* TargetParticle = NULL ; + + bool ReadingStatus = false ; + bool check_Beam = false ; + bool check_Target = false ; + bool check_ReactionProducts = false ; + bool check_BeamEnergy = false ; + bool check_BeamEnergySpread = false ; + bool check_FWHMX = false ; + bool check_FWHMY = false ; + bool check_EmmitanceTheta = false ; + bool check_EmmitancePhi = false ; + +////////////////////////////////////////////////////////////////////////////////////////// + ifstream ReactionFile; + ReactionFile.open(Path.c_str()); + + if (ReactionFile.is_open()) {} + else { + return; + } + + while (!ReactionFile.eof()) { + //Pick-up next line + getline(ReactionFile, LineBuffer); + + if (LineBuffer.compare(0, 10, "PhaseSpace") == 0) { ReadingStatus = true ;} + + +while(ReadingStatus){ + + ReactionFile >> DataBuffer; + + //Search for comment Symbol % + if (DataBuffer.compare(0, 1, "%") == 0) { ReactionFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );} + + else if (DataBuffer.compare(0, 5, "Beam=") == 0) { + check_Beam = true ; + ReactionFile >> DataBuffer; ReactionFile >> DataBuffer; + int A = atoi(DataBuffer.c_str()); + ReactionFile >> DataBuffer; ReactionFile >> DataBuffer; + int Z = atoi(DataBuffer.c_str()); + ReactionFile >> DataBuffer; ReactionFile >> DataBuffer; + int EXX = atoi(DataBuffer.c_str())*MeV; + + G4ParticleDefinition* ParticleBuffer = G4ParticleTable::GetParticleTable()->GetIon(Z, A, EXX) ; + BeamParticle = ParticleBuffer ; + + G4cout << "Beam : A=" << A << " Z=" << Z << " Excitation Energy = " << EXX/MeV << "MeV" << G4endl; + } + + else if (DataBuffer.compare(0, 7, "Target=") == 0) { + check_Target = true ; + ReactionFile >> DataBuffer; ReactionFile >> DataBuffer; + int A = atoi(DataBuffer.c_str()); + ReactionFile >> DataBuffer; ReactionFile >> DataBuffer; + int Z = atoi(DataBuffer.c_str()); + ReactionFile >> DataBuffer; ReactionFile >> DataBuffer; + int EXX = atoi(DataBuffer.c_str())*MeV; + + G4ParticleDefinition* ParticleBuffer = G4ParticleTable::GetParticleTable()->GetIon(Z, A, EXX) ; + TargetParticle = ParticleBuffer ; + + G4cout << "Target : A=" << A << " Z=" << Z << " Excitation Energy = " << EXX/MeV << "MeV" << G4endl; + } + + else if (DataBuffer.compare(0, 11, "BeamEnergy=") == 0) { + check_BeamEnergy = true ; + ReactionFile >> DataBuffer; + BeamEnergy = atof(DataBuffer.c_str()) * MeV; + G4cout << "Beam Energy " << BeamEnergy / MeV << " MeV" << G4endl; + } + + else if (DataBuffer.compare(0, 17, "BeamEnergySpread=") == 0) { + check_BeamEnergySpread = true ; + ReactionFile >> DataBuffer; + BeamEnergySpread = atof(DataBuffer.c_str()) * MeV; + G4cout << "Beam Energy Spread " << BeamEnergySpread / MeV << " MeV" << G4endl; + } + + else if (DataBuffer.compare(0, 7, "SigmaX=") == 0) { + check_FWHMX = true ; + ReactionFile >> DataBuffer; + SigmaX = atof(DataBuffer.c_str()) * mm; + G4cout << "Beam FWHM X " << SigmaX << " mm" << G4endl; + } + + else if (DataBuffer.compare(0, 7, "SigmaY=") == 0) { + check_FWHMY = true ; + ReactionFile >> DataBuffer; + SigmaY = atof(DataBuffer.c_str()) * mm; + G4cout << "Beam FWHM Y " << SigmaX << " mm" << G4endl; + } + + else if (DataBuffer.compare(0, 19, "SigmaThetaX=") == 0) { + check_EmmitanceTheta = true ; + ReactionFile >> DataBuffer; + SigmaThetaX = atof(DataBuffer.c_str()) * deg; + G4cout << "Beam Emmitance Theta " << SigmaThetaX / deg << " deg" << G4endl; + } + + else if (DataBuffer.compare(0, 17, "SigmaPhiY=") == 0) { + check_EmmitancePhi = true ; + ReactionFile >> DataBuffer; + SigmaPhiY = atof(DataBuffer.c_str()) * deg; + G4cout << "Beam Emmitance Phi " << SigmaPhiY / deg << " deg" << G4endl; + } + + else if (DataBuffer.compare(0, 13, "DecayProduct=") == 0) { + ReactionFile >> DataBuffer; ReactionFile >> DataBuffer; + int A = atoi(DataBuffer.c_str()); + ReactionFile >> DataBuffer; ReactionFile >> DataBuffer; + int Z = atoi(DataBuffer.c_str()); + ReactionFile >> DataBuffer; ReactionFile >> DataBuffer; + int EXX = atoi(DataBuffer.c_str())*MeV; + + G4ParticleDefinition* ParticleBuffer ; + + if ( A==1 && Z==0 ) + ParticleBuffer = G4ParticleTable::GetParticleTable()->FindParticle("neutron"); + else if ( A==1 && Z==1) + ParticleBuffer = G4ParticleTable::GetParticleTable()->FindParticle("proton"); +// else if ( A==2 && Z==0) +// ParticleBuffer = G4ParticleTable::GetParticleTable()->FindParticle("neutron"); +// ParticleBuffer->SetPDGMass( ParticleBuffer->GetPDGMass*2); + else + ParticleBuffer = G4ParticleTable::GetParticleTable()->GetIon(Z, A, EXX) ; + + ReactionProducts.push_back(ParticleBuffer); + + G4cout << "Decay Product: A=" << A << " Z=" << Z << " Excitation Energy = " << EXX/MeV << "MeV" << G4endl; + } + + else if (DataBuffer.compare(0, 21, "EndOfDecayProductList") == 0) { + check_ReactionProducts = true ; + } + + + /////////////////////////////////////////////////// + // If no Transfert Token and no comment, toggle out + else + {ReadingStatus = false; G4cout << "WARNING : Wrong Token Sequence: Getting out " << G4endl ;} + + /////////////////////////////////////////////////// + // If all Token found toggle out + if( check_Beam && check_Target && check_BeamEnergy && check_BeamEnergySpread && check_FWHMX && check_FWHMY && check_EmmitanceTheta + && check_EmmitancePhi && check_ReactionProducts) + ReadingStatus = false ; + + } + + + } + + SetEverything( BeamParticle , + TargetParticle , + ReactionProducts , + BeamEnergy , + BeamEnergySpread , + SigmaX , + SigmaY , + SigmaThetaX , + SigmaPhiY ); + + ReactionFile.close(); +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +void EventGeneratorPhaseSpace::GenerateEvent(G4Event* anEvent , G4ParticleGun* particleGun) +{ + + // If first time, write the DeDx table + if(anEvent->GetEventID()==0 && m_Target!=0) + { + m_Target->WriteDEDXTable(m_BeamParticle ,0, m_BeamEnergy+4*m_BeamEnergySpread); + for(unsigned int k = 0 ; k < m_ReactionProducts.size() ; k++) + { + m_Target->WriteDEDXTable(m_ReactionProducts[k] ,0, m_BeamEnergy+4*m_BeamEnergySpread); + } + } + + // Clear contents of Precedent event (now stored in ROOTOutput) + m_InitConditions->Clear() ; + m_EventWeight = 0 ; + + /////////////////////////////////////////////////////////////////////// + ///// Calculate the incident beam direction as well as the vertex ///// + ///// of interaction in target and Energy Loss of the beam within ///// + ///// the target. ///// + /////////////////////////////////////////////////////////////////////// + G4ThreeVector InterCoord; + + G4double Beam_thetaX = 0, Beam_phiY = 0; + G4double Beam_theta = 0, Beam_phi = 0; + G4double FinalBeamEnergy = 0 ; + G4double InitialBeamEnergy = RandGauss::shoot(m_BeamEnergy, m_BeamEnergySpread); + + m_Target->CalculateBeamInteraction( 0, m_SigmaX, 0, m_SigmaThetaX, + 0, m_SigmaY, 0, m_SigmaPhiY, + InitialBeamEnergy, + m_BeamParticle, + InterCoord, Beam_thetaX, Beam_phiY, + Beam_theta, Beam_phi, + FinalBeamEnergy); + + m_InitConditions->SetICIncidentEnergy(FinalBeamEnergy / MeV); + + // write vertex position to ROOT file + G4double x0 = InterCoord.x(); + G4double y0 = InterCoord.y(); + G4double z0 = InterCoord.z(); + m_InitConditions->SetICPositionX(x0); + m_InitConditions->SetICPositionY(y0); + m_InitConditions->SetICPositionZ(z0); + + // write emittance angles to ROOT file + m_InitConditions->SetICIncidentEmittanceTheta(Beam_thetaX / deg); + m_InitConditions->SetICIncidentEmittancePhi(Beam_phiY / deg); + + // write angles to ROOT file + m_InitConditions->SetICIncidentAngleTheta(Beam_theta / deg); + m_InitConditions->SetICIncidentAnglePhi(Beam_phi / deg); + + ////////////////////////////////////////////////////////// + //////////////// Phase Space Calculation ///////////////// + ////////////////////////////////////////////////////////// + + // Masses array of ecay products in GeV (unit used by ROOT) + int NumberOfReactionProducts = m_ReactionProducts.size() ; + double* masses = new double[NumberOfReactionProducts]; + + for(int k = 0 ; k < NumberOfReactionProducts ; k++ ) + { + masses[k] = m_ReactionProducts[k]-> GetPDGMass()/GeV ; + } + + // Kinematics of reaction + G4double M = m_BeamParticle -> GetPDGMass() ; + G4double InitialE = FinalBeamEnergy + M ; + G4double InitialMomentumX = sqrt( InitialE*InitialE - M*M) * sin(Beam_theta) * cos(Beam_phi) ; + G4double InitialMomentumY = sqrt( InitialE*InitialE - M*M) * sin(Beam_theta) * sin(Beam_phi) ; + G4double InitialMomentumZ = sqrt( InitialE*InitialE - M*M) * cos(Beam_theta) ; + + TLorentzVector Initial = TLorentzVector(InitialMomentumX/GeV, InitialMomentumY/GeV, InitialMomentumZ/GeV,InitialE/GeV) + TLorentzVector(0,0,0,m_TargetParticle -> GetPDGMass() / GeV); + + + // Instentiate a Phase Space Generator, with flat distrution + TGenPhaseSpace TPhaseSpace ; + + if( !TPhaseSpace.SetDecay(Initial, NumberOfReactionProducts , masses) ) cout << "Warning: Phase Space Decay forbiden by kinematic, or more than 18 particles "<<endl; + + // Generate event and store the associate weight. Think to use this weigt to get correcte spectrum + m_EventWeight = TPhaseSpace.Generate() ; + + + TLorentzVector* ProductLV ; + for ( int u = 0; u < NumberOfReactionProducts ; u++) + { + ProductLV = TPhaseSpace.GetDecay(u); + + G4ThreeVector Momentum ( ProductLV->X()*GeV , + ProductLV->Y()*GeV , + ProductLV->Z()*GeV ); + Momentum.unit() ; + + G4double Energy = ProductLV->E()*GeV-masses[u]*GeV ; + + //Set the gun to shoot + particleGun->SetParticleDefinition(m_ReactionProducts[u]) ; + particleGun->SetParticleMomentumDirection(Momentum) ; + particleGun->SetParticleEnergy(Energy) ; + particleGun->SetParticlePosition(G4ThreeVector(x0, y0, z0)) ; + // Shoot the Daugter + particleGun->GeneratePrimaryVertex(anEvent) ; + + // get theta and phi in the world frame + G4double theta_world = Momentum.theta(); + G4double phi_world = Momentum.phi(); + if (phi_world < 1e-6) phi_world += 2*pi; + // write angles in ROOT file + m_InitConditions->SetICEmittedAngleThetaLabWorldFrame(theta_world / deg); + m_InitConditions->SetICEmittedAnglePhiWorldFrame(phi_world / deg); + m_InitConditions->SetICEmittedEnergy(Energy); + + } +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +void EventGeneratorPhaseSpace::SetEverything( G4ParticleDefinition* BeamParticle , + G4ParticleDefinition* TargetParticle , + vector<G4ParticleDefinition*> ReactionProducts , + double BeamEnergy , + double BeamEnergySpread , + double SigmaX , + double SigmaY , + double SigmaThetaX , + double SigmaPhiY ) +{ + //------------- Constructor with nuclei names and beam energy ------------ + m_BeamParticle = BeamParticle ; + m_TargetParticle = TargetParticle ; + m_ReactionProducts = ReactionProducts ; + m_BeamEnergy = BeamEnergy ; + m_BeamEnergySpread = BeamEnergySpread ; + m_SigmaX = SigmaX ; + m_SigmaY = SigmaY ; + m_SigmaThetaX = SigmaThetaX ; + m_SigmaPhiY = SigmaPhiY ; +} + diff --git a/NPSimulation/src/EventGeneratorTransfert.cc b/NPSimulation/src/EventGeneratorTransfert.cc index e30585f7f0bace34e7f3eeea56fda8ba6e05d8da..1e251c2a2378a3d0585d49b99a596e303e008d7a 100644 --- a/NPSimulation/src/EventGeneratorTransfert.cc +++ b/NPSimulation/src/EventGeneratorTransfert.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -69,9 +69,6 @@ void EventGeneratorTransfert::SetTarget(Target* Target) { if (Target != 0) { m_Target = Target; - G4int LightZ = m_Reaction->GetNucleus3()->GetZ(); - G4int LightA = m_Reaction->GetNucleus3()->GetA(); - m_Target->WriteDEDXTable(G4ParticleTable::GetParticleTable()->GetIon(LightZ,LightA, 0.) ,0, m_BeamEnergy); } } @@ -328,26 +325,20 @@ while(ReadingStatus){ //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void EventGeneratorTransfert::GenerateEvent(G4Event* anEvent , G4ParticleGun* particleGun) { - // If first time, write the DeDx table - if(anEvent->GetEventID()==0) - { - //-------------- Before living, wrtie the DeDx Table ------------------- - - G4int LightZx = m_Reaction->GetNucleus3()->GetZ() ; - G4int LightAx = m_Reaction->GetNucleus3()->GetA() ; - - G4int BeamZx = m_Reaction->GetNucleus1()->GetZ() ; - G4int BeamAx = m_Reaction->GetNucleus1()->GetA() ; - - if(m_Target!=0) - { - m_Target->WriteDEDXTable(G4ParticleTable::GetParticleTable()->GetIon(LightZx,LightAx, 0.) ,0, m_BeamEnergy+4*m_BeamEnergySpread); - m_Target->WriteDEDXTable(G4ParticleTable::GetParticleTable()->GetIon(BeamZx,BeamAx, 0.) ,0, m_BeamEnergy+4*m_BeamEnergySpread); - } - - } - - + // If first time, write the DeDx table + if (anEvent->GetEventID() == 0) { + //-------------- Before living, wrtie the DeDx Table ------------------- + G4int LightZx = m_Reaction->GetNucleus3()->GetZ(); + G4int LightAx = m_Reaction->GetNucleus3()->GetA(); + + G4int BeamZx = m_Reaction->GetNucleus1()->GetZ(); + G4int BeamAx = m_Reaction->GetNucleus1()->GetA(); + + if (m_Target != 0) { + m_Target->WriteDEDXTable(G4ParticleTable::GetParticleTable()->GetIon(LightZx,LightAx, 0.) ,0, m_BeamEnergy+4*m_BeamEnergySpread); + m_Target->WriteDEDXTable(G4ParticleTable::GetParticleTable()->GetIon(BeamZx,BeamAx, 0.) ,0, m_BeamEnergy+4*m_BeamEnergySpread); + } + } // Clear contents of Precedent event (now stored in ROOTOutput) m_InitConditions->Clear(); @@ -456,8 +447,8 @@ void EventGeneratorTransfert::GenerateEvent(G4Event* anEvent , G4ParticleGun* pa sin(ThetaLight) * sin(phi), cos(ThetaLight)); // Momentum in beam frame for heavy particle - G4ThreeVector momentum_kineHeavy_beam(sin(ThetaHeavy) * cos(phi), - sin(ThetaHeavy) * sin(phi), + G4ThreeVector momentum_kineHeavy_beam(sin(ThetaHeavy) * cos(phi+pi), + sin(ThetaHeavy) * sin(phi+pi), cos(ThetaHeavy)); // write angles/energy to ROOT file diff --git a/NPSimulation/src/EventGeneratorTransfertToResonance.cc b/NPSimulation/src/EventGeneratorTransfertToResonance.cc index 270f2eadae742b4d751c5211cbee822406692ce2..f7338b3a15f0c470c67fe3d69df7e4e45ae31cea 100644 --- a/NPSimulation/src/EventGeneratorTransfertToResonance.cc +++ b/NPSimulation/src/EventGeneratorTransfertToResonance.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -46,32 +46,34 @@ //Root Headers #include "TGenPhaseSpace.h" +//CLHEP +#include "CLHEP/Random/RandBreitWigner.h" + using namespace std; using namespace CLHEP; - - //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... EventGeneratorTransfertToResonance::EventGeneratorTransfertToResonance() { //------------- Default Constructor ------------- m_InitConditions = new TInitialConditions() ; - m_Reaction = new Reaction() ; - m_Target = new Target(); - m_SigmaX = 0 ; - m_SigmaY = 0 ; - m_SigmaThetaX = 0 ; - m_SigmaPhiY = 0 ; - m_ResonanceDecayZ = 0 ; - m_ResonanceDecayA = 0 ; + m_Reaction = new Reaction() ; + m_Target = new Target() ; + m_SigmaX = 0 ; + m_SigmaY = 0 ; + m_SigmaThetaX = 0 ; + m_SigmaPhiY = 0 ; + m_ResonanceDecayZ = 0 ; + m_ResonanceDecayA = 0 ; + m_EventWeight = 0 ; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... EventGeneratorTransfertToResonance::~EventGeneratorTransfertToResonance() { //------------- Default Destructor ------------ - delete m_InitConditions; - delete m_Reaction ; + delete m_InitConditions ; + delete m_Reaction ; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void EventGeneratorTransfertToResonance::SetTarget(Target* Target) @@ -119,6 +121,8 @@ EventGeneratorTransfertToResonance::EventGeneratorTransfertToResonance( string ShootHeavy , ShootDecayProduct , Path ); + + m_EventWeight = 0 ; } @@ -129,13 +133,7 @@ void EventGeneratorTransfertToResonance::InitializeRootOutput() RootOutput *pAnalysis = RootOutput::getInstance(); TTree *pTree = pAnalysis->GetTree(); pTree->Branch("InitialConditions", "TInitialConditions", &m_InitConditions); -} - - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void EventGeneratorTransfertToResonance::Print() const -{ - + pTree->Branch("EventWeight",&m_EventWeight,"EventWeigt/D"); } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -188,7 +186,7 @@ void EventGeneratorTransfertToResonance::ReadConfiguration(string Path) - if (LineBuffer.compare(0, 9, "Transfert") == 0) { ReadingStatus = true ;} + if (LineBuffer.compare(0, 20, "TransfertToResonance") == 0) { ReadingStatus = true ;} while(ReadingStatus){ @@ -345,24 +343,24 @@ while(ReadingStatus){ } - SetEverything( Beam , - Target , - Light , - Heavy , - BeamEnergy , - ExcitationEnergy , - BeamEnergySpread , - SigmaX , - SigmaY , - SigmaThetaX , - SigmaPhiY , - ResonanceWidth, - ResonanceDecayZ , - ResonanceDecayA , - ShootLight , - ShootHeavy , - ShootDecayProduct , - CrossSectionPath ); + SetEverything( Beam , + Target , + Light , + Heavy , + BeamEnergy , + ExcitationEnergy , + BeamEnergySpread , + SigmaX , + SigmaY , + SigmaThetaX , + SigmaPhiY , + ResonanceWidth , + ResonanceDecayZ , + ResonanceDecayA , + ShootLight , + ShootHeavy , + ShootDecayProduct , + CrossSectionPath ); ReactionFile.close(); } @@ -370,7 +368,9 @@ while(ReadingStatus){ //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4ParticleGun* particleGun) { - + // Initialize event weight to one. + m_EventWeight = 1 ; + // If first time, write the DeDx table if(anEvent->GetEventID()==0) { @@ -403,26 +403,23 @@ void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4Part G4ParticleDefinition* LightName = G4ParticleTable::GetParticleTable()->GetIon(LightZ, LightA, 0.); - // Recoil - G4int HeavyZ = m_Reaction->GetNucleus4()->GetZ() ; - G4int HeavyA = m_Reaction->GetNucleus4()->GetA() ; - - G4ParticleDefinition* HeavyName - = G4ParticleTable::GetParticleTable()->GetIon(HeavyZ, HeavyA, m_Reaction->GetExcitation()*MeV); - + // Shoot the Resonance energy following the mean and width value + // EXX should always be more than specific heat of the reaction + // double EXX = RandBreitWigner::shoot(m_ResonanceMean,m_ResonanceWidth) ; + double EXX = RandGauss::shoot(m_ResonanceMean,m_ResonanceWidth) ; + m_Reaction->SetExcitation( EXX ); + + while ( m_Reaction->CheckKinematic()==false ) + { +// EXX = RandBreitWigner::shoot(m_ResonanceMean,m_ResonanceWidth) ; + EXX = RandGauss::shoot(m_ResonanceMean,m_ResonanceWidth) ; + m_Reaction->SetExcitation( EXX ); + } // Beam G4int BeamZ = m_Reaction->GetNucleus1()->GetZ(); G4int BeamA = m_Reaction->GetNucleus1()->GetA(); G4ParticleDefinition* BeamName = G4ParticleTable::GetParticleTable()->GetIon(BeamZ, BeamA, 0); - // Shoot the Resonance energy following the mean and width value - double EXX = -10 ; - - while(EXX<0) - EXX = RandGauss::shoot(m_ResonanceMean,m_ResonanceWidth) ; - - m_Reaction->SetExcitation( EXX ); - /////////////////////////////////////////////////////////////////////// ///// Calculate the incident beam direction as well as the vertex ///// ///// of interaction in target and Energy Loss of the beam within ///// @@ -482,11 +479,6 @@ void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4Part ///// Angles for emitted particles following Cross Section ////// ///// Angles are in the beam frame ////// ///////////////////////////////////////////////////////////////// - // Beam incident energy - G4double NominalBeamEnergy = m_BeamEnergy; - G4double IncidentBeamEnergy = RandGauss::shoot(NominalBeamEnergy, m_BeamEnergySpread); - m_Reaction->SetBeamEnergy(IncidentBeamEnergy); - m_InitConditions->SetICIncidentEnergy(IncidentBeamEnergy / MeV); // Angles RandGeneral CrossSectionShoot(m_Reaction->GetCrossSection(), m_Reaction->GetCrossSectionSize()); G4double ThetaCM = CrossSectionShoot.shoot() * (180*deg); @@ -510,8 +502,8 @@ void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4Part sin(ThetaLight) * sin(phi), cos(ThetaLight)); // Momentum in beam frame for heavy particle - G4ThreeVector momentum_kineHeavy_beam(sin(ThetaHeavy) * cos(phi), - sin(ThetaHeavy) * sin(phi), + G4ThreeVector momentum_kineHeavy_beam(sin(ThetaHeavy) * cos(phi+pi), + sin(ThetaHeavy) * sin(phi+pi), cos(ThetaHeavy)); ////////////////////////////////////////////////// @@ -545,12 +537,6 @@ void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4Part } // Case of recoil particle - /* // Particle type - particleGun->SetParticleDefinition(HeavyName); - // Particle energy - particleGun->SetParticleEnergy(EnergyHeavy); - // Particle vertex position - particleGun->SetParticlePosition(G4ThreeVector(x0, y0, z0)); // Particle direction // Kinematical angles in the beam frame are transformed // to the "world" frame*/ @@ -560,14 +546,15 @@ void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4Part G4double phi_world = momentum_kine_world.phi(); if (phi_world < 1e-6) phi_world += 2*pi; + if(m_ShootHeavy || m_ShootDecayProduct) EventGeneratorTransfertToResonance::ResonanceDecay( EnergyHeavy , - theta_world , - phi_world , - x0 , - y0 , - z0 , - anEvent , - particleGun ); + theta_world , + phi_world , + x0 , + y0 , + z0 , + anEvent , + particleGun ); } @@ -587,8 +574,8 @@ void EventGeneratorTransfertToResonance::ResonanceDecay( G4double EnergyHeavy G4double parentA = m_Reaction->GetNucleus4()->GetA() ; G4int NumberOfNeutrons = (parentA - parentZ) - (m_ResonanceDecayA - m_ResonanceDecayZ) ; - G4int NumberOfProtons = parentZ - m_ResonanceDecayZ ; - G4int NumberOfDecayProducts = NumberOfNeutrons + NumberOfProtons ; + G4int NumberOfProtons = parentZ - m_ResonanceDecayZ ; + G4int NumberOfDecayProducts = NumberOfNeutrons + NumberOfProtons ; if (NumberOfNeutrons < 0 || NumberOfProtons < 0) { G4cout << "Error input for Resonance decay" << G4endl; @@ -598,7 +585,7 @@ void EventGeneratorTransfertToResonance::ResonanceDecay( G4double EnergyHeavy else { //Obtain Mass of daughter Nuclei G4ParticleDefinition* parent - = G4ParticleTable::GetParticleTable()->GetIon(parentZ, parentA, m_Reaction->GetExcitation()) ; + = G4ParticleTable::GetParticleTable()->GetIon(parentZ, parentA, 0 ) ; G4ParticleDefinition* daughter = G4ParticleTable::GetParticleTable()->GetIon(m_ResonanceDecayZ, m_ResonanceDecayA, 0.) ; @@ -609,11 +596,20 @@ void EventGeneratorTransfertToResonance::ResonanceDecay( G4double EnergyHeavy G4ParticleDefinition* proton = G4ParticleTable::GetParticleTable()->FindParticle("proton"); - G4double M = parent -> GetPDGMass() ; + G4double M = parent -> GetPDGMass() + m_Reaction->GetExcitation()*MeV ; G4double md = daughter -> GetPDGMass() ; G4double mn = neutron -> GetPDGMass() ; G4double mp = proton -> GetPDGMass() ; + // Check that we are above threshold: + // If the Resonnance go below the threshold, decay is forced at thereshold + if (M < md + NumberOfNeutrons*mn + NumberOfProtons*mp) + { + double NewExx = parent -> GetPDGMass() - md - NumberOfNeutrons*mn - NumberOfProtons*mp ; + M = parent -> GetPDGMass() + NewExx ; + } + + G4double InitialE = EnergyHeavy + M ; G4double InitialMomentumX = sqrt( InitialE*InitialE - M*M) * sin(ThetaHeavy) * cos(PhiHeavy) ; G4double InitialMomentumY = sqrt( InitialE*InitialE - M*M) * sin(ThetaHeavy) * sin(PhiHeavy) ; @@ -638,15 +634,9 @@ void EventGeneratorTransfertToResonance::ResonanceDecay( G4double EnergyHeavy TGenPhaseSpace TPhaseSpace ; if( !TPhaseSpace.SetDecay(Initial, NumberOfDecayProducts+1, masses) ) cout << "Warning: Phase Space Decay forbiden by kinematic, or more than 18 particles "<<endl; - double MaxWt=TPhaseSpace.GetWtMax() ; - double Weight = 0 ; - double Rand = 1 ; - - while( Rand > Weight ) - { - Weight = TPhaseSpace.Generate() ; - Rand = CLHEP::RandFlat::shoot()*MaxWt ; - } + + // Generate an event and store is weight in the Output Tree + m_EventWeight = TPhaseSpace.Generate() ; TLorentzVector* daugterLV ; diff --git a/NPSimulation/src/GaspardScorers.cc b/NPSimulation/src/GaspardScorers.cc index 266edcfdfdb814c35fe5536c4f7e4d29639634b0..3897c87ebd874a10c61c58505aa7fcc8b7750860 100644 --- a/NPSimulation/src/GaspardScorers.cc +++ b/NPSimulation/src/GaspardScorers.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/GaspardTracker.cc b/NPSimulation/src/GaspardTracker.cc index c822520055818fe99167a955f3ad8c184284ae8e..bd377f355efba4bfea1b508ac7aecfe954b2ec60 100644 --- a/NPSimulation/src/GaspardTracker.cc +++ b/NPSimulation/src/GaspardTracker.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/GaspardTrackerAnnular.cc b/NPSimulation/src/GaspardTrackerAnnular.cc index 64693c36fb2e6979df99edd208bea0064fa2219d..b6014d4d91620d02e7ae779b248432e91bdb000e 100644 --- a/NPSimulation/src/GaspardTrackerAnnular.cc +++ b/NPSimulation/src/GaspardTrackerAnnular.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -290,7 +290,7 @@ void GaspardTrackerAnnular::VolumeMaker(G4int TelescopeNumber , ///Visualisation of Silicon Strip // G4VisAttributes* SiliconVisAtt = new G4VisAttributes(G4Colour(0.5, 0.5, 0.5)) ; - G4VisAttributes* SiliconVisAtt = new G4VisAttributes(G4Colour(0.0, 0.0, 0.9)) ; + G4VisAttributes* SiliconVisAtt = new G4VisAttributes(G4Colour(0.0, 0.0, 0.9)) ; // bleu logicSilicon->SetVisAttributes(SiliconVisAtt) ; } @@ -319,7 +319,7 @@ void GaspardTrackerAnnular::VolumeMaker(G4int TelescopeNumber , PVPBuffer = new G4PVPlacement(0, positionThirdStage, logicThirdStage, Name + "_ThirdStage", logicMM, false, 0); ///Visualisation of Third Stage - G4VisAttributes* ThirdStageVisAtt = new G4VisAttributes(G4Colour(0.0, 0.9, 0.)) ; + G4VisAttributes* ThirdStageVisAtt = new G4VisAttributes(G4Colour(0.0, 0.9, 0.)) ; // green logicThirdStage->SetVisAttributes(ThirdStageVisAtt) ; // logicThirdStage->SetVisAttributes(G4VisAttributes::Invisible); diff --git a/NPSimulation/src/GaspardTrackerDummyShape.cc b/NPSimulation/src/GaspardTrackerDummyShape.cc index c04602bd08c2221828411dde5228073643de9c74..5c83ef4695ecc92bf5c2b5e2b231324df1ac9c99 100644 --- a/NPSimulation/src/GaspardTrackerDummyShape.cc +++ b/NPSimulation/src/GaspardTrackerDummyShape.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/GaspardTrackerModule.cc b/NPSimulation/src/GaspardTrackerModule.cc index 890cd77702c06e4720d4ca5b54e55f513e67a61e..4fb280990d0bfcaae6913815f275046705972902 100644 --- a/NPSimulation/src/GaspardTrackerModule.cc +++ b/NPSimulation/src/GaspardTrackerModule.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/GaspardTrackerSquare.cc b/NPSimulation/src/GaspardTrackerSquare.cc index b9eee508a5fdb67749a45c38b148e716b16b066c..5fbeb423a30c59a3550e82cee0a485547f59e547 100644 --- a/NPSimulation/src/GaspardTrackerSquare.cc +++ b/NPSimulation/src/GaspardTrackerSquare.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/GaspardTrackerTrapezoid.cc b/NPSimulation/src/GaspardTrackerTrapezoid.cc index 2a38ba8c373085604a94e8fc14af6140fdc87ad3..a0b6abe10806a849275bf7efa84832b57ab9afef 100644 --- a/NPSimulation/src/GaspardTrackerTrapezoid.cc +++ b/NPSimulation/src/GaspardTrackerTrapezoid.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/GeneralScorers.cc b/NPSimulation/src/GeneralScorers.cc index 9284d069ec7991726a3f55bee31e62b60d9fdecb..f068349871453018a8aed90a93f165290dd2022a 100644 --- a/NPSimulation/src/GeneralScorers.cc +++ b/NPSimulation/src/GeneralScorers.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/MUST2Array.cc b/NPSimulation/src/MUST2Array.cc index 8b18d4b053b8d28e568af766f7d27e05afb65bbd..b8c5f43281a739a3ab1ec0d4bc16fcc661fbe14a 100644 --- a/NPSimulation/src/MUST2Array.cc +++ b/NPSimulation/src/MUST2Array.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -163,12 +163,12 @@ void MUST2Array::VolumeMaker(G4int TelescopeNumber , G4String Name = "MUST2Telescope" + DetectorNumber ; - PVPBuffer = new G4PVPlacement(G4Transform3D(*MMrot, MMpos) , - logicMM , - Name , - world , - false , - 0); + PVPBuffer = new G4PVPlacement( G4Transform3D(*MMrot, MMpos) , + logicMM , + Name , + world , + false , + 0); @@ -879,21 +879,19 @@ void MUST2Array::ConstructDetector(G4LogicalVolume* world) // (u,v) // to silicon plan // w perpendicular to (u,v) plan and pointing CsI MMu = m_X128_Y1[i] - m_X1_Y1[i] ; - MMu = -MMu.unit() ; + MMu = MMu.unit() ; MMv = m_X1_Y128[i] - m_X1_Y1[i] ; MMv = MMv.unit() ; - - MMw = MMu.cross(MMv) ; + + MMw = MMv.cross(MMu) ; // if (MMw.z() > 0)MMw = MMv.cross(MMu) ; MMw = MMw.unit() ; - + MMCenter = (m_X1_Y1[i] + m_X1_Y128[i] + m_X128_Y1[i] + m_X128_Y128[i]) / 4 ; // Passage Matrix from Lab Referential to Telescope Referential - // MUST2 - MMrot = new G4RotationMatrix(MMu, MMv, MMw); - // translation to place Telescope + MMrot = new G4RotationMatrix(MMv, MMu, MMw); MMpos = MMw * Length * 0.5 + MMCenter ; } diff --git a/NPSimulation/src/Must2Scorers.cc b/NPSimulation/src/Must2Scorers.cc index 2b057adf11486a6508e9239bc808b555e870b688..1d9d6bc813ab1b3a4b362744fefb6c2b6f525d20 100644 --- a/NPSimulation/src/Must2Scorers.cc +++ b/NPSimulation/src/Must2Scorers.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/PhysicsList.cc b/NPSimulation/src/PhysicsList.cc index e55adb66be5b364586c2f2c9d5b7fe4a6be2d4e5..a31200545c04a8654ef0bfa35e13cfc7f7f3dcd0 100644 --- a/NPSimulation/src/PhysicsList.cc +++ b/NPSimulation/src/PhysicsList.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/Plastic.cc b/NPSimulation/src/Plastic.cc index 5e1e3fda47083a810e4cbdd617b9808a6d135c24..a8ea8618837d62f6d511dbd9b013a29da78da7c5 100644 --- a/NPSimulation/src/Plastic.cc +++ b/NPSimulation/src/Plastic.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -27,6 +27,7 @@ #include <limits> //G4 Geometry object #include "G4Tubs.hh" +#include "G4Box.hh" //G4 sensitive #include "G4SDManager.hh" @@ -91,16 +92,40 @@ void Plastic::AddPlastic( G4double R , G4double PlasticRadius , G4String Scintillator , G4double LeadThickness ) -{ + { + + m_R.push_back(R) ; + m_Theta.push_back(Theta) ; + m_Phi.push_back(Phi) ; + m_PlasticThickness.push_back(PlasticThickness) ; + m_LeadThickness.push_back(LeadThickness) ; + m_Scintillator.push_back(Scintillator) ; + m_PlasticRadius.push_back(PlasticRadius) ; // cylindrical shape + m_PlasticHeight.push_back(-1) ; // squared shape + m_PlasticWidth.push_back(-1) ; // squared shape + } + +void Plastic::AddPlastic( G4double R , + G4double Theta , + G4double Phi , + G4double Height , + G4double Width , + G4double PlasticThickness , + G4String Scintillator , + G4double LeadThickness ) + { + m_R.push_back(R) ; + m_Theta.push_back(Theta) ; + m_Phi.push_back(Phi) ; + m_PlasticThickness.push_back(PlasticThickness) ; + m_LeadThickness.push_back(LeadThickness) ; + m_Scintillator.push_back(Scintillator) ; + m_PlasticRadius.push_back(-1) ; // cylindrical shape + m_PlasticHeight.push_back(Height) ; // squared shape + m_PlasticWidth.push_back(Width) ; // squared shape + + } - m_R.push_back(R) ; - m_Theta.push_back(Theta) ; - m_Phi.push_back(Phi) ; - m_PlasticThickness.push_back(PlasticThickness) ; - m_PlasticRadius.push_back(PlasticRadius) ; - m_LeadThickness.push_back(LeadThickness) ; - m_Scintillator.push_back(Scintillator) ; -} //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -117,18 +142,24 @@ void Plastic::ReadConfiguration(string Path) string LineBuffer ; string DataBuffer ; - G4double Theta = 0 , Phi = 0 , R = 0 , Thickness = 0 , Radius = 0 , LeadThickness = 0; - G4String Scintillator ; + G4double Theta = 0 , Phi = 0 , R = 0 , Thickness = 0 , Radius = 0 , LeadThickness = 0, X = 0 , Y = 0 , Z = 0 , Width = 0 , Height = 0 ; + G4String Scintillator, Shape ; - bool check_Theta = false ; - bool check_Phi = false ; - bool check_R = false ; + bool check_Theta = false ; + bool check_Phi = false ; + bool check_R = false ; bool check_Thickness = false ; - bool check_Radius = false ; - bool check_LeadThickness = false ; + bool check_Radius = false ; + bool check_LeadThickness = false ; bool check_Scintillator = false ; - bool ReadingStatus = false ; - + bool check_Height = false ; + bool check_Width = false ; + bool check_Shape = false ; + bool check_X = false ; + bool check_Y = false ; + bool check_Z = false ; + bool ReadingStatus = false ; + while (!ConfigFile.eof()) { @@ -187,6 +218,41 @@ void Plastic::ReadConfiguration(string Path) cout << "R: " << R/mm << endl; } + //Position method + else if (DataBuffer.compare(0, 2, "X=") == 0) { + check_X = true; + ConfigFile >> DataBuffer ; + X = atof(DataBuffer.c_str()) ; + X = X * mm; + cout << "X: " << X / mm << endl; + } + + else if (DataBuffer.compare(0, 2, "Y=") == 0) { + check_Y = true; + ConfigFile >> DataBuffer ; + Y = atof(DataBuffer.c_str()) ; + Y = Y * mm; + cout << "Y: " << Y / mm << endl; + } + + else if (DataBuffer.compare(0, 2, "Z=") == 0) { + check_Z = true; + ConfigFile >> DataBuffer ; + Z = atof(DataBuffer.c_str()) ; + Z = Z * mm; + cout << "Z: " << Z / mm << endl; + } + + + //General + else if (DataBuffer.compare(0, 6, "Shape=") == 0) { + check_Shape = true; + ConfigFile >> DataBuffer ; + Shape = DataBuffer ; + cout << "Shape: " << Shape << endl; + } + + // Cylindrical shape else if (DataBuffer.compare(0, 7, "Radius=") == 0) { check_Radius = true; ConfigFile >> DataBuffer ; @@ -195,6 +261,24 @@ void Plastic::ReadConfiguration(string Path) cout << "Plastic Radius: " << Radius/mm << endl; } + // Squared shape + else if (DataBuffer.compare(0, 7, "Width=") == 0) { + check_Width = true; + ConfigFile >> DataBuffer ; + Width = atof(DataBuffer.c_str()) ; + Width = Width * mm; + cout << "Plastic Width: " << Width/mm << endl; + } + + else if (DataBuffer.compare(0, 7, "Height=") == 0) { + check_Height = true; + ConfigFile >> DataBuffer ; + Height = atof(DataBuffer.c_str()) ; + Height = Height * mm; + cout << "Plastic Height: " << Height/mm << endl; + } + + // Common else if (DataBuffer.compare(0, 10, "Thickness=") == 0) { check_Thickness = true; ConfigFile >> DataBuffer ; @@ -226,27 +310,57 @@ void Plastic::ReadConfiguration(string Path) ///////////////////////////////////////////////// // If All necessary information there, toggle out - if ( check_Theta && check_Phi && check_R && check_Thickness && check_Radius && check_LeadThickness && check_Scintillator) + if ( ( check_Theta && check_Phi && check_R && check_Thickness && check_Radius && check_LeadThickness && check_Scintillator && check_Shape) // Cylindrical case + || ( check_X && check_Y && check_Z && check_Thickness && check_Radius && check_LeadThickness && check_Scintillator ) + + || ( check_Theta && check_Phi && check_R && check_Thickness && check_Width && check_Height && check_LeadThickness && check_Scintillator && check_Shape ) // Squared case + || ( check_X && check_Y && check_Z && check_Thickness && check_Width && check_Height && check_LeadThickness && check_Scintillator ) + ) { - AddPlastic( R , - Theta , - Phi , - Thickness , - Radius , - Scintillator , - LeadThickness ); + + if (check_X && check_Y && check_Z) + { + R = sqrt (X*X+Y*Y+Z*Z) ; + Theta = acos(Z / (R) ) ; + Phi = atan2(Y,X) ; + } + + if (Shape == "Cylinder") + AddPlastic( R , + Theta , + Phi , + Thickness , + Radius , + Scintillator , + LeadThickness ); + + else if (Shape == "Square") + AddPlastic( R , + Theta , + Phi , + Height , + Width , + Thickness , + Scintillator , + LeadThickness ); // Reinitialisation of Check Boolean check_Theta = false ; - check_Phi = false ; + check_Phi = false ; check_R = false ; check_Thickness = false ; check_Radius = false ; - check_LeadThickness = false ; - check_Scintillator = false ; + check_LeadThickness = false ; + check_Scintillator = false ; + check_Height = false ; + check_Width = false ; + check_Shape = false ; + check_X = false ; + check_Y = false ; + check_Z = false ; ReadingStatus = false ; - cout << "///"<< endl ; + cout << "///"<< endl ; } } @@ -303,58 +417,103 @@ void Plastic::VolumeMaker(G4ThreeVector Det_pos, int DetNumber, G4LogicalVolume* // Definition of the volume containing the sensitive detector - if(m_PlasticThickness[i]>0 && m_PlasticRadius[i]>0) - { - G4Tubs* solidPlastic = new G4Tubs( Name , - 0 , - m_PlasticRadius[i] , - m_PlasticThickness[i]/2 , - 0*deg , - 360*deg ); - - G4LogicalVolume* logicPlastic = new G4LogicalVolume(solidPlastic, PlasticMaterial, Name+ "_Scintillator", 0, 0, 0); - logicPlastic->SetSensitiveDetector(m_PlasticScorer); + + + // Cylindrical Case + if(m_PlasticRadius[i]!=-1) + { + if(m_PlasticThickness[i]>0 && m_PlasticRadius[i]>0) + { + G4Tubs* solidPlastic = new G4Tubs( Name , + 0 , + m_PlasticRadius[i] , + m_PlasticThickness[i]/2 , + 0*deg , + 360*deg ); + + G4LogicalVolume* logicPlastic = new G4LogicalVolume(solidPlastic, PlasticMaterial, Name+ "_Scintillator", 0, 0, 0); + logicPlastic->SetSensitiveDetector(m_PlasticScorer); + + G4VisAttributes* PlastVisAtt = new G4VisAttributes(G4Colour(0.0, 0.0, 0.9)) ; + logicPlastic->SetVisAttributes(PlastVisAtt) ; + + + + PVPBuffer = new G4PVPlacement( 0 , + Det_pos , + logicPlastic , + Name + "_Scintillator" , + world , + false , + 0 ); + } - G4VisAttributes* PlastVisAtt = new G4VisAttributes(G4Colour(0.0, 0.0, 0.9)) ; - logicPlastic->SetVisAttributes(PlastVisAtt) ; - - - - PVPBuffer = new G4PVPlacement( 0 , - Det_pos , - logicPlastic , - Name + "_Scintillator" , - world , - false , - 0 ); - - + if(m_LeadThickness[i]>0&& m_PlasticRadius[i]>0) + { + G4Tubs* solidLead = new G4Tubs( Name+"_Lead" , + 0 , + m_PlasticRadius[i] , + m_LeadThickness[i]/2 , + 0*deg , + 360*deg ); + + G4LogicalVolume* logicLead = new G4LogicalVolume(solidLead, m_MaterialLead, Name+"_Lead", 0, 0, 0); + G4VisAttributes* LeadVisAtt = new G4VisAttributes(G4Colour(0.1, 0.1, 0.1)) ; + logicLead->SetVisAttributes(LeadVisAtt) ; + + PVPBuffer = new G4PVPlacement( 0 , + Det_pos+(m_PlasticThickness[i]/2+m_LeadThickness[i]/2)*Det_pos.unit() , + logicLead , + Name+"_Lead" , + world , + false , + 0 ); + + } + } + + // Squared case + if(m_PlasticHeight[i]!=-1) + { + + if(m_PlasticThickness[i]>0 && m_PlasticHeight[i]>0 && m_PlasticWidth[i]>0) + { + G4Box* solidPlastic = new G4Box(Name, 0.5*m_PlasticWidth[i], 0.5*m_PlasticHeight[i], 0.5*m_PlasticThickness[i]); + G4LogicalVolume* logicPlastic = new G4LogicalVolume(solidPlastic, PlasticMaterial, Name+ "_Scintillator", 0, 0, 0); + logicPlastic->SetSensitiveDetector(m_PlasticScorer); + + G4VisAttributes* PlastVisAtt = new G4VisAttributes(G4Colour(0.0, 0.0, 0.9)) ; + logicPlastic->SetVisAttributes(PlastVisAtt) ; + + PVPBuffer = new G4PVPlacement( 0 , + Det_pos , + logicPlastic , + Name + "_Scintillator" , + world , + false , + 0 ); + } + + if(m_LeadThickness[i]>0&& m_PlasticHeight[i]>0 && m_PlasticWidth[i]>0) + { + G4Box* solidLead = new G4Box(Name+"_Lead", 0.5*m_PlasticWidth[i], 0.5*m_PlasticHeight[i], 0.5*m_LeadThickness[i]); + + G4LogicalVolume* logicLead = new G4LogicalVolume(solidLead, m_MaterialLead, Name+"_Lead", 0, 0, 0); + G4VisAttributes* LeadVisAtt = new G4VisAttributes(G4Colour(0.1, 0.1, 0.1)) ; + logicLead->SetVisAttributes(LeadVisAtt) ; + + PVPBuffer = new G4PVPlacement( 0 , + Det_pos+(m_PlasticThickness[i]/2+m_LeadThickness[i]/2)*Det_pos.unit() , + logicLead , + Name+"_Lead" , + world , + false , + 0 ); + + } } - - if(m_LeadThickness[i]>0&& m_PlasticRadius[i]>0) - { - G4Tubs* solidLead = new G4Tubs( Name+"_Lead" , - 0 , - m_PlasticRadius[i] , - m_LeadThickness[i]/2 , - 0*deg , - 360*deg ); - - G4LogicalVolume* logicLead = new G4LogicalVolume(solidLead, m_MaterialLead, Name+"_Lead", 0, 0, 0); - G4VisAttributes* LeadVisAtt = new G4VisAttributes(G4Colour(0.1, 0.1, 0.1)) ; - logicLead->SetVisAttributes(LeadVisAtt) ; - - PVPBuffer = new G4PVPlacement( 0 , - Det_pos+(m_PlasticThickness[i]/2+m_LeadThickness[i]/2)*Det_pos.unit() , - logicLead , - Name+"_Lead" , - world , - false , - 0 ); - - } } // Add Detector branch to the EventTree. diff --git a/NPSimulation/src/PrimaryGeneratorAction.cc b/NPSimulation/src/PrimaryGeneratorAction.cc index a5d8a264e2eb54c33cb78404ac210f7ee0ab6ba4..c6a852cdb4fe334a5a68e3425e3bd3908571b835 100644 --- a/NPSimulation/src/PrimaryGeneratorAction.cc +++ b/NPSimulation/src/PrimaryGeneratorAction.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -35,6 +35,7 @@ #include "EventGeneratorTransfertToResonance.hh" #include "EventGeneratorIsotropic.hh" #include "EventGeneratorBeam.hh" +#include "EventGeneratorPhaseSpace.hh" #include <cstdlib> @@ -83,10 +84,11 @@ void PrimaryGeneratorAction::ReadEventGeneratorFile(string Path) ifstream EventGeneratorFile; EventGeneratorFile.open(Path.c_str()); - bool check_TransfertToResonance = false ; - bool check_Isotropic = false ; - bool check_Transfert = false ; - bool check_Beam = false ; + bool check_TransfertToResonance = false ; + bool check_PhaseSpace = false ; + bool check_Isotropic = false ; + bool check_Transfert = false ; + bool check_Beam = false ; if (EventGeneratorFile.is_open()) cout << " Event Generator file " << Path << " loading " << endl ; else { @@ -151,6 +153,18 @@ void PrimaryGeneratorAction::ReadEventGeneratorFile(string Path) myEventGenerator->SetTarget(m_detector->GetTarget()); m_EventGenerator = myEventGenerator ; } + + //Search for Transfert To Resonance + else if (LineBuffer.compare(0, 10, "PhaseSpace") == 0 && !check_PhaseSpace) { + check_PhaseSpace = true ; + VEventGenerator* myEventGenerator = new EventGeneratorPhaseSpace() ; + EventGeneratorFile.close() ; + myEventGenerator->ReadConfiguration(Path) ; + EventGeneratorFile.open(Path.c_str()) ; + myEventGenerator->InitializeRootOutput() ; + myEventGenerator->SetTarget(m_detector->GetTarget()) ; + m_EventGenerator = myEventGenerator ; + } } EventGeneratorFile.close(); } diff --git a/NPSimulation/src/SteppingVerbose.cc b/NPSimulation/src/SteppingVerbose.cc index 73018998e694a372f53a664bea20aa5e4680b77b..eb8acb7d353702b254f71db0961605f3360fe23b 100644 --- a/NPSimulation/src/SteppingVerbose.cc +++ b/NPSimulation/src/SteppingVerbose.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/Target.cc b/NPSimulation/src/Target.cc index 09bf750a14c7532cd4fd669bcb26abaf43467de1..6e8d1d6b4b46bb7ab898c5ddf8309e0c8ab16f80 100644 --- a/NPSimulation/src/Target.cc +++ b/NPSimulation/src/Target.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * @@ -64,7 +64,7 @@ Target::Target() m_WindowsThickness = 0 ; m_TargetTemperature = 0 ; m_TargetPressure = 0 ; - m_TargetNbLayers = 50; // Number of steps by default + m_TargetNbLayers = 50; // Number of steps by default } G4Material* Target::GetMaterialFromLibrary(G4String MaterialName, G4double Temperature, G4double Pressure) @@ -77,6 +77,7 @@ G4Material* Target::GetMaterialFromLibrary(G4String MaterialName, G4double Tempe if (Pressure == 1) { G4cout << "CryoTarget pressure set to 1 bar" << G4endl; + if (Temperature == 24) { density = 0.0020182 * g / cm3; G4cout << "CryoTarget temp set to 24K" << G4endl; @@ -91,14 +92,17 @@ G4Material* Target::GetMaterialFromLibrary(G4String MaterialName, G4double Tempe density = 0.001863 * g / cm3; G4cout << "CryoTarget temp set to 26K" << G4endl; } + + else if (Temperature == 30) { + density = 0.00020475 * g / cm3; + G4cout << "CryoTarget temp set to 30K" << G4endl; + } else { G4cout << ">>> !!!!WARNING INVALID TEMP FOR CRYOGENIC TARGET!!!! <<<" << G4endl; } } - - else if (Pressure == 0.5) { G4cout << "CryoTarget pressure set to 0.5 bar" << G4endl; @@ -117,6 +121,17 @@ G4Material* Target::GetMaterialFromLibrary(G4String MaterialName, G4double Tempe G4cout << "CryoTarget temp set to 26K" << G4endl; } + + else if (Pressure == 0.7) { + G4cout << "CryoTarget pressure set to 0.7 bar" << G4endl; + + if (Temperature == 26) { + density = 0.0013125 * g / cm3; + G4cout << "CryoTarget temp set to 26K" << G4endl; + } + } + + else { G4cout << ">>> !!!!WARNING INVALID TEMP FOR CRYOGENIC TARGET!!!! <<<" << G4endl; } @@ -130,7 +145,19 @@ G4Material* Target::GetMaterialFromLibrary(G4String MaterialName, G4double Tempe return(myMaterial); } + else if (MaterialName == "D2_solid") { + G4Element* D = new G4Element("Deuteron", "D", 1., 2.0141*g / mole); + G4Material* myMaterial = new G4Material("D2_solid", 0.0715*g/cm3, 1); + myMaterial->AddElement(D, 2); + return(myMaterial); + } + else if (MaterialName == "H2_solid") { + G4Element* H = new G4Element("Hydrogen", "H", 1., 1.01*g / mole); + G4Material* myMaterial = new G4Material("H2_solid", 0.0715*g/cm3, 1); + myMaterial->AddElement(H, 2); + return(myMaterial); + } else if (MaterialName == "Mylar") { G4cout << "Mylar Material" << G4endl ; @@ -165,7 +192,7 @@ G4Material* Target::GetMaterialFromLibrary(G4String MaterialName, G4double Tempe G4Element* C = new G4Element("Carbon" , "C" , 6. , 12.011*g / mole); G4Element* D = new G4Element("Deuteron" , "D" , 1., 2.0141*g / mole); - G4Material* myMaterial = new G4Material("CD2", 0.97*g / cm3, 2); + G4Material* myMaterial = new G4Material("CD2", 1.15*g / cm3, 2); myMaterial->AddElement(C , 1); myMaterial->AddElement(D , 2); return myMaterial; @@ -175,12 +202,20 @@ G4Material* Target::GetMaterialFromLibrary(G4String MaterialName, G4double Tempe G4Element* C = new G4Element("Carbon" , "C" , 6. , 12.011*g / mole); G4Element* H = new G4Element("Hydrogen", "H" , 1. , 1.01 *g / mole); - G4Material* myMaterial = new G4Material("CH2", 0.9*g / cm3, 2); + G4Material* myMaterial = new G4Material("CH2", 1.0*g / cm3, 2); myMaterial->AddElement(C , 1); myMaterial->AddElement(H , 2); return myMaterial; } + else if (MaterialName == "Pb208") { + G4Element* Pb = new G4Element("Lead" , "Pb" , 82. , 207.2*g / mole); + + G4Material* myMaterial = new G4Material("Pb208", 11.342*g / cm3, 1); + myMaterial->AddElement(Pb , 1); + return myMaterial; + } + else { G4cout << "No Matching Material in the Target Library Default is Vacuum" << G4endl; G4Element* N = new G4Element("Nitrogen", "N", 7., 14.01*g / mole); @@ -274,21 +309,21 @@ void Target::ReadConfiguration(string Path) else if (DataBuffer.compare(0, 2, "X=") == 0) { check_X = true ; ConfigFile >> DataBuffer; - m_TargetX = atoi(DataBuffer.c_str()) * mm; + m_TargetX = atof(DataBuffer.c_str()) * mm; cout << "Target coordinate (mm): ( " << m_TargetX / mm << " ; "; } else if (DataBuffer.compare(0, 2, "Y=") == 0) { check_Y = true ; ConfigFile >> DataBuffer; - m_TargetY = atoi(DataBuffer.c_str()) * mm; + m_TargetY = atof(DataBuffer.c_str()) * mm; cout << m_TargetY / mm << " ; "; } else if (DataBuffer.compare(0, 2, "Z=") == 0) { check_Z = true ; ConfigFile >> DataBuffer; - m_TargetZ = atoi(DataBuffer.c_str()) * mm; + m_TargetZ = atof(DataBuffer.c_str()) * mm; cout << m_TargetZ / mm << " )" << endl ; } @@ -335,13 +370,13 @@ void Target::ReadConfiguration(string Path) else if (DataBuffer.compare(0, 12, "TEMPERATURE=") == 0) { check_Temperature = true ; ConfigFile >> DataBuffer; - m_TargetTemperature = atoi(DataBuffer.c_str()); + m_TargetTemperature = atof(DataBuffer.c_str()); } else if (DataBuffer.compare(0, 9, "PRESSURE=") == 0) { check_Pressure = true ; ConfigFile >> DataBuffer; - m_TargetPressure = atoi(DataBuffer.c_str()); + m_TargetPressure = atof(DataBuffer.c_str()); } else if (DataBuffer.compare(0, 9, "MATERIAL=") == 0) { @@ -354,7 +389,7 @@ void Target::ReadConfiguration(string Path) else if (DataBuffer.compare(0, 17, "WINDOWSTHICKNESS=") == 0) { check_WinThickness = true ; ConfigFile >> DataBuffer; - m_WindowsThickness = atoi(DataBuffer.c_str()) * micrometer; + m_WindowsThickness = atof(DataBuffer.c_str()) * micrometer; cout << "Windows Thickness: " << m_WindowsThickness / micrometer << "um" << endl ; } @@ -368,21 +403,21 @@ void Target::ReadConfiguration(string Path) else if (DataBuffer.compare(0, 2, "X=") == 0) { check_X = true ; ConfigFile >> DataBuffer; - m_TargetX = atoi(DataBuffer.c_str()) * mm; + m_TargetX = atof(DataBuffer.c_str()) * mm; cout << "Target coordinate (mm): ( " << m_TargetX / mm << " ; "; } else if (DataBuffer.compare(0, 2, "Y=") == 0) { check_Y = true ; ConfigFile >> DataBuffer; - m_TargetY = atoi(DataBuffer.c_str()) * mm; + m_TargetY = atof(DataBuffer.c_str()) * mm; cout << m_TargetY / mm << " ; "; } else if (DataBuffer.compare(0, 2, "Z=") == 0) { check_Z = true ; ConfigFile >> DataBuffer; - m_TargetZ = atoi(DataBuffer.c_str()) * mm; + m_TargetZ = atof(DataBuffer.c_str()) * mm; cout << m_TargetZ / mm << " )" << endl ; } @@ -541,9 +576,8 @@ void Target::CalculateBeamInteraction( double MeanPosX, double SigmaPosX, double if (AngleIncidentPhi < 0) AngleIncidentPhi += 2*pi ; if (AngleIncidentTheta < 1e-6) AngleIncidentPhi = 0 ; - // Calculation of effective target thickness and z-position of interaction + // effective target thickness is dz and z-position of interaction // when the target is tilted wrt the beam axis - double EffectiveThickness = m_TargetThickness / (BeamDir.unit()).dot(TargetNormal.unit()); double uniform = RandFlat::shoot(); z0 = dz + (-m_TargetThickness / 2 + uniform * m_TargetThickness); diff --git a/NPSimulation/src/ThinSi.cc b/NPSimulation/src/ThinSi.cc index 3af43f06ac2bb0ff45dc5cae53c8bd7b388273dd..9c12bc02eb1ff80120b7ccab2eef2f2f7ed79219 100644 --- a/NPSimulation/src/ThinSi.cc +++ b/NPSimulation/src/ThinSi.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/ThinSiScorers.cc b/NPSimulation/src/ThinSiScorers.cc index 53faa61b07698e34d45c0fd94c3e67aab908c55c..6ea27810b730fc892bf4bf3b4825e3bebba72496 100644 --- a/NPSimulation/src/ThinSiScorers.cc +++ b/NPSimulation/src/ThinSiScorers.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/VDetector.cc b/NPSimulation/src/VDetector.cc index df74f1f014ae9d3907e9fdc8783898f5add0516b..59ce7bc05e694cb3f7e97c62ddae95adb54e1719 100644 --- a/NPSimulation/src/VDetector.cc +++ b/NPSimulation/src/VDetector.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/NPSimulation/src/VEventGenerator.cc b/NPSimulation/src/VEventGenerator.cc index bf2b8e82b1f30a6be7f2e75b8f067898ca3d2347..2da902dfea0faf122ce31ff2ba6818b53dd781e1 100644 --- a/NPSimulation/src/VEventGenerator.cc +++ b/NPSimulation/src/VEventGenerator.cc @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/README b/README index a0cad80d2ede8ac15ab6d25d35f5e14b8aef0e64..63df8bcb12fa09deea23089a4c530d42b083922e 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 this file is part of the NPTool Project * * * * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * * For the list of contributors see $NPTOOL/Licence/Contributors * diff --git a/TODO b/TODO deleted file mode 100644 index 6c8b4c2fe56cad39fa553e806cbea1a49fa9be49..0000000000000000000000000000000000000000 --- a/TODO +++ /dev/null @@ -1,40 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * - * * - * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * - * For the list of contributors see $NPTOOL/Licence/Contributors * - *****************************************************************************/ - -/***************************************************************************** - * Original Author: contact address: * - * * - * Creation Date : 11/09/09 * - * Last update : * - *---------------------------------------------------------------------------* - * Decription: * - * This file describes the features we would like to form part of a next * - * release * - *---------------------------------------------------------------------------* - * Comment: * - * * - * * - *****************************************************************************/ - -TODO for NPTool: ----------------- - + Target work (Nicolas) - + Take correctly into account the emittance when the target is tilted. - + IsInsideTarget method for debugging purposes - + Add a dedicated class to deal with materials (see example from G4 tutorial) - (still under debate) - + Split physic list and give the possibility to choose which package to use - + Add support for messengers - + Scorers: CopyNumber v.s. DetectorNumber? (to be checked) - + Build NPTool with the Autotool/Automake - -TODO for Gaspard: ------------------ - + Check bug when light and heavy particles are detected in the same event - + Improve analysis in order to deal with heterogeneous detector shapes - + Use only one class for the analysis per detector instead of two currently - (ROOT feature in private member definition ( //!))