GEMC  1.8
Geant4 Monte-Carlo Framework
dc12geom.h
Go to the documentation of this file.
1 double cwirex(int isup);
2 double cwirey(int isup);
3 double cwirez(int isup);
4 double wiremidx(int iwir, int ilayer, int isup);
5 double wiremidy(int iwir, int ilayer, int isup);
6 double wiremidz(int iwir, int ilayer, int isup);
7 
8 double anglepoint(double x1[],double x2[],double x3[]);
9 int wiretowire(double x1[],double x2[],double cwire[], double *par);
10 int lineplaneint(double xwire[],double cwire[],double xplates[],double cplate[],double *par);
11 void read_param(string filename);
12 void get_thickness (int ireg);
13 void calc_cosines_etc (int isup);
14 void calc_midpoints (int ilayer, int isup);
15 void calc_wire_info (int iwir, int ilayer, int isup);
16 void calc_g4layer_parameters(int ilayer, int isup);
17 void calc_g4mother_positions(int isup);
18 void calc_g4layer_positions(int isup);
19 void def_some_numbers();
20 void write_output_g4layers(string filename);
21 void write_output_g4mother(string filename);
22 void getWirePositions(int isup,int ilayer,double xc[],double yc[],double zc[],double xcos[],double ycos[],double zcos[]);
23 
24 double pi = 3.14159;
25 double d2r = pi/180.0; // degrees to radians
26 double r2d = 1.0/d2r; // radians to degrees
27 double expand = 1.0000; // expand mother volume
28 
29 
30 const int nlayers = 8; //number of layers in a superlayer
31 const int nslayers = 6; // number of superlayers
32 const int ndim = 3; // number of spatial dimensions: x,y,z
33 const int nreg = 3; // number of DC regions
34 const int nwires = 114; // total number of wires in each layer
35 const int totnlyr = 21; // total number of layers in a superlayer - 1
36 const int avethick = 3; // average thickness of hexagonal layer in units of d (an essential parameter)
37 const int staggerflag = 1; // order of layer stagger (0 or 1)
38 
39 
40 double rlyr[nslayers]; //distance from the target to the first guard wire plane in each superlayer
41 double thopen[nslayers]; //opening angle between endplate planes in each superlayer
42 double thtilt[nslayers]; //tilt angle (relative to z) of the six superlayers
43 double thster[nslayers]; //stereo angle of the wires in the six superlayers,angle of rotation about the normal to the wire plane
44 double thmin[nslayers]; //polar angle to the first guard wire's "mid-point" where the wire mid-point is the intersection of the wire with the chamber mid-plane
45 double d[nslayers]; //distance between wire planes
46 double xe[nslayers]; //distance between the line of intersection of the two endplate planes and the target position
47 double frontgap[nreg]; //distance between the upstream gas bag and the first guard wire layer
48 double midgap[nreg]; //the distance between the last guard wire layer of one superlayer and the first guard wire layer of the next superlayer - for each region
49 double backgap[nreg]; //distance between the last guard wire layer of a region and the downstream gas bag - for each region
50 
51 int ifirst = 1;
52 int ifirstwir[nslayers] = {1,1,1,1,1,1}; //guard wire "marked" in a superlayer, corresponding to thmin
53 
56 double cplane[ndim],cwire[ndim]; //direction cosines of wire plane normals and wire directions
57 double crhplate[ndim],clhplate[ndim]; //dir. cosines of normals to rh and lh endplates
58 double xplates[ndim];
67 double xx1[nreg],xx2[nreg],xz1[nreg],xz2[nreg];
68 double delx1[nreg],delx2[nreg],dely[nreg],center_m[ndim][nreg]; // mother G4 volumes dim
const int ndim
Definition: dc12geom.h:32
double dw
Definition: dc12geom.h:59
void calc_g4layer_positions(int isup)
Definition: dc12geom.cc:408
double dely[nreg]
Definition: dc12geom.h:68
double xz1[nreg]
Definition: dc12geom.h:67
double wirespan[nslayers][nlayers]
Definition: dc12geom.h:65
double cplane[ndim]
Definition: dc12geom.h:56
double wirelength[nwires]
Definition: dc12geom.h:61
double cwirez(int isup)
Definition: dc12geom.cc:495
double crhplate[ndim]
Definition: dc12geom.h:57
const int staggerflag
Definition: dc12geom.h:37
double xlyr[ndim][nslayers][nlayers]
Definition: dc12geom.h:66
double regthickness[nreg]
Definition: dc12geom.h:54
double xrightwire[ndim]
Definition: dc12geom.h:62
double layerthickness[nslayers]
Definition: dc12geom.h:55
const int nlayers
Definition: dc12geom.h:30
double x1mid
Definition: dc12geom.h:60
const int nwires
Definition: dc12geom.h:34
const int totnlyr
Definition: dc12geom.h:35
double thmin[nslayers]
Definition: dc12geom.h:44
double xcenter[ndim][nwires]
Definition: dc12geom.h:63
double rlyr[nslayers]
Definition: dc12geom.h:40
double delx1[nreg]
Definition: dc12geom.h:68
double rfront[nreg]
Definition: dc12geom.h:54
int wiretowire(double x1[], double x2[], double cwire[], double *par)
Definition: dc12geom.cc:76
void get_thickness(int ireg)
Definition: dc12geom.cc:174
double anglepoint(double x1[], double x2[], double x3[])
Definition: dc12geom.cc:52
double xmidwire[ndim]
Definition: dc12geom.h:62
void calc_cosines_etc(int isup)
Definition: dc12geom.cc:185
double dw2
Definition: dc12geom.h:59
const int nslayers
Definition: dc12geom.h:31
double delxlyr[ndim][nslayers][nlayers]
Definition: dc12geom.h:69
void calc_midpoints(int ilayer, int isup)
Definition: dc12geom.cc:242
double dist1mid
Definition: dc12geom.h:60
void calc_g4mother_positions(int isup)
Definition: dc12geom.cc:364
double y0mid
Definition: dc12geom.h:60
double x0mid
Definition: dc12geom.h:60
double wiremidz(int iwir, int ilayer, int isup)
Definition: dc12geom.cc:543
double xe[nslayers]
Definition: dc12geom.h:46
double wiremidy(int iwir, int ilayer, int isup)
Definition: dc12geom.cc:536
double midgap[nreg]
Definition: dc12geom.h:48
double xplates[ndim]
Definition: dc12geom.h:58
double delx2[nreg]
Definition: dc12geom.h:68
int ifirstwir[nslayers]
Definition: dc12geom.h:52
double expand
Definition: dc12geom.h:27
double xmid[ndim][nwires]
Definition: dc12geom.h:61
double xleftwire[ndim]
Definition: dc12geom.h:62
double pi
Definition: dc12geom.h:24
double thster[nslayers]
Definition: dc12geom.h:43
const int nreg
Definition: dc12geom.h:33
double sster
Definition: dc12geom.h:59
int ifirst
Definition: dc12geom.h:51
double d2r
Definition: dc12geom.h:25
double xleft[ndim][nslayers][nlayers][nwires]
Definition: dc12geom.h:63
double lyrangle[nslayers][nlayers]
Definition: dc12geom.h:65
double y1mid
Definition: dc12geom.h:60
double thtilt[nslayers]
Definition: dc12geom.h:42
double xx2[nreg]
Definition: dc12geom.h:67
void def_some_numbers()
Definition: dc12geom.cc:382
double r2d
Definition: dc12geom.h:26
double d[nslayers]
Definition: dc12geom.h:45
double stilt
Definition: dc12geom.h:59
double rback[nreg]
Definition: dc12geom.h:54
double lyrthick
Definition: dc12geom.h:60
double delx1lyr[nslayers][nlayers]
Definition: dc12geom.h:64
void write_output_g4mother(string filename)
double thopen[nslayers]
Definition: dc12geom.h:41
double z1mid
Definition: dc12geom.h:60
double delylyr[nslayers][nlayers]
Definition: dc12geom.h:64
double xright[ndim][nslayers][nlayers][nwires]
Definition: dc12geom.h:63
double frontgap[nreg]
Definition: dc12geom.h:47
double clhplate[ndim]
Definition: dc12geom.h:57
double backgap[nreg]
Definition: dc12geom.h:49
double cwirey(int isup)
Definition: dc12geom.cc:487
void calc_wire_info(int iwir, int ilayer, int isup)
Definition: dc12geom.cc:267
int lineplaneint(double xwire[], double cwire[], double xplates[], double cplate[], double *par)
Definition: dc12geom.cc:101
double cster
Definition: dc12geom.h:59
const int avethick
Definition: dc12geom.h:36
double angmid[nwires]
Definition: dc12geom.h:61
double z0mid
Definition: dc12geom.h:60
void getWirePositions(int isup, int ilayer, double xc[], double yc[], double zc[], double xcos[], double ycos[], double zcos[])
Definition: dc12geom.cc:573
double xx1[nreg]
Definition: dc12geom.h:67
double r
Definition: dc12geom.h:54
double delx2lyr[nslayers][nlayers]
Definition: dc12geom.h:64
double center_m[ndim][nreg]
Definition: dc12geom.h:68
void read_param(string filename)
void calc_g4layer_parameters(int ilayer, int isup)
Definition: dc12geom.cc:311
double xz2[nreg]
Definition: dc12geom.h:67
double ctilt
Definition: dc12geom.h:59
double cwire[ndim]
Definition: dc12geom.h:56
void write_output_g4layers(string filename)
double wiremidx(int iwir, int ilayer, int isup)
Definition: dc12geom.cc:504
double cwirex(int isup)
Definition: dc12geom.cc:478