diff --git a/Inputs/DetectorConfiguration/10cm.detector b/Inputs/DetectorConfiguration/10cm.detector deleted file mode 100644 index 7b1e6036fc0242b97f3a813785de0ea857afc27b..0000000000000000000000000000000000000000 --- a/Inputs/DetectorConfiguration/10cm.detector +++ /dev/null @@ -1,64 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -MUST2Array -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -M2Telescope - THETA= 18 - PHI= 0 - R= 210 - BETA= 0 -15 -0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -M2Telescope - THETA= -18 - PHI= -0 - R= 210 - BETA= 0 15 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -M2Telescope - THETA= 40 - PHI= 90 - R= 90 - BETA= 5 -0 -0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -M2Telescope - THETA= -40 - PHI= 90 - R= 90 - BETA= -5 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%M2Telescope - THETA= 0.01 - PHI= 0.01 - R= 320 - BETA= 0 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%M2Telescope - THETA= 75 - PHI= 0.01 - R= 90 - BETA= 0 20 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Inputs/DetectorConfiguration/12cm.detector b/Inputs/DetectorConfiguration/12cm.detector deleted file mode 100644 index 18605c6d520d7ab98d8c7d1b54a1883c253c86c5..0000000000000000000000000000000000000000 --- a/Inputs/DetectorConfiguration/12cm.detector +++ /dev/null @@ -1,107 +0,0 @@ -%Fichier de configuration manip E225 -%%%%%%%%%%%Target%%%%%%%%%%%%%%%%%%%1 -%Thickness in micrometer -%Radius in mm -%Temperature in K, Pressure in bar -%Material name according to the target library - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%GeneralTarget -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%CryoTarget - THICKNESS= 3000 - RADIUS= 45 - TEMPERATURE= 26 - PRESSURE= 1 - MATERIAL= D2 - WINDOWSTHICKNESS= 8 - WINDOWSMATERIAL= Mylar -%%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%% -%%Position and R given in mm -%%Angle given in degree -%%Option: 0,1 for Si SiLi and CSI -%%Option: all or sensible for VISualisation - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -MUST2Array -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 -M2Telescope - THETA= 35 - PHI= 43 - R= 130 - BETA= 0 -0 -0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 -M2Telescope - THETA= 35 - PHI= -43 - R= 130 - BETA= 0 -0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3 -M2Telescope - THETA= -32 - PHI= 42 - R= 150 - BETA= 0 0 -0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 -M2Telescope - THETA= -32 - PHI= -42 - R= 150 - BETA= 0 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 -%M2Telescope - THETA= 0 - PHI= 0 - R= 280 - BETA= 0 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%AddThinSi -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= 41 - PHI= 45 - R= 114 - BETA= 0 0 -8 - SIDE= right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= -41 - PHI= 45 - R= 114 - BETA= 0 0 -8 - SIDE= left -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= 41 - PHI= -45 - R= 114 - BETA= 0 0 8 - SIDE= right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= -41 - PHI= -45 - R= 114 - BETA= 0 0 8 - SIDE= left -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Inputs/DetectorConfiguration/15cm.detector b/Inputs/DetectorConfiguration/15cm.detector deleted file mode 100644 index 79eecdfb164b57878a781a58b3dd413798268328..0000000000000000000000000000000000000000 --- a/Inputs/DetectorConfiguration/15cm.detector +++ /dev/null @@ -1,107 +0,0 @@ -%Fichier de configuration manip E225 -%%%%%%%%%%%Target%%%%%%%%%%%%%%%%%%%1 -%Thickness in micrometer -%Radius in mm -%Temperature in K, Pressure in bar -%Material name according to the target library - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%GeneralTarget -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%CryoTarget - THICKNESS= 3000 - RADIUS= 45 - TEMPERATURE= 26 - PRESSURE= 1 - MATERIAL= D2 - WINDOWSTHICKNESS= 8 - WINDOWSMATERIAL= Mylar -%%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%% -%%Position and R given in mm -%%Angle given in degree -%%Option: 0,1 for Si SiLi and CSI -%%Option: all or sensible for VISualisation - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -MUST2Array -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 -M2Telescope - THETA= 33 - PHI= 41 - R= 150 - BETA= 0 -0 -0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 -M2Telescope - THETA= 33 - PHI= -41 - R= 150 - BETA= 0 -0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3 -M2Telescope - THETA= -33 - PHI= 41 - R= 150 - BETA= 0 0 -0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 -M2Telescope - THETA= -33 - PHI= -41 - R= 150 - BETA= 0 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 -%M2Telescope - THETA= 0 - PHI= 0 - R= 280 - BETA= 0 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -AddThinSi -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= 33 - PHI= 41 - R= 110 - BETA= 0 0 -0 - SIDE= right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= -33 - PHI= 41 - R= 110 - BETA= 0 0 -0 - SIDE= left -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= 33 - PHI= -41 - R= 110 - BETA= 0 0 0 - SIDE= right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= -33 - PHI= -41 - R= 110 - BETA= 0 0 0 - SIDE= left -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Inputs/DetectorConfiguration/17cm.detector b/Inputs/DetectorConfiguration/17cm.detector deleted file mode 100644 index 5dcc20fb2a175478c01bbf0de489d2c38b3250ba..0000000000000000000000000000000000000000 --- a/Inputs/DetectorConfiguration/17cm.detector +++ /dev/null @@ -1,118 +0,0 @@ -%Fichier de configuration manip E225 -%%%%%%%%%%%Target%%%%%%%%%%%%%%%%%%%1 -%Thickness in micrometer -%Radius in mm -%Temperature in K, Pressure in bar -%Material name according to the target library - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -GeneralTarget -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%Target - THICKNESS= 1 - RADIUS= 45 - MATERIAL= CD2 - X= 10 - Y= -10 - Z= 50 - -CryoTarget - THICKNESS= 3000 - RADIUS= 45 - TEMPERATURE= 26 - PRESSURE= 1 - MATERIAL= D2 - WINDOWSTHICKNESS= 15 - WINDOWSMATERIAL= Mylar - X= 0 - Y= 0 - Z= 0 -%%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%% -%%Position and R given in mm -%%Angle given in degree -%%Option: 0,1 for Si SiLi and CsI -%%Option: all or sensible for VISualisation - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -MUST2Array -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 -M2Telescope - THETA= 30 - PHI= 41 - R= 170 - BETA= 0 -0 -0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 -M2Telescope - THETA= 30 - PHI= -41 - R= 170 - BETA= 0 -0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3 -M2Telescope - THETA= -30 - PHI= 41 - R= 170 - BETA= 0 0 -0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 -M2Telescope - THETA= -30 - PHI= -41 - R= 170 - BETA= 0 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 -M2Telescope - THETA= 0 - PHI= 0 - R= 325 - BETA= 0 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -AddThinSi -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= 30 - PHI= 41 - R= 110 - BETA= 0 0 -0 - SIDE= right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= -30 - PHI= 41 - R= 110 - BETA= 0 0 -0 - SIDE= left -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= 30 - PHI= -41 - R= 110 - BETA= 0 0 0 - SIDE= right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= -30 - PHI= -41 - R= 110 - BETA= 0 0 0 - SIDE= left -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Inputs/DetectorConfiguration/20cm.detector b/Inputs/DetectorConfiguration/20cm.detector deleted file mode 100644 index 686516b97c00e78b5be749d251745b1669a2fa49..0000000000000000000000000000000000000000 --- a/Inputs/DetectorConfiguration/20cm.detector +++ /dev/null @@ -1,107 +0,0 @@ -%Fichier de configuration manip E225 -%%%%%%%%%%%Target%%%%%%%%%%%%%%%%%%%1 -%Thickness in micrometer -%Radius in mm -%Temperature in K, Pressure in bar -%Material name according to the target library - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%GeneralTarget -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%CryoTarget - THICKNESS= 3000 - RADIUS= 45 - TEMPERATURE= 26 - PRESSURE= 1 - MATERIAL= D2 - WINDOWSTHICKNESS= 8 - WINDOWSMATERIAL= Mylar -%%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%% -%%Position and R given in mm -%%Angle given in degree -%%Option: 0,1 for Si SiLi and CSI -%%Option: all or sensible for VISualisation - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -MUST2Array -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 -M2Telescope - THETA= 27 - PHI= 42 - R= 180 - BETA= 0 -0 -0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 -M2Telescope - THETA= 27 - PHI= -42 - R= 200 - BETA= 0 -0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3 -M2Telescope - THETA= -27 - PHI= 42 - R= 180 - BETA= 0 0 -0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 -M2Telescope - THETA= -27 - PHI= -42 - R= 200 - BETA= 0 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 -%M2Telescope - THETA= 0 - PHI= 0 - R= 280 - BETA= 0 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%AddThinSi -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= 41 - PHI= 45 - R= 114 - BETA= 0 0 -8 - SIDE= right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= -41 - PHI= 45 - R= 114 - BETA= 0 0 -8 - SIDE= left -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= 41 - PHI= -45 - R= 114 - BETA= 0 0 8 - SIDE= right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= -41 - PHI= -45 - R= 114 - BETA= 0 0 8 - SIDE= left -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Inputs/DetectorConfiguration/AnnularS1.detector b/Inputs/DetectorConfiguration/AnnularS1.detector new file mode 100644 index 0000000000000000000000000000000000000000..2733b1795fc5a8de118ce799e654e055af0cf0da --- /dev/null +++ b/Inputs/DetectorConfiguration/AnnularS1.detector @@ -0,0 +1,7 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +AnnularS1 + Z= -158.7 + RMIN= 24 + RMAX= 48 + VIS= all + diff --git a/Inputs/DetectorConfiguration/GOOD_12cm.detector b/Inputs/DetectorConfiguration/GOOD_12cm.detector deleted file mode 100644 index e09f7e4ed2bbc2a3284c09c5153eacc08f1418b5..0000000000000000000000000000000000000000 --- a/Inputs/DetectorConfiguration/GOOD_12cm.detector +++ /dev/null @@ -1,107 +0,0 @@ -%Fichier de configuration manip E225 -%%%%%%%%%%%Target%%%%%%%%%%%%%%%%%%%1 -%Thickness in micrometer -%Radius in mm -%Temperature in K, Pressure in bar -%Material name according to the target library - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%GeneralTarget -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%CryoTarget - THICKNESS= 3000 - RADIUS= 45 - TEMPERATURE= 26 - PRESSURE= 1 - MATERIAL= D2 - WINDOWSTHICKNESS= 8 - WINDOWSMATERIAL= Mylar -%%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%% -%%Position and R given in mm -%%Angle given in degree -%%Option: 0,1 for Si SiLi and CSI -%%Option: all or sensible for VISualisation - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -MUST2Array -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 -M2Telescope - THETA= 41 - PHI= 45 - R= 120 - BETA= 0 0 -8 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 -M2Telescope - THETA= -41 - PHI= 45 - R= 120 - BETA= 0 0 -8 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3 -M2Telescope - THETA= -41 - PHI= -45 - R= 120 - BETA= 0 0 8 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 -M2Telescope - THETA= 41 - PHI= -45 - R= 120 - BETA= 0 0 8 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%8 -%M2Telescope - THETA= 0 - PHI= 0 - R= 280 - BETA= 0 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%AddThinSi -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= 41 - PHI= 45 - R= 114 - BETA= 0 0 -8 - SIDE= right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= -41 - PHI= 45 - R= 114 - BETA= 0 0 -8 - SIDE= left -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= 41 - PHI= -45 - R= 114 - BETA= 0 0 8 - SIDE= right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= -41 - PHI= -45 - R= 114 - BETA= 0 0 8 - SIDE= left -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Inputs/DetectorConfiguration/GOOD_2_12cm.detector b/Inputs/DetectorConfiguration/GOOD_2_12cm.detector deleted file mode 100644 index 02d1d78eca2b73cfc3ec465921ec35587492e924..0000000000000000000000000000000000000000 --- a/Inputs/DetectorConfiguration/GOOD_2_12cm.detector +++ /dev/null @@ -1,107 +0,0 @@ -%Fichier de configuration manip E225 -%%%%%%%%%%%Target%%%%%%%%%%%%%%%%%%%1 -%Thickness in micrometer -%Radius in mm -%Temperature in K, Pressure in bar -%Material name according to the target library - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%GeneralTarget -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%CryoTarget - THICKNESS= 3000 - RADIUS= 45 - TEMPERATURE= 26 - PRESSURE= 1 - MATERIAL= D2 - WINDOWSTHICKNESS= 8 - WINDOWSMATERIAL= Mylar -%%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%% -%%Position and R given in mm -%%Angle given in degree -%%Option: 0,1 for Si SiLi and CSI -%%Option: all or sensible for VISualisation - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -MUST2Array -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 -M2Telescope - THETA= 37.5 - PHI= 45 - R= 120 - BETA= 0 -0 -0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 -M2Telescope - THETA= -37.5 - PHI= 39 - R= 140 - BETA= 0 0 -0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3 -M2Telescope - THETA= -37.5 - PHI= -39 - R= 140 - BETA= 0 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 -M2Telescope - THETA= 37.5 - PHI= -45 - R= 120 - BETA= 0 -0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%8 -%M2Telescope - THETA= 0 - PHI= 0 - R= 280 - BETA= 0 0 0 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%AddThinSi -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= 41 - PHI= 45 - R= 114 - BETA= 0 0 -8 - SIDE= right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= -41 - PHI= 45 - R= 114 - BETA= 0 0 -8 - SIDE= left -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= 41 - PHI= -45 - R= 114 - BETA= 0 0 8 - SIDE= right -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -ThinSi - THETA= -41 - PHI= -45 - R= 114 - BETA= 0 0 8 - SIDE= left -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Inputs/DetectorConfiguration/MUST2.detector b/Inputs/DetectorConfiguration/MUST2.detector new file mode 100644 index 0000000000000000000000000000000000000000..4a7ebad47d22ce1fd369b06a54b37fdfde88b633 --- /dev/null +++ b/Inputs/DetectorConfiguration/MUST2.detector @@ -0,0 +1,24 @@ +%%%%%%%%%%%%%%%%%%%%% +MUST2Array +%%%%%%% Telescope 1 %%%%%%% +M2Telescope +X1_Y1= 10.85 105.03 146.16 +X1_Y128= 22.8 9.84 175.95 +X128_Y1= 104.09 105.03 108.76 +X128_Y128= 116.04 9.84 138.55 +SI= 1 +SILI= 0 +CSI= 1 +VIS= all + +%%%%%%% Telescope 2 %%%%%%% +M2Telescope + THETA= -130 + PHI= 0 + R= 150 + BETA= 0 0 0 + SI= 1 + SILI= 1 + CSI= 0 + VIS= all + diff --git a/Inputs/DetectorConfiguration/Riken1.detector b/Inputs/DetectorConfiguration/Riken1.detector deleted file mode 100644 index 30f2e3f0ac1ab6e7acc162f304d4bc93198b072c..0000000000000000000000000000000000000000 --- a/Inputs/DetectorConfiguration/Riken1.detector +++ /dev/null @@ -1,82 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -GeneralTarget -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%Target - THICKNESS= 1 - RADIUS= 45 - MATERIAL= CD2 - X= 10 - Y= -10 - Z= 50 - -CryoTarget - THICKNESS= 3000 - RADIUS= 45 - TEMPERATURE= 26 - PRESSURE= 1 - MATERIAL= D2 - WINDOWSTHICKNESS= 15 - WINDOWSMATERIAL= Mylar - X= 0 - Y= 0 - Z= 0 -%%%%%%%%%%%%%%%%%%%%% -MUST2Array -%%%%%%% Telescope 1 %%%%%%% -M2Telescope -X1_Y1= 10.85 105.03 162.16 -X1_Y128= 22.8 9.84 191.95 -X128_Y1= 104.09 105.03 124.76 -X128_Y128= 116.04 9.84 154.55 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%% Telescope 2 %%%%%%% -M2Telescope -X1_Y1= -116.04 9.84 154.55 -X1_Y128= -22.8 9.84 191.95 -X128_Y1= -104.09 105.03 124.76 -X128_Y128= -10.85 105.03 162.16 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%% Telescope 3 %%%%%%% -M2Telescope -X1_Y1= -10.85 -105.03 162.16 -X1_Y128= -22.8 -9.84 191.95 -X128_Y1= -104.09 -105.03 124.76 -X128_Y128= -116.04 -9.84 154.55 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%% Telescope 4 %%%%%%% -M2Telescope -X1_Y1= 116.04 -9.84 154.55 -X1_Y128= 22.8 -9.84 191.95 -X128_Y1= 104.09 -105.03 124.76 -X128_Y128= 10.85 -105.03 162.16 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%% Telescope 5 %%%%%%% -M2Telescope -X1_Y1= -50.23 -50.23 341 -X1_Y128= 50.23 -50.23 341 -X128_Y1= -50.23 50.23 341 -X128_Y128= 50.23 50.23 341 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%%%%%%%%%%%%%%% - - diff --git a/Inputs/DetectorConfiguration/ThinSi.detector b/Inputs/DetectorConfiguration/ThinSi.detector new file mode 100644 index 0000000000000000000000000000000000000000..352ff0601de682f39a585712f3183bae144275a2 --- /dev/null +++ b/Inputs/DetectorConfiguration/ThinSi.detector @@ -0,0 +1,19 @@ +%%%%%%%%%%%%%%%%%%%% +AddThinSi +%%%%%%%%% Det 1 %%%%%%%% +ThinSi +A= 17.61 9.85 104.11 +B= 64.48 9.85 85.31 +C= 58.66 56.29 70.79 +D= 11.79 56.29 89.69 + +%%%%%%%%% Det 2 %%%%%%%% +ThinSi + THETA= 33 + PHI= -130 + R= 110 + BETA= 0 0 -0 + SIDE= right + + + diff --git a/Inputs/DetectorConfiguration/e569.detector b/Inputs/DetectorConfiguration/e569.detector deleted file mode 100644 index 7860dc649ce9b7856c9570550822b7afc8da070d..0000000000000000000000000000000000000000 --- a/Inputs/DetectorConfiguration/e569.detector +++ /dev/null @@ -1,85 +0,0 @@ -%Fichier de configuration manip E225 -%%%%%%%%%%%Target%%%%%%%%%%%%%%%%%%%1 -%Thickness in micrometer -%Radius in mm -%Temperature in K. Pressure in bar -%Material name according to the target library -GeneralTarget - -Target - THICKNESS= 10 - RADIUS= 15 - MATERIAL= CD2 -%%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%% -%%Position and distance given in mm -%%Angle given in degree -%%Option: 0.1 for Si SiLi and CSI -%%Option: all or sensible for VISualisation -MUST2Array -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 -M2Telescope - TL= 104.146 105.098 124.716 - BL= 116.093 9.902 154.501 - BR= 22.854 9.902 191.9 - CT= 63.5 57.5 158.308 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 -M2Telescope - TL= -10.907 105.098 162.116 - BL= -22.854 9.902 191.9 - BR= -116.093 9.902 154.501 - CT= -63.5 57.5 158.308 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3 -M2Telescope - TL= -22.854 -9.902 191.9 - BL= -10.907 -105.098 162.116 - BR= -104.146 -105.098 124.716 - CT= -63.5 -57.5 158.308 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 -M2Telescope - TL= 116.093 -9.902 154.501 - BL= 104.146 -105.098 124.716 - BR= 10.907 -105.098 162.116 - CT= 63.5 -57.5 158.308 - SI= 1 - SILI= 0 - CSI= 1 - VIS= all - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 -M2Telescope - TL= 172.96 -110.03 -4.04 - BL= 146 -110.03 92.82 - BR= 214.71 -19.4 7.67 - CT= 180.36 -64.72 50.24 - SI= 1 - SILI= 1 - CSI= 0 - VIS= all - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 -M2Telescope - TL= 215.8 -3.7 8 - BL= 188.9 -3.7 104.8 - BR= 187.2 92.3 0 - CT= 188 44.3 52.4 - SI= 1 - SILI= 1 - CSI= 0 - VIS= all - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 diff --git a/Inputs/DetectorConfiguration/plastic.detector b/Inputs/DetectorConfiguration/plastic.detector new file mode 100644 index 0000000000000000000000000000000000000000..138a7f665cb5624ba7e36280e99ab848f141516c --- /dev/null +++ b/Inputs/DetectorConfiguration/plastic.detector @@ -0,0 +1,21 @@ +%Fichier de configuration manip E225 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +ScintillatorPlastic +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Plastic + THETA= 0 + PHI= 0 + R= 150 + Thickness= 20 + Radius= 50 + LeadThickness= 0 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Plastic + THETA= 0 + PHI= 0 + R= 175 + Thickness= 20 + Radius= 50 + LeadThickness= 0 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/NPLib/Makefile b/NPLib/Makefile index 477a5e05d9c7f5572d3d47433a52295f94941e4d..bdfaaf6e1e7a68e22d56a00385b0a2753ce40bb8 100644 --- a/NPLib/Makefile +++ b/NPLib/Makefile @@ -269,7 +269,7 @@ INCLUDE = -I$(CLHEP_BASE_DIR)/include #------------------------------------------------------------------------------ SHARELIB = Vdetec InputOutputRoot InitCond InterCoord \ - Must2All GaspardData AnnularS1Data \ + Must2All GaspardData AnnularS1Data PlasticData\ Reaction EnergyLoss all: $(SHARELIB) @@ -311,6 +311,15 @@ ifeq ($(ARCH),macosx) cd lib; ln -sf libGaspardPyysics.so libGaspardPhysics.dylib endif +## Gaspard ## +PlasticData: + make -C ./Plastic + cp ./Plastic/*.so ./lib ; cp ./Plastic/*.h ./include +ifeq ($(ARCH),macosx) + cd lib; ln -sf libPlasticData.so libPlasticData.dylib + cd lib; ln -sf libPlasticPyysics.so libPlasticPhysics.dylib +endif + ############# Simulation ############## diff --git a/NPLib/Plastic/Makefile b/NPLib/Plastic/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..e5373baed1a56beac4a2ecd424d8ed5a91a45d6d --- /dev/null +++ b/NPLib/Plastic/Makefile @@ -0,0 +1,302 @@ +# Makefile for the ROOT test programs. +# This Makefile shows nicely how to compile and link applications +# using the ROOT libraries on all supported platforms. +# +# Copyright (c) 2000 Rene Brun and Fons Rademakers +# +# Author: Fons Rademakers, 29/2/2000 + +ROOTCONFIG := root-config + +ARCH := $(shell $(ROOTCONFIG) --arch) +PLATFORM := $(shell $(ROOTCONFIG) --platform) +ALTCC := $(shell $(ROOTCONFIG) --cc) +ALTCXX := $(shell $(ROOTCONFIG) --cxx) +ALTF77 := $(shell $(ROOTCONFIG) --f77) +ALTLD := $(shell $(ROOTCONFIG) --ld) + +#CXX = +ObjSuf = o +SrcSuf = cxx +ExeSuf = +DllSuf = so +OutPutOpt = -o # keep whitespace after "-o" + +ifeq (debug,$(findstring debug,$(ROOTBUILD))) +OPT = -g +OPT2 = -g +else +ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),) +OPT = -g +OPT2 = -g +else +OPT = -O +OPT2 = -O2 +endif +endif + +ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags) +ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags) +ROOTLIBS := $(shell $(ROOTCONFIG) --libs) +ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs) +HASTHREAD := $(shell $(ROOTCONFIG) --has-thread) +ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype) +NOSTUBS := $(shell $(ROOTCONFIG) --nostubs) +ROOTCINT := rootcint + +ifeq ($(ARCH),linux) +# Linux with egcs, gcc 2.9x, gcc 3.x +CXX = g++ +CXXFLAGS = $(OPT2) -Wall -fPIC +LD = g++ +LDFLAGS = $(OPT2) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),linuxkcc) +# Linux with the KAI compiler +CXX = KCC --one_instantiation_per_object +CXXFLAGS = $(OPT) -fPIC +K0 +LD = KCC +LDFLAGS = $(OPT) $(shell $(ROOTCONFIG) --cflags) +SOFLAGS = +endif + +ifeq ($(ARCH),linuxicc) +# Linux with Intel icc compiler +ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \ + cut -d'.' -f1) +ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \ + cut -d'.' -f2) +CXX = icc +CXXFLAGS = $(OPT) -fPIC -wd1476 +LD = icpc +LDFLAGS = $(OPT) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),linuxppcgcc) +# PPC Linux with gcc and glibc +CXX = g++ +CXXFLAGS = $(OPT2) -Wall -fPIC +LD = g++ +LDFLAGS = $(OPT2) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),linuxia64gcc) +# Itanium Linux with gcc 2.9x +CXX = g++ +CXXFLAGS = $(OPT2) -Wall -fPIC +LD = g++ +LDFLAGS = $(OPT2) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),linuxia64sgi) +# Itanium Linux with sgiCC +CXX = sgiCC +CXXFLAGS = $(OPT) -Wall -fPIC +LD = gsgiCC +LDFLAGS = $(OPT) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),linuxia64ecc) +# Itanium Linux with Intel icc (was ecc) +ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \ + cut -d'.' -f1) +ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \ + cut -d'.' -f2) +CXX = icc +CXXFLAGS = $(OPT) -fPIC -wd1476 -ftz +LD = icpc +LDFLAGS = $(OPT) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),linuxx8664gcc) +# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x +CXX = g++ +CXXFLAGS = $(OPT2) -Wall -fPIC +LD = g++ +LDFLAGS = $(OPT2) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),linuxppc64gcc) +# PPC64 Linux with gcc 3.x +CXX = g++ +CXXFLAGS = $(OPT) -Wall -fPIC +LD = g++ +LDFLAGS = $(OPT) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),linuxx8664icc) +# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler +CXX = icc +CXXFLAGS = $(OPT) -fPIC -wd1476 -wd1572 +LD = icpc +LDFLAGS = $(OPT) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),linuxalphagcc) +# Alpha Linux with gcc +CXX = g++ +CXXFLAGS = $(OPT2) -Wall -fPIC +LD = g++ +LDFLAGS = $(OPT2) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),linuxmips) +# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc +CXX = g++ +CXXFLAGS = $(OPT2) -Wall -fPIC +LD = g++ +LDFLAGS = $(OPT2) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),linuxhppa) +# GNU/Linux on hppa with gcc +CXX = g++ +CXXFLAGS = $(OPT2) -Wall -fPIC +LD = g++ +LDFLAGS = $(OPT2) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),linuxarm) +# ARM Linux with egcs +CXX = g++ +CXXFLAGS = $(OPT) -Wall -fPIC +LD = g++ +LDFLAGS = $(OPT) +SOFLAGS = -shared +endif + +ifeq ($(ARCH),macosx) +# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3) +MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2) +MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR) +CXX = g++ +CXXFLAGS = $(OPT2) -pipe -Wall -W -Woverloaded-virtual +LD = $(MACOSXTARGET) g++ +LDFLAGS = $(OPT2) -bind_at_load +# The SOFLAGS will be used to create the .dylib, +# the .so will be created separately +ifeq ($(subst $(MACOSX_MINOR),,1234),1234) +DllSuf = so +else +DllSuf = dylib +endif +UNDEFOPT = dynamic_lookup +ifneq ($(subst $(MACOSX_MINOR),,12),12) +UNDEFOPT = suppress +LD = g++ +endif +SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT) +endif + +ifeq ($(ARCH),macosxicc) +# MacOS X with Intel icc compiler +MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2) +MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR) +ifeq ($(MACOSX_MINOR),5) +MACOSX_MINOR := 4 +endif +CXX = icc +CXXFLAGS = $(OPT) -fPIC -wd1476 +LD = $(MACOSXTARGET) icpc +LDFLAGS = $(OPT) +# The SOFLAGS will be used to create the .dylib, +# the .so will be created separately +ifeq ($(subst $(MACOSX_MINOR),,1234),1234) +DllSuf = so +else +DllSuf = dylib +endif +SOFLAGS = -dynamiclib -single_module -undefined dynamic_lookup +endif + +ifeq ($(ARCH),macosx64) +# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*) +# Only specific option (-m64) comes from root-config +MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2) +MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR) +CXX = g++ +CXXFLAGS = $(OPT2) -pipe -Wall -W -Woverloaded-virtual +LD = $(MACOSXTARGET) g++ -m64 +LDFLAGS = $(OPT2) -bind_at_load +# The SOFLAGS will be used to create the .dylib, +# the .so will be created separately +ifeq ($(subst $(MACOSX_MINOR),,1234),1234) +DllSuf = so +else +DllSuf = dylib +endif +SOFLAGS = -m64 -dynamiclib -single_module -undefined dynamic_lookup +endif + +ifeq ($(ARCH),macosxxlc) +# MacOS X with IBM xlC compiler +MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2) +MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR) +CXX = xlC +CXXFLAGS = $(OPT) +LD = $(MACOSXTARGET) xlC +LDFLAGS = $(OPT) -Wl,-bind_at_load +# The SOFLAGS will be used to create the .dylib, +# the .so will be created separately +DllSuf = dylib +UNDEFOPT = dynamic_lookup +ifneq ($(subst $(MACOSX_MINOR),,12),12) +UNDEFOPT = suppress +LD = xlC +endif +SOFLAGS = -qmkshrobj -single_module -undefined $(UNDEFOPT) +endif + +CXXFLAGS += $(ROOTCFLAGS) +LDFLAGS += $(ROOTLDFLAGS) +LIBS = $(ROOTLIBS) $(SYSLIBS) +GLIBS = $(ROOTGLIBS) $(SYSLIBS) + +INCLUDE = -I$(CLHEP_BASE_DIR)/include + +#------------------------------------------------------------------------------ +SHARELIB = libPlasticData.so + +all: $(SHARELIB) +#------------------------------------------------------------------------------ +############### Detector ############## + +## Plastic ## +libPlasticData.so: TPlasticData.o TPlasticDataDict.o + $(LD) $(SOFLAGS) $^ $(OutPutOpt) $@ + +TPlasticDataDict.cxx: TPlasticData.h + rootcint -f $@ -c $^ + +# dependances +TPlasticData.o: TPlasticData.cxx TPlasticData.h +####################################### + +############# Clean and More ########## +clean: + @rm -f core *~ *.o *Dict* + +distclean: + make clean; rm -f *.so + +.SUFFIXES: .$(SrcSuf) + +### + +.$(SrcSuf).$(ObjSuf): + $(CXX) $(CXXFLAGS) $(INCLUDE) -c $< + + diff --git a/NPLib/Plastic/TPlasticData.cxx b/NPLib/Plastic/TPlasticData.cxx new file mode 100644 index 0000000000000000000000000000000000000000..1221a2a4f6b5abed0ceb5f94d74fe56c3e8586b5 --- /dev/null +++ b/NPLib/Plastic/TPlasticData.cxx @@ -0,0 +1,39 @@ +#include <iostream> +using namespace std; + +#include "TPlasticData.h" + + +ClassImp(TPlasticData) + +TPlasticData::TPlasticData() +{ +} + + + +TPlasticData::~TPlasticData() +{ +} + + + +void TPlasticData::Clear() +{ + fPlastic_Energy.clear(); + fPlastic_Number.clear(); +} + + + +void TPlasticData::Dump() +{ + cout << "XXXXXXXXXXXXXXXXXXXXXXXX New Event XXXXXXXXXXXXXXXXX" << endl; + + for(short i = 0 ; i<fPlastic_Energy.size() ; i ++) + { + cout << "Plastic Number " << fPlastic_Number[i] << " Energy: " << fPlastic_Energy[i] << " Time: "<< fPlastic_Time[i] << endl; + + } + +} diff --git a/NPLib/Plastic/TPlasticData.h b/NPLib/Plastic/TPlasticData.h new file mode 100644 index 0000000000000000000000000000000000000000..f11a97f572312123f19724077a334d1067f985ea --- /dev/null +++ b/NPLib/Plastic/TPlasticData.h @@ -0,0 +1,41 @@ +#ifndef __PLASTICDATA__ +#define __PLASTICDATA__ + +#include <vector> + +#include "TObject.h" + + + +class TPlasticData : public TObject { + private: + // ADC + vector<double> fPlastic_Energy ; + vector<double> fPlastic_Time ; + vector<short> fPlastic_Number ; + + public: + TPlasticData(); + virtual ~TPlasticData(); + + void Clear(); + void Dump(); + + ///////////////////// GETTERS //////////////////////// + // (E) + double GetEnergy(int i) {return fPlastic_Energy[i];} + // (T) + double GetTime(int i) {return fPlastic_Time[i];} + // (N) + int GetPlasticNumber(int i) {return fPlastic_Number[i];} + ///////////////////// SETTERS //////////////////////// + // (E) + void SetEnergy(double E) {fPlastic_Energy.push_back(E);} + void SetTime(double T) {fPlastic_Time.push_back(T);} + void SetPlasticNumber(int N) {fPlastic_Number.push_back(N);} + + // + ClassDef(TPlasticData,1) // PlasticData structure +}; + +#endif diff --git a/NPSimulation/GNUmakefile b/NPSimulation/GNUmakefile index 4e9abd2e1f96016a13d60429d783fe3e0328da8b..ef3b50375f8063460248194e4042809ab9385514 100644 --- a/NPSimulation/GNUmakefile +++ b/NPSimulation/GNUmakefile @@ -19,7 +19,7 @@ G4WORKDIR = ./ CPPFLAGS += $(shell root-config --cflags) CPPFLAGS += -I$(NPLIB)/include EXTRALIBS = $(shell root-config --glibs) -EXTRALIBS += -L$(NPLIB)/lib -lMust2Data -lAnnularS1Data -lGaspardData \ +EXTRALIBS += -L$(NPLIB)/lib -lMust2Data -lAnnularS1Data -lGaspardData -lPlasticData\ -lInitialConditions -lInteractionCoordinates \ -lReaction -lIORoot .PHONY: all diff --git a/NPSimulation/include/GeneralScorers.hh b/NPSimulation/include/GeneralScorers.hh index 646d62125ebaac520fe56cba2c9e144ffc09070e..1591fbab1b1e76036b5dc39acbb7d2b20c1ddc40 100644 --- a/NPSimulation/include/GeneralScorers.hh +++ b/NPSimulation/include/GeneralScorers.hh @@ -22,7 +22,7 @@ * deposit, time of flight or position,... particle by particle for each * * event.Because standard scorer provide by G4 don't work this way but using* * a global ID for each event you should not use those scorer with some G4 * - * provided ones or being very carefull doing so. * * + * provided ones or being very carefull doing so. *s *****************************************************************************/ #include "G4VPrimitiveScorer.hh" #include "G4THitsMap.hh" diff --git a/NPSimulation/include/MUST2Array.hh b/NPSimulation/include/MUST2Array.hh index 383d90c8c30bebd55d1843a7523da2edacd7d9a8..fd84ddb54c4668db1e9211d40c7df9c3aaafa047 100644 --- a/NPSimulation/include/MUST2Array.hh +++ b/NPSimulation/include/MUST2Array.hh @@ -35,7 +35,6 @@ namespace MUST2 { // Resolution const G4double ResoTimeMust = 0.212765957 ;// = 500ps // Unit is ns/2.35 - const G4double ResoTimePPAC = 0.106382979 ;// = 250ps // Unit is ns/2.35 const G4double ResoSiLi = 0.055 ;// = 130 keV of resolution // Unit is MeV/2.35 const G4double ResoCsI = 0.08 ;// = 188 kev of resolution // Unit is MeV/2.35 const G4double ResoStrip = 0.022 ;// = 52keV of Resolution // Unit is MeV/2.35 diff --git a/NPSimulation/include/Plastic.hh b/NPSimulation/include/Plastic.hh new file mode 100644 index 0000000000000000000000000000000000000000..cf541f9aa379bc206485de4c9441e0d486c76c9e --- /dev/null +++ b/NPSimulation/include/Plastic.hh @@ -0,0 +1,120 @@ +#ifndef Plastic_h +#define Plastic_h 1 +/***************************************************************************** + * Copyright (C) 2009 this file is part of the NPTool Project * + * * + * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * + * For the list of contributors see $NPTOOL/Licence/Contributors * + *****************************************************************************/ + +/***************************************************************************** + * Original Author: Adrien MATTA contact address: matta@ipno.in2p3.fr * + * * + * Creation Date : september 2009 * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * This class describe a modular plastic array * + * * + *---------------------------------------------------------------------------* + * Comment: * + * * + *****************************************************************************/ +// C++ header +#include <string> +#include <vector> + +// G4 header defining G4 types +#include "globals.hh" + +// G4 headers +#include "G4ThreeVector.hh" +#include "G4RotationMatrix.hh" +#include "G4LogicalVolume.hh" + +// NPTool header +#include "VDetector.hh" +#include "TPlasticData.h" + +using namespace std; + +class Plastic : public VDetector +{ + //////////////////////////////////////////////////// + /////// Default Constructor and Destructor ///////// + //////////////////////////////////////////////////// +public: + Plastic() ; + virtual ~Plastic() ; + + //////////////////////////////////////////////////// + //////// Specific Function of this Class /////////// + //////////////////////////////////////////////////// +public: + // By Angle Method + void AddPlastic( G4double R , + G4double Theta , + G4double Phi , + G4double PlasticThickness , + G4double PlasticRadius , + G4double LeadThickness ); + + void VolumeMaker(G4ThreeVector Det_pos, int DetNumber,G4LogicalVolume* world) ; + //////////////////////////////////////////////////// + ///////// Inherite from VDetector class /////////// + //////////////////////////////////////////////////// +public: + // Read stream at Configfile to pick-up parameters of detector (Position,...) + // Called in DetecorConstruction::ReadDetextorConfiguration Method + void ReadConfiguration(string Path) ; + + // Construct detector and inialise sensitive part. + // Called After DetecorConstruction::AddDetector Method + void ConstructDetector(G4LogicalVolume* world) ; + + // Add Detector branch to the EventTree. + // Called After DetecorConstruction::AddDetector Method + void InitializeRootOutput() ; + + // Read sensitive part and fill the Root tree. + // Called at in the EventAction::EndOfEventAvtion + void ReadSensitive(const G4Event* event) ; + +public: // Material + void InitializeMaterial() ; + // Platic + G4Material* m_MaterialPlastic ; + // Lead + G4Material* m_MaterialLead ; + +public: // Scorer + // Initialize all Scorer used by the MUST2Array + void InitializeScorers() ; + + // Silicon Associate Scorer + G4MultiFunctionalDetector* m_PlasticScorer ; + //////////////////////////////////////////////////// + ///////////Event class to store Data//////////////// + //////////////////////////////////////////////////// +private: + TPlasticData* m_Event ; + + //////////////////////////////////////////////////// + ///////////////Private intern Data////////////////// + //////////////////////////////////////////////////// +private: + + // if true a Lead plate is added in front or back of the detector + vector<double> m_LeadThickness ; + + vector<double> m_PlasticThickness ; + vector<double> m_PlasticRadius ; + + // Used for "By Angle Definition" + vector<G4double> m_R ; // | + vector<G4double> m_Theta ; // > Spherical coordinate plastic volume center + vector<G4double> m_Phi ; // | + + +}; +#endif diff --git a/NPSimulation/include/PlasticScorers.hh b/NPSimulation/include/PlasticScorers.hh new file mode 100644 index 0000000000000000000000000000000000000000..7490280c3720dd6720ce4d6fd3b9ebce74adf293 --- /dev/null +++ b/NPSimulation/include/PlasticScorers.hh @@ -0,0 +1,94 @@ +#ifndef GeneralScorers_h +#define GeneralScorers_h 1 +/***************************************************************************** + * Copyright (C) 2009 this file is part of the NPTool Project * + * * + * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * + * For the list of contributors see $NPTOOL/Licence/Contributors * + *****************************************************************************/ + +/***************************************************************************** + * Original Author: Adrien MATTA contact address: matta@ipno.in2p3.fr * + * * + * Creation Date : September 2009 * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * This class old some of the Platic Scorer, shared by different detector. * + *---------------------------------------------------------------------------* + * Comment: * + *****************************************************************************/ +#include "G4VPrimitiveScorer.hh" +#include "G4THitsMap.hh" +namespace PLASTIC { +class PSEnergy : public G4VPrimitiveScorer + { + + public: // with description + PSEnergy(G4String name, G4int depth = 0); + virtual ~PSEnergy(); + + protected: // with description + virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*); + + public: + virtual void Initialize(G4HCofThisEvent*); + virtual void EndOfEvent(G4HCofThisEvent*); + virtual void clear(); + virtual void DrawAll(); + virtual void PrintAll(); + + private: + G4int HCID; + G4THitsMap<G4double>* EvtMap; + }; + +class PSTOF : public G4VPrimitiveScorer +{ + + public: // with description + PSTOF(G4String name, G4int depth = 0); + virtual ~PSTOF(); + + protected: // with description + virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*); + + public: + virtual void Initialize(G4HCofThisEvent*); + virtual void EndOfEvent(G4HCofThisEvent*); + virtual void clear(); + virtual void DrawAll(); + virtual void PrintAll(); + + private: + G4int HCID; + G4THitsMap<G4double>* EvtMap; +}; + + +class PSDetectorNumber : public G4VPrimitiveScorer + { + + public: // with description + PSDetectorNumber(G4String name, G4int depth = 0 ); + virtual ~PSDetectorNumber(); + + protected: // with description + virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*); + + public: + virtual void Initialize(G4HCofThisEvent*); + virtual void EndOfEvent(G4HCofThisEvent*); + virtual void clear(); + virtual void DrawAll(); + virtual void PrintAll(); + + private: + G4int HCID; + G4THitsMap<G4int>* EvtMap; + }; + + +} + +#endif diff --git a/NPSimulation/src/GeneralScorers.cc b/NPSimulation/src/GeneralScorers.cc index 614ed22a33150258b32f4a1bbd99c8b2ea8d6661..9fe510c3b9a76f788af8ae39d89c410e63764fff 100644 --- a/NPSimulation/src/GeneralScorers.cc +++ b/NPSimulation/src/GeneralScorers.cc @@ -20,7 +20,7 @@ * deposit, time of flight or position,... particle by particle for each * * event.Because standard scorer provide by G4 don't work this way but using* * a global ID for each event you should not use those scorer with some G4 * - * provided ones or being very carefull doing so. * * + * provided ones or being very carefull doing so. * *****************************************************************************/ #include "GeneralScorers.hh" #include "G4UnitsTable.hh" @@ -438,6 +438,7 @@ G4bool PSDetectorNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) if (edep < 100*keV) return FALSE; G4int index = aStep->GetTrack()->GetTrackID(); + EvtMap->set(index, DetNbr); return TRUE; } diff --git a/NPSimulation/src/MUST2Array.cc b/NPSimulation/src/MUST2Array.cc index 85b9902b1cc48dc8c2c40b3623a9c86a54800d0b..3040dec99e7980a88ec584555e587fcab00a2aa1 100644 --- a/NPSimulation/src/MUST2Array.cc +++ b/NPSimulation/src/MUST2Array.cc @@ -1066,7 +1066,6 @@ void MUST2Array::ReadSensitive(const G4Event* event) G4double T = *(Time_itr->second) ; if (TTrackID == ETrackID) { - T = RandGauss::shoot(T, ResoTimePPAC) ; m_Event->SetMMStripXTTime(RandGauss::shoot(T, ResoTimeMust)) ; m_Event->SetMMStripYTTime(RandGauss::shoot(T, ResoTimeMust)) ; } diff --git a/NPSimulation/src/Plastic.cc b/NPSimulation/src/Plastic.cc new file mode 100644 index 0000000000000000000000000000000000000000..1f95f4954904a6055597a8824e5b59dead0cba56 --- /dev/null +++ b/NPSimulation/src/Plastic.cc @@ -0,0 +1,476 @@ +/***************************************************************************** + * Copyright (C) 2009 this file is part of the NPTool Project * + * * + * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * + * For the list of contributors see $NPTOOL/Licence/Contributors * + *****************************************************************************/ + +/***************************************************************************** + * Original Author: Adrien MATTA contact address: matta@ipno.in2p3.fr * + * * + * Creation Date : January 2009 * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * This class describe a 20um Silicium detector * + * * + *---------------------------------------------------------------------------* + * Comment: * + * * + *****************************************************************************/ + +// C++ headers +#include <sstream> +#include <cmath> + +//G4 Geometry object +#include "G4Tubs.hh" + +//G4 sensitive +#include "G4SDManager.hh" +#include "G4MultiFunctionalDetector.hh" + +//G4 various object +#include "G4MaterialTable.hh" +#include "G4Element.hh" +#include "G4ElementTable.hh" +#include "G4Transform3D.hh" +#include "G4PVPlacement.hh" +#include "G4VisAttributes.hh" +#include "G4Colour.hh" + +// NPTool header +#include "Plastic.hh" +#include "PlasticScorers.hh" +#include "RootOutput.h" + +// CLHEP header +#include "CLHEP/Random/RandGauss.h" + +using namespace std; +using namespace CLHEP; + + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +namespace PLASTIC +{ + // Energy and time Resolution + const G4double ResoTime = 4.2 ;// = 10ns of Resolution // Unit is MeV/2.35 + const G4double ResoEnergy = 0.42 ;// = 1MeV of Resolution // Unit is MeV/2.35 + +} + +using namespace PLASTIC ; +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +// Plastic Specific Method +Plastic::Plastic() +{ + InitializeMaterial(); + m_Event = new TPlasticData() ; +} + +Plastic::~Plastic() +{ + delete m_MaterialPlastic ; + delete m_MaterialLead ; + delete m_PlasticScorer ; +} +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +void Plastic::AddPlastic( G4double R , + G4double Theta , + G4double Phi , + G4double PlasticThickness , + G4double PlasticRadius , + G4double LeadThickness ) +{ + + m_R.push_back(R) ; + m_Theta.push_back(Theta) ; + m_Phi.push_back(Phi) ; + m_PlasticThickness.push_back(PlasticThickness) ; + m_PlasticRadius.push_back(PlasticRadius) ; + m_LeadThickness.push_back(LeadThickness); +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +// Virtual Method of VDetector class + + +// Read stream at Configfile to pick-up parameters of detector (Position,...) +// Called in DetecorConstruction::ReadDetextorConfiguration Method +void Plastic::ReadConfiguration(string Path) +{ + ifstream ConfigFile ; + ConfigFile.open(Path.c_str()) ; + string LineBuffer ; + string DataBuffer ; + + G4double Theta = 0 , Phi = 0 , R = 0 , Thickness = 0 , Radius = 0 , LeadThickness = 0; + + bool check_Theta = false ; + bool check_Phi = false ; + bool check_R = false ; + bool check_Thickness = false ; + bool check_Radius = false ; + bool check_LeadThickness = false ; + bool ReadingStatus = false ; + + + while (!ConfigFile.eof()) + { + + getline(ConfigFile, LineBuffer); + + // If line is a Start Up MUST2 bloc, Reading toggle to true + if (LineBuffer.compare(0, 7, "Plastic") == 0) + { + G4cout << "///" << G4endl ; + G4cout << "Platic found: " << G4endl ; + ReadingStatus = true ; + + } + + // Else don't toggle to Reading Block Status + else ReadingStatus = false ; + + // Reading Block + while(ReadingStatus) + { + // Pickup Next Word + ConfigFile >> DataBuffer ; + + // Comment Line + if (DataBuffer.compare(0, 1, "%") == 0) {/*do nothing */;} + + // Finding another telescope (safety), toggle out + else if (DataBuffer.compare(0, 6, "Plastic") == 0) { + cout << "WARNING: Another Telescope is find before standard sequence of Token, Error may occured in Telecope definition" << endl ; + ReadingStatus = false ; + } + + //Angle method + else if (DataBuffer.compare(0, 6, "THETA=") == 0) { + check_Theta = true; + ConfigFile >> DataBuffer ; + Theta = atof(DataBuffer.c_str()) ; + Theta = Theta * deg; + cout << "Theta: " << Theta / deg << endl; + } + + else if (DataBuffer.compare(0, 4, "PHI=") == 0) { + check_Phi = true; + ConfigFile >> DataBuffer ; + Phi = atof(DataBuffer.c_str()) ; + Phi = Phi * deg; + cout << "Phi: " << Phi / deg << endl; + } + + else if (DataBuffer.compare(0, 2, "R=") == 0) { + check_R = true; + ConfigFile >> DataBuffer ; + R = atof(DataBuffer.c_str()) ; + R = R * mm; + cout << "R: " << R/mm << endl; + } + + else if (DataBuffer.compare(0, 7, "Radius=") == 0) { + check_Radius = true; + ConfigFile >> DataBuffer ; + Radius = atof(DataBuffer.c_str()) ; + Radius = Radius * mm; + cout << "Plastic Radius: " << Radius/mm << endl; + } + + else if (DataBuffer.compare(0, 10, "Thickness=") == 0) { + check_Thickness = true; + ConfigFile >> DataBuffer ; + Thickness = atof(DataBuffer.c_str()) ; + Thickness = Thickness * mm; + cout << "Plastic Thickness: " << Thickness/mm << endl; + } + + else if (DataBuffer.compare(0, 14, "LeadThickness=") == 0) { + check_LeadThickness = true; + ConfigFile >> DataBuffer ; + LeadThickness = atof(DataBuffer.c_str()) ; + LeadThickness = LeadThickness * mm; + cout << "Lead Thickness : " << LeadThickness/mm << endl; + } + + /////////////////////////////////////////////////// + // If no Detector Token and no comment, toggle out + else + {ReadingStatus = false; G4cout << "Wrong Token Sequence: Getting out " << DataBuffer << G4endl ;} + + ///////////////////////////////////////////////// + // If All necessary information there, toggle out + + if ( check_Theta && check_Phi && check_R && check_Thickness && check_Radius && check_LeadThickness) + { + AddPlastic( R , + Theta , + Phi , + Thickness , + Radius , + LeadThickness); + + // Reinitialisation of Check Boolean + + check_Theta = false ; + check_Phi = false ; + check_R = false ; + check_Thickness = false ; + check_Radius = false ; + check_LeadThickness = false ; + ReadingStatus = false ; + cout << "///"<< endl ; + } + + } + } + +} + +// Construct detector and inialise sensitive part. +// Called After DetecorConstruction::AddDetector Method +void Plastic::ConstructDetector(G4LogicalVolume* world) +{ + G4ThreeVector Det_pos = G4ThreeVector(0, 0, 0) ; + + for (ushort i = 0 ; i < m_R.size() ; i++) + { + G4double wX = m_R[i] * sin(m_Theta[i] ) * cos(m_Phi[i] ) ; + G4double wY = m_R[i] * sin(m_Theta[i] ) * sin(m_Phi[i] ) ; + G4double wZ = m_R[i] * cos(m_Theta[i] ) ; + + Det_pos = G4ThreeVector(wX, wY, wZ) ; + G4LogicalVolume* logicPlastic = NULL ; + + VolumeMaker(Det_pos , i+1, world) ; + } + +} + +void Plastic::VolumeMaker(G4ThreeVector Det_pos, int DetNumber, G4LogicalVolume* world) + { + //////////////////////////////////////////////////////////////// + ////////////// Starting Volume Definition ////////////////////// + //////////////////////////////////////////////////////////////// + G4PVPlacement* PVPBuffer ; + + // Name of the module + std::ostringstream DetectorNumber ; + DetectorNumber << DetNumber ; + G4String Name = "Plastic" + DetectorNumber.str() ; + + int i = DetNumber-1; + + // Definition of the volume containing the sensitive detector + if(m_PlasticThickness[i]>0 && m_PlasticRadius[i]>0) + { + G4Tubs* solidPlastic = new G4Tubs( Name , + 0 , + m_PlasticRadius[i] , + m_PlasticThickness[i]/2 , + 0*deg , + 360*deg ); + + G4LogicalVolume* logicPlastic = new G4LogicalVolume(solidPlastic, m_MaterialPlastic, Name, 0, 0, 0); + logicPlastic->SetSensitiveDetector(m_PlasticScorer); + + G4VisAttributes* PlastVisAtt = new G4VisAttributes(G4Colour(0.0, 0.0, 0.9)) ; + logicPlastic->SetVisAttributes(PlastVisAtt) ; + + + + PVPBuffer = new G4PVPlacement( 0 , + Det_pos , + logicPlastic , + Name , + world , + false , + 0 ); + + + + } + + + if(m_LeadThickness[i]>0&& m_PlasticRadius[i]>0) + { + G4Tubs* solidLead = new G4Tubs( Name , + 0 , + m_PlasticRadius[i] , + m_LeadThickness[i]/2 , + 0*deg , + 360*deg ); + + G4LogicalVolume* logicLead = new G4LogicalVolume(solidLead, m_MaterialLead, Name, 0, 0, 0); + G4VisAttributes* LeadVisAtt = new G4VisAttributes(G4Colour(0.1, 0.1, 0.1)) ; + logicLead->SetVisAttributes(LeadVisAtt) ; + + PVPBuffer = new G4PVPlacement( 0 , + Det_pos+(m_PlasticThickness[i]/2+m_LeadThickness[i]/2)*Det_pos.unit() , + logicLead , + Name , + world , + false , + 0 ); + + } + } + +// Add Detector branch to the EventTree. +// Called After DetecorConstruction::AddDetector Method +void Plastic::InitializeRootOutput() +{ + RootOutput *pAnalysis = RootOutput::getInstance(); + TTree *pTree = pAnalysis->GetTree(); + pTree->Branch("Plastic", "TPlasticData", &m_Event) ; +} + +// Read sensitive part and fill the Root tree. +// Called at in the EventAction::EndOfEventAvtion +void Plastic::ReadSensitive(const G4Event* event) +{ + G4String DetectorNumber ; + m_Event->Clear() ; + +////////////////////////////////////////////////////////////////////////////////////// +//////////////////////// Used to Read Event Map of detector ////////////////////////// +////////////////////////////////////////////////////////////////////////////////////// + + std::map<G4int, G4int*>::iterator DetectorNumber_itr ; + std::map<G4int, G4double*>::iterator Energy_itr ; + std::map<G4int, G4double*>::iterator Time_itr ; + + G4THitsMap<G4int>* DetectorNumberHitMap ; + G4THitsMap<G4double>* EnergyHitMap ; + G4THitsMap<G4double>* TimeHitMap ; + +////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////// + + // Read the Scorer associate to the Silicon Strip + + //Detector Number + G4int StripDetCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("PlasticScorer/PlasticNumber") ; + DetectorNumberHitMap = (G4THitsMap<G4int>*)(event->GetHCofThisEvent()->GetHC(StripDetCollectionID)) ; + DetectorNumber_itr = DetectorNumberHitMap->GetMap()->begin() ; + + //Energy + G4int StripEnergyCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("PlasticScorer/Energy") ; + EnergyHitMap = (G4THitsMap<G4double>*)(event->GetHCofThisEvent()->GetHC(StripEnergyCollectionID)) ; + Energy_itr = EnergyHitMap->GetMap()->begin() ; + + //Time of Flight + G4int StripTimeCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("PlasticScorer/Time") ; + TimeHitMap = (G4THitsMap<G4double>*)(event->GetHCofThisEvent()->GetHC(StripTimeCollectionID)) ; + Time_itr = TimeHitMap->GetMap()->begin() ; + + G4int sizeN = DetectorNumberHitMap->entries() ; + G4int sizeE = EnergyHitMap->entries() ; + G4int sizeT = TimeHitMap->entries() ; + + // Loop on Plastic Number + for (G4int l = 0 ; l < sizeN ; l++) { + G4int N = *(DetectorNumber_itr->second) ; + G4int NTrackID = DetectorNumber_itr->first - N ; + + + if (N > 0) { + + m_Event->SetPlasticNumber(N) ; + + // Energy + Energy_itr = EnergyHitMap->GetMap()->begin(); + for (G4int h = 0 ; h < sizeE ; h++) { + G4int ETrackID = Energy_itr->first - N ; + G4double E = *(Energy_itr->second) ; + + if (ETrackID == NTrackID) { + m_Event->SetEnergy(RandGauss::shoot(E, ResoEnergy)) ; + } + + Energy_itr++; + } + + + // Time + Time_itr = TimeHitMap->GetMap()->begin(); + for (G4int h = 0 ; h < sizeT ; h++) { + G4int TTrackID = Time_itr->first - N ; + G4double T = *(Time_itr->second) ; + + if (TTrackID == NTrackID) { + m_Event->SetTime(RandGauss::shoot(T, ResoTime)) ; + } + + Time_itr++; + } + + } + + DetectorNumber_itr++; + } + + // clear map for next event + DetectorNumberHitMap ->clear(); + EnergyHitMap ->clear() ; +} + +//////////////////////////////////////////////////////////////// +void Plastic::InitializeMaterial() + { + + //////////////////////////////////////////////////////////////// + /////////////////Element Definition /////////////////////////// + //////////////////////////////////////////////////////////////// + G4String symbol ; + G4double density = 0. , a = 0, z = 0 ; + G4int ncomponents = 0, natoms = 0 ; + + // for Plastic + G4Element* H = new G4Element("Hydrogen" , symbol = "H" , z = 1 , a = 1.01 * g / mole); + G4Element* C = new G4Element("Carbon" , symbol = "C" , z = 6 , a = 12.011 * g / mole); + + //////////////////////////////////////////////////////////////// + /////////////////Material Definition /////////////////////////// + //////////////////////////////////////////////////////////////// + + // Pb + a = 207.2 * g / mole; + density = 11.34 * g / cm3; + m_MaterialLead = new G4Material("Lead", z = 82 , a, density); + + + // Plastic + density = 1.243 * g / cm3; + m_MaterialPlastic = new G4Material("Plastic", density, ncomponents = 2); + m_MaterialPlastic->AddElement(H , natoms = 10); + m_MaterialPlastic->AddElement(C , natoms = 14); + + } + +//////////////////////////////////////////////////////////////// +void Plastic::InitializeScorers() + { + m_PlasticScorer = new G4MultiFunctionalDetector("PlasticScorer") ; + G4SDManager::GetSDMpointer()->AddNewDetector(m_PlasticScorer); + + G4VPrimitiveScorer* DetNbr = new PSDetectorNumber("PlasticNumber", 0) ; + G4VPrimitiveScorer* Energy = new PSEnergy("Energy", 0) ; + G4VPrimitiveScorer* Time = new PSTOF("Time", 0) ; + + //and register it to the multifunctionnal detector + m_PlasticScorer->RegisterPrimitive(DetNbr) ; + m_PlasticScorer->RegisterPrimitive(Energy) ; + m_PlasticScorer->RegisterPrimitive(Time) ; + + + } +//////////////////////////////////////////////////////////////// diff --git a/NPSimulation/src/PlasticScorer.cc b/NPSimulation/src/PlasticScorer.cc new file mode 100644 index 0000000000000000000000000000000000000000..4cf0904c27753c54b33660127cab23fffdd5f5ec --- /dev/null +++ b/NPSimulation/src/PlasticScorer.cc @@ -0,0 +1,240 @@ +/***************************************************************************** + * Copyright (C) 2009 this file is part of the NPTool Project * + * * + * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * + * For the list of contributors see $NPTOOL/Licence/Contributors * + *****************************************************************************/ + +/***************************************************************************** + * Original Author: Adrien MATTA contact address: matta@ipno.in2p3.fr * + * * + * Creation Date : September 2009 * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * This class old some of the Platic Scorer, shared by different detector. * + *---------------------------------------------------------------------------* + * Comment: * + *****************************************************************************/ +#include "PlasticScorers.hh" +#include "G4UnitsTable.hh" +using namespace PLASTIC; + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +// Energy Scorer (deal with multiple particle hit) + +PSEnergy::PSEnergy(G4String name, G4int depth) + : G4VPrimitiveScorer(name, depth), HCID(-1) +{ +} + +PSEnergy::~PSEnergy() +{ +} + +G4bool PSEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) +{ + std::string name = aStep->GetTrack()->GetVolume()->GetName(); + std::string nbr ; + size_t found; + found=name.find("Plastic"); + found = found + 7; + + int numberOfCharacterInDetectorNumber = name.length() - (int)found ; + + for( int i = found ; i < found + numberOfCharacterInDetectorNumber ; i++ ) + nbr += name[i] ; + + G4int DetNbr = atoi( nbr.c_str() ) ; + + G4double edep = aStep->GetTotalEnergyDeposit(); + if (edep < 100*keV) return FALSE; + + G4int index = aStep->GetTrack()->GetTrackID(); + + EvtMap->add(DetNbr+index, edep); + return TRUE; +} + +void PSEnergy::Initialize(G4HCofThisEvent* HCE) +{ + EvtMap = new G4THitsMap<G4double>(GetMultiFunctionalDetector()->GetName(), GetName()); + if (HCID < 0) { + HCID = GetCollectionID(0); + } + HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap); +} + +void PSEnergy::EndOfEvent(G4HCofThisEvent*) +{ + ; +} + +void PSEnergy::clear() +{ + EvtMap->clear(); +} + +void PSEnergy::DrawAll() +{ + ; +} + +void PSEnergy::PrintAll() +{ + G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl; + G4cout << " PrimitiveScorer " << GetName() << G4endl; + G4cout << " Number of entries " << EvtMap->entries() << G4endl; + std::map<G4int, G4double*>::iterator itr = EvtMap->GetMap()->begin(); + for (; itr != EvtMap->GetMap()->end(); itr++) { + G4cout << " copy no.: " << itr->first + << " energy deposit: " << G4BestUnit(*(itr->second), "Energy") + << G4endl; + } +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + //Detector Number Scorer +PSDetectorNumber::PSDetectorNumber(G4String name, G4int depth) + : G4VPrimitiveScorer(name, depth), HCID(-1) +{ +} + +PSDetectorNumber::~PSDetectorNumber() +{ + ; +} + +G4bool PSDetectorNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) +{ + std::string name = aStep->GetTrack()->GetVolume()->GetName(); + std::string nbr ; + size_t found; + found=name.find("Plastic"); + found = found + 7; + + int numberOfCharacterInDetectorNumber = name.length() - (int)found ; + + for( int i = found ; i < found + numberOfCharacterInDetectorNumber ; i++ ) + nbr += name[i] ; + + G4int DetNbr = atoi( nbr.c_str() ) ; + G4double edep = aStep->GetTotalEnergyDeposit(); + + if (edep < 100*keV) return FALSE; + + G4int index = aStep->GetTrack()->GetTrackID(); + + EvtMap->set(DetNbr + index, DetNbr); + return TRUE; +} + +void PSDetectorNumber::Initialize(G4HCofThisEvent* HCE) +{ + EvtMap = new G4THitsMap<G4int>(GetMultiFunctionalDetector()->GetName(), GetName()); + if (HCID < 0) { + HCID = GetCollectionID(0); + } + HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap); +} + +void PSDetectorNumber::EndOfEvent(G4HCofThisEvent*) +{ + ; +} + +void PSDetectorNumber::clear() +{ + EvtMap->clear(); +} + +void PSDetectorNumber::DrawAll() +{ + ; +} + +void PSDetectorNumber::PrintAll() +{ + G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl; + G4cout << " PrimitiveScorer " << GetName() << G4endl; + G4cout << " Number of entries " << EvtMap->entries() << G4endl; + std::map<G4int, G4int*>::iterator itr = EvtMap->GetMap()->begin(); + for (; itr != EvtMap->GetMap()->end(); itr++) { + G4cout << " copy no.: " << itr->first + << " energy deposit: " << G4BestUnit(*(itr->second), "Energy") + << G4endl; + } +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +//TOF Scorer// +PSTOF::PSTOF(G4String name, G4int depth) + : G4VPrimitiveScorer(name, depth), HCID(-1) +{ + ; +} + +PSTOF::~PSTOF() +{ + ; +} + +G4bool PSTOF::ProcessHits(G4Step* aStep, G4TouchableHistory*) +{ + std::string name = aStep->GetTrack()->GetVolume()->GetName(); + std::string nbr ; + size_t found; + found=name.find("Plastic"); + found = found + 7; + + int numberOfCharacterInDetectorNumber = name.length() - (int)found ; + + for( int i = found ; i < found + numberOfCharacterInDetectorNumber ; i++ ) + nbr += name[i] ; + + G4int DetNbr = atoi( nbr.c_str() ) ; + + + G4double TOF = aStep->GetPreStepPoint()->GetGlobalTime(); + G4double edep = aStep->GetTotalEnergyDeposit(); + if (edep < 100*keV) return FALSE; + G4int index = aStep->GetTrack()->GetTrackID(); + EvtMap->set(DetNbr + index, TOF); + return TRUE; +} + +void PSTOF::Initialize(G4HCofThisEvent* HCE) +{ + EvtMap = new G4THitsMap<G4double>(GetMultiFunctionalDetector()->GetName(), + GetName()); + if (HCID < 0) { + HCID = GetCollectionID(0); + } + HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap); +} + +void PSTOF::EndOfEvent(G4HCofThisEvent*) +{ + ; +} + +void PSTOF::clear() +{ + EvtMap->clear(); +} + +void PSTOF::DrawAll() +{ + ; +} + +void PSTOF::PrintAll() +{ + G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl ; + G4cout << " PrimitiveScorer " << GetName() << G4endl ; + G4cout << " Number of entries " << EvtMap->entries() << G4endl ; +}