Project

General

Profile

Files » det1_tagger_eledownstream_geometry.pl

Alexandre Camsonne, 12/19/2018 03:40 PM

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

    
7
my $DetectorMother="root";
8

    
9
my $DetectorName = 'det1_tagger_eledownstream';
10

    
11
#length in m, halfaperture in cm, streng in T or T/m, X in m, Z in m, Theta in rad
12
my $e_ds_dipole1_length			= $parameters{"e_ds_dipole1_length"};
13
my $e_ds_dipole1_innerhalfaperture	= $parameters{"e_ds_dipole1_innerhalfaperture"};
14
my $e_ds_dipole1_outerhalfaperture	= $parameters{"e_ds_dipole1_outerhalfaperture"};
15
my $e_ds_dipole1_strength		= $parameters{"e_ds_dipole1_strength"};
16
my $e_ds_dipole1_X			= $parameters{"e_ds_dipole1_X"};
17
my $e_ds_dipole2_X			= $parameters{"e_ds_dipole2_X"};
18
my $e_ds_dipole3_X			= $parameters{"e_ds_dipole3_X"};
19
my $e_ds_dipole1_Z			= $parameters{"e_ds_dipole1_Z"};
20
my $e_ds_dipole2_Z			= $parameters{"e_ds_dipole2_Z"};
21
my $e_ds_dipole3_Z			= $parameters{"e_ds_dipole3_Z"};
22
my $e_ds_dipole1_Theta			= $parameters{"e_ds_dipole1_Theta"};
23

    
24
my $Dy=$e_ds_dipole1_outerhalfaperture;
25
my $Dz=0.5*$e_ds_dipole1_length;
26
my $X=$e_ds_dipole1_X-0.6;
27
#my $Z=$e_ds_dipole1_Z-2*$e_ds_dipole1_length;
28
my $Z=$e_ds_dipole1_Z-2;
29
my $Z2=$e_ds_dipole2_Z+2;
30
my $X2=$e_ds_dipole2_X-0.5;
31
my $Z3=$e_ds_dipole3_Z-2;
32
my $X3=$e_ds_dipole3_X-0.3;
33
# == id name ==============================================================
34
# digit     beamline                side          magnet      number          window
35
#        ion    1        upstream    1    dipole    1           n     front      1
36
#        ele    2       downstream   2  quadrupole  2           n     back       2
37
#                                         virtual   3 
38
#                                         compton   4 
39
#                                         tagger    5 
40
# =========================================================================
41

    
42

    
43
sub det1_tagger_eledownstream
44
{
45
    make_meic_det1_ele_tagger_side();
46
    make_meic_det1_ele_tagger_front();
47
    make_meic_det1_ele_tagger_back();
48

    
49
}
50

    
51
sub make_meic_det1_ele_tagger_side
52
{
53
	my %detector = init_det();
54
	$detector{"name"}        = "$DetectorName"."side";
55
	$detector{"mother"}      = "$DetectorMother" ;
56
	$detector{"description"} = "$DetectorName";
57
	$detector{"pos"}         = "$X*m 0*m $Z*m";
58
	$detector{"rotation"}    = "0*deg -$e_ds_dipole1_Theta*deg 0*deg";
59
	$detector{"color"}       = "880000";
60
	$detector{"type"}        = "Box";
61
	$detector{"dimensions"}  = "1*cm 10*cm 3*m";
62
	$detector{"material"}    = "Kryptonite";
63
	$detector{"mfield"}     = "no";
64
	$detector{"ncopy"}      = 1;
65
	$detector{"pMany"}       = 1;
66
	$detector{"exist"}       = 1;
67
	$detector{"visible"}     = 1;
68
	$detector{"style"}       = 1;	
69
	$detector{"sensitivity"} ="flux";
70
	$detector{"hit_type"}    ="flux";
71
	$detector{"identifiers"} ="id manual 22510";
72
	print_det(\%configuration, \%detector);	
73
}
74

    
75
sub make_meic_det1_ele_tagger_front
76
{
77
	my %detector = init_det();
78
	$detector{"name"}        = "$DetectorName"."front";
79
	$detector{"mother"}      = "$DetectorMother" ;
80
	$detector{"description"} = "$DetectorName";
81
	$detector{"pos"}         = "$X*m 0*m $Z2*m";
82
	$detector{"rotation"}    = "0*deg -$e_ds_dipole1_Theta*deg 0*deg";
83
	$detector{"color"}       = "880000";
84
	$detector{"type"}        = "Box";
85
	$detector{"dimensions"}  = "30*cm 10*cm 0.1*cm";
86
	$detector{"material"}    = "Kryptonite";
87
	$detector{"mfield"}     = "no";
88
	$detector{"ncopy"}      = 1;
89
	$detector{"pMany"}       = 1;
90
	$detector{"exist"}       = 1;
91
	$detector{"visible"}     = 1;
92
	$detector{"style"}       = 1;	
93
	$detector{"sensitivity"} ="flux";
94
	$detector{"hit_type"}    ="flux";
95
	$detector{"identifiers"} ="id manual 22511";
96
	print_det(\%configuration, \%detector);	
97
}
98

    
99
sub make_meic_det1_ele_tagger_back
100
{
101
	my %detector = init_det();
102
	$detector{"name"}        = "$DetectorName"."back";
103
	$detector{"mother"}      = "$DetectorMother" ;
104
	$detector{"description"} = "$DetectorName";
105
	$detector{"pos"}         = "$X3*m 0*m $Z3*m";
106
	$detector{"rotation"}    = "0*deg -$e_ds_dipole1_Theta*deg 0*deg";
107
	$detector{"color"}       = "880000";
108
	$detector{"type"}        = "Box";
109
	$detector{"dimensions"}  = "30*cm 10*cm 0.1*cm";
110
	$detector{"material"}    = "Kryptonite";
111
	$detector{"mfield"}     = "no";
112
	$detector{"ncopy"}      = 1;
113
	$detector{"pMany"}       = 1;
114
	$detector{"exist"}       = 1;
115
	$detector{"visible"}     = 1;
116
	$detector{"style"}       = 1;	
117
	$detector{"sensitivity"} ="flux";
118
	$detector{"hit_type"}    ="flux";
119
	$detector{"identifiers"} ="id manual 22512";
120
	print_det(\%configuration, \%detector);	
121
}
(1-1/4)