Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public enum DetectorType {
AHDC (24, "AHDC"),
ATOF (25, "ATOF"),
RECOIL (26, "RECOIL"),
MUCAL (28, "MUCAL"),
MUVT (29, "MUVT"),
MURT (30, "MURT"),
MURH (31, "MURH"),
TARGET (100, "TARGET"),
MAGNETS (101, "MAGNETS");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ public final class DCGeant4Factory extends Geant4Factory {
private final HashMap<String, String> properties = new HashMap<>();
private int nsgwires;

private final double x_enlargement = 1.00;
private final double y_enlargement = 3.65;
private final double z_enlargement = -2.46;
private final double microgap = 0.01;
Expand Down Expand Up @@ -823,19 +824,20 @@ private Geant4Basic getRegion(int isec, int ireg) {
}

private Geant4Basic getLayer(int isec, int isuper, int ilayer) {
return getRegion(isec, isuper/2).getChildren().get((isuper%2)*6 + ilayer);
return getRegion(isec, isuper/2).getChildren().get(0).getChildren().get((isuper%2)*6 + ilayer);
}
///////////////////////////////////////////////////
public Geant4Basic createRegion(int isector, int iregion) {
Wire regw0 = new Wire(isector+1, iregion * 2, 0, 0);
Wire regw1 = new Wire(isector+1, iregion * 2 + 1, 7, nsgwires - 1);

double dx_shift = y_enlargement * Math.tan(Math.toRadians(29.5));
double dx_shift = y_enlargement * Math.tan(dbref.thopen(iregion)/2);
double extra = 0.2;

double reg_dz = (dbref.frontgap(iregion) + dbref.backgap(iregion) + dbref.midgap(iregion) + dbref.superwidth(iregion * 2) + dbref.superwidth(iregion * 2 + 1)) / 2.0 + z_enlargement;
double reg_dx0 = Math.abs(regw0.bottom().x) - dx_shift + 1.0;
double reg_dx1 = Math.abs(regw1.top().x) + dx_shift + 1.0;
double reg_dy = regw1.top().minus(regw0.bottom()).y / Math.cos(dbref.thtilt(iregion)) / 2.0 + y_enlargement + 1.0;
double reg_dx0 = Math.abs(regw0.bottom().x) - dx_shift + x_enlargement;
double reg_dx1 = Math.abs(regw1.top().x) + dx_shift + x_enlargement;
double reg_dy = regw1.top().minus(regw0.bottom()).y / Math.cos(dbref.thtilt(iregion)) / 2.0 + y_enlargement;
double reg_skew = 0.0;
double reg_thtilt = dbref.thtilt(iregion);

Expand All @@ -852,6 +854,17 @@ public Geant4Basic createRegion(int isector, int iregion) {
regionVolume.translate(vcenter.x, vcenter.y, vcenter.z);
regionVolume.setId(isector + 1, iregion + 1, 0, 0);

double gas_dx0 = reg_dx0 - x_enlargement + dx_shift + extra;
double gas_dx1 = reg_dx1 - x_enlargement - dx_shift + extra;
double gas_dy = reg_dy - y_enlargement + extra;
Geant4Basic regionGas = new G4Trap("regionGas" + (iregion + 1) + "_s" + (isector + 1),
reg_dz, -reg_thtilt, Math.toRadians(90.0),
gas_dy, gas_dx0, gas_dx1, 0.0,
gas_dy, gas_dx0, gas_dx1, 0.0);
regionGas.setPosition(0, 0, 0);
regionGas.setMother(regionVolume);
regionGas.setId(isector + 1, iregion + 1, 0, 0);

for (int isup = 0; isup < 2; isup++) {
int isuper = iregion * 2 + isup;
Geant4Basic superlayerVolume = this.createSuperlayer(isuper);
Expand All @@ -864,7 +877,7 @@ public Geant4Basic createRegion(int isector, int iregion) {
superlayerVolume.rotate("zxy", -dbref.thster(isuper), 0.0, 0.0);

superlayerVolume.setPosition(slshift.x, slshift.y, slshift.z);
superlayerVolume.setMother(regionVolume);
superlayerVolume.setMother(regionGas);
superlayerVolume.setId(isector + 1, iregion + 1, isuper + 1);

int nsglayers = dbref.nsenselayers(isuper) + dbref.nguardlayers(isuper);
Expand All @@ -879,7 +892,7 @@ public Geant4Basic createRegion(int isector, int iregion) {
layerVolume.rotate("zxy", -dbref.thster(isuper), 0.0, 0.0);

layerVolume.setPosition(lshift.x, lshift.y, lshift.z);
layerVolume.setMother(regionVolume);
layerVolume.setMother(regionGas);
layerVolume.setId(isector + 1, iregion + 1, isuper + 1, ilayer);
}
}
Expand Down
60 changes: 60 additions & 0 deletions etc/bankdefs/hipo4/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,66 @@
{ "name":"TDC" , "type":"I", "info":"TDC value"}
]
},
{
"name" : "MUCAL::adc",
"group": 22800,
"item" : 11,
"info": "ADC bank for the muCLAS12 Electromagnetic Calorimeter",
"entries":[
{ "name":"sector" , "type":"B", "info":"sector (=1)"},
{ "name":"layer" , "type":"B", "info":"layer (1-6)"},
{ "name":"component" , "type":"S", "info":"strip"},
{ "name":"order" , "type":"B", "info":"order: 0 - ADCL , 1 - ADCR"},
{ "name":"ADC" , "type":"I", "info":"ADC maximum"},
{ "name":"time" , "type":"F", "info":"time from pulse fit"},
{ "name":"ped" , "type":"S", "info":"pedestal from pulse analysis"}
]
},
{
"name" : "MUVT::adc",
"group": 22900,
"item" : 11,
"info": "ADC bank for the muCLAS12 Vertex Tracker",
"entries":[
{"name":"sector" , "type":"B", "info":"sector (=1)"},
{"name":"layer" , "type":"B", "info":"layer (=1)"},
{"name":"component" , "type":"S", "info":"crystal id"},
{ "name":"order" , "type":"B", "info":"order: 0 - ADCL , 1 - ADCR"},
{ "name":"ADC" , "type":"I", "info":"ADC integral from pulse fit"},
{ "name":"time" , "type":"F", "info":"time from pulse fit"},
{ "name":"ped" , "type":"S", "info":"pedestal from pulse analysis"}
]
},
{
"name" : "MURT::adc",
"group": 23000,
"item" : 11,
"info": "ADC bank for the muCLAS12 Recoil Tracker",
"entries":[
{"name":"sector" , "type":"B", "info":"sector (=1)"},
{"name":"layer" , "type":"B", "info":"layer (=1)"},
{"name":"component" , "type":"S", "info":"crystal id"},
{ "name":"order" , "type":"B", "info":"order: 0 - ADCL , 1 - ADCR"},
{ "name":"ADC" , "type":"I", "info":"ADC integral from pulse fit"},
{ "name":"time" , "type":"F", "info":"time from pulse fit"},
{ "name":"ped" , "type":"S", "info":"pedestal from pulse analysis"}
]
},
{
"name" : "MURH::adc",
"group": 23100,
"item" : 11,
"info": "ADC bank for the muCLAS12 Recoil Hodoscope",
"entries":[
{"name":"sector" , "type":"B", "info":"sector (1-8)"},
{"name":"layer" , "type":"B", "info":"layer (1-2)"},
{"name":"component" , "type":"S", "info":"tile id"},
{ "name":"order" , "type":"B", "info":"order: 0 - ADCL , 1 - ADCR"},
{ "name":"ADC" , "type":"I", "info":"ADC integral from pulse fit"},
{ "name":"time" , "type":"F", "info":"time from pulse fit"},
{ "name":"ped" , "type":"S", "info":"pedestal from pulse analysis"}
]
},
{
"name" : "RF::adc",
"group": 21700,
Expand Down
176 changes: 176 additions & 0 deletions etc/bankdefs/hipo4/mu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
[
{
"name": "MUCAL::hits",
"group": 22800,
"item" : 21,
"info": "Reconstructed Hits in muCLAS12 calorimeter",
"entries": [
{"name":"idx", "type":"B", "info":"x id of grid"},
{"name":"idy", "type":"B", "info":"y id of grid"},
{"name":"x", "type":"F", "info":"Hit X position (cm)" },
{"name":"y", "type":"F", "info":"Hit Y position (cm)" },
{"name":"z", "type":"F", "info":"Hit Z position (cm)" },
{"name":"energy", "type":"F", "info":"Hit Energy" },
{"name":"time", "type":"F", "info":"Hit Time" },
{"name":"hitID", "type":"S", "info":"Hit Pointer to ADC bank"},
{"name":"clusterID", "type":"S", "info":"Hit Pointer to Cluster Bank"}
]
},
{
"name": "MUCAL::clusters",
"group": 22800,
"item" : 22,
"info": "Reconstructed Clusters in muCLAS12 calorimeter",
"entries": [
{"name":"size", "type":"S", "info":"Cluster size" },
{"name":"id", "type":"S", "info":"Cluster ID" },
{"name":"x", "type":"F", "info":"Cluster centroid X moment (cm)" },
{"name":"y", "type":"F", "info":"Cluster centroid Y moment (cm)" },
{"name":"z", "type":"F", "info":"Cluster centroid Z moment (cm)" },
{"name":"widthX", "type":"F", "info":"Cluster width in x (cm)" },
{"name":"widthY", "type":"F", "info":"Cluster width in y (cm)" },
{"name":"radius", "type":"F", "info":"Cluster radius (cm)" },
{"name":"time", "type":"F", "info":"Cluster timing information" },
{"name":"energy", "type":"F", "info":"Cluster total energy" },
{"name":"maxEnergy", "type":"F", "info":"Cluster maximum energy" },
{"name":"recEnergy", "type":"F", "info":"Cluster reconstructed energy" }
]
},
{
"name": "MUVT::hits",
"group": 22900,
"item" : 21,
"info": "MUVT hits",
"entries": [
{"name":"id", "type":"S", "info":"id of the hit"},
{"name":"sector", "type":"B", "info":"sector number"},
{"name":"layer", "type":"B", "info":"layer number"},
{"name":"strip", "type":"S", "info":"strip number"},
{"name":"energy", "type":"F", "info":"energy of the hit (eV)"},
{"name":"time", "type":"F", "info":"time of the hit (ns)"},
{"name":"clusterId", "type":"S", "info":"id of the cluster the hit belongs to"},
{"name":"status", "type":"S", "info":"status of the hit"}
]
},
{
"name": "MUVT::clusters",
"group": 22900,
"item" : 22,
"info": "reconstructed clusters from MUVT",
"entries": [
{"name":"id", "type":"S", "info":"id of the cluster"},
{"name":"sector", "type":"B", "info":"sector"},
{"name":"layer", "type":"B", "info":"layer"},
{"name":"strip", "type":"S", "info":"seed strip"},
{"name":"energy", "type":"F", "info":"energy of the cluster (eV)"},
{"name":"time", "type":"F", "info":"time of the cluster (ns)"},
{"name":"xo", "type":"F", "info":"strip origin X coordinate (cm)"},
{"name":"yo", "type":"F", "info":"strip origin Y coordinate (cm)"},
{"name":"zo", "type":"F", "info":"strip origin Z coordinate (cm)"},
{"name":"xe", "type":"F", "info":"strip end X coordinate (cm)"},
{"name":"ye", "type":"F", "info":"strip end Y coordinate (cm)"},
{"name":"ze", "type":"F", "info":"strip end Z coordinate (cm)"},
{"name":"size", "type":"S", "info":"size of the cluster"},
{"name":"status", "type":"S", "info":"status of the cluster"}
]
},
{
"name": "MUVT::crosses",
"group": 22900,
"item" : 23,
"info": "reconstructed crosses from MUVT",
"entries": [
{"name":"id", "type":"S", "info":"id of the cross"},
{"name":"sector", "type":"B", "info":"sector"},
{"name":"region", "type":"B", "info":"region"},
{"name":"energy", "type":"F", "info":"energy of the cross (eV)"},
{"name":"time", "type":"F", "info":"time of the cross (ns)"},
{"name":"x", "type":"F", "info":"x coordinate (cm)"},
{"name":"y", "type":"F", "info":"y coordinate (cm)"},
{"name":"z", "type":"F", "info":"z coordinate (cm)"},
{"name":"cluster1", "type":"S", "info":"id of the cluster in the V layer"},
{"name":"cluster2", "type":"S", "info":"id of the cluster in the W layer"},
{"name":"status", "type":"S", "info":"status of the cluster"}
]
},
{
"name": "MUVT::tracks",
"group": 22900,
"item" : 36,
"info": "reconstructed tracks using MUVT information",
"entries": [
{"name":"index", "type":"S", "info":"index of the track in the DC bank"},
{"name":"status", "type":"B", "info":"status of the track (0: refitted using FMT, 1: original DC track)"},
{"name":"sector", "type":"B", "info":"sector of the track in DC"},
{"name":"vx", "type":"F", "info":"Vertex x-position of the swam track to the DOCA to the beamline (in cm)"},
{"name":"vy", "type":"F", "info":"Vertex y-position of the swam track to the DOCA to the beamline (in cm)"},
{"name":"vz", "type":"F", "info":"Vertex z-position of the swam track to the DOCA to the beamline (in cm)"},
{"name":"px", "type":"F", "info":"3-momentum x-coordinate of the swam track to the DOCA to the beamline (in GeV)"},
{"name":"py", "type":"F", "info":"3-momentum y-coordinate of the swam track to the DOCA to the beamline (in GeV)"},
{"name":"pz", "type":"F", "info":"3-momentum z-coordinate of the swam track to the DOCA to the beamline (in GeV)"},
{"name":"charge", "type":"B", "info":"charge of the track"},
{"name":"chi2", "type":"F", "info":"chi^2 of the fit"},
{"name":"NDF", "type":"B", "info":"number of degrees of freedom of the fit"}
]
},
{
"name": "MUVT::trajectory",
"group": 22900,
"item" : 37,
"info": "MUVT tracks trajectory bank",
"entries": [
{"name":"index", "type":"S", "info":"index of the track in the DC bank"},
{"name":"detector", "type":"B", "info":"id of the detector"},
{"name":"layer", "type":"B", "info":"id of the layer"},
{"name":"x", "type":"F", "info":"track x position at detector surface (cm)"},
{"name":"y", "type":"F", "info":"track y position at detector surface (cm)"},
{"name":"z", "type":"F", "info":"track z position at detector surface (cm)"},
{"name":"tx", "type":"F", "info":"track unit direction vector x component at detector surface"},
{"name":"ty", "type":"F", "info":"track unit direction vector y component at detector surface"},
{"name":"tz", "type":"F", "info":"track unit direction vector z component at detector surface"},
{"name":"lx", "type":"F", "info":"track x position in local coordinates (cm)"},
{"name":"ly", "type":"F", "info":"track y position in local coordinates (cm)"},
{"name":"lz", "type":"F", "info":"track z position in local coordinates (cm)"},
{"name":"dx", "type":"F", "info":"DC track x position in local coordinates (cm)"},
{"name":"dy", "type":"F", "info":"DC track y position in local coordinates (cm)"},
{"name":"dz", "type":"F", "info":"DC track z position in local coordinates (cm)"},
{"name":"path", "type":"F", "info":"pathlength of the track from the track vertex to the detector surface (cm)"}
]
},
{
"name": "MURH::hits",
"group": 23100,
"item" : 21,
"info": "Reconstructed Hits in muCLAS12 hodoscope",
"entries": [
{"name":"sector", "type":"B", "info":"sector number"},
{"name":"layer", "type":"B", "info":"layer number"},
{"name":"component", "type":"S", "info":"component number"},
{"name":"x", "type":"F", "info":"Hit X position (cm)" },
{"name":"y", "type":"F", "info":"Hit Y position (cm)" },
{"name":"z", "type":"F", "info":"Hit Z position (cm)" },
{"name":"energy", "type":"F", "info":"Hit Energy" },
{"name":"time", "type":"F", "info":"Hit Time" },
{"name":"hitID", "type":"S", "info":"Hit Pointer to ADC bank"},
{"name":"clusterID", "type":"S", "info":"Hit Pointer to Cluster Bank"}
]
},
{
"name": "MURH::clusters",
"group": 23100,
"item" : 22,
"info": "Reconstructed clusters in muCLAS12 hodoscope",
"entries": [
{"name":"size", "type":"S", "info":"Cluster size" },
{"name":"id", "type":"S", "info":"Cluster ID" },
{"name":"x", "type":"F", "info":"Cluster centroid X moment (cm)" },
{"name":"y", "type":"F", "info":"Cluster centroid Y moment (cm)" },
{"name":"z", "type":"F", "info":"Cluster centroid Z moment (cm)" },
{"name":"widthX", "type":"F", "info":"Cluster width in x (cm)" },
{"name":"widthY", "type":"F", "info":"Cluster width in y (cm)" },
{"name":"radius", "type":"F", "info":"Cluster radius (cm)" },
{"name":"time", "type":"F", "info":"Cluster timing information" },
{"name":"energy", "type":"F", "info":"Cluster total energy" }
]
}
]
Loading
Loading