diff --git a/Inputs/CrossSection/flat-0_20.txt b/Inputs/CrossSection/flat-0_20.txt new file mode 100644 index 0000000000000000000000000000000000000000..b1f1d9cfe6591bb2b710170cd0675cc5845b7300 --- /dev/null +++ b/Inputs/CrossSection/flat-0_20.txt @@ -0,0 +1,1801 @@ +0 1 +0.1 1 +0.2 1 +0.3 1 +0.4 1 +0.5 1 +0.6 1 +0.7 1 +0.8 1 +0.9 1 +1 1 +1.1 1 +1.2 1 +1.3 1 +1.4 1 +1.5 1 +1.6 1 +1.7 1 +1.8 1 +1.9 1 +2 1 +2.1 1 +2.2 1 +2.3 1 +2.4 1 +2.5 1 +2.6 1 +2.7 1 +2.8 1 +2.9 1 +3 1 +3.1 1 +3.2 1 +3.3 1 +3.4 1 +3.5 1 +3.6 1 +3.7 1 +3.8 1 +3.9 1 +4 1 +4.1 1 +4.2 1 +4.3 1 +4.4 1 +4.5 1 +4.6 1 +4.7 1 +4.8 1 +4.9 1 +5 1 +5.1 1 +5.2 1 +5.3 1 +5.4 1 +5.5 1 +5.6 1 +5.7 1 +5.8 1 +5.9 1 +6 1 +6.1 1 +6.2 1 +6.3 1 +6.4 1 +6.5 1 +6.6 1 +6.7 1 +6.8 1 +6.9 1 +7 1 +7.1 1 +7.2 1 +7.3 1 +7.4 1 +7.5 1 +7.6 1 +7.7 1 +7.8 1 +7.9 1 +8 1 +8.1 1 +8.2 1 +8.3 1 +8.4 1 +8.5 1 +8.6 1 +8.7 1 +8.8 1 +8.9 1 +9 1 +9.1 1 +9.2 1 +9.3 1 +9.4 1 +9.5 1 +9.6 1 +9.7 1 +9.8 1 +9.9 1 +10 1 +10.1 1 +10.2 1 +10.3 1 +10.4 1 +10.5 1 +10.6 1 +10.7 1 +10.8 1 +10.9 1 +11 1 +11.1 1 +11.2 1 +11.3 1 +11.4 1 +11.5 1 +11.6 1 +11.7 1 +11.8 1 +11.9 1 +12 1 +12.1 1 +12.2 1 +12.3 1 +12.4 1 +12.5 1 +12.6 1 +12.7 1 +12.8 1 +12.9 1 +13 1 +13.1 1 +13.2 1 +13.3 1 +13.4 1 +13.5 1 +13.6 1 +13.7 1 +13.8 1 +13.9 1 +14 1 +14.1 1 +14.2 1 +14.3 1 +14.4 1 +14.5 1 +14.6 1 +14.7 1 +14.8 1 +14.9 1 +15 1 +15.1 1 +15.2 1 +15.3 1 +15.4 1 +15.5 1 +15.6 1 +15.7 1 +15.8 1 +15.9 1 +16 1 +16.1 1 +16.2 1 +16.3 1 +16.4 1 +16.5 1 +16.6 1 +16.7 1 +16.8 1 +16.9 1 +17 1 +17.1 1 +17.2 1 +17.3 1 +17.4 1 +17.5 1 +17.6 1 +17.7 1 +17.8 1 +17.9 1 +18 1 +18.1 1 +18.2 1 +18.3 1 +18.4 1 +18.5 1 +18.6 1 +18.7 1 +18.8 1 +18.9 1 +19 1 +19.1 1 +19.2 1 +19.3 1 +19.4 1 +19.5 1 +19.6 1 +19.7 1 +19.8 1 +19.9 1 +20 1 +20.1 0 +20.2 0 +20.3 0 +20.4 0 +20.5 0 +20.6 0 +20.7 0 +20.8 0 +20.9 0 +21 0 +21.1 0 +21.2 0 +21.3 0 +21.4 0 +21.5 0 +21.6 0 +21.7 0 +21.8 0 +21.9 0 +22 0 +22.1 0 +22.2 0 +22.3 0 +22.4 0 +22.5 0 +22.6 0 +22.7 0 +22.8 0 +22.9 0 +23 0 +23.1 0 +23.2 0 +23.3 0 +23.4 0 +23.5 0 +23.6 0 +23.7 0 +23.8 0 +23.9 0 +24 0 +24.1 0 +24.2 0 +24.3 0 +24.4 0 +24.5 0 +24.6 0 +24.7 0 +24.8 0 +24.9 0 +25 0 +25.1 0 +25.2 0 +25.3 0 +25.4 0 +25.5 0 +25.6 0 +25.7 0 +25.8 0 +25.9 0 +26 0 +26.1 0 +26.2 0 +26.3 0 +26.4 0 +26.5 0 +26.6 0 +26.7 0 +26.8 0 +26.9 0 +27 0 +27.1 0 +27.2 0 +27.3 0 +27.4 0 +27.5 0 +27.6 0 +27.7 0 +27.8 0 +27.9 0 +28 0 +28.1 0 +28.2 0 +28.3 0 +28.4 0 +28.5 0 +28.6 0 +28.7 0 +28.8 0 +28.9 0 +29 0 +29.1 0 +29.2 0 +29.3 0 +29.4 0 +29.5 0 +29.6 0 +29.7 0 +29.8 0 +29.9 0 +30 0 +30.1 0 +30.2 0 +30.3 0 +30.4 0 +30.5 0 +30.6 0 +30.7 0 +30.8 0 +30.9 0 +31 0 +31.1 0 +31.2 0 +31.3 0 +31.4 0 +31.5 0 +31.6 0 +31.7 0 +31.8 0 +31.9 0 +32 0 +32.1 0 +32.2 0 +32.3 0 +32.4 0 +32.5 0 +32.6 0 +32.7 0 +32.8 0 +32.9 0 +33 0 +33.1 0 +33.2 0 +33.3 0 +33.4 0 +33.5 0 +33.6 0 +33.7 0 +33.8 0 +33.9 0 +34 0 +34.1 0 +34.2 0 +34.3 0 +34.4 0 +34.5 0 +34.6 0 +34.7 0 +34.8 0 +34.9 0 +35 0 +35.1 0 +35.2 0 +35.3 0 +35.4 0 +35.5 0 +35.6 0 +35.7 0 +35.8 0 +35.9 0 +36 0 +36.1 0 +36.2 0 +36.3 0 +36.4 0 +36.5 0 +36.6 0 +36.7 0 +36.8 0 +36.9 0 +37 0 +37.1 0 +37.2 0 +37.3 0 +37.4 0 +37.5 0 +37.6 0 +37.7 0 +37.8 0 +37.9 0 +38 0 +38.1 0 +38.2 0 +38.3 0 +38.4 0 +38.5 0 +38.6 0 +38.7 0 +38.8 0 +38.9 0 +39 0 +39.1 0 +39.2 0 +39.3 0 +39.4 0 +39.5 0 +39.6 0 +39.7 0 +39.8 0 +39.9 0 +40 0 +40.1 0 +40.2 0 +40.3 0 +40.4 0 +40.5 0 +40.6 0 +40.7 0 +40.8 0 +40.9 0 +41 0 +41.1 0 +41.2 0 +41.3 0 +41.4 0 +41.5 0 +41.6 0 +41.7 0 +41.8 0 +41.9 0 +42 0 +42.1 0 +42.2 0 +42.3 0 +42.4 0 +42.5 0 +42.6 0 +42.7 0 +42.8 0 +42.9 0 +43 0 +43.1 0 +43.2 0 +43.3 0 +43.4 0 +43.5 0 +43.6 0 +43.7 0 +43.8 0 +43.9 0 +44 0 +44.1 0 +44.2 0 +44.3 0 +44.4 0 +44.5 0 +44.6 0 +44.7 0 +44.8 0 +44.9 0 +45 0 +45.1 0 +45.2 0 +45.3 0 +45.4 0 +45.5 0 +45.6 0 +45.7 0 +45.8 0 +45.9 0 +46 0 +46.1 0 +46.2 0 +46.3 0 +46.4 0 +46.5 0 +46.6 0 +46.7 0 +46.8 0 +46.9 0 +47 0 +47.1 0 +47.2 0 +47.3 0 +47.4 0 +47.5 0 +47.6 0 +47.7 0 +47.8 0 +47.9 0 +48 0 +48.1 0 +48.2 0 +48.3 0 +48.4 0 +48.5 0 +48.6 0 +48.7 0 +48.8 0 +48.9 0 +49 0 +49.1 0 +49.2 0 +49.3 0 +49.4 0 +49.5 0 +49.6 0 +49.7 0 +49.8 0 +49.9 0 +50 0 +50.1 0 +50.2 0 +50.3 0 +50.4 0 +50.5 0 +50.6 0 +50.7 0 +50.8 0 +50.9 0 +51 0 +51.1 0 +51.2 0 +51.3 0 +51.4 0 +51.5 0 +51.6 0 +51.7 0 +51.8 0 +51.9 0 +52 0 +52.1 0 +52.2 0 +52.3 0 +52.4 0 +52.5 0 +52.6 0 +52.7 0 +52.8 0 +52.9 0 +53 0 +53.1 0 +53.2 0 +53.3 0 +53.4 0 +53.5 0 +53.6 0 +53.7 0 +53.8 0 +53.9 0 +54 0 +54.1 0 +54.2 0 +54.3 0 +54.4 0 +54.5 0 +54.6 0 +54.7 0 +54.8 0 +54.9 0 +55 0 +55.1 0 +55.2 0 +55.3 0 +55.4 0 +55.5 0 +55.6 0 +55.7 0 +55.8 0 +55.9 0 +56 0 +56.1 0 +56.2 0 +56.3 0 +56.4 0 +56.5 0 +56.6 0 +56.7 0 +56.8 0 +56.9 0 +57 0 +57.1 0 +57.2 0 +57.3 0 +57.4 0 +57.5 0 +57.6 0 +57.7 0 +57.8 0 +57.9 0 +58 0 +58.1 0 +58.2 0 +58.3 0 +58.4 0 +58.5 0 +58.6 0 +58.7 0 +58.8 0 +58.9 0 +59 0 +59.1 0 +59.2 0 +59.3 0 +59.4 0 +59.5 0 +59.6 0 +59.7 0 +59.8 0 +59.9 0 +60 0 +60.1 0 +60.2 0 +60.3 0 +60.4 0 +60.5 0 +60.6 0 +60.7 0 +60.8 0 +60.9 0 +61 0 +61.1 0 +61.2 0 +61.3 0 +61.4 0 +61.5 0 +61.6 0 +61.7 0 +61.8 0 +61.9 0 +62 0 +62.1 0 +62.2 0 +62.3 0 +62.4 0 +62.5 0 +62.6 0 +62.7 0 +62.8 0 +62.9 0 +63 0 +63.1 0 +63.2 0 +63.3 0 +63.4 0 +63.5 0 +63.6 0 +63.7 0 +63.8 0 +63.9 0 +64 0 +64.1 0 +64.2 0 +64.3 0 +64.4 0 +64.5 0 +64.6 0 +64.7 0 +64.8 0 +64.9 0 +65 0 +65.1 0 +65.2 0 +65.3 0 +65.4 0 +65.5 0 +65.6 0 +65.7 0 +65.8 0 +65.9 0 +66 0 +66.1 0 +66.2 0 +66.3 0 +66.4 0 +66.5 0 +66.6 0 +66.7 0 +66.8 0 +66.9 0 +67 0 +67.1 0 +67.2 0 +67.3 0 +67.4 0 +67.5 0 +67.6 0 +67.7 0 +67.8 0 +67.9 0 +68 0 +68.1 0 +68.2 0 +68.3 0 +68.4 0 +68.5 0 +68.6 0 +68.7 0 +68.8 0 +68.9 0 +69 0 +69.1 0 +69.2 0 +69.3 0 +69.4 0 +69.5 0 +69.6 0 +69.7 0 +69.8 0 +69.9 0 +70 0 +70.1 0 +70.2 0 +70.3 0 +70.4 0 +70.5 0 +70.6 0 +70.7 0 +70.8 0 +70.9 0 +71 0 +71.1 0 +71.2 0 +71.3 0 +71.4 0 +71.5 0 +71.6 0 +71.7 0 +71.8 0 +71.9 0 +72 0 +72.1 0 +72.2 0 +72.3 0 +72.4 0 +72.5 0 +72.6 0 +72.7 0 +72.8 0 +72.9 0 +73 0 +73.1 0 +73.2 0 +73.3 0 +73.4 0 +73.5 0 +73.6 0 +73.7 0 +73.8 0 +73.9 0 +74 0 +74.1 0 +74.2 0 +74.3 0 +74.4 0 +74.5 0 +74.6 0 +74.7 0 +74.8 0 +74.9 0 +75 0 +75.1 0 +75.2 0 +75.3 0 +75.4 0 +75.5 0 +75.6 0 +75.7 0 +75.8 0 +75.9 0 +76 0 +76.1 0 +76.2 0 +76.3 0 +76.4 0 +76.5 0 +76.6 0 +76.7 0 +76.8 0 +76.9 0 +77 0 +77.1 0 +77.2 0 +77.3 0 +77.4 0 +77.5 0 +77.6 0 +77.7 0 +77.8 0 +77.9 0 +78 0 +78.1 0 +78.2 0 +78.3 0 +78.4 0 +78.5 0 +78.6 0 +78.7 0 +78.8 0 +78.9 0 +79 0 +79.1 0 +79.2 0 +79.3 0 +79.4 0 +79.5 0 +79.6 0 +79.7 0 +79.8 0 +79.9 0 +80 0 +80.1 0 +80.2 0 +80.3 0 +80.4 0 +80.5 0 +80.6 0 +80.7 0 +80.8 0 +80.9 0 +81 0 +81.1 0 +81.2 0 +81.3 0 +81.4 0 +81.5 0 +81.6 0 +81.7 0 +81.8 0 +81.9 0 +82 0 +82.1 0 +82.2 0 +82.3 0 +82.4 0 +82.5 0 +82.6 0 +82.7 0 +82.8 0 +82.9 0 +83 0 +83.1 0 +83.2 0 +83.3 0 +83.4 0 +83.5 0 +83.6 0 +83.7 0 +83.8 0 +83.9 0 +84 0 +84.1 0 +84.2 0 +84.3 0 +84.4 0 +84.5 0 +84.6 0 +84.7 0 +84.8 0 +84.9 0 +85 0 +85.1 0 +85.2 0 +85.3 0 +85.4 0 +85.5 0 +85.6 0 +85.7 0 +85.8 0 +85.9 0 +86 0 +86.1 0 +86.2 0 +86.3 0 +86.4 0 +86.5 0 +86.6 0 +86.7 0 +86.8 0 +86.9 0 +87 0 +87.1 0 +87.2 0 +87.3 0 +87.4 0 +87.5 0 +87.6 0 +87.7 0 +87.8 0 +87.9 0 +88 0 +88.1 0 +88.2 0 +88.3 0 +88.4 0 +88.5 0 +88.6 0 +88.7 0 +88.8 0 +88.9 0 +89 0 +89.1 0 +89.2 0 +89.3 0 +89.4 0 +89.5 0 +89.6 0 +89.7 0 +89.8 0 +89.9 0 +90 0 +90.1 0 +90.2 0 +90.3 0 +90.4 0 +90.5 0 +90.6 0 +90.7 0 +90.8 0 +90.9 0 +91 0 +91.1 0 +91.2 0 +91.3 0 +91.4 0 +91.5 0 +91.6 0 +91.7 0 +91.8 0 +91.9 0 +92 0 +92.1 0 +92.2 0 +92.3 0 +92.4 0 +92.5 0 +92.6 0 +92.7 0 +92.8 0 +92.9 0 +93 0 +93.1 0 +93.2 0 +93.3 0 +93.4 0 +93.5 0 +93.6 0 +93.7 0 +93.8 0 +93.9 0 +94 0 +94.1 0 +94.2 0 +94.3 0 +94.4 0 +94.5 0 +94.6 0 +94.7 0 +94.8 0 +94.9 0 +95 0 +95.1 0 +95.2 0 +95.3 0 +95.4 0 +95.5 0 +95.6 0 +95.7 0 +95.8 0 +95.9 0 +96 0 +96.1 0 +96.2 0 +96.3 0 +96.4 0 +96.5 0 +96.6 0 +96.7 0 +96.8 0 +96.9 0 +97 0 +97.1 0 +97.2 0 +97.3 0 +97.4 0 +97.5 0 +97.6 0 +97.7 0 +97.8 0 +97.9 0 +98 0 +98.1 0 +98.2 0 +98.3 0 +98.4 0 +98.5 0 +98.6 0 +98.7 0 +98.8 0 +98.9 0 +99 0 +99.1 0 +99.2 0 +99.3 0 +99.4 0 +99.5 0 +99.6 0 +99.7 0 +99.8 0 +99.9 0 +100 0 +100.1 0 +100.2 0 +100.3 0 +100.4 0 +100.5 0 +100.6 0 +100.7 0 +100.8 0 +100.9 0 +101 0 +101.1 0 +101.2 0 +101.3 0 +101.4 0 +101.5 0 +101.6 0 +101.7 0 +101.8 0 +101.9 0 +102 0 +102.1 0 +102.2 0 +102.3 0 +102.4 0 +102.5 0 +102.6 0 +102.7 0 +102.8 0 +102.9 0 +103 0 +103.1 0 +103.2 0 +103.3 0 +103.4 0 +103.5 0 +103.6 0 +103.7 0 +103.8 0 +103.9 0 +104 0 +104.1 0 +104.2 0 +104.3 0 +104.4 0 +104.5 0 +104.6 0 +104.7 0 +104.8 0 +104.9 0 +105 0 +105.1 0 +105.2 0 +105.3 0 +105.4 0 +105.5 0 +105.6 0 +105.7 0 +105.8 0 +105.9 0 +106 0 +106.1 0 +106.2 0 +106.3 0 +106.4 0 +106.5 0 +106.6 0 +106.7 0 +106.8 0 +106.9 0 +107 0 +107.1 0 +107.2 0 +107.3 0 +107.4 0 +107.5 0 +107.6 0 +107.7 0 +107.8 0 +107.9 0 +108 0 +108.1 0 +108.2 0 +108.3 0 +108.4 0 +108.5 0 +108.6 0 +108.7 0 +108.8 0 +108.9 0 +109 0 +109.1 0 +109.2 0 +109.3 0 +109.4 0 +109.5 0 +109.6 0 +109.7 0 +109.8 0 +109.9 0 +110 0 +110.1 0 +110.2 0 +110.3 0 +110.4 0 +110.5 0 +110.6 0 +110.7 0 +110.8 0 +110.9 0 +111 0 +111.1 0 +111.2 0 +111.3 0 +111.4 0 +111.5 0 +111.6 0 +111.7 0 +111.8 0 +111.9 0 +112 0 +112.1 0 +112.2 0 +112.3 0 +112.4 0 +112.5 0 +112.6 0 +112.7 0 +112.8 0 +112.9 0 +113 0 +113.1 0 +113.2 0 +113.3 0 +113.4 0 +113.5 0 +113.6 0 +113.7 0 +113.8 0 +113.9 0 +114 0 +114.1 0 +114.2 0 +114.3 0 +114.4 0 +114.5 0 +114.6 0 +114.7 0 +114.8 0 +114.9 0 +115 0 +115.1 0 +115.2 0 +115.3 0 +115.4 0 +115.5 0 +115.6 0 +115.7 0 +115.8 0 +115.9 0 +116 0 +116.1 0 +116.2 0 +116.3 0 +116.4 0 +116.5 0 +116.6 0 +116.7 0 +116.8 0 +116.9 0 +117 0 +117.1 0 +117.2 0 +117.3 0 +117.4 0 +117.5 0 +117.6 0 +117.7 0 +117.8 0 +117.9 0 +118 0 +118.1 0 +118.2 0 +118.3 0 +118.4 0 +118.5 0 +118.6 0 +118.7 0 +118.8 0 +118.9 0 +119 0 +119.1 0 +119.2 0 +119.3 0 +119.4 0 +119.5 0 +119.6 0 +119.7 0 +119.8 0 +119.9 0 +120 0 +120.1 0 +120.2 0 +120.3 0 +120.4 0 +120.5 0 +120.6 0 +120.7 0 +120.8 0 +120.9 0 +121 0 +121.1 0 +121.2 0 +121.3 0 +121.4 0 +121.5 0 +121.6 0 +121.7 0 +121.8 0 +121.9 0 +122 0 +122.1 0 +122.2 0 +122.3 0 +122.4 0 +122.5 0 +122.6 0 +122.7 0 +122.8 0 +122.9 0 +123 0 +123.1 0 +123.2 0 +123.3 0 +123.4 0 +123.5 0 +123.6 0 +123.7 0 +123.8 0 +123.9 0 +124 0 +124.1 0 +124.2 0 +124.3 0 +124.4 0 +124.5 0 +124.6 0 +124.7 0 +124.8 0 +124.9 0 +125 0 +125.1 0 +125.2 0 +125.3 0 +125.4 0 +125.5 0 +125.6 0 +125.7 0 +125.8 0 +125.9 0 +126 0 +126.1 0 +126.2 0 +126.3 0 +126.4 0 +126.5 0 +126.6 0 +126.7 0 +126.8 0 +126.9 0 +127 0 +127.1 0 +127.2 0 +127.3 0 +127.4 0 +127.5 0 +127.6 0 +127.7 0 +127.8 0 +127.9 0 +128 0 +128.1 0 +128.2 0 +128.3 0 +128.4 0 +128.5 0 +128.6 0 +128.7 0 +128.8 0 +128.9 0 +129 0 +129.1 0 +129.2 0 +129.3 0 +129.4 0 +129.5 0 +129.6 0 +129.7 0 +129.8 0 +129.9 0 +130 0 +130.1 0 +130.2 0 +130.3 0 +130.4 0 +130.5 0 +130.6 0 +130.7 0 +130.8 0 +130.9 0 +131 0 +131.1 0 +131.2 0 +131.3 0 +131.4 0 +131.5 0 +131.6 0 +131.7 0 +131.8 0 +131.9 0 +132 0 +132.1 0 +132.2 0 +132.3 0 +132.4 0 +132.5 0 +132.6 0 +132.7 0 +132.8 0 +132.9 0 +133 0 +133.1 0 +133.2 0 +133.3 0 +133.4 0 +133.5 0 +133.6 0 +133.7 0 +133.8 0 +133.9 0 +134 0 +134.1 0 +134.2 0 +134.3 0 +134.4 0 +134.5 0 +134.6 0 +134.7 0 +134.8 0 +134.9 0 +135 0 +135.1 0 +135.2 0 +135.3 0 +135.4 0 +135.5 0 +135.6 0 +135.7 0 +135.8 0 +135.9 0 +136 0 +136.1 0 +136.2 0 +136.3 0 +136.4 0 +136.5 0 +136.6 0 +136.7 0 +136.8 0 +136.9 0 +137 0 +137.1 0 +137.2 0 +137.3 0 +137.4 0 +137.5 0 +137.6 0 +137.7 0 +137.8 0 +137.9 0 +138 0 +138.1 0 +138.2 0 +138.3 0 +138.4 0 +138.5 0 +138.6 0 +138.7 0 +138.8 0 +138.9 0 +139 0 +139.1 0 +139.2 0 +139.3 0 +139.4 0 +139.5 0 +139.6 0 +139.7 0 +139.8 0 +139.9 0 +140 0 +140.1 0 +140.2 0 +140.3 0 +140.4 0 +140.5 0 +140.6 0 +140.7 0 +140.8 0 +140.9 0 +141 0 +141.1 0 +141.2 0 +141.3 0 +141.4 0 +141.5 0 +141.6 0 +141.7 0 +141.8 0 +141.9 0 +142 0 +142.1 0 +142.2 0 +142.3 0 +142.4 0 +142.5 0 +142.6 0 +142.7 0 +142.8 0 +142.9 0 +143 0 +143.1 0 +143.2 0 +143.3 0 +143.4 0 +143.5 0 +143.6 0 +143.7 0 +143.8 0 +143.9 0 +144 0 +144.1 0 +144.2 0 +144.3 0 +144.4 0 +144.5 0 +144.6 0 +144.7 0 +144.8 0 +144.9 0 +145 0 +145.1 0 +145.2 0 +145.3 0 +145.4 0 +145.5 0 +145.6 0 +145.7 0 +145.8 0 +145.9 0 +146 0 +146.1 0 +146.2 0 +146.3 0 +146.4 0 +146.5 0 +146.6 0 +146.7 0 +146.8 0 +146.9 0 +147 0 +147.1 0 +147.2 0 +147.3 0 +147.4 0 +147.5 0 +147.6 0 +147.7 0 +147.8 0 +147.9 0 +148 0 +148.1 0 +148.2 0 +148.3 0 +148.4 0 +148.5 0 +148.6 0 +148.7 0 +148.8 0 +148.9 0 +149 0 +149.1 0 +149.2 0 +149.3 0 +149.4 0 +149.5 0 +149.6 0 +149.7 0 +149.8 0 +149.9 0 +150 0 +150.1 0 +150.2 0 +150.3 0 +150.4 0 +150.5 0 +150.6 0 +150.7 0 +150.8 0 +150.9 0 +151 0 +151.1 0 +151.2 0 +151.3 0 +151.4 0 +151.5 0 +151.6 0 +151.7 0 +151.8 0 +151.9 0 +152 0 +152.1 0 +152.2 0 +152.3 0 +152.4 0 +152.5 0 +152.6 0 +152.7 0 +152.8 0 +152.9 0 +153 0 +153.1 0 +153.2 0 +153.3 0 +153.4 0 +153.5 0 +153.6 0 +153.7 0 +153.8 0 +153.9 0 +154 0 +154.1 0 +154.2 0 +154.3 0 +154.4 0 +154.5 0 +154.6 0 +154.7 0 +154.8 0 +154.9 0 +155 0 +155.1 0 +155.2 0 +155.3 0 +155.4 0 +155.5 0 +155.6 0 +155.7 0 +155.8 0 +155.9 0 +156 0 +156.1 0 +156.2 0 +156.3 0 +156.4 0 +156.5 0 +156.6 0 +156.7 0 +156.8 0 +156.9 0 +157 0 +157.1 0 +157.2 0 +157.3 0 +157.4 0 +157.5 0 +157.6 0 +157.7 0 +157.8 0 +157.9 0 +158 0 +158.1 0 +158.2 0 +158.3 0 +158.4 0 +158.5 0 +158.6 0 +158.7 0 +158.8 0 +158.9 0 +159 0 +159.1 0 +159.2 0 +159.3 0 +159.4 0 +159.5 0 +159.6 0 +159.7 0 +159.8 0 +159.9 0 +160 0 +160.1 0 +160.2 0 +160.3 0 +160.4 0 +160.5 0 +160.6 0 +160.7 0 +160.8 0 +160.9 0 +161 0 +161.1 0 +161.2 0 +161.3 0 +161.4 0 +161.5 0 +161.6 0 +161.7 0 +161.8 0 +161.9 0 +162 0 +162.1 0 +162.2 0 +162.3 0 +162.4 0 +162.5 0 +162.6 0 +162.7 0 +162.8 0 +162.9 0 +163 0 +163.1 0 +163.2 0 +163.3 0 +163.4 0 +163.5 0 +163.6 0 +163.7 0 +163.8 0 +163.9 0 +164 0 +164.1 0 +164.2 0 +164.3 0 +164.4 0 +164.5 0 +164.6 0 +164.7 0 +164.8 0 +164.9 0 +165 0 +165.1 0 +165.2 0 +165.3 0 +165.4 0 +165.5 0 +165.6 0 +165.7 0 +165.8 0 +165.9 0 +166 0 +166.1 0 +166.2 0 +166.3 0 +166.4 0 +166.5 0 +166.6 0 +166.7 0 +166.8 0 +166.9 0 +167 0 +167.1 0 +167.2 0 +167.3 0 +167.4 0 +167.5 0 +167.6 0 +167.7 0 +167.8 0 +167.9 0 +168 0 +168.1 0 +168.2 0 +168.3 0 +168.4 0 +168.5 0 +168.6 0 +168.7 0 +168.8 0 +168.9 0 +169 0 +169.1 0 +169.2 0 +169.3 0 +169.4 0 +169.5 0 +169.6 0 +169.7 0 +169.8 0 +169.9 0 +170 0 +170.1 0 +170.2 0 +170.3 0 +170.4 0 +170.5 0 +170.6 0 +170.7 0 +170.8 0 +170.9 0 +171 0 +171.1 0 +171.2 0 +171.3 0 +171.4 0 +171.5 0 +171.6 0 +171.7 0 +171.8 0 +171.9 0 +172 0 +172.1 0 +172.2 0 +172.3 0 +172.4 0 +172.5 0 +172.6 0 +172.7 0 +172.8 0 +172.9 0 +173 0 +173.1 0 +173.2 0 +173.3 0 +173.4 0 +173.5 0 +173.6 0 +173.7 0 +173.8 0 +173.9 0 +174 0 +174.1 0 +174.2 0 +174.3 0 +174.4 0 +174.5 0 +174.6 0 +174.7 0 +174.8 0 +174.9 0 +175 0 +175.1 0 +175.2 0 +175.3 0 +175.4 0 +175.5 0 +175.6 0 +175.7 0 +175.8 0 +175.9 0 +176 0 +176.1 0 +176.2 0 +176.3 0 +176.4 0 +176.5 0 +176.6 0 +176.7 0 +176.8 0 +176.9 0 +177 0 +177.1 0 +177.2 0 +177.3 0 +177.4 0 +177.5 0 +177.6 0 +177.7 0 +177.8 0 +177.9 0 +178 0 +178.1 0 +178.2 0 +178.3 0 +178.4 0 +178.5 0 +178.6 0 +178.7 0 +178.8 0 +178.9 0 +179 0 +179.1 0 +179.2 0 +179.3 0 +179.4 0 +179.5 0 +179.6 0 +179.7 0 +179.8 0 +179.9 0 +180 0 diff --git a/NPLib/Core/NPInputParser.cxx b/NPLib/Core/NPInputParser.cxx index 84ea383ef72afcc36a31933d6e2d7c1b0cef3a54..577983975a9a8249375ecabbd9f3ded97dcc1502 100644 --- a/NPLib/Core/NPInputParser.cxx +++ b/NPLib/Core/NPInputParser.cxx @@ -458,6 +458,14 @@ double NPL::ApplyUnit(double value, std::string unit){ if(unit=="void") // apply no unit return value; + else if(unit=="g/cm3"){ + return value*NPUNITS::g/NPUNITS::cm3; + } + + else if(unit=="kg/cm3"){ + return value*NPUNITS::kg/NPUNITS::cm3; + } + else if(unit=="millimeter"){ return value*NPUNITS::millimeter; } diff --git a/NPLib/Detectors/MUST2/TMust2Physics.cxx b/NPLib/Detectors/MUST2/TMust2Physics.cxx index aa650609e8f4c5a69c2656ae7bb3955c28f5b627..8466864423ec2a06227af41cc302a594f73c27b2 100644 --- a/NPLib/Detectors/MUST2/TMust2Physics.cxx +++ b/NPLib/Detectors/MUST2/TMust2Physics.cxx @@ -968,13 +968,18 @@ void TMust2Physics::AddTelescope( TVector3 C_X1_Y1, m_NumberOfTelescope++; + // Geometry Parameter + double Face = 97.3; //mm + double NumberOfStrip = 128; + double StripPitch = Face/NumberOfStrip ; //mm + // Vector U on Telescope Face (paralelle to Y Strip) (NB: remember that Y strip are allong X axis) TVector3 U = C_X128_Y1 - C_X1_Y1 ; - double Ushift = (U.Mag()-98)/2.; + double Ushift = (U.Mag()-Face)/2.; U = U.Unit(); // Vector V on Telescope Face (parallele to X Strip) TVector3 V = C_X1_Y128 - C_X1_Y1 ; - double Vshift = (V.Mag() -98)/2. ; + double Vshift = (V.Mag() -Face)/2. ; V = V.Unit() ; // Position Vector of Strip Center @@ -982,10 +987,6 @@ void TMust2Physics::AddTelescope( TVector3 C_X1_Y1, // Position Vector of X=1 Y=1 Strip TVector3 Strip_1_1; - // Geometry Parameter - 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 ; @@ -1094,7 +1095,7 @@ void TMust2Physics::AddTelescope( double theta, U.Rotate( beta_w * Pi/180. , W ) ; V.Rotate( beta_w * Pi/180. , W ) ; - double Face = 98 ; //mm + double Face = 97.3 ; //mm double NumberOfStrip = 128 ; double StripPitch = Face/NumberOfStrip ; //mm @@ -1143,9 +1144,7 @@ TVector3 TMust2Physics::GetPositionOfInteraction(const int i) const{ TVector3 Position = TVector3 ( GetStripPositionX( TelescopeNumber[i] , Si_X[i] , Si_Y[i] ) , GetStripPositionY( TelescopeNumber[i] , Si_X[i] , Si_Y[i] ) , GetStripPositionZ( TelescopeNumber[i] , Si_X[i] , Si_Y[i] ) ) ; - return(Position) ; - } TVector3 TMust2Physics::GetTelescopeNormal( const int i) const{ diff --git a/NPLib/Detectors/MUST2/ressources/maskBack.png b/NPLib/Detectors/MUST2/ressources/maskBack.png index 40753f6d6e226ee99d1d9a27524e1576f56a9a5f..0bc5c7e77417e8276e6c0bd90bfeb9ffeaef24e6 100644 Binary files a/NPLib/Detectors/MUST2/ressources/maskBack.png and b/NPLib/Detectors/MUST2/ressources/maskBack.png differ diff --git a/NPLib/Detectors/MUST2/ressources/maskFront.png b/NPLib/Detectors/MUST2/ressources/maskFront.png index 6644c19a7279d326859c83ab956ac8ffc3fa3681..859369c8da86b94078fd6e1e4b82ba6c6bf3f919 100644 Binary files a/NPLib/Detectors/MUST2/ressources/maskFront.png and b/NPLib/Detectors/MUST2/ressources/maskFront.png differ diff --git a/NPLib/Detectors/ModularLeaf/CMakeLists.txt b/NPLib/Detectors/ModularLeaf/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..89ce7b70c9fa953accffc9695c6aaa0dcdab3f32 --- /dev/null +++ b/NPLib/Detectors/ModularLeaf/CMakeLists.txt @@ -0,0 +1,4 @@ +add_library(NPModularLeaf SHARED TModularLeafPhysics.cxx) +target_link_libraries(NPModularLeaf ${ROOT_LIBRARIES} NPCore) +install(FILES TModularLeafPhysics.h DESTINATION ${CMAKE_INCLUDE_OUTPUT_DIRECTORY}) + diff --git a/NPLib/Detectors/ModularLeaf/TModularLeafPhysics.cxx b/NPLib/Detectors/ModularLeaf/TModularLeafPhysics.cxx new file mode 100644 index 0000000000000000000000000000000000000000..a482a896262b1e95e30c1ff4651ecbb6981c30e6 --- /dev/null +++ b/NPLib/Detectors/ModularLeaf/TModularLeafPhysics.cxx @@ -0,0 +1,181 @@ +/***************************************************************************** + * Copyright (C) 2009-2016 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@lpccaen.in2p3.fr * + * * + * Creation Date : november 2009 * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * This class hold ModularLeaf Physics * + * * + *---------------------------------------------------------------------------* + * Comment: * + * * + * * + *****************************************************************************/ + +// NPL +#include "TModularLeafPhysics.h" +#include "RootOutput.h" +#include "RootInput.h" +#include "NPDetectorFactory.h" +#include "NPOptionManager.h" + +// STL +#include <iostream> +#include <sstream> +#include <fstream> +#include <limits> +#include <stdlib.h> +using namespace std; + +// ROOT +#include "TChain.h" + +// tranform an integer to a string +string itoa(int value){ + char buffer [33]; + sprintf(buffer,"%d",value); + return buffer; +} + +ClassImp(TModularLeafPhysics) + /////////////////////////////////////////////////////////////////////////// +TModularLeafPhysics::TModularLeafPhysics(){ + NumberOfDetector = 0 ; + //EventData = new TModularLeafData ; + EventPhysics = this ; +} + +/////////////////////////////////////////////////////////////////////////// +TModularLeafPhysics::~TModularLeafPhysics(){ + } + +/////////////////////////////////////////////////////////////////////////// +void TModularLeafPhysics::Clear() { + std::map<std::string,double>::iterator it ; + for( it=m_CalibratedData.begin();it!=m_CalibratedData.end();it++){ + it->second=m_DefaultValue; + } +} +/////////////////////////////////////////////////////////////////////////// +void TModularLeafPhysics::ClearEventData() { + std::map<std::string,short>::iterator it ; + for( it=m_RawData.begin();it!=m_RawData.end();it++){ + it->second=m_DefaultValue; + } +} + + +/////////////////////////////////////////////////////////////////////////// +void TModularLeafPhysics::ReadConfiguration(NPL::InputParser parser) { + vector<NPL::InputBlock*> blocks = parser.GetAllBlocksWithToken("ModularLeaf"); + if(NPOptionManager::getInstance()->GetVerboseLevel()) + cout << "//// " << blocks.size() << " modular leafs blocks found " << endl; + + vector<string> token = {"Leafs","DefaultValue"}; + + for(unsigned int i = 0 ; i < blocks.size() ; i++){ + if(blocks[i]->HasTokenList(token)){ + if(NPOptionManager::getInstance()->GetVerboseLevel()) + cout << endl << "//// ModularLeaf " << i+1 << endl; + + m_DefaultValue = blocks[i]->GetDouble("DefaultValue","void"); + std::vector<std::string> leafs = blocks[i]->GetVectorString("Leafs"); + unsigned int size = leafs.size(); + for(unsigned int l = 0 ; l < size ; l++){ + m_CalibratedData[leafs[l]] = m_DefaultValue; + m_RawData[leafs[l]] = m_DefaultValue; + } + } + + else{ + cout << "ERROR: check your input file formatting " << endl; + exit(1); + } + } +} + +/////////////////////////////////////////////////////////////////////////// +void TModularLeafPhysics::AddParameterToCalibrationManager(){ + CalibrationManager* Cal = CalibrationManager::getInstance(); + std::map<std::string,double>::iterator it; + for(it = m_CalibratedData.begin() ; it!=m_CalibratedData.end() ; it++) + Cal->AddParameter("ModularLeaf", it->first,it->first) ; +} + +/////////////////////////////////////////////////////////////////////////// +void TModularLeafPhysics::InitializeRootInputRaw() { + TChain* inputChain = RootInput::getInstance()->GetChain(); + std::map<std::string,short>::iterator it; + for(it = m_RawData.begin() ; it!=m_RawData.end() ; it++){ + inputChain->SetBranchStatus ( (it->first).c_str(), true ); + inputChain->SetBranchAddress( (it->first).c_str(), &(it->second) ) ; + } +} +/////////////////////////////////////////////////////////////////////////// +void TModularLeafPhysics::InitializeRootInputPhysics(){ + TChain* inputChain = RootInput::getInstance()->GetChain(); + std::map<std::string,double>::iterator it; + for(it = m_CalibratedData.begin() ; it!=m_CalibratedData.end() ; it++){ + inputChain->SetBranchStatus ( (it->first).c_str(), true ); + inputChain->SetBranchAddress( (it->first).c_str(), &(it->second) ) ; + } +} + +/////////////////////////////////////////////////////////////////////////// +void TModularLeafPhysics::InitializeRootOutput(){ + TTree* outputTree = RootOutput::getInstance()->GetTree(); + std::map<std::string,double>::iterator it; + for(it = m_CalibratedData.begin() ; it!=m_CalibratedData.end() ; it++){ + outputTree->Branch( (it->first).c_str(), &(m_CalibratedData[it->first])) ; + } +} + +/////////////////////////////////////////////////////////////////////////// +void TModularLeafPhysics::BuildPhysicalEvent(){ + static CalibrationManager* Cal = CalibrationManager::getInstance(); + std::map<std::string,short>::iterator it; + + for(it = m_RawData.begin() ; it != m_RawData.end() ; it++){ + if(it->second!=m_DefaultValue){ + static string param; + param="ModularLeaf/"+it->first; + m_CalibratedData[it->first] = Cal->ApplyCalibration(param,it->second); + } + } +} + +/////////////////////////////////////////////////////////////////////////// +void TModularLeafPhysics::BuildSimplePhysicalEvent(){ + +} + +//////////////////////////////////////////////////////////////////////////////// +// Construct Method to be pass to the DetectorFactory // +//////////////////////////////////////////////////////////////////////////////// +NPL::VDetector* TModularLeafPhysics::Construct(){ + return (NPL::VDetector*) new TModularLeafPhysics(); +} + +//////////////////////////////////////////////////////////////////////////////// +// Registering the construct method to the factory // +//////////////////////////////////////////////////////////////////////////////// +extern "C"{ +class proxy_modularleaf{ + public: + proxy_modularleaf(){ + NPL::DetectorFactory::getInstance()->AddToken("ModularLeaf","ModularLeaf"); + NPL::DetectorFactory::getInstance()->AddDetector("ModularLeaf",TModularLeafPhysics::Construct); + } +}; + +proxy_modularleaf p; +} + diff --git a/NPLib/Detectors/ModularLeaf/TModularLeafPhysics.h b/NPLib/Detectors/ModularLeaf/TModularLeafPhysics.h new file mode 100644 index 0000000000000000000000000000000000000000..3bcddfac2611567cd1a2d45e4b5a07fe73077153 --- /dev/null +++ b/NPLib/Detectors/ModularLeaf/TModularLeafPhysics.h @@ -0,0 +1,98 @@ +#ifndef __ModularLeafPhysics__ +#define __ModularLeafPhysics__ +/***************************************************************************** + * Copyright (C) 2009-2016 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: a.matta@surrey.ac.uk * + * * + * Creation Date : November 2009 * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * This class hold theModularLeaf Detector Physics * + * * + *---------------------------------------------------------------------------* + * Comment: * + * * + * * + *****************************************************************************/ + +// STL +#include <vector> +using namespace std ; + +// ROOT +#include "TObject.h" + +// NPL +#include "NPVDetector.h" +#include "NPCalibrationManager.h" +#include "NPInputParser.h" + +class TModularLeafPhysics : public TObject, public NPL::VDetector{ + public: // Constructor and Destructor + TModularLeafPhysics(); + ~TModularLeafPhysics(); + + public: + void Clear(); + void Clear(const Option_t*) {}; + + private: // Raw and Calibrated Data + double m_DefaultValue; // ! + std::map<std::string,double> m_CalibratedData; + std::map<std::string,short> m_RawData; + + public: // inherrited from VDetector + // Read stream at ConfigFile to pick-up parameters of detector (Position,...) using Token + void ReadConfiguration(NPL::InputParser); + + + // Add Parameter to the CalibrationManger + void AddParameterToCalibrationManager(); + + // Activated associated Branches and link it to the private member DetectorData address + // In this method mother Branches (Detector) AND daughter leaf (fDetector_parameter) have to be activated + void InitializeRootInputRaw() ; + + // Activated associated Branches and link it to the private member DetectorPhysics address + // In this method mother Branches (Detector) AND daughter leaf (parameter) have to be activated + void InitializeRootInputPhysics() ; + + // Create associated branches and associated private member DetectorPhysics address + void InitializeRootOutput(); + + // This method is called at each event read from the Input Tree. Aime is to build treat Raw dat in order to extract physical parameter. + void BuildPhysicalEvent(); + + // Same as above, but only the simplest event and/or simple method are used (low multiplicity, faster algorythm but less efficient ...). + // This method aimed to be used for analysis performed during experiment, when speed is requiered. + // NB: This method can eventually be the same as BuildPhysicalEvent. + void BuildSimplePhysicalEvent(); + + // Same as above but for online analysis + void BuildOnlinePhysicalEvent() {BuildPhysicalEvent();}; + + // Give and external TModularLeafData object to TModularLeafPhysics. Needed for online analysis for example. + void SetRawDataPointer(void* rawDataPointer) {} + + // Those two method all to clear the Event Physics or Data + void ClearEventPhysics() {Clear();} + void ClearEventData() ; + + private: // Data not writted in the tree + int NumberOfDetector ;//! + //TModularLeafData* EventData ;//! + TModularLeafPhysics* EventPhysics ;//! + + public: // Static constructor to be passed to the Detector Factory + static NPL::VDetector* Construct(); + ClassDef(TModularLeafPhysics,1) // ModularLeafPhysics structure +}; + +#endif diff --git a/NPLib/Detectors/Sharc/TSharcData.h b/NPLib/Detectors/Sharc/TSharcData.h index a808c652ec4ae20a4407bc205160640773685233..7a1716a72d8505c0c0c28fc0c14e9066851fbd52 100644 --- a/NPLib/Detectors/Sharc/TSharcData.h +++ b/NPLib/Detectors/Sharc/TSharcData.h @@ -23,7 +23,7 @@ *****************************************************************************/ // STL -#include<stdlib.h> +#include <stdlib.h> #include <vector> #include <map> using namespace std ; diff --git a/NPLib/Physics/NPBeam.cxx b/NPLib/Physics/NPBeam.cxx index edd0a557283470972197d3c4d3f4fe9f6fbe649c..454f4f894dd7f3ac32ce35fdc92e11d85354c002 100644 --- a/NPLib/Physics/NPBeam.cxx +++ b/NPLib/Physics/NPBeam.cxx @@ -131,7 +131,7 @@ void Beam::ReadConfigurationFile(NPL::InputParser parser){ vector<string> energyA = {"Energy","SigmaEnergy"}; vector<string> energyP = {"EnergyProfilePath"}; vector<string> emmitA = {"SigmaThetaX","SigmaPhiY","SigmaX","SigmaY","MeanThetaX","MeanPhiY","MeanX","MeanY"}; - vector<string> emmitP = {"EnergyProfilePath","XThetaXProfilePath","YPhiYProfilePath"}; + vector<string> emmitP = {"XThetaXProfilePath","YPhiYProfilePath"}; for(unsigned int i = 0 ; i < blocks.size() ; i++){ @@ -172,9 +172,9 @@ void Beam::ReadConfigurationFile(NPL::InputParser parser){ // Emmitance profile else if(blocks[i]->HasTokenList(emmitP)){ vector<string> XThetaX= blocks[i]->GetVectorString("XThetaXProfilePath"); - SetEnergyHist( Read1DProfile(XThetaX[0], XThetaX[1])); + SetXThetaXHist( Read2DProfile(XThetaX[0], XThetaX[1])); vector<string> YPhiY= blocks[i]->GetVectorString("YPhiYProfilePath"); - SetEnergyHist( Read1DProfile(YPhiY[0], YPhiY[1])); + SetYPhiYHist( Read2DProfile(YPhiY[0], YPhiY[1])); } diff --git a/NPLib/Physics/NPFunction.cxx b/NPLib/Physics/NPFunction.cxx index 817d303061eabc35b423d5cf4c5c384fc694953f..71602f164667e633ce7966235034c47924788d89 100644 --- a/NPLib/Physics/NPFunction.cxx +++ b/NPLib/Physics/NPFunction.cxx @@ -37,7 +37,7 @@ TH1F* Read1DProfile(string filename,string HistName) // test whether file format is ASCII or ROOT bool type = OpenASCIIorROOTFile(filename, ASCII , ROOT); - + // ASCII File case if (type) { string LineBuffer; @@ -80,7 +80,7 @@ TH1F* Read1DProfile(string filename,string HistName) else{ h = (TH1F*) gDirectory->FindObjectAny(HistName.c_str()); if(!h){ - cout << "Error: Histogramm " << HistName << " not found in file " << filename << endl; + cout << "Error: Histogram " << HistName << " not found in file " << filename << endl; exit(1); } } diff --git a/NPLib/Physics/NPNucleus.cxx b/NPLib/Physics/NPNucleus.cxx index bf9c9ac39709473362ed3d72e2f9b7491e67b558..44038da618164558bd4df79f4ba6b84fbde418c5 100644 --- a/NPLib/Physics/NPNucleus.cxx +++ b/NPLib/Physics/NPNucleus.cxx @@ -185,8 +185,8 @@ void Nucleus::Extract(string line){ fLifeTime*=1e-18; else if(s_lt_units=="zs") fLifeTime*=1e-21; - else if(s_lt_units=="zs") - fLifeTime*=1e-23; + else if(s_lt_units=="ys") + fLifeTime*=1e-24; else if(s_lt_units=="m") fLifeTime*=60; else if(s_lt_units=="h") diff --git a/NPLib/Physics/NPNucleus.h b/NPLib/Physics/NPNucleus.h index bc13d1768246cee3ae7b866679fd509f21ea568f..18bf35d0ef4bfc00ecf01047aa65309474899946 100644 --- a/NPLib/Physics/NPNucleus.h +++ b/NPLib/Physics/NPNucleus.h @@ -52,13 +52,13 @@ namespace NPL { //intrinsic properties string fName; // Nucleus name string fNucleusName; - int fCharge; // Nucleus charge - int fAtomicWeight; // Nucleus atomic weight + int fCharge; // Nucleus charge + int fAtomicWeight; // Nucleus atomic weight double fMassExcess; // Nucleus mass excess in keV string fSpinParity; // Nucleus spin and parity double fSpin; // Nucleus spin - string fParity; // Nucleus parity - double fLifeTime; // life time + string fParity; // Nucleus parity + double fLifeTime; // life time //kinematic properties double fKineticEnergy; @@ -91,17 +91,17 @@ namespace NPL { string GetName() const {return fNucleusName;} int GetZ() const {return fCharge;} int GetA() const {return fAtomicWeight;} - double GetMassExcess() const {return fMassExcess;} - string GetSpinParity() const {return fSpinParity;} - double GetSpin() const {return fSpin;} - string GetParity() const {return fParity;} - double GetLifeTime() const {return fLifeTime;} - double GetEnergy() const {return fKineticEnergy;} - double GetBrho() const {return fBrho;} - double GetTimeOfFlight() const {return fTimeOfFlight;} - double GetBeta() const {return fBeta;} - double GetGamma() const {return fGamma;} - double GetVelocity() const {return fVelocity;} + double GetMassExcess() const {return fMassExcess;} + string GetSpinParity() const {return fSpinParity;} + double GetSpin() const {return fSpin;} + string GetParity() const {return fParity;} + double GetLifeTime() const {return fLifeTime;} + double GetEnergy() const {return fKineticEnergy;} + double GetBrho() const {return fBrho;} + double GetTimeOfFlight() const {return fTimeOfFlight;} + double GetBeta() const {return fBeta;} + double GetGamma() const {return fGamma;} + double GetVelocity() const {return fVelocity;} TLorentzVector GetEnergyImpulsion() const {return fEnergyImpulsion;} void SetName(const char* name) {fName = name;} void SetZ(int charge) {fCharge = charge;} diff --git a/NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMEPhysics.cxx b/NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMEPhysics.cxx index 88b42e7f649e6fd31eacaebd1ca3492d188c7dba..ffde1ca495330a87b92d5e20df1987ab62096f31 100644 --- a/NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMEPhysics.cxx +++ b/NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMEPhysics.cxx @@ -275,20 +275,6 @@ map< string , TH1*> TDETECTORNAMEPhysics::GetSpectra() { } } - - -//////////////////////////////////////////////////////////////////////////////// -vector<TCanvas*> TDETECTORNAMEPhysics::GetCanvas() { - if(m_Spectra) - return m_Spectra->GetCanvas(); - else{ - vector<TCanvas*> empty; - return empty; - } -} - - - /////////////////////////////////////////////////////////////////////////// void TDETECTORNAMEPhysics::WriteSpectra() { m_Spectra->WriteSpectra(); diff --git a/NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMEPhysics.h b/NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMEPhysics.h index 2f4b0da3eb8ce040163d468d11c2302103c02536..2e55defaa40d277e7db9bb0d9ae3f6abbb664286 100644 --- a/NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMEPhysics.h +++ b/NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMEPhysics.h @@ -31,7 +31,6 @@ using namespace std; // ROOT headers #include "TObject.h" #include "TH1.h" -#include "TCanvas.h" #include "TVector3.h" // NPTool headers #include "TDETECTORNAMEData.h" @@ -171,7 +170,6 @@ class TDETECTORNAMEPhysics : public TObject, public NPL::VDetector { // spectra getter public: map<string, TH1*> GetSpectra(); - vector<TCanvas*> GetCanvas(); // Static constructor to be passed to the Detector Factory public: diff --git a/NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMESpectra.cxx b/NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMESpectra.cxx index 19e4817bb30e62be7c3850d01b3d37575a332c40..98207a50b07649c2e4eda675ba863965309444d0 100644 --- a/NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMESpectra.cxx +++ b/NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMESpectra.cxx @@ -117,7 +117,7 @@ void TDETECTORNAMESpectra::FillRawSpectra(TDETECTORNAMEData* RawData) { name = "DETECTORNAME"+NPL::itoa(RawData->GetE_DetectorNbr(i))+"_ENERGY_RAW"; family = "DETECTORNAME/RAW"; - GetHisto(family,name) -> Fill(RawData->Get_Energy(i)); + FillSpectra(family,name,RawData->Get_Energy(i)); } // Time @@ -126,7 +126,7 @@ void TDETECTORNAMESpectra::FillRawSpectra(TDETECTORNAMEData* RawData) { name = "DETECTORNAME"+NPL::itoa(RawData->GetT_DetectorNbr(i))+"_TIME_RAW"; family = "DETECTORNAME/RAW"; - GetHisto(family,name) -> Fill(RawData->Get_Time(i)); + FillSpectra(family,name,RawData->Get_Time(i)); } } @@ -143,7 +143,7 @@ void TDETECTORNAMESpectra::FillPreTreatedSpectra(TDETECTORNAMEData* PreTreatedDa name = "DETECTORNAME"+NPL::itoa(PreTreatedData->GetE_DetectorNbr(i))+"_ENERGY_CAL"; family = "DETECTORNAME/CAL"; - GetHisto(family,name) -> Fill(PreTreatedData->Get_Energy(i)); + FillSpectra(family,name,PreTreatedData->Get_Energy(i)); } // Time @@ -152,7 +152,7 @@ void TDETECTORNAMESpectra::FillPreTreatedSpectra(TDETECTORNAMEData* PreTreatedDa name = "DETECTORNAME"+NPL::itoa(PreTreatedData->GetT_DetectorNbr(i))+"_TIME_CAL"; family = "DETECTORNAME/CAL"; - GetHisto(family,name) -> Fill(PreTreatedData->Get_Time(i)); + FillSpectra(family,name,PreTreatedData->Get_Time(i)); } } @@ -168,7 +168,7 @@ void TDETECTORNAMESpectra::FillPhysicsSpectra(TDETECTORNAMEPhysics* Physics) { unsigned int sizeE = Physics->Energy.size(); for(unsigned int i = 0 ; i < sizeE ; i++){ name = "DETECTORNAME_ENERGY_TIME"; - GetHisto(family,name) -> Fill(Physics->Energy[i],Physics->Time[i]); + FillSpectra(family,name,Physics->Energy[i],Physics->Time[i]); } } diff --git a/NPSimulation/Core/MaterialManager.cc b/NPSimulation/Core/MaterialManager.cc index 29a0653db4a713880c185f7e8e6a59c056c6e437..18001280e75ca7c73b44deb8606f8e91d71ee02f 100644 --- a/NPSimulation/Core/MaterialManager.cc +++ b/NPSimulation/Core/MaterialManager.cc @@ -295,6 +295,30 @@ G4Material* MaterialManager::GetMaterialFromLibrary(string Name,double density){ m_Material[Name]=material; return material; } + else if(Name == "He_gas"){ + if(!density) + density = 0.0001665*g/cm3; // room temp, 1 atm + G4Material* material = new G4Material("NPS_"+Name, density,1); + material->AddElement(GetElementFromLibrary("He"),1); + m_Material[Name]=material; + return material; + } + else if(Name == "O2_gas"){ + if(!density) + density = 0.001331*g/cm3; // room temp, 1 atm + G4Material* material = new G4Material("NPS_"+Name, density,1); + material->AddElement(GetElementFromLibrary("O"),2); + m_Material[Name]=material; + return material; + } + else if(Name == "Ti"){ + if(!density) + density = 4.5189*g/cm3; + G4Material* material = new G4Material("NPS_"+Name, density,1); + material->AddElement(GetElementFromLibrary("Ti"),1); + m_Material[Name]=material; + return material; + } // Usual detector material else if(Name == "Si"){ diff --git a/NPSimulation/Core/ParticleStack.cc b/NPSimulation/Core/ParticleStack.cc index 1d7ac6c1711117c6d893bb7acba571708d44c4b7..236eab375ff5d25d7c3c03017806295546578e9f 100644 --- a/NPSimulation/Core/ParticleStack.cc +++ b/NPSimulation/Core/ParticleStack.cc @@ -106,8 +106,7 @@ void ParticleStack::AddBeamParticleToStack(Particle& particle){ m_ParticleStack.push_back(particle); // Incident beam parameter m_InitialConditions-> SetIncidentParticleName (particle.GetParticleDefinition()->GetParticleName()); - //m_InitialConditions-> SetIncidentInitialKineticEnergy (particle. GetParticleThetaCM()); - m_InitialConditions-> SetIncidentInitialKineticEnergy (particle. GetParticleKineticEnergy()); + m_InitialConditions-> SetIncidentFinalKineticEnergy (particle. GetParticleKineticEnergy()); G4ThreeVector U(1,0,0); G4ThreeVector V(0,1,0); @@ -118,7 +117,7 @@ void ParticleStack::AddBeamParticleToStack(Particle& particle){ m_InitialConditions-> SetIncidentEmittancePhi (particle.GetParticleMomentumDirection().phi()/deg); // Beam status at the initial interaction point - m_InitialConditions-> SetIncidentFinalKineticEnergy (particle. GetParticleKineticEnergy()); + m_InitialConditions-> SetIncidentInitialKineticEnergy (particle. GetParticleThetaCM()); m_InitialConditions-> SetIncidentPositionX (particle. GetParticlePosition().x()); m_InitialConditions-> SetIncidentPositionY (particle. GetParticlePosition().y()); m_InitialConditions-> SetIncidentPositionZ (particle. GetParticlePosition().z()); diff --git a/NPSimulation/Core/Target.cc b/NPSimulation/Core/Target.cc index ddf19b7c4f800145719d7fde14704b488720db38..ecb81aab77764c8ae2203f2f1c2c99c420777d45 100644 --- a/NPSimulation/Core/Target.cc +++ b/NPSimulation/Core/Target.cc @@ -112,14 +112,17 @@ void Target::ReadConfiguration(NPL::InputParser parser){ } else if(ctarget.size()==1){ - cout << " Solid Target found " << endl; + m_TargetType=false; + cout << " Cryo Target found " << endl; vector<string> token = {"Thickness","Radius","Material","Density","WindowsThickness","WindowsMaterial","Angle","X","Y","Z"}; if(ctarget[0]->HasTokenList(token)){ m_TargetThickness= ctarget[0]->GetDouble("Thickness","micrometer"); m_TargetAngle=ctarget[0]->GetDouble("Angle","deg"); - m_TargetMaterial= GetMaterialFromLibrary(ctarget[0]->GetString("Material")); + m_TargetMaterial= MaterialManager::getInstance()->GetMaterialFromLibrary(ctarget[0]->GetString("Material"),ctarget[0]->GetDouble("Density","g/cm3")); m_WindowsThickness= ctarget[0]->GetDouble("WindowsThickness","micrometer"); m_WindowsMaterial= GetMaterialFromLibrary(ctarget[0]->GetString("WindowsMaterial")); + m_TargetRadius=ctarget[0]->GetDouble("Radius","mm"); + m_TargetX=ctarget[0]->GetDouble("X","mm"); m_TargetY=ctarget[0]->GetDouble("Y","mm"); m_TargetZ =ctarget[0]->GetDouble("Z","mm"); diff --git a/NPSimulation/Detectors/MUST2/MUST2Array.cc b/NPSimulation/Detectors/MUST2/MUST2Array.cc index d5f4dbaf90d23156e230a64fe122f1a046f2c5f3..6796a6dfac3206508ac163a23905c90f850df6df 100644 --- a/NPSimulation/Detectors/MUST2/MUST2Array.cc +++ b/NPSimulation/Detectors/MUST2/MUST2Array.cc @@ -753,11 +753,12 @@ void MUST2Array::ReadSensitive(const G4Event* event){ unsigned int a,r,g,b; // pixel SiScorer->GetARGBFront(indexes[i],a,r,g,b); + b=b+2; + g=g+2; if(r==0){ trig.insert(detectorNbr); // Energy m_Event->SetStripXE(detectorNbr,b+1,energyX); - // Time m_Event->SetStripXT(detectorNbr,b+1,RandGauss::shoot(time, ResoTimeMust)); } @@ -768,8 +769,7 @@ void MUST2Array::ReadSensitive(const G4Event* event){ if(energyX>0.1*keV){ trig.insert(detectorNbr); // Energy - m_Event->SetStripXE(detectorNbr,b+1,energyX) ; - + m_Event->SetStripXE(detectorNbr,b+1,energyX) ; // Time m_Event->SetStripXT(detectorNbr,b+1,RandGauss::shoot(time, ResoTimeMust)); } @@ -781,7 +781,6 @@ void MUST2Array::ReadSensitive(const G4Event* event){ // Energy m_Event->SetStripXE(detectorNbr,g+1,energyX) ; - // Time m_Event->SetStripXT(detectorNbr,g+1,RandGauss::shoot(time, ResoTimeMust)); } @@ -795,11 +794,12 @@ void MUST2Array::ReadSensitive(const G4Event* event){ unsigned int a,r,g,b; // pixel SiScorer->GetARGBBack(indexes[i],a,r,g,b); + b=b+2; + g=g+2; if(r==0){ trig.insert(detectorNbr); // Energy m_Event->SetStripYE(detectorNbr,b+1,energyY); - // Time m_Event->SetStripYT(detectorNbr,b+1,RandGauss::shoot(time, ResoTimeMust)); } @@ -811,7 +811,6 @@ void MUST2Array::ReadSensitive(const G4Event* event){ // Energy m_Event->SetStripYE(detectorNbr,b+1,energyY1); - // Time m_Event->SetStripYT(detectorNbr,b+1,RandGauss::shoot(time, ResoTimeMust)); } @@ -821,7 +820,6 @@ void MUST2Array::ReadSensitive(const G4Event* event){ double energyY2 = (1-rand)*energyY; // Energy m_Event->SetStripYE(detectorNbr,g+1,energyY2); - // Time m_Event->SetStripYT(detectorNbr,g+1,RandGauss::shoot(time, ResoTimeMust)); } @@ -830,6 +828,7 @@ void MUST2Array::ReadSensitive(const G4Event* event){ // If event passes through first stage fill the Interaction Coordinates if (SiScoredHit){ + //Always calculated with respect to (0,0,0) ms_InterCoord->SetDetectedPositionX(InterPos_X) ; ms_InterCoord->SetDetectedPositionY(InterPos_Y) ; ms_InterCoord->SetDetectedPositionZ(InterPos_Z) ; diff --git a/NPSimulation/EventGenerator/EventGeneratorBeam.cc b/NPSimulation/EventGenerator/EventGeneratorBeam.cc index 91282a47a7554060062f1021479d07f8d826692c..c6b67dc1f74bc6c516f6ab2e6516f7d81168f5ea 100644 --- a/NPSimulation/EventGenerator/EventGeneratorBeam.cc +++ b/NPSimulation/EventGenerator/EventGeneratorBeam.cc @@ -94,9 +94,10 @@ void EventGeneratorBeam::GenerateEvent(G4Event* anEvent){ G4double Beam_theta, Beam_phi, FinalBeamEnergy, InitialBeamEnergy, x0, y0, z0, Beam_thetaX, Beam_phiY; m_Beam->GenerateRandomEvent(InitialBeamEnergy, x0, y0, z0, Beam_thetaX, Beam_phiY); - G4double Xdir = sin(Beam_thetaX); - G4double Ydir = sin(Beam_phiY); - G4double Zdir = cos(Beam_thetaX) + cos(Beam_phiY); + //Set the direction cosines: alpha=90-Beam_thetaX, beta=90-Beam_phiY + G4double Xdir = sin(Beam_thetaX); // cos(90-x) = sin(x) + G4double Ydir = sin(Beam_phiY); + G4double Zdir = sqrt(1-Xdir*Xdir-Ydir*Ydir); // alpha^2 + beta^2 + gamma^2 = 1 G4ThreeVector BeamDir(Xdir,Ydir,Zdir); G4ThreeVector BeamPos(x0,y0,z0); Beam_theta = BeamDir.theta() ; diff --git a/NPSimulation/EventGenerator/EventGeneratorMultipleParticle.cc b/NPSimulation/EventGenerator/EventGeneratorMultipleParticle.cc index 3f0239935878afa0c0f0e9b6623e6ab6c15ab179..f9f08578bd143565b0a51c73b8b12ff783803948 100644 --- a/NPSimulation/EventGenerator/EventGeneratorMultipleParticle.cc +++ b/NPSimulation/EventGenerator/EventGeneratorMultipleParticle.cc @@ -102,7 +102,7 @@ void EventGeneratorMultipleParticle::ReadConfiguration(NPL::InputParser parser){ double dEnergy, dAngle; if(evtfile.is_open()){ cout << "Event file found: " << m_FileName << " \033[0m" << endl; - for(unsigned int i=0; i<m_Events; i++){ + for(unsigned int j=0; j<m_Events; j++){ //while(!evtfile.eof()){ evtfile >> sMult >> iMult; m_Multiplicity.push_back(iMult); diff --git a/NPSimulation/Scorers/SiliconScorers.cc b/NPSimulation/Scorers/SiliconScorers.cc index af5b65d4e7f72665213450d81852f0c0d6f3dac8..b9674a66c3e751dcee5679795697b50d444ed4c7 100644 --- a/NPSimulation/Scorers/SiliconScorers.cc +++ b/NPSimulation/Scorers/SiliconScorers.cc @@ -36,52 +36,54 @@ PS_Silicon_Images::PS_Silicon_Images(G4String name, string imageFront,string ima //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... G4bool PS_Silicon_Images::ProcessHits(G4Step* aStep, G4TouchableHistory*){ - // contain Energy Time, DetNbr, PixelFront and PixelBack - t_Energy = aStep->GetTotalEnergyDeposit(); - t_Time = aStep->GetPreStepPoint()->GetGlobalTime(); - - t_DetectorNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(m_Level); - t_Position = aStep->GetPreStepPoint()->GetPosition(); - - // Interaction coordinates (used to fill the InteractionCoordinates branch)et vous re - t_X = t_Position.x(); - t_Y = t_Position.y(); - t_Z = t_Position.z(); - t_Theta = t_Position.theta(); - t_Phi = t_Position.phi(); - - t_Position = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(t_Position); - - t_PixelFront = m_ImageFront->GetPixelAtCoordinate(t_Position.x(),t_Position.y()); - t_PixelBack = m_ImageBack->GetPixelAtCoordinate(t_Position.x(),t_Position.y()); - - // If front and back are in inactive part of the wafer, - // nothing is added to the map - if(t_PixelFront == m_IgnoreValue && t_PixelBack == m_IgnoreValue) - return FALSE; - - t_Index = aStep->GetTrack()->GetTrackID() + t_DetectorNbr * 1e3 ; - // Check if the particle has interact before, if yes, add up the energies. - map<unsigned int, double>::iterator it; - it= m_Energy.find(t_Index); - if(it!=m_Energy.end()){ - double dummy = it->second; - t_Energy+=dummy; - } - - m_Energy[t_Index] = t_Energy; - m_Time[t_Index] = t_Time; - m_DetectorNbr[t_Index] = t_DetectorNbr; - m_PixelFront[t_Index] = t_PixelFront; - m_PixelBack[t_Index] = t_PixelBack; - m_X[t_Index] = t_X; - m_Y[t_Index] = t_Y; - m_Z[t_Index] = t_Z; - m_Theta[t_Index] = t_Theta; - m_Phi[t_Index] = t_Phi; - - - return TRUE; + + // contain Energy Time, DetNbr, PixelFront and PixelBack + t_Energy = aStep->GetTotalEnergyDeposit(); + t_Time = aStep->GetPreStepPoint()->GetGlobalTime(); + + t_DetectorNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(m_Level); + t_Position = aStep->GetPreStepPoint()->GetPosition(); + + // Interaction coordinates (used to fill the InteractionCoordinates branch) + // N.B: Theta and phi are calculated with respect to (0,0,0) + t_X = t_Position.x(); + t_Y = t_Position.y(); + t_Z = t_Position.z(); + t_Theta = t_Position.theta(); + t_Phi = t_Position.phi(); + // transforming the position to the local volume + t_Position = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(t_Position); + t_PixelFront = m_ImageFront->GetPixelAtCoordinate(t_Position.x(),t_Position.y()); + t_PixelBack = m_ImageBack->GetPixelAtCoordinate(t_Position.x(),t_Position.y()); + + // If front and back are in inactive part of the wafer, + // nothing is added to the map + if(t_PixelFront == m_IgnoreValue && t_PixelBack == m_IgnoreValue) + return FALSE; + + t_Index = aStep->GetTrack()->GetTrackID() + t_DetectorNbr * 1e3 ; + // Check if the particle has interact before, if yes, add up the energies. + map<unsigned int, double>::iterator it; + it= m_Energy.find(t_Index); + if(it!=m_Energy.end()){ + double dummy = it->second; + t_Energy+=dummy; + } + + m_Energy[t_Index] = t_Energy; + m_Time[t_Index] = t_Time; + m_DetectorNbr[t_Index] = t_DetectorNbr; + m_PixelFront[t_Index] = t_PixelFront; + m_PixelBack[t_Index] = t_PixelBack; + m_X[t_Index] = t_X; + m_Y[t_Index] = t_Y; + m_Z[t_Index] = t_Z; + m_Theta[t_Index] = t_Theta; + m_Phi[t_Index] = t_Phi; + + + return TRUE; + } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... diff --git a/Projects/MUGAST/DetectorConfiguration/MUGAST_Agata_Cryo.detector b/Projects/MUGAST/DetectorConfiguration/MUGAST_Agata_Cryo.detector index 068eb26ae72a9f17c0a390ffb852e96b14805b67..66a113a1b36a50b5157555c09ae249b474937c98 100644 --- a/Projects/MUGAST/DetectorConfiguration/MUGAST_Agata_Cryo.detector +++ b/Projects/MUGAST/DetectorConfiguration/MUGAST_Agata_Cryo.detector @@ -1,166 +1,165 @@ %%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 CryoTarget - THICKNESS= 1000 - RADIUS= 7.5 - MATERIAL= D2 - DENSITY= 0.16383 - WINDOWSTHICKNESS= 1 - WINDOWSMATERIAL= Mylar - ANGLE= 0 - X= 0 - Y= 0 - Z= 0 + THICKNESS= 1 mm + RADIUS= 7.5 mm + MATERIAL= D2 + DENSITY= 0.16383 g/cm3 + WINDOWSTHICKNESS= 1 micrometer + WINDOWSMATERIAL= Mylar + ANGLE= 0 deg + X= 0 mm + Y= 0 mm + Z= 0 mm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GaspardTracker GPDChamber= MUGAST %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Annular Back GPDAnnular - Z= -134.15 - RMIN= 16 - RMAX= 45 - FIRSTSTAGE= 1 - SECONDSTAGE= 1 - THIRDSTAGE= 1 - VIS= all + Z= -134.15 + RMIN= 16 + RMAX= 45 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 1 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 End-Cap Back GPDTrapezoid - X128_Y128= 41.963 21.364 -99.28 - X1_Y128= 23.737 39.592 -99.282 - X128_Y1= 122.368 54.712 -31.789 - X1_Y1= 57.084 119.996 -31.789 - FIRSTSTAGE= 1 - SECONDSTAGE= 0 - THIRDSTAGE= 0 - VIS= all + X128_Y128= 41.963 21.364 -99.28 + X1_Y128= 23.737 39.592 -99.282 + X128_Y1= 122.368 54.712 -31.789 + X1_Y1= 57.084 119.996 -31.789 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 0 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 GPDTrapezoid - X128_Y128= -41.963 -21.364 -99.28 - X1_Y128= -23.737 -39.592 -99.282 - X128_Y1= -122.368 -54.712 -31.789 - X1_Y1= -57.084 -119.996 -31.789 - FIRSTSTAGE= 1 - SECONDSTAGE= 0 - THIRDSTAGE= 0 - VIS= all + X128_Y128= -41.963 -21.364 -99.28 + X1_Y128= -23.737 -39.592 -99.282 + X128_Y1= -122.368 -54.712 -31.789 + X1_Y1= -57.084 -119.996 -31.789 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 0 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3 GPDTrapezoid - X128_Y128= -21.364 41.963 -99.28 - X1_Y128= -39.592 23.737 -99.282 - X128_Y1= -54.712 122.368 -31.789 - X1_Y1= -119.996 57.084 -31.789 - FIRSTSTAGE= 1 - SECONDSTAGE= 0 - THIRDSTAGE= 0 - VIS= all + X128_Y128= -21.364 41.963 -99.28 + X1_Y128= -39.592 23.737 -99.282 + X128_Y1= -54.712 122.368 -31.789 + X1_Y1= -119.996 57.084 -31.789 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 0 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 GPDTrapezoid - X128_Y128= 21.364 -41.963 -99.28 - X1_Y128= 39.592 -23.737 -98.282 - X128_Y1= 54.712 -122.368 -31.789 - X1_Y1= 119.996 -57.084 -31.789 - FIRSTSTAGE= 1 - SECONDSTAGE= 0 - THIRDSTAGE= 0 - VIS= all + X128_Y128= 21.364 -41.963 -99.28 + X1_Y128= 39.592 -23.737 -98.282 + X128_Y1= 54.712 -122.368 -31.789 + X1_Y1= 119.996 -57.084 -31.789 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 0 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Barrel GPDRectangle - X1_Y1= -132.251 58.314 88.72 - X128_Y1= -61.823 128.742 88.72 - X1_Y128= -132.251 58.314 -3.13 - X128_Y128= -61.823 128.742 -3.13 - FIRSTSTAGE= 1 - SECONDSTAGE= 1 - THIRDSTAGE= 0 - VIS= all + X1_Y1= -132.251 58.314 88.72 + X128_Y1= -61.823 128.742 88.72 + X1_Y128= -132.251 58.314 -3.13 + X128_Y128= -61.823 128.742 -3.13 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 0 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 GPDRectangle - X1_Y1= -135.00 -51.01 88.72 - X128_Y1= -135.00 43.99 88.72 - X1_Y128= -135.00 -51.01 -3.13 - X128_Y128= -135.00 43.99 -3.13 - FIRSTSTAGE= 1 - SECONDSTAGE= 1 - THIRDSTAGE= 0 - VIS= all + X1_Y1= -135.00 -51.01 88.72 + X128_Y1= -135.00 43.99 88.72 + X1_Y128= -135.00 -51.01 -3.13 + X128_Y128= -135.00 43.99 -3.13 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 0 + VIS= all %%%%%%%%%%%%%%%%%%%%% -MUST2Array %%%%%%% Telescope 1 %%%%%%% M2Telescope -X1_Y1= 13.00 102.79 161.98 -X1_Y128= 24.88 10.58 191.20 -X128_Y1= 103.08 102.90 126.06 -X128_Y128= 115.23 10.76 155.14 -SI= 1.00 -SILI= 0.00 -CSI= 1.00 -VIS= all + X1_Y1= 13.00 102.79 161.98 + X1_Y128= 24.88 10.58 191.20 + X128_Y1= 103.08 102.90 126.06 + X128_Y128= 115.23 10.76 155.14 + SI= 1.00 + SILI= 0.00 + CSI= 1.00 + VIS= all %%%%%%% Telescope 2 %%%%%%% M2Telescope -X1_Y1= -114.05 10.98 154.48 -X1_Y128= -23.81 10.92 190.84 -X128_Y1= -102.23 102.22 125.39 -X128_Y128= -11.95 102.90 161.48 -SI= 1.00 -SILI= 0.00 -CSI= 1.00 -VIS= all + X1_Y1= -114.05 10.98 154.48 + X1_Y128= -23.81 10.92 190.84 + X128_Y1= -102.23 102.22 125.39 + X128_Y128= -11.95 102.90 161.48 + SI= 1.00 + SILI= 0.00 + CSI= 1.00 + VIS= all %%%%%%% Telescope 3 %%%%%%% M2Telescope -X1_Y1= -11.91 -103.68 162.50 -X1_Y128= -24.30 -10.94 191.00 -X128_Y1= -102.03 -103.39 126.36 -X128_Y128= -114.58 -10.71 154.76 -SI= 1.00 -SILI= 0.00 -CSI= 1.00 -VIS= all + X1_Y1= -11.91 -103.68 162.50 + X1_Y128= -24.30 -10.94 191.00 + X128_Y1= -102.03 -103.39 126.36 + X128_Y128= -114.58 -10.71 154.76 + SI= 1.00 + SILI= 0.00 + CSI= 1.00 + VIS= all %%%%%%% Telescope 4 %%%%%%% M2Telescope -X1_Y1= 115.12 -11.35 154.94 -X1_Y128= 24.33 -11.60 190.81 -X128_Y1= 103.64 -103.42 126.51 -X128_Y128= 12.89 -103.90 162.29 -SI= 1.00 -SILI= 0.00 -CSI= 1.00 -VIS= all + X1_Y1= 115.12 -11.35 154.94 + X1_Y128= 24.33 -11.60 190.81 + X128_Y1= 103.64 -103.42 126.51 + X128_Y128= 12.89 -103.90 162.29 + SI= 1.00 + SILI= 0.00 + CSI= 1.00 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -AGATA - THETA= 157.5 - PHI= 45 - R= 270 - Shape= Square +%AGATA + THETA= 157.5 + PHI= 45 + R= 270 + Shape= Square %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -AGATA - THETA= 157.5 - PHI= 117 - R= 270 - Shape= Square +%AGATA + THETA= 157.5 + PHI= 117 + R= 270 + Shape= Square %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -AGATA - THETA= 157.5 - PHI= 189 - R= 270 - Shape= Square +%AGATA + THETA= 157.5 + PHI= 189 + R= 270 + Shape= Square %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -AGATA - THETA= 157.5 - PHI= 261 - R= 270 - Shape= Square +%AGATA + THETA= 157.5 + PHI= 261 + R= 270 + Shape= Square %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -AGATA - THETA= 157.5 - PHI= 333 - R= 270 - Shape= Square +%AGATA + THETA= 157.5 + PHI= 333 + R= 270 + Shape= Square %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Projects/e748/Analysis.cxx b/Projects/e748/Analysis.cxx index 5d0a7676115caa8266da6fbd60a5e092c34d0ac2..a66d024f8f42a54f16bfe368c0f97b21132ede4e 100644 --- a/Projects/e748/Analysis.cxx +++ b/Projects/e748/Analysis.cxx @@ -37,10 +37,13 @@ Analysis::~Analysis(){ //////////////////////////////////////////////////////////////////////////////// void Analysis::Init(){ M2= (TMust2Physics*) m_DetectorManager->GetDetector("M2Telescope"); - Initial=new TInitialConditions(); + CATS= ( TCATSPhysics*) m_DetectorManager->GetDetector("CATSDetector"); + + //Initial=new TInitialConditions(); + InitOutputBranch(); InitInputBranch(); - Rand = TRandom3(); + /* Rand = TRandom3(); */ myReaction= new NPL::Reaction(); myReaction->ReadConfigurationFile(NPOptionManager::getInstance()->GetReactionFile()); DetectorNumber = 0 ; @@ -56,9 +59,10 @@ void Analysis::Init(){ Si_X_M2 = 0; Si_Y_M2 = 0; ZTarget = 0; + TimeCorr=0; TargetThickness = m_DetectorManager->GetTargetThickness(); // Energy loss table: the G4Table are generated by the simulation - He3CD2 = EnergyLoss("Example/He3_CD2.G4table","G4Table",100 ); + He3CD2 = EnergyLoss("Example/He3_CD2.G4table","G4Table",101 ); He3Al = EnergyLoss("Example/He3_Al.G4table","G4Table",10); He3Si = EnergyLoss("Example/He3_Si.G4table","G4Table",10); //Li11CD2 = EnergyLoss("ExampleLi11_CD2.G4table","G4Table",100); @@ -72,45 +76,58 @@ void Analysis::TreatEvent(){ // and apply by hand the experimental resolution // This is because the beam diagnosis are not simulated // PPAC position resolution on target is assumed to be 1mm - double XTarget = Rand.Gaus(Initial->GetIncidentPositionX(),1); - double YTarget = Rand.Gaus(Initial->GetIncidentPositionY(),1); - TVector3 BeamDirection = Initial->GetBeamDirection(); + double XTarget = CATS->GetPositionOnTarget().X(); + double YTarget = CATS->GetPositionOnTarget().Y(); + + TVector3 BeamDirection = CATS->GetBeamDirection(); // Beam energy is measured using F3 and F2 plastic TOF - double BeamEnergy = Rand.Gaus(Initial->GetIncidentInitialKineticEnergy(),4.5); + //double BeamEnergy= myReaction-> GetBeamEnergy()* MeV; + double BeamEnergy= 30*12* MeV; //BeamEnergy = Li11CD2.Slow(BeamEnergy,TargetThickness/2.,0); - OriginalThetaLab = Initial->GetThetaCM(0); - OriginalELab = Initial->GetKineticEnergy(0); myReaction->SetBeamEnergy(BeamEnergy); //////////////////////////// LOOP on MUST2 Hit ////////////////// - for(unsigned int countMust2 = 0 ; countMust2 < M2->Si_E.size() ; countMust2++){ - /************************************************/ - //Part 0 : Get the usefull Data - // MUST2 - int X = M2->Si_X[countMust2]; - int Y = M2->Si_Y[countMust2]; - int TelescopeNumber = M2->TelescopeNumber[countMust2]; + for(unsigned int countMust2 = 0 ; countMust2 < M2->Si_E.size() ; countMust2++){ + /* //Part 0 : Get the usefull Data */ + // MUST2 */ + int X = M2->Si_X[countMust2]; + int Y = M2->Si_Y[countMust2]; + int TelescopeNumber = M2->TelescopeNumber[countMust2]; Si_X_M2 = X ; Si_Y_M2 = Y ; - /************************************************/ - // Forward Telescope Only - if(TelescopeNumber<5){ + /* // Forward Telescope Only */ + // if(TelescopeNumber<6){ + /* // All Telescopes */ + if(TelescopeNumber<9){ + // if(TelescopeNumber<6){ DetectorNumber = TelescopeNumber ; - /************************************************/ - // Part 1 : Impact Angle + + /* // Part 1 : Impact Angle */ ThetaM2Surface = 0; ThetaNormalTarget = 0; if(XTarget>-1000 && YTarget>-1000){ TVector3 BeamImpact(XTarget,YTarget,0); + //TVector3 BeamImpact(0,0,0); + TVector3 HitDirection = M2 -> GetPositionOfInteraction(countMust2) - BeamImpact ; ThetaLab = HitDirection.Angle( BeamDirection ); + + ThetaM2Surface = HitDirection.Angle(- M2 -> GetTelescopeNormal(countMust2) ); ThetaNormalTarget = HitDirection.Angle( TVector3(0,0,1) ) ; X_M2 = M2 -> GetPositionOfInteraction(countMust2).X() ; Y_M2 = M2 -> GetPositionOfInteraction(countMust2).Y() ; Z_M2 = M2 -> GetPositionOfInteraction(countMust2).Z() ; - } + static double BeamSpeed = 74.2;// mm per nano + static double ZCats1 = 1458; //mm + BeamLength = ZCats1/(1-sin(BeamDirection.Angle(TVector3(0,0,1)))); + ParticleLength = HitDirection.Mag(); + TimeCorr=BeamLength/BeamSpeed ; + + + } + else{ BeamDirection = TVector3(-1000,-1000,-1000); @@ -118,50 +135,46 @@ void Analysis::TreatEvent(){ ThetaNormalTarget = -1000 ; } - /************************************************/ - - /************************************************/ - // Part 2 : Impact Energy +/* // Part 2 : Impact Energy */ Energy = ELab = E_M2 = 0; Si_E_M2 = M2->Si_E[countMust2]; CsI_E_M2= M2->CsI_E[countMust2]; - // if CsI - if(CsI_E_M2>0 ){ - // The energy in CsI is calculate form dE/dx Table because - // 20um resolution is poor - Energy = - He3Si.EvaluateEnergyFromDeltaE(Si_E_M2,300*micrometer, - ThetaM2Surface, 0.01*MeV, - 450.*MeV,0.001*MeV ,1000); - E_M2=CsI_E_M2; - } +/* // if CsI */ +/* /1* if(CsI_E_M2>0 ){ *1/ */ +/* /1* // The energy in CsI is calculate form dE/dx Table because *1/ */ +/* /1* // 20um resolution is poor *1/ */ +/* /1* Energy = *1/ */ +/* /1* He3Si.EvaluateEnergyFromDeltaE(Si_E_M2,300*micrometer, *1/ */ +/* /1* ThetaM2Surface, 0.01*MeV, *1/ */ +/* /1* 450.*MeV,0.001*MeV ,1000); *1/ */ +/* /1* E_M2=CsI_E_M2; *1/ */ +/* /1* } *1/ */ - else - Energy = Si_E_M2; +/* /1* else *1/ */ + + + + + Energy = Si_E_M2; E_M2 += Si_E_M2; - // Evaluate energy using the thickness +/* // Evaluate energy using the thickness */ ELab = He3Al.EvaluateInitialEnergy( Energy,0.4*micrometer , ThetaM2Surface); - // Target Correction +/* // Target Correction */ ELab = He3CD2.EvaluateInitialEnergy( ELab ,TargetThickness/2., ThetaNormalTarget); - /************************************************/ - /************************************************/ - // Part 3 : Excitation Energy Calculation +/* // Part 3 : Excitation Energy Calculation */ Ex = myReaction -> ReconstructRelativistic( ELab , ThetaLab ); - /************************************************/ - /************************************************/ - // Part 4 : Theta CM Calculation +/* // Part 4 : Theta CM Calculation */ ThetaCM = myReaction -> EnergyLabToThetaCM( ELab , ThetaLab)/deg; ThetaLab=ThetaLab/deg; - /************************************************/ - - } + + } }//end loop MUST2 } @@ -171,21 +184,85 @@ void Analysis::End(){ //////////////////////////////////////////////////////////////////////////////// void Analysis::InitOutputBranch() { + RootOutput::getInstance()->GetTree()->Branch("X_M2",&X_M2,"X_M2/D"); + RootOutput::getInstance()->GetTree()->Branch("Y_M2",&Y_M2,"Y_M2/D"); RootOutput::getInstance()->GetTree()->Branch("Ex",&Ex,"Ex/D"); - RootOutput::getInstance()->GetTree()->Branch("ELab",&ELab,"ELab/D"); RootOutput::getInstance()->GetTree()->Branch("ThetaLab",&ThetaLab,"ThetaLab/D"); RootOutput::getInstance()->GetTree()->Branch("ThetaCM",&ThetaCM,"ThetaCM/D"); - RootOutput::getInstance()->GetTree()->Branch("OriginalThetaLab",&OriginalThetaLab,"OriginalThetaLab/D"); - RootOutput::getInstance()->GetTree()->Branch("OriginalELab",&OriginalELab,"OriginalELab/D"); - + /* RootOutput::getInstance()->GetTree()->Branch("OriginalThetaLab",&OriginalThetaLab,"OriginalThetaLab/D"); */ + RootOutput::getInstance()->GetTree()->Branch("ELab",&ELab,"ELab/D"); + RootOutput::getInstance()->GetTree()->Branch("TimeCorr",&TimeCorr,"TimeCorr/D"); + RootOutput::getInstance()->GetTree()->Branch("BeamLength",&BeamLength,"BeamLength/D"); + RootOutput::getInstance()->GetTree()->Branch("ParticleLength",&ParticleLength,"ParticleLength/D"); + RootOutput::getInstance()->GetTree()->Branch("GATCONF",&vGATCONF,"GATCONF/s"); +/* RootOutput::getInstance()->GetTree()->Branch("ADC_CHIO_V15",&vADC_CHIO_V15,"ADC_CHIO_V15/s"); + RootOutput::getInstance()->GetTree()->Branch("ADC_VOIE_29",&vADC_VOIE_29,"ADC_VOIE_29/s"); + RootOutput::getInstance()->GetTree()->Branch("CHIO",&vCHIO,"CHIO/s"); + RootOutput::getInstance()->GetTree()->Branch("CONFDEC",&vCONFDEC,"CONFDEC/s"); + RootOutput::getInstance()->GetTree()->Branch("CONFDEC_AGAVA",&vCONFDEC_AGAVA,"CONFDEC_AGAVA/s"); + RootOutput::getInstance()->GetTree()->Branch("DATATRIG",&vDATATRIG,"DATATRIG/s"); + RootOutput::getInstance()->GetTree()->Branch("DATATRIG_CHIO",&vDATATRIG_CHIO,"DATATRIG_CHIO/s"); + RootOutput::getInstance()->GetTree()->Branch("E1D6",&vE1D6,"E1D6/s"); + RootOutput::getInstance()->GetTree()->Branch("E2D6",&vE2D6,"E2D6/s"); + RootOutput::getInstance()->GetTree()->Branch("ED4",&vED4,"ED4/s"); + RootOutput::getInstance()->GetTree()->Branch("EXL_HF",&vEXL_HF,"EXL_HF/s"); + RootOutput::getInstance()->GetTree()->Branch("GALD4X",&vGALD4X,"GALD4X/s"); + RootOutput::getInstance()->GetTree()->Branch("GALD4Y",&vGALD4Y,"GALD4Y/s"); + RootOutput::getInstance()->GetTree()->Branch("QCaviar",&vQCaviar,"QCaviar/s"); + RootOutput::getInstance()->GetTree()->Branch("QPlast",&vQPlast,"QPlast/s"); + RootOutput::getInstance()->GetTree()->Branch("TCAVHF",&vTCAVHF,"TCAVHF/s"); + RootOutput::getInstance()->GetTree()->Branch("TE1D6CAV",&vTE1D6CAV,"TE1D6CAV/s"); + RootOutput::getInstance()->GetTree()->Branch("TE1D6GAL",&vTE1D6GAL,"TE1D6GAL/s"); + RootOutput::getInstance()->GetTree()->Branch("TE1D6HF",&vTE1D6HF,"TE1D6HF/s"); + RootOutput::getInstance()->GetTree()->Branch("TED4HF",&vTED4HF,"TED4HF/s"); + RootOutput::getInstance()->GetTree()->Branch("TGALD4HF",&vTGALD4HF,"TGALD4HF/s"); + RootOutput::getInstance()->GetTree()->Branch("T_CATS1_2",&vT_CATS1_2,"T_CATS1_2/s"); + RootOutput::getInstance()->GetTree()->Branch("T_CATS1_CAV",&vT_CATS1_CAV,"T_CATS1_CAV/s"); + RootOutput::getInstance()->GetTree()->Branch("T_MUVI_CATS1",&vT_MUVI_CATS1,"T_MUVI_CATS1/s"); + RootOutput::getInstance()->GetTree()->Branch("T_PL_CATS1",&vT_PL_CATS1,"T_PL_CATS1/s"); + RootOutput::getInstance()->GetTree()->Branch("T_PL_CATS2",&vT_PL_CATS2,"T_PL_CATS2/s"); + RootOutput::getInstance()->GetTree()->Branch("T_PL_CHIO",&vT_PL_CHIO,"T_PL_CHIO/s"); + RootOutput::getInstance()->GetTree()->Branch("T_PLchCATS1",&vT_PLchCATS1,"T_PLchCATS1/s"); +*/ } //////////////////////////////////////////////////////////////////////////////// void Analysis::InitInputBranch(){ - RootInput:: getInstance()->GetChain()->SetBranchStatus("InitialConditions",true ); - RootInput:: getInstance()->GetChain()->SetBranchStatus("fIC_*",true ); - RootInput:: getInstance()->GetChain()->SetBranchAddress("InitialConditions",&Initial); + /* RootInput:: getInstance()->GetChain()->SetBranchStatus("InitialConditions",true ); */ + /* RootInput:: getInstance()->GetChain()->SetBranchStatus("fIC_*",true ); */ + /* RootInput:: getInstance()->GetChain()->SetBranchStatus("InitialConditions",true ); */ + + RootInput:: getInstance()->GetChain()->SetBranchAddress("GATCONF",&vGATCONF); + /* RootInput:: getInstance()->GetChain()->SetBranchAddress("ADC_CHIO_V15",&vADC_CHIO_V15); + RootInput:: getInstance()->GetChain()->SetBranchAddress("ADC_VOIE_29",&vADC_VOIE_29); + RootInput:: getInstance()->GetChain()->SetBranchAddress("CHIO",&vCHIO); + RootInput:: getInstance()->GetChain()->SetBranchAddress("CONFDEC",&vCONFDEC); + RootInput:: getInstance()->GetChain()->SetBranchAddress("CONFDEC_AGAVA",&vCONFDEC_AGAVA); + RootInput:: getInstance()->GetChain()->SetBranchAddress("DATATRIG",&vDATATRIG); + RootInput:: getInstance()->GetChain()->SetBranchAddress("DATATRIG_CHIO",&vDATATRIG_CHIO); + RootInput:: getInstance()->GetChain()->SetBranchAddress("E1D6",&vE1D6); + RootInput:: getInstance()->GetChain()->SetBranchAddress("E2D6",&vE2D6); + RootInput:: getInstance()->GetChain()->SetBranchAddress("ED4",&vED4); + RootInput:: getInstance()->GetChain()->SetBranchAddress("EXL_HF",&vEXL_HF); + RootInput:: getInstance()->GetChain()->SetBranchAddress("GALD4X",&vGALD4X); + RootInput:: getInstance()->GetChain()->SetBranchAddress("GALD4Y",&vGALD4Y); + RootInput:: getInstance()->GetChain()->SetBranchAddress("QCaviar",&vQCaviar); + RootInput:: getInstance()->GetChain()->SetBranchAddress("QPlast",&vQPlast); + RootInput:: getInstance()->GetChain()->SetBranchAddress("TCAVHF",&vTCAVHF); + RootInput:: getInstance()->GetChain()->SetBranchAddress("TE1D6CAV",&vTE1D6CAV); + RootInput:: getInstance()->GetChain()->SetBranchAddress("TE1D6GAL",&vTE1D6GAL); + RootInput:: getInstance()->GetChain()->SetBranchAddress("TE1D6HF",&vTE1D6HF); + RootInput:: getInstance()->GetChain()->SetBranchAddress("TED4HF",&vTED4HF); + RootInput:: getInstance()->GetChain()->SetBranchAddress("TGALD4HF",&vTGALD4HF); + RootInput:: getInstance()->GetChain()->SetBranchAddress("T_CATS1_2",&vT_CATS1_2); + RootInput:: getInstance()->GetChain()->SetBranchAddress("T_CATS1_CAV",&vT_CATS1_CAV); + RootInput:: getInstance()->GetChain()->SetBranchAddress("T_MUVI_CATS1",&vT_MUVI_CATS1); + RootInput:: getInstance()->GetChain()->SetBranchAddress("T_PL_CATS1",&vT_PL_CATS1); + RootInput:: getInstance()->GetChain()->SetBranchAddress("T_PL_CATS2",&vT_PL_CATS2); + RootInput:: getInstance()->GetChain()->SetBranchAddress("T_PL_CHIO",&vT_PL_CHIO); + RootInput:: getInstance()->GetChain()->SetBranchAddress("T_PLchCATS1",&vT_PLchCATS1); +*/ } //////////////////////////////////////////////////////////////////////////////// @@ -196,6 +273,9 @@ void Analysis::ReInitValue(){ ThetaCM = -1000; OriginalThetaLab = -1000; OriginalELab = -1000; + TimeCorr=-1000; + BeamLength=-1000; + ParticleLength=-1000; } //////////////////////////////////////////////////////////////////////////////// diff --git a/Projects/e748/Analysis.h b/Projects/e748/Analysis.h index 8e3cc283c4cbf8bb1ced7d115b1db8bef10af010..c614c7ae4ce79b8ba8ee573c5ee273d4305e32d5 100644 --- a/Projects/e748/Analysis.h +++ b/Projects/e748/Analysis.h @@ -23,7 +23,8 @@ *****************************************************************************/ #include"NPVAnalysis.h" #include "TMust2Physics.h" -#include "TInitialConditions.h" +#include "TCATSPhysics.h" + #include "TInitialConditions.h" #include "NPEnergyLoss.h" #include "NPReaction.h" #include "TRandom3.h" @@ -63,6 +64,9 @@ class Analysis: public NPL::VAnalysis{ double Si_X_M2; double Si_Y_M2; double ZTarget; + double TimeCorr; + double BeamLength; + double ParticleLength; double TargetThickness; double OriginalThetaLab; double OriginalELab; @@ -72,6 +76,39 @@ class Analysis: public NPL::VAnalysis{ NPL::EnergyLoss Li11CD2 ; TMust2Physics* M2; - TInitialConditions* Initial; + TCATSPhysics* CATS; + TInitialConditions* Initial; + //other variables + Short_t vADC_CHIO_V15; + Short_t vADC_VOIE_29; + Short_t vCHIO; + Short_t vCONFDEC; + Short_t vCONFDEC_AGAVA; + Short_t vDATATRIG; + Short_t vDATATRIG_CHIO; + Short_t vE1D6; + Short_t vE2D6; + Short_t vED4; + Short_t vEXL_HF; + Short_t vGALD4X; + Short_t vGALD4Y; + Short_t vGATCONF; + Short_t vQCaviar; + Short_t vQPlast; + Short_t vTCAVHF; + Short_t vTE1D6CAV; + Short_t vTE1D6GAL; + Short_t vTE1D6HF; + Short_t vTED4HF; + Short_t vTGALD4HF; + Short_t vT_CATS1_2; + Short_t vT_CATS1_CAV; + Short_t vT_MUVI_CATS1; + Short_t vT_PL_CATS1; + Short_t vT_PL_CATS2; + Short_t vT_PL_CHIO; + Short_t vT_PLchCATS1; + + }; #endif diff --git a/Projects/e748/Calibration/Energy/EnergyCalibrator.h b/Projects/e748/Calibration/Energy/EnergyCalibrator.h index 61e2468559ec16bf88a47fdc6ff7b0218ed3a18d..b12bbba060f1ae9c564ee363bb77857982865df7 100644 --- a/Projects/e748/Calibration/Energy/EnergyCalibrator.h +++ b/Projects/e748/Calibration/Energy/EnergyCalibrator.h @@ -37,14 +37,14 @@ EnergyLoss EL_Al("./EnergyLossTable/alpha_Al.G4table" , "G4Table", 100) ; EnergyLoss EL_Si("./EnergyLossTable/alpha_Si.G4table" , "G4Table", 100) ; // Information about the calibration condition (use Latex marks-up) -const TString xy = "X" ; +const TString xy = "Y" ; const TString Experiment = "E748"; const TString Run_Period = "june 2017"; const TString Operator = "Freddy and the girls"; const TString Source = "3 alpha peaks $^{239}$Pu, $^{241}$Am, $^{244}$Cm"; -const TString Comment = "Source at 0$^{\\circ}$ facing Telescope 1,2,3,4"; -const char* frun = "run11"; +const TString Comment = "Source at 0$^{\\circ}$ facing Telescope 1-4"; +const char* frun = "run_0019"; //const TString Experiment = "RIBF57"; //const TString Run_Period = "April 2010, Riken BigRIPS, Run 3"; diff --git a/Projects/e748/Calibration/Energy/ExtractRawHisto_E.C b/Projects/e748/Calibration/Energy/ExtractRawHisto_E.C index d5eae414f8748c2ff12e3353ff455ffda5f7248d..29d419a57ea364a41dc422ea959b4d7dd03326e1 100644 --- a/Projects/e748/Calibration/Energy/ExtractRawHisto_E.C +++ b/Projects/e748/Calibration/Energy/ExtractRawHisto_E.C @@ -23,7 +23,7 @@ #define NBSTRIPS 128 #define NBSILI 16 -void ExtractMust2Histos(const char* fname = "run11") +void ExtractMust2Histos(const char* fname = "run_0019") { RootInput* Input = RootInput::getInstance("RunToTreat.txt"); @@ -45,6 +45,7 @@ void ExtractMust2Histos(const char* fname = "run11") // prepare output histograms for Must2 TH1F* hStripXEnergy[NBTELESCOPE][NBSTRIPS]; TH1F* hStripYEnergy[NBTELESCOPE][NBSTRIPS]; + //from i=4 because I wanted only the T5,T8 for (Int_t i = 0; i < NBTELESCOPE; i++) { for (Int_t j = 0; j < NBSTRIPS; j++) { // strips XE diff --git a/Projects/e748/Calibration/Energy/RunToTreat.txt b/Projects/e748/Calibration/Energy/RunToTreat.txt index 5d23f161d921d4514a97e5e289301d028f7fd53f..47ef51cc0410d896f04dc016500bd596a1ed175e 100644 --- a/Projects/e748/Calibration/Energy/RunToTreat.txt +++ b/Projects/e748/Calibration/Energy/RunToTreat.txt @@ -2,5 +2,18 @@ TTreeName AutoTree RootFileName -/home/muvi/e748/nptool/Projects/e748/offline/run11.root - +/data/e748X/e748/acquisition/root/run_0019_0.root +/data/e748X/e748/acquisition/root/run_0019_1.root +/data/e748X/e748/acquisition/root/run_0019_2.root +/data/e748X/e748/acquisition/root/run_0019_3.root +/data/e748X/e748/acquisition/root/run_0019_4.root +/data/e748X/e748/acquisition/root/run_0019_5.root +/data/e748X/e748/acquisition/root/run_0019_6.root +/data/e748X/e748/acquisition/root/run_0019_7.root +/data/e748X/e748/acquisition/root/run_0019_8.root +/data/e748X/e748/acquisition/root/run_0019_9.root +/data/e748X/e748/acquisition/root/run_0019_10.root +/data/e748X/e748/acquisition/root/run_0019_11.root +/data/e748X/e748/acquisition/root/run_0019_12.root +/data/e748X/e748/acquisition/root/run_0019_13.root +/data/e748X/e748/acquisition/root/run_0019_14.root diff --git a/Projects/e748/configs/ConfigMust2.dat b/Projects/e748/configs/ConfigMust2.dat old mode 100755 new mode 100644 index 04da937f1fb77a776e758a69eb46ad01ab0ad167..247888b9066a495290646e88bdb2f6ae7c65bd4c --- a/Projects/e748/configs/ConfigMust2.dat +++ b/Projects/e748/configs/ConfigMust2.dat @@ -1,15 +1,74 @@ ConfigMust2 - MAX_STRIP_MULTIPLICITY 10 - STRIP_ENERGY_MATCHING_NUMBER_OF_SIGMA 5 - STRIP_ENERGY_MATCHING_SIGMA 0.02 - DISABLE_CHANNEL MM1STRY12 - DISABLE_CHANNEL MM2STRY12 - DISABLE_CHANNEL MM3STRY12 - DISABLE_CHANNEL MM4STRY12 - DISABLE_CHANNEL MM1STRX12 + MAX_STRIP_MULTIPLICITY 100 + STRIP_ENERGY_MATCHING_NUMBER_OF_SIGMA 50 + STRIP_ENERGY_MATCHING_SIGMA 0.05 + DISABLE_CHANNEL MM1STRX12 DISABLE_CHANNEL MM2STRX12 DISABLE_CHANNEL MM3STRX12 DISABLE_CHANNEL MM4STRX12 - SI_X_E_RAW_THRESHOLD 8192 - CSI_E_RAW_THRESHOLD 0 - CSI_SIZE 256 + + DISABLE_CHANNEL MM1STRY121 + DISABLE_CHANNEL MM1STRY122 + DISABLE_CHANNEL MM1STRY125 + DISABLE_CHANNEL MM1STRY126 + DISABLE_CHANNEL MM1STRY128 + + DISABLE_CHANNEL MM1STRX44 + DISABLE_CHANNEL MM1STRX120 + + DISABLE_CHANNEL MM2STRX1 + DISABLE_CHANNEL MM2STRX2 + DISABLE_CHANNEL MM2STRX3 + DISABLE_CHANNEL MM2STRX4 + DISABLE_CHANNEL MM2STRX5 + DISABLE_CHANNEL MM2STRX6 + DISABLE_CHANNEL MM2STRX7 + DISABLE_CHANNEL MM2STRX8 + DISABLE_CHANNEL MM2STRX9 + DISABLE_CHANNEL MM2STRX10 + DISABLE_CHANNEL MM2STRX11 + DISABLE_CHANNEL MM2STRX12 + DISABLE_CHANNEL MM2STRX128 + + DISABLE_CHANNEL MM2STRY1 + DISABLE_CHANNEL MM2STRY107 + DISABLE_CHANNEL MM2STRY108 + DISABLE_CHANNEL MM2STRY109 + DISABLE_CHANNEL MM2STRY128 + + DISABLE_CHANNEL MM3STRX1 + DISABLE_CHANNEL MM3STRX128 + DISABLE_CHANNEL MM3STRY128 + DISABLE_CHANNEL MM3STRY1 + + DISABLE_CHANNEL MM4STRX1 + DISABLE_CHANNEL MM4STRY90 + DISABLE_CHANNEL MM4STRY91 + DISABLE_CHANNEL MM4STRY92 + DISABLE_CHANNEL MM4STRY93 + DISABLE_CHANNEL MM4STRY94 + DISABLE_CHANNEL MM4STRY95 + DISABLE_CHANNEL MM4STRY121 + DISABLE_CHANNEL MM4STRY122 + DISABLE_CHANNEL MM4STRY123 + DISABLE_CHANNEL MM4STRY124 + DISABLE_CHANNEL MM4STRY125 + DISABLE_CHANNEL MM4STRY126 + DISABLE_CHANNEL MM4STRY127 + DISABLE_CHANNEL MM4STRY128 + DISABLE_CHANNEL MM4STRY59 + DISABLE_CHANNEL MM4STRY60 + DISABLE_CHANNEL MM4STRY61 + DISABLE_CHANNEL MM4STRY62 + DISABLE_CHANNEL MM4STRY63 + DISABLE_CHANNEL MM4STRY64 + DISABLE_CHANNEL MM4STRY65 + DISABLE_CHANNEL MM4STRY66 + DISABLE_CHANNEL MM4STRY67 + + SI_X_E_RAW_THRESHOLD 8270 + SI_Y_E_RAW_THRESHOLD 8120 + CSI_E_RAW_THRESHOLD 8250 + CSI_SIZE 40 + TAKE_T_Y + TAKE_E_Y diff --git a/Projects/e748/e748.detector b/Projects/e748/e748.detector old mode 100755 new mode 100644 index b1a7abf2acc1cd8a4753d295636c9032538717ac..302a7fe4f7ac6751f3ca066a0e30103a20055f31 --- a/Projects/e748/e748.detector +++ b/Projects/e748/e748.detector @@ -1,102 +1,123 @@ -%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%% Target - THICKNESS= 3.2 micrometer - ANGLE= 20 deg - RADIUS= 24 mm + THICKNESS= 23.5 micrometer + ANGLE= 0 deg + RADIUS= 25 mm MATERIAL= CD2 X= 0 mm Y= 0 mm Z= 0 mm -%%%%%%% Telescope 1 = mechanics2.pdf no1 with y<>z %%%%%%% -M2Telescope - X1_Y1= 13.38 102.64 146.39 mm - X1_Y128= 25.14 10.62 175.69 mm - X128_Y1= 103.73 102.64 110.42 mm - X128_Y128= 115.54 10.70 139.68 mm - SI= 1 - SILI= 0 - CSI= 1 - VIS= all - -%%%%%%% Telescope 2 = mechanics2.pdf no2 with y<>z %%%%%%% -M2Telescope - X1_Y1= -114.11 10.23 138.88 mm - X1_Y128= -23.89 10.34 175.22 mm - X128_Y1= -102.56 102.33 109.73 mm - X128_Y128= -12.33 102.47 146.06 mm - SI= 1 - SILI= 0 - CSI= 1 - VIS= all - -%%%%%%% Telescope 3 = mechanics2.pdf no3 with y<>z & -x %%%%%%% -M2Telescope - X1_Y1= -12.42 -103.75 146.62 mm - X1_Y128= -24.17 -11.63 175.45 mm - X128_Y1= -102.70 -103.88 110.29 mm - X128_Y128= -114.44 -11.78 139.11 mm - SI= 1 - SILI= 0 - CSI= 1 - VIS= all - -%%%%%%% Telescope 4 = mechanics2.pdf no4 with y<>z %%%%%%% -M2Telescope - X1_Y1= 115.22 -11.58 139.29 mm - X1_Y128= 24.87 -11.54 175.28 mm - X128_Y1= 103.79 -103.89 110.54 mm - X128_Y128= 13.44 -103.84 146.53 mm - SI= 1 - SILI= 0 - CSI= 1 - VIS= all - -%%%%%%% Telescope 5 = mechanics2.pdf no7 with y<>z & -x %%%%%%% -M2Telescope - X1_Y1= 173.26 -2.56 -65.31 mm - X1_Y128= 116.26 -3.01 -144.1 mm - X128_Y1= 149.29 90.19 -48.48 mm - X128_Y128= 92.28 89.75 -127.29 mm - SI= 1 - SILI= 1 - CSI= 0 - VIS= all - -%%%%%%% Telescope 6 = mechanics2.pdf no5 with y<>z %%%%%%% -M2Telescope - X1_Y1= -139.15 108.71 -35.67 mm - X128_Y1= -130.34 108.76 61.22 mm - X1_Y128= -181.05 20.86 -31.71 mm - X128_Y128= -172.23 20.92 65.41 mm - SI= 1 - SILI= 0 - CSI= 1 - VIS= all - -%%%%%%% Telescope 7 = mechanics2.pdf no6 with y<>z & -x %%%%%%% -M2Telescope - X1_Y1= -174.31 1.39 65.07 mm - X128_Y1= -145.33 -91.15 62.71 mm - X1_Y128= -182.91 1.17 -32.05 mm - X128_Y128= -153.93 -91.63 -34.41 mm - SI= 1 - SILI= 0 - CSI= 1 - VIS= all - -%%%%%%% Telescope 8 = mechanics2.pdf no8 with y<>z & -x %%%%%%% -M2Telescope - X1_Y1= 80.72 -109.73 -118.89 mm - X128_Y1= 138.0 -109.34 -40.61 mm - X1_Y128= 114.34 -21.77 -143.95 mm - X128_Y128= 171.66 -21.34 -65.46 mm - SI= 1 - SILI= 1 - CSI= 0 - VIS= all +%%%%%%%%%%%%%%%%%%%%% +% T1 +M2Telescope + X128_Y128= -12.2 104.3 146.4 mm + X128_Y1= -102.5 104.4 110.3 mm + X1_Y1= -114.3 12.4 139.4 mm + X1_Y128= -24. 12.2 175.6 mm + SI= 1 + SILI= 0 + CSI= 1 + VIS= all + +% T2 +M2Telescope + X128_Y128= -114.5 -10.3 139.3 + X128_Y1= -103.2 -102.7 110.7 + X1_Y1= -12.9 -102.9 146.9 + X1_Y128= -24.3 -10.5 175.5 + SI= 1 + SILI= 0 + CSI= 1 + VIS= all + +% T3 +M2Telescope + X128_Y128= 13.3 -103.4 146.2 + X128_Y1= 103.7 -103.5 110.3 + X1_Y1= 115.2 -11.3 139.0 + X1_Y128= 24.8 -11.1 174.9 + SI= 1 + SILI= 0 + CSI= 1 + VIS= all + +% T4 +M2Telescope + X128_Y128= 115.2 10.9 139.6 + X128_Y1= 103.8 103.2 110.3 + X1_Y1= 13.7 103.5 146.3 + X1_Y128= 25.1 11.2 175.6 + SI= 1 + SILI= 0 + CSI= 1 + VIS= all + +% T5 +M2Telescope + X128_Y128= 170.8 -20.9 -65.4 + X128_Y1= 137.1 -108.6 -40.4 + X1_Y1= 79.8 -109.1 -118.9 + X1_Y128= 113.4 -21.3 -143.9 + SI= 1 + SILI= 1 + CSI= 0 + VIS= all + +% T6 +M2Telescope + X128_Y128= -154.5 -91.7 -34.0 + X128_Y1= -145.8 -91.3 62.8 + X1_Y1= -173.8 1.9 65.0 + X1_Y128= -182.6 1.5 -31.9 + SI= 1 + SILI= 0 + CSI= 1 + VIS= all + + +% T7 +M2Telescope + X128_Y128= -172.6 21.7 65.7 + X128_Y1= -130.3 109.4 61.4 + X1_Y1= -139.3 108.9 -35.2 + X1_Y128= -181.6 21.2 -30.9 + SI= 1 + SILI= 0 + CSI= 1 + VIS= all + + +% T8 +M2Telescope + X128_Y128= 91.4 91.2 -127.4 + X128_Y1= 148.6 91.0 -48.6 + X1_Y1= 171.8 -2.0 -65.8 + X1_Y128= 114.6 -1.8 -144.5 + SI= 1 + SILI= 0 + CSI= 1 + VIS= all + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%Chio -% Pos= -30. -30. 600. mm +CATSDetector + X1_Y1= -35.86 -34.76 -1457 mm + X28_Y1= 35.26 -34.76 -1457 mm + X1_Y28= -35.86 36.36 -1457 mm + X28_Y28= 35.26 36.36 -1457 mm +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +CATSDetector + X1_Y1= 34.86 -35.36 -949 mm + X28_Y1= -36.26 -35.36 -949 mm + X1_Y28= 34.66 35.76 -949 mm + X28_Y28= -36.26 35.76 -949 mm +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +Chio_dig + Pos= -30. -30. 600. mm + +Chio_an + Pos= -30. -30. 600. mm + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %ScintillatorPlastic @@ -114,14 +135,11 @@ M2Telescope Scintillator= BC400 LeadThickness= 0 mm -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%EXL -% !!! Position values are for test only %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EXL POS= -20 30 -20 cm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - +ModularLeaf + DefaultValue= -1000 + Leafs= T_CATS1_CAV T_CATS1_2 T_MUVI_CATS1 T_PL_CATS2 EXL_HF T_PL_CHIO T_PL_CATS1 diff --git a/Projects/e748/offline/GUser.cxx b/Projects/e748/offline/GUser.cxx index 0b78de4b1d4276c41b32cdbb76fca7511e8073a3..d6859cdfe5537834c8f90bb5f3db521c0d31d02c 100644 --- a/Projects/e748/offline/GUser.cxx +++ b/Projects/e748/offline/GUser.cxx @@ -31,8 +31,8 @@ using namespace std; ClassImp (GUser); GUser::GUser (GDevice* DevIn, GDevice* DevOut):GAcq(DevIn,DevOut){ - NPOptionManager::getInstance()->Destroy(); - NPOptionManager* myOptionManager = NPOptionManager::getInstance("-D ../e748.detector -GH -C calibration.txt "); +NPOptionManager::getInstance()->Destroy(); + NPOptionManager* myOptionManager = NPOptionManager::getInstance("-D ../e748.detector -C calibration.txt "); // Constructor/initialisator of Acquisition object // @@ -60,11 +60,11 @@ GUser::GUser (GDevice* DevIn, GDevice* DevOut):GAcq(DevIn,DevOut){ m_G2RDetectorManager->AddDetector(det[i]); } - // Set the Raw Data poiinter + // Set the Raw Data pointer m_G2RDetectorManager->SetRawDataPointer(m_NPDetectorManager); // Register spectra to GRU - vector < map < string, TH1* > > mySpectra = m_NPDetectorManager->GetSpectra(); +/* vector < map < string, TH1* > > mySpectra = m_NPDetectorManager->GetSpectra(); for (unsigned int i = 0; i < mySpectra.size(); ++i) { // loop on mySpectra map<string, TH1*>::iterator it; for (it = mySpectra[i].begin(); it != mySpectra[i].end(); ++it) { // loop on map @@ -72,7 +72,7 @@ GUser::GUser (GDevice* DevIn, GDevice* DevOut):GAcq(DevIn,DevOut){ GetSpectra()->AddSpectrum(it->second, family.c_str()); } } - +*/ // if(myOptionManager->GetOnline()){ // Request Detector manager to give the Spectra to the server // m_NPDetectorManager->SetSpectraServer(); @@ -92,40 +92,54 @@ GUser::~GUser() { //______________________________________________________________ void GUser::InitUser(){ - // Initialisation for global user treatement - // In this method , we can make histograms (prevously declared in GUser.h) - // Ex : in GUser.h we have declared TH1I *fMyHisto ; - // in this methode we make it fHisto = new TH1I ("MyHisto","MyHisto",1024,0,1024); - // we can include it in database GetSpectra()->AddSpectrum(fMyHisto,"MyFamily"); + m_G2RDetectorManager->Init(GetEvent()->GetDataParameters()); } //______________________________________________________________ void GUser::InitUserRun(){ // Initialisation for user treatemeant for each run // For specific user treatement - m_G2RDetectorManager->Init(GetEvent()->GetDataParameters()); -} + } //______________________________________________________________ void GUser::User(){ static unsigned int count = 0; count++; + m_NPShiftedTree->Fill(); // Clear Data from previous event m_G2RDetectorManager->Clear(); // Loop on new Data + // AGAVA + m_AGAVA_LTS = 0; + UShort_t AGAVA_U = 0; + UShort_t AGAVA_M = 0; + UShort_t AGAVA_L = 0; + int size = GetEventArrayLabelValueSize()/2; for (Int_t i = 0; i < size; i++) { - if (m_G2RDetectorManager->Is(GetEventArrayLabelValue_Label(i),GetEventArrayLabelValue_Value(i))) { - cout << GetEventArrayLabelValue_Label(i) << " " << GetEventArrayLabelValue_Value(i) << endl; + UShort_t Data = GetEventArrayLabelValue_Value(i); + UShort_t Label = GetEventArrayLabelValue_Label(i); + if (m_G2RDetectorManager->Is(Label, Data)) { + cout << Label << " " << Data << endl; m_G2RDetectorManager->Treat(); } + + if (Label==9003) AGAVA_U = Data; + if (Label==9004) AGAVA_M = Data; + if (Label==9005) AGAVA_L = Data; } - + m_AGAVA_LTS = ((ULong64_t) AGAVA_U << 32); + m_AGAVA_LTS += ((ULong64_t) AGAVA_M << 16); + m_AGAVA_LTS += ((ULong64_t) AGAVA_L); + //cout << AGAVA_U << "\t" << AGAVA_M << "\t" << AGAVA_L << "\t" << m_AGAVA_LTS << endl; + // Do nptool analysis - m_NPDetectorManager->BuildPhysicalEvent(); + //m_NPDetectorManager->BuildPhysicalEvent(); // if(count%1000==0) // m_NPDetectorManager->CheckSpectraServer(); + + //cout << "GATCONF:" << m_G2RDetectorManager->GetModularLabelValue("GATCONF") << endl; // Fill the nptool tree //m_NPTree->Fill(); } @@ -134,11 +148,13 @@ count++; //______________________________________________________________ void GUser::EndUserRun(){ + // end of run , executed a end of each run #if __cplusplus > 199711L m_NPDetectorManager->StopThread(); #endif + m_NPShiftedTree->Write(); } //______________________________________________________________ @@ -147,12 +163,21 @@ void GUser::EndUser(){ if(NPOptionManager::getInstance()->GetGenerateHistoOption()) m_NPDetectorManager->WriteSpectra(); + // Write the Physics tree RootOutput::Destroy(); - } //_______________________________________________________________ void GUser::InitTTreeUser(){ m_G2RDetectorManager->InitBranch(fTheTree); + +// gDirectory->cd(fTheTree->GetDirectory()->GetPath()); + m_NPShiftedTree = new TTree("ShiftedTree", "ShiftedTree"); + m_NPShiftedTree->SetDirectory(0); + m_NPShiftedTree->SetDirectory(fTheTree->GetDirectory()); + m_G2RDetectorManager->InitBranch(m_NPShiftedTree); + + // AGAVA + GetTree()->Branch("AGAVA_LTS", &m_AGAVA_LTS, "AGAVA_LTS/l"); } diff --git a/Projects/e748/offline/GUser.h b/Projects/e748/offline/GUser.h index f00a6fa6c5e56fc8b97747d7ae7575a468abe80c..adddff2a4b63ff004bd1f143027eae42ce76cb41 100644 --- a/Projects/e748/offline/GUser.h +++ b/Projects/e748/offline/GUser.h @@ -57,11 +57,13 @@ class GUser : public GAcq{ #ifndef __MAKECINT__ private: // NPTool NPL::DetectorManager* m_NPDetectorManager; - TTree* m_NPTree; + TTree* m_NPShiftedTree; private: // Ganil2Root G2R::DetectorManager* m_G2RDetectorManager; #endif + private: // AGAVA + ULong64_t m_AGAVA_LTS; }; #endif diff --git a/Projects/e748/offline/Makefile b/Projects/e748/offline/Makefile index 51332d69bd2dedb2794bd58ed613b7b86e2719b1..55a8799daaf1f07f47fc96267510f58f4b68a617 100644 --- a/Projects/e748/offline/Makefile +++ b/Projects/e748/offline/Makefile @@ -1,46 +1,50 @@ - # This Makefile shows nicely how to compile and link applications - CLASSNAME := GUser - GUSERDIR := ./ - G2RINC := $(GANIL2ROOT)/include/ - G2RLIB := $(GANIL2ROOT)/lib/ - LIBDIR := $(GRUDIR)/lib/ - VIGRUDIR := $(GRUDIR)/vigru/ - GTDIR := $(GRUDIR)/GTape/ - GGRUDIR := $(GRUDIR)/GGRU/ - GSOAPDIR := $(GRUDIR)/gsoap/ - MFM_DIR := $(GRUDIR)/MFMlib/ - GRUFLAGS := -I$(GRUDIR)/include/ -I$(LIBDIR) -I$(VIGRUDIR) -I$(GTDIR) -I$(GGRUDIR) -I$(GSOAPDIR) -I$(MFM_DIR) -I$(G2RINC) -I$(NPTOOL)/NPLib/include/ - INCLIST := General.h GAcq.h GDevice.h - # Extensions des fichiers - ObjSuf = o - SrcSuf = cxx - ExeSuf = - DllSuf = so - OutPutOpt = -o - # Compilateur et options - CXX = g++ - CXXFLAGS = -O -Wall -fPIC - LD = g++ - LDFLAGS = -O - SOFLAGS = -shared - # Options de ROOT - ROOTCFLAGS := $(shell root-config --cflags) -I$(ROOTSYS)/xmlparser/inc -I$(ROOTSYS)/io/xmlparser/inc - ROOTLIBS := $(shell root-config --libs) -lHtml -lSpectrum - ROOTGLIBS := $(shell root-config --glibs) - CXXFLAGS += $(ROOTCFLAGS) $(GRUFLAGS) - LIBS = $(ROOTLIBS) $(SYSLIBS) - GLIBS = $(ROOTGLIBS) $(SYSLIBS) - #------------------------------------------------------------------------------ - SHARELIB = $(CLASSNAME).so - all: $(SHARELIB) - #------------------------------------------------------------------------------ +# This Makefile shows nicely how to compile and link applications +CLASSNAME := GUser +GUSERDIR := ./ +G2RINC := $(GANIL2ROOT)/include/ +G2RLIB := $(GANIL2ROOT)/lib/ +LIBDIR := $(GRUDIR)/lib/ +VIGRUDIR := $(GRUDIR)/vigru/ +GTDIR := $(GRUDIR)/GTape/ +GGRUDIR := $(GRUDIR)/GGRU/ +GSOAPDIR := $(GRUDIR)/gsoap/ +MFM_DIR := $(GRUDIR)/MFMlib/ +GRUFLAGS := -I$(GRUDIR)/include/ -I$(LIBDIR) -I$(VIGRUDIR) -I$(GTDIR) -I$(GGRUDIR) -I$(GSOAPDIR) -I$(MFM_DIR) -I$(G2RINC) -I$(NPTOOL)/NPLib/include/ +INCLIST := General.h GAcq.h GDevice.h +# Extensions des fichiers +ObjSuf = o +SrcSuf = cxx +ExeSuf = +DllSuf = so +OutPutOpt = -o +# Compilateur et options +CXX = g++ +CXXFLAGS = -O -Wall -fPIC +LD = g++ +LDFLAGS = -O -L$(LIBDIR) -lGRU -L./ -lGUser -L$(GANIL2ROOT)/lib -lG2RCore -L$(NPTOOL)/NPLib/lib -lNPCore +SOFLAGS = -shared +# Options de ROOT +ROOTCFLAGS := $(shell root-config --cflags) -I$(ROOTSYS)/xmlparser/inc -I$(ROOTSYS)/io/xmlparser/inc +ROOTLIBS := $(shell root-config --libs) -lHtml -lSpectrum +ROOTGLIBS := $(shell root-config --glibs) +CXXFLAGS += $(ROOTCFLAGS) $(GRUFLAGS) +LIBS = $(ROOTLIBS) $(SYSLIBS) +GLIBS = $(ROOTGLIBS) $(SYSLIBS) +#------------------------------------------------------------------------------ +SHARELIB = lib$(CLASSNAME).so +all: $(SHARELIB) Offline Offline_check libGUser.so +#------------------------------------------------------------------------------ - $(CLASSNAME).so:$(CLASSNAME)Dict.o $(CLASSNAME).o +lib$(CLASSNAME).so: $(CLASSNAME)Dict.o $(CLASSNAME).o $(LD) $(SOFLAGS) $^ $(OutPutOpt) $@ - $(CLASSNAME)Dict.cxx: $(CLASSNAME).h +$(CLASSNAME)Dict.cxx: $(CLASSNAME).h @echo "Generating dictionary $@..." rootcint -f $@ -c -p $(GRUFLAGS) $^ $(CLASSNAME)LinkDef.h - +Offline: Offline.cxx libGUser.so + $(CXX) $(CXXFLAGS) $(LDFLAGS) Offline.cxx -o Offline +Offline_check: Offline_check.cxx libGUser.so + $(CXX) $(CXXFLAGS) $(LDFLAGS) Offline_check.cxx -o Offline_check + clean: @rm -f core *~ *.o *Dict* diff --git a/Projects/e748/offline/Offline.cxx b/Projects/e748/offline/Offline.cxx index 5d693009120e4633ae8277ac6d1897db6b25c75c..d2675f005e0b77eabc1397af187cc70d6a9d250a 100644 --- a/Projects/e748/offline/Offline.cxx +++ b/Projects/e748/offline/Offline.cxx @@ -1,26 +1,61 @@ -void Offline(){ - gROOT->Reset(); - char command[100]; - gROOT->ProcessLine(command); - gSystem->Load("GUser.so"); //load and compile GUser class - GTape *file = new GTape("/data/muviX/must2/acquisition/run/run_0011.dat.16-06-17_01h18m04s"); - //GTape *file = new GTape("/data/muviX/must2/acquisition/run/run_0008.dat.15-06-17_19h23m54s"); - - file->Open(); - GUser * a= new GUser(file); // creat user treatement environement - //GNetServerRoot *serv = new GNetServerRoot(9094, a); - a->EventInit("exl"); // even initialisation - //a->SetSpectraMode(1); // Declare all raw parameters as histograms - a->SetSpectraMode(0); - a->SetTTreeMode(3, "./run11.root"); - a->InitUser(); - //serv->StartServer(); - file->Rewind(); - a->DoRun(); // a->DoRun(2000); do treaments on 2000 first events ( 0 = all); - a->EndUser(); // must be explicitly called , if it needs - a->SpeSave("histo.root"); // save all declared histogram - delete (a); // finish - gROOT->ProcessLine(".q"); +/***************************************************************************** + * Original Author: V. Girard-Alcindor * + * contact address: girardalcindor@ganil.fr * + * * + * Creation Date : June 2017 * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * This programm convert a GANIL run into a root file readable by NpTool * + *---------------------------------------------------------------------------* + * Comment: * + * If you want to convert multiple run you should use the run_analysis.sh * + * script you will find in this folder * + * * + *****************************************************************************/ + +#include <iostream> +#include "GTape.h" +#include "GUser.h" +#include "General.h" +using namespace std; + +int main(int argc, char * argv[]){ + + std::string run, output_run; + if(argc!=1){ + run=argv[1]; // Run name + output_run=argv[2]; // Output run.root + } + + cout << " * Looking for Run " << run << endl ; + + GTape *file = new GTape(run.c_str()); + /// analyse + /// Open + file->Open(); + GUser * a= new GUser(file); // creat user treatement environement + //GNetServerRoot *serv = new GNetServerRoot(9094, a); + //a->EventInit("must2"); // even initialisation + a->EventInit("e748"); // even initialisation + /// set tree mode and name + //a->SetSpectraMode(1); // Declare all raw parameters as histograms + a->SetSpectraMode(0); + + a->SetTTreeMode((TTreeMode)3, output_run.c_str()); + /// work the data + a->InitUser(); + //serv->StartServer(); + file->Rewind(); + a->DoRun(); + //a->DoRun(2000); //do treaments on 2000 first events ( 0 = all); + /// wrap-up and save spectra with a specific name + a->EndUser(); // must be explicitly called , if it needs + /* a->SpeSave(histName); // save all declared histogram */ + // delete Guser object + delete (a); // finish + + return 0; } diff --git a/Projects/e748/online/GUser.cxx b/Projects/e748/online/GUser.cxx index f7e1166b416641f731c2ac8d60426130f3d82854..a5d542958655ad80fc8dd816b3a5afdf1777d754 100644 --- a/Projects/e748/online/GUser.cxx +++ b/Projects/e748/online/GUser.cxx @@ -79,7 +79,6 @@ GUser::GUser (GDevice* DevIn, GDevice* DevOut):GAcq(DevIn,DevOut){ // } - } //_____________________________________________________________________________ @@ -92,19 +91,30 @@ GUser::~GUser() { //______________________________________________________________ void GUser::InitUser(){ - // Initialisation for global user treatement - // In this method , we can make histograms (prevously declared in GUser.h) - // Ex : in GUser.h we have declared TH1I *fMyHisto ; - // in this methode we make it fHisto = new TH1I ("MyHisto","MyHisto",1024,0,1024); - // we can include it in database GetSpectra()->AddSpectrum(fMyHisto,"MyFamily"); + m_G2RDetectorManager->Init(GetEvent()->GetDataParameters()); + // Add the modular label spectra + map<string, TH1S*>::iterator it; + map<string, TH1S*> MLS = m_G2RDetectorManager->GetModularLabelSpectra(); + for (it = MLS.begin(); it != MLS.end(); ++it) { // loop on map + string family = it->first.substr(0, it->first.find_last_of("/", string::npos)); + GetSpectra()->AddSpectrum(it->second, family.c_str()); + } + + h_TPLCATS1_corr = new TH2F("h_TPLCATS1_corr","h_TPLCATS1_corr",512,0,16384,512,0,16384); + h_TPLCATS1_corr->GetXaxis()->SetTitle("Time PL-CATS1 in VXI M2"); + h_TPLCATS1_corr->GetXaxis()->CenterTitle(); + h_TPLCATS1_corr->GetYaxis()->SetTitle("Time PL-CATS1 in VXI Chio"); + h_TPLCATS1_corr->GetYaxis()->CenterTitle(); + GetSpectra()->AddSpectrum(h_TPLCATS1_corr ,"ModularLabel"); + + } //______________________________________________________________ void GUser::InitUserRun(){ // Initialisation for user treatemeant for each run // For specific user treatement - m_G2RDetectorManager->Init(GetEvent()->GetDataParameters()); -} + } //______________________________________________________________ void GUser::User(){ @@ -125,6 +135,10 @@ count++; // if(count%1000==0) // m_NPDetectorManager->CheckSpectraServer(); + + h_TPLCATS1_corr->Fill(m_G2RDetectorManager->GetModularLabelValue("T_PL_CATS1"), + m_G2RDetectorManager->GetModularLabelValue("T_PLchCATS1")); + // Fill the nptool tree //m_NPTree->Fill(); } diff --git a/Projects/e748/online/GUser.h b/Projects/e748/online/GUser.h index f00a6fa6c5e56fc8b97747d7ae7575a468abe80c..e9ac4d9db27b6c49763d94dcc0aacf2554f96de0 100644 --- a/Projects/e748/online/GUser.h +++ b/Projects/e748/online/GUser.h @@ -53,6 +53,8 @@ class GUser : public GAcq{ virtual void EndUser(); virtual void InitTTreeUser(); ClassDef (GUser ,1); // User Treatment of Data + + TH2F* h_TPLCATS1_corr; #ifndef __MAKECINT__ private: // NPTool diff --git a/Projects/e748/online/Online.cxx b/Projects/e748/online/Online.cxx index cce6412d7ebac5710b1dc004c462a970f00d803e..32f9eb79a302d73f83622c35cf08833b6f8158a9 100644 --- a/Projects/e748/online/Online.cxx +++ b/Projects/e748/online/Online.cxx @@ -1,28 +1,27 @@ -void Online(){ +void Online(){ // specify good include dir! - gROOT->Reset(); + // gROOT->Reset(); - char command[100]; - gROOT->ProcessLine(command); - gSystem->Load("GUser.so"); //load and compile GUser class +// char command[100]; +// gROOT->ProcessLine(command); + gSystem->Load("/home/e748/analysis/ganil2root/lib/libG2RCore.so"); + gSystem->Load("./GUser.so"); //load GUser class - GNetClientNarval *net = new GNetClientNarval("ganp207"); // - net->SetPort(10202); + GNetClientNarval *net = new GNetClientNarval("ganp616"); + net->SetPort(10221); net->SetBufferSize(65536); - GUser * a= new GUser(net); // creat user treatement environement + GUser* a= new GUser(net); // creat user treatement environement GNetServerRoot *serv = new GNetServerRoot(9094, a); - a->EventInit("must2"); // even initialisation - //a->SetSpectraMode(1); // Declare all raw parameters as histograms + a->EventInit("e748"); // even initialisation + //a->SetSpectraMode(2); // Declare all raw parameters as histograms a->SetSpectraMode(0); a->InitUser(); serv->StartServer(); - a->DoRun(); // a->DoRun(2000); do treaments on 2000 first events ( 0 = all); - net->Close(); + a->DoRun(); // a->DoRun(2002); do treaments on 2000 first events ( 0 = all); + net->Close() a->EndUser(); // must be explicitly called , if it needs - a->SpeSave("histo.root"); // save all declared histogram + //a->SpeSave("histo.root"); // save all declared histogram delete (a); // finish gROOT->ProcessLine(".q"); } - -