|
1 | 1 | package org.jlab.detector.geant4.v2.recoil.trk; |
2 | 2 |
|
3 | | -import org.jlab.detector.calib.utils.DatabaseConstantProvider; |
| 3 | +import org.jlab.detector.calib.utils.DatabaseConstantProvider; |
4 | 4 |
|
5 | 5 | public class RtrkConstants { |
6 | | - |
| 6 | + |
7 | 7 | private final static String CCDBPATH = "/geometry/recoil/trk/"; |
8 | 8 |
|
9 | | - public final static int NMAXREGIONS = 3; //max number of regions |
10 | | - public final static int NREGIONS = 3; //number of regions |
| 9 | + public final static int NMAXREGIONS = 3; //max number of regions |
| 10 | + public final static int NREGIONS = 3; //number of regions |
11 | 11 | public final static int NSECTORS = 2; //number of sectors |
12 | 12 | public final static int NLAYERS = 2; //number of layers |
13 | 13 | public final static int NCHAMBERS = 1; //number of chambers in a sector |
14 | | - |
| 14 | + |
15 | 15 | public final static double HORIZONTHAL_OPENING_ANGLE = 34.; |
16 | 16 | public final static double VERTICAL_OPENING_ANGLE = 50.; |
17 | 17 | public final static double RADIUS[] = {33.5,55.5,79.5}; |
18 | 18 | public final static double WIDTH[] = new double[NMAXREGIONS]; |
19 | 19 | public final static double HEIGHT[] = new double[NMAXREGIONS]; |
20 | | - |
| 20 | + |
21 | 21 | public final static double THTILT = 0; // theta tilt (deg) |
22 | 22 | /* public final static double XENLARGEMENT = 0.5; // cm |
23 | 23 | public final static double YENLARGEMENT = 1.; // cm |
24 | 24 | public final static double ZENLARGEMENT = 0.1; // cm |
25 | | - |
| 25 | + |
26 | 26 | // Sector geometrical parameters |
27 | 27 | public final static double THOPEN = 34.; // opening angle between endplate planes (deg) |
28 | 28 | public final static double THTILT = 0; // theta tilt (deg) |
29 | 29 | public final static double THMIN = 4.694; // polar angle to the base of first chamber (deg) |
30 | 30 | public final static double SECTORHEIGHT = 146.21; //height of each sector (cm) |
31 | 31 | public final static double DX0CHAMBER0 = 5.197; // halfbase of chamber 1 (cm)*/ |
32 | | - |
| 32 | + |
33 | 33 | // Chamber volumes and materials (units are cm) |
34 | | - public final static double[] CHAMBERVOLUMESTHICKNESS = {0.0025, 0.0005,0.3, // window |
35 | | - 0.0025, 0.0005,0.4, // cathode |
36 | | - 0.0005, 0.005, 0.0005, // uRWell + DlC |
37 | | - 0.0005, 0.005, 0.0005, // Capacitive sharing layer1 |
38 | | - 0.0005, 0.005, 0.0005, // Capacitive sharing layer2 |
39 | | - 0.005, 0.0005,0.005, 0.005, 0.0005,0.005, 0.005, // Readout |
40 | | - 0.0127, 0.3, 0.0125}; // support |
41 | | - public final static String[] CHAMBERVOLUMESNAME = {"window_kapton", "window_Al", "window_gas", |
42 | | - "cathode_kapton", "cathode_Al", "cathode_gas", |
43 | | - "muRwell_Cu", "muRwell_kapton", "muRwell_dlc", |
44 | | - "capa_sharing_layer1_glue","capa_sharing_layer1_Cr","capa_sharing_layer1_kapton", |
45 | | - "capa_sharing_layer2_glue","capa_sharing_layer2_Cr","capa_sharing_layer2_kapton", |
46 | | - "readout1_glue", "readout1_Cu", "readout1_kapton", "readout2_glue", "readout2_Cu", "readout2_kapton", "readout3_glue", |
47 | | - "support_skin1_g10", "support_honeycomb_nomex", "support_skin2_g10"}; |
48 | | - |
49 | | - // URWELL position in the CLAS12 frame |
50 | | - /* public final static double TGT2DC0 = 228.078; // cm |
51 | | - // public final static double URWELL2DC0 = 2; // cm |
| 34 | + public final static double[] CHAMBERVOLUMESTHICKNESS = { |
| 35 | + 0.0025, 0.0005,0.3, // window |
| 36 | + 0.0025, 0.0005,0.4, // cathode |
| 37 | + 0.0005, 0.005, 0.0005, // uRWell + DlC |
| 38 | + 0.0005, 0.005, 0.0005, // Capacitive sharing layer1 |
| 39 | + 0.0005, 0.005, 0.0005, // Capacitive sharing layer2 |
| 40 | + 0.005, 0.0005,0.005, 0.005, 0.0005,0.005, 0.005, // Readout |
| 41 | + 0.0127, 0.3, 0.0125}; // support |
| 42 | + public final static String[] CHAMBERVOLUMESNAME = { |
| 43 | + "window_kapton", "window_Al", "window_gas", |
| 44 | + "cathode_kapton", "cathode_Al", "cathode_gas", |
| 45 | + "muRwell_Cu", "muRwell_kapton", "muRwell_dlc", |
| 46 | + "capa_sharing_layer1_glue","capa_sharing_layer1_Cr","capa_sharing_layer1_kapton", |
| 47 | + "capa_sharing_layer2_glue","capa_sharing_layer2_Cr","capa_sharing_layer2_kapton", |
| 48 | + "readout1_glue", "readout1_Cu", "readout1_kapton", "readout2_glue", "readout2_Cu", "readout2_kapton", "readout3_glue", |
| 49 | + "support_skin1_g10", "support_honeycomb_nomex", "support_skin2_g10"}; |
| 50 | + |
| 51 | + // URWELL position in the CLAS12 frame |
| 52 | + /* public final static double TGT2DC0 = 228.078; // cm |
| 53 | + // public final static double URWELL2DC0 = 2; // cm |
52 | 54 | public final static double URWELL2DC0[] = new double[NMAXREGIONS]; |
53 | 55 | public final static double DIST2TGT[] = new double[NMAXREGIONS]; |
54 | | - public final static double W2TGT[] = new double[NMAXREGIONS];; |
| 56 | + public final static double W2TGT[] = new double[NMAXREGIONS];; |
55 | 57 | public final static double YMIN[] = new double[NMAXREGIONS]; |
56 | 58 | public final static double ZMIN[] = new double[NMAXREGIONS];*/ |
57 | 59 |
|
58 | 60 | public final static double PITCH = 0.1 ; // cm |
59 | 61 | public final static double STEREOANGLE = 90; // deg |
60 | | - |
61 | | - /* |
62 | | - * @return String a path to a directory in CCDB of the format {@code "/geometry/detector/"} |
63 | | - */ |
| 62 | + |
| 63 | + /* |
| 64 | + * @return String a path to a directory in CCDB of the format {@code "/geometry/detector/"} |
| 65 | + */ |
64 | 66 | public static String getCcdbPath() |
65 | 67 | { |
66 | | - return CCDBPATH; |
| 68 | + return CCDBPATH; |
67 | 69 | } |
68 | | - |
69 | | - /** |
| 70 | + |
| 71 | + /** |
70 | 72 | * Loads the the necessary tables for the URWELL geometry for a given DatabaseConstantProvider. |
71 | | - * |
| 73 | + * |
72 | 74 | * @return DatabaseConstantProvider the same thing |
73 | 75 | */ |
74 | 76 | public static DatabaseConstantProvider connect( DatabaseConstantProvider cp ) |
75 | 77 | { |
76 | | - // cp.loadTable( CCDBPATH +"RWELL"); |
77 | | - |
78 | | - load(cp ); |
79 | | - return cp; |
| 78 | + // cp.loadTable( CCDBPATH +"RWELL"); |
| 79 | + |
| 80 | + load(cp ); |
| 81 | + return cp; |
80 | 82 | } |
81 | | - |
| 83 | + |
82 | 84 | /** |
83 | 85 | * Reads all the necessary constants from CCDB into static variables. |
84 | 86 | * Please use a DatabaseConstantProvider to access CCDB and load the following tables: |
85 | 87 | * @param cp a ConstantProvider that has loaded the necessary tables |
86 | 88 | */ |
87 | | - |
88 | 89 | public static synchronized void load( DatabaseConstantProvider cp ) |
89 | 90 | { |
90 | | - // read constants from svt table |
| 91 | + // read constants from svt table |
91 | 92 | // NREGIONS = cp.getInteger( CCDBPATH+"svt/nRegions", 0 ); |
92 | | - |
93 | | - for (int i=0; i<NMAXREGIONS; i++){ |
94 | | - |
95 | | -/* URWELL2DC0[i] = -2.+i*1.3; |
96 | | - DIST2TGT[i] = (TGT2DC0+URWELL2DC0[i]); |
97 | | - W2TGT[i] = DIST2TGT[i]/Math.cos(Math.toRadians(THTILT-THMIN)); |
98 | | - YMIN[i]= W2TGT[i]*Math.sin(Math.toRadians(THMIN)); // distance from the base chamber1 and beamline |
99 | | - ZMIN[i] = W2TGT[i]*Math.cos(Math.toRadians(THMIN)); |
100 | | - */ |
101 | | - WIDTH[i]=2.*RADIUS[i]*Math.sin(Math.toRadians(HORIZONTHAL_OPENING_ANGLE)/2); |
102 | | - HEIGHT[i]=RADIUS[i]*Math.tan(Math.toRadians(VERTICAL_OPENING_ANGLE)/2); |
103 | | - } |
| 93 | + |
| 94 | + for (int i=0; i<NMAXREGIONS; i++){ |
| 95 | + |
| 96 | + /* URWELL2DC0[i] = -2.+i*1.3; |
| 97 | + DIST2TGT[i] = (TGT2DC0+URWELL2DC0[i]); |
| 98 | + W2TGT[i] = DIST2TGT[i]/Math.cos(Math.toRadians(THTILT-THMIN)); |
| 99 | + YMIN[i]= W2TGT[i]*Math.sin(Math.toRadians(THMIN)); // distance from the base chamber1 and beamline |
| 100 | + ZMIN[i] = W2TGT[i]*Math.cos(Math.toRadians(THMIN)); |
| 101 | + */ |
| 102 | + WIDTH[i]=2.*RADIUS[i]*Math.sin(Math.toRadians(HORIZONTHAL_OPENING_ANGLE)/2); |
| 103 | + HEIGHT[i]=RADIUS[i]*Math.tan(Math.toRadians(VERTICAL_OPENING_ANGLE)/2); |
| 104 | + } |
104 | 105 | } |
105 | 106 | } |
0 commit comments