diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/recoil/RecoilConstants.java b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/recoil/RecoilConstants.java index 805407434e..0a06fe70df 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/recoil/RecoilConstants.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/recoil/RecoilConstants.java @@ -2,7 +2,6 @@ import org.jlab.detector.calib.utils.DatabaseConstantProvider; -import org.jlab.geom.prim.Point3D; public class RecoilConstants { @@ -15,24 +14,15 @@ public class RecoilConstants { public final static int NLAYERS = 2; //number of layers public final static int NCHAMBERS = 1; //number of chambers in a sector - public final static double HORIZONTHAL_OPENING_ANGLE = 34.; + public final static double HORIZONTHAL_STARTING_ANGLE = 40.; + public final static double HORIZONTHAL_OPENING_ANGLE = 29.; public final static double VERTICAL_OPENING_ANGLE = 50.; - public final static double RADIUS[] = {33.5,55.5,79.5}; + public final static double RADIUS[] = {44,72,100}; public final static double WIDTH[] = new double[NMAXREGIONS]; public final static double HEIGHT[] = new double[NMAXREGIONS]; public final static double THTILT = 0; // theta tilt (deg) - /* public final static double XENLARGEMENT = 0.5; // cm - public final static double YENLARGEMENT = 1.; // cm - public final static double ZENLARGEMENT = 0.1; // cm - // Sector geometrical parameters - public final static double THOPEN = 34.; // opening angle between endplate planes (deg) - public final static double THTILT = 0; // theta tilt (deg) - public final static double THMIN = 4.694; // polar angle to the base of first chamber (deg) - public final static double SECTORHEIGHT = 146.21; //height of each sector (cm) - public final static double DX0CHAMBER0 = 5.197; // halfbase of chamber 1 (cm)*/ - // Chamber volumes and materials (units are cm) public final static double[] CHAMBERVOLUMESTHICKNESS = {0.0025, 0.0005,0.3, // window 0.0025, 0.0005,0.4, // cathode @@ -49,15 +39,6 @@ public class RecoilConstants { "readout1_glue", "readout1_Cu", "readout1_kapton", "readout2_glue", "readout2_Cu", "readout2_kapton", "readout3_glue", "support_skin1_g10", "support_honeycomb_nomex", "support_skin2_g10"}; - // URWELL position in the CLAS12 frame - /* public final static double TGT2DC0 = 228.078; // cm - // public final static double URWELL2DC0 = 2; // cm - public final static double URWELL2DC0[] = new double[NMAXREGIONS]; - public final static double DIST2TGT[] = new double[NMAXREGIONS]; - public final static double W2TGT[] = new double[NMAXREGIONS];; - public final static double YMIN[] = new double[NMAXREGIONS]; - public final static double ZMIN[] = new double[NMAXREGIONS];*/ - public final static double PITCH = 0.1 ; // cm public final static double STEREOANGLE = 90; // deg @@ -95,14 +76,8 @@ public static synchronized void load( DatabaseConstantProvider cp ) for (int i=0; i globalStrips = new IndexedList(3); private IndexedList localStrips = new IndexedList(3); - private IndexedList planeStrips = new IndexedList(3); private int nRegions; private int nSectors; private int nChambers; @@ -73,7 +71,6 @@ public void init(DatabaseConstantProvider cp, int regions) { nChambers = RecoilConstants.NCHAMBERS; nLayers = RecoilConstants.NLAYERS; this.fillStripLists(); - // this.fillPlaneLists(); } /** @@ -117,7 +114,7 @@ public int getNStripChamber(int ichamber, int regions) { int nAB = (int) (2 * xHalf / RecoilConstants.PITCH); int nAC = (int) (2 * yHalf / RecoilConstants.PITCH); - int nStrips = nAB + nAC; + int nStrips = nAB + nAC +1; return nStrips; } @@ -191,7 +188,8 @@ private Line3d createStrip(int sector, int region, int layer, int strip) { } // ID of the strip int nS = (int) (DY / RecoilConstants.PITCH); - int nCStrip = nS + (cStrip - 1); + // int nCStrip = nS + (cStrip - 1); + int nCStrip = nS + (cStrip); double c = nCStrip * RecoilConstants.PITCH; // Take 2 points in the strip straight line. They needs to define Line object @@ -308,9 +306,10 @@ private void fillStripLists() { DY = -yHalf; } int nS = (int) (DY / RecoilConstants.PITCH); - int nCStrip = nS + (cStrip - 1); + // int nCStrip = nS + (cStrip - 1); + int nCStrip = nS + (cStrip); double c = nCStrip * RecoilConstants.PITCH; - if (((layer) % 2 == 0 && c>-xHalf && c-yHalf && c=-xHalf && c<=xHalf)||((layer) % 2 != 0 && c>=-yHalf && c<=yHalf)) { Line3d line = this.createStrip(sector, region,layer, strip); @@ -339,55 +338,12 @@ private void fillStripLists() { public Line3D toLocal(int sector, Line3D global) { Line3D local = new Line3D(); local.copy(global); - local.rotateY((-1+sector*2)*Math.toRadians(1.5*RecoilConstants.HORIZONTHAL_OPENING_ANGLE+270)); - + if(sector==0)local.rotateY((Math.toRadians(RecoilConstants.HORIZONTHAL_OPENING_ANGLE/2+RecoilConstants.HORIZONTHAL_STARTING_ANGLE))); + if(sector==1)local.rotateY(-(Math.toRadians(RecoilConstants.HORIZONTHAL_OPENING_ANGLE/2+RecoilConstants.HORIZONTHAL_STARTING_ANGLE))); return local; } - private void fillPlaneLists() { - - for(int ir=0; ir-xHalf && c-yHalf && c + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
+ diff --git a/etc/bankdefs/hipo4/data.json b/etc/bankdefs/hipo4/data.json index 854f4586ab..92dfa52aa5 100644 --- a/etc/bankdefs/hipo4/data.json +++ b/etc/bankdefs/hipo4/data.json @@ -597,7 +597,22 @@ { "name":"ped" , "type":"S", "info":"pedestal from pulse analysis"} ] }, - { + { + "name" : "RECOIL::adc", + "group": 22600, + "item" : 11, + "info": "ADC bank for the URWELL", + "entries":[ + { "name":"sector" , "type":"B", "info":"sector (11-63)"}, + { "name":"layer" , "type":"B", "info":"layer (1-2)"}, + { "name":"component" , "type":"S", "info":"strip"}, + { "name":"order" , "type":"B", "info":"order: 0 - ADCL , 1 - ADCR"}, + { "name":"ADC" , "type":"I", "info":"ADC charge"}, + { "name":"time" , "type":"F", "info":"time"}, + { "name":"ped" , "type":"S", "info":"pedestal from pulse analysis"} + ] + }, + { "name" : "RAW::adc", "group": 20000, "item" : 11,