Skip to content
Felix Touchte Codjo edited this page Dec 20, 2024 · 12 revisions

Geometry

The AHDC geometry, the same currently used by the geometry service, is defined in this coatjava repository.

The following lines give a simple explanation.

Conforming to the CLAS convention, the AHDC is composed of :

  • 1 sector
  • 5 superlayers containing 1 or 2 layers
  • each layer of the same superlayer contains the same number of wires
sector superlayer layer number of wires radius of the layer (mm)
1 1 1 47 32
1 2 1 56 38
1 2 2 56 38 + 4
1 3 1 72 48
1 3 2 72 48 + 4
1 4 1 87 58
1 4 2 87 58 + 4
1 5 1 99 68

It is important to note that the numerotation starts at 1. Each line contains information about a particular layer.

Detector indexing and hipo files

They are two type of detector indexing :

  • csc = crate, slot, channel (currently in EVIO only)

  • slco = sector, layer, component, order (currently in HIPO only)

That means that if you are working with HIPO files, you have to deal with the slco indexing convention. At this stage, one could ask where is encoded the AHDC superlayer concept. The geometry service uses this convention :

$$\mbox{layerID} = 10*\mbox{superlayer} + \mbox{layer}$$

Here is an example of HIPO files containing the AHDC::adc bank.

Screenshot from 2024-12-20 13-57-12

Let's explain the indexing. Each column contains information about a sense wire. In the first column, we can see that sector = 1, layer = 11, component = 45, order = 1. That means that the hit appears in the 45 -th wire of the layer 1 of the superlayer 1.

From wire identifiers to (x,y,z) coordinates

There is a direct link between the sclo indexing and the wire position.

One can retrieve this link by hand or using methods available in the coatjava library.

By hand

As starting point, I assume we know the superlayer, layer, component identifiers.

  1. A wire is characterised by two end points, let's say p1 and p2 with coordinates (x1,y1,z1) and (x2,y2,z2). p1 is located in the "back" face of the detector, where the electronics are connected. If the geometric range of the detector goes from z = -150 mm to z = +150 mm, we have z1 = -150 mm and z2 = 150 mm. We retrieve the radius of the layer from the table defined previously and store it in the variable rlayer.

  2. If the numerotation starts at 1, do minus 1 t go back in a 0-indexing convention.

superlayer = superlayer - 1;
layer = layer - 1;
component = component - 1;
  1. We have :
$$x_1 = - r*sin()$$

TO BE COMPLETED...

Using coatjava

  1. Let's suppose, we read the AHDC::adc bank. Then we store the wire identifier in the variables layer, component. I assume you have the correct version of geometry where the numerotation starts at 1.
int sector       = bank.getByte("sector", loop);
int layer        = bank.getByte("layer", loop);
int component    = bank.getShort("component", loop);
int order        = bank.getByte("order", loop);

// 
int sectorId = sector;
int superlayerId = layer/10;
int layerId = layer - superlayerId*10;
int componentId = component;

// when using the getter methods, numerotations start at 0 !!!
Point3D midpoint = ahdc.getSector(sectorId-1).getSuperlayer(superlayerId-1).getLayer(layerId-1).getComponent(componentId-1).getMidpoint();
double x = midpoint.x()
double y = midpoint.y()
double z = midpoint.z();

TO BE COMPLETED...

Clone this wiki locally