det1_compton_edetector_geometry.pl

Alexandre Camsonne, 11/16/2017 05:22 PM

Download (1.45 KB)

 
1
use strict;
2
use warnings;
3
our %detector;
4
our %configuration;
5
our %parameters;
6

    
7
use Getopt::Long;
8
use Math::Trig;
9

    
10
my $DetectorMother="root";
11
my $DetectorName = "meic_det1_magnet_ele";
12
my $NStrips = 300;
13

    
14
my $strip;
15
my $strip_position;
16

    
17
sub make_det1_compton_edetector_geometry
18
{
19

    
20
    for(my $i = 0; $i < ($NStrips); $i++)
21
    {
22

    
23
        $strip = $i + 1;
24
        $strip_position = -0.0503698+${i}*(0.000010+0.000240); #-0.0653698+${i}*(0.000010+0.000240); 
25

    
26

    
27
        my %detector=init_det();
28
        $detector{"name"}        = "e_det_strip_$strip";
29
        $detector{"mother"}      = "root";
30
        $detector{"description"} = "Compton Electron Detector Strip ${strip}";
31
        $detector{"pos"}         = "${strip_position}*m 0*m -32.5965318*m";
32
        $detector{"rotation"}    = "0.0*rad 0.0*rad 0.0*rad";
33
        $detector{"color"}       = "EE00EE";
34
        $detector{"type"}        = "Box";
35
        $detector{"dimensions"}  = "0.0120*cm 0.5000*cm 0.05*cm";
36
        $detector{"material"}    = "G4_Si";
37
        $detector{"mfield"}      = "no";
38
        $detector{"ncopy"}       = 1;
39
        $detector{"pMany"}       = 1;
40
        $detector{"exist"}       = 1;
41
        $detector{"visible"}     = 1;
42
        $detector{"style"}       = 1;
43
        $detector{"sensitivity"} = "flux";
44
        $detector{"hit_type"}    = "flux";
45
        $detector{"identifiers"} = "id manual $strip";
46
        print_det(\%configuration, \%detector);
47
    }
48
}
49
1;