public class BaseIDDecoder extends Object implements IDDecoder
Modifier and Type | Field and Description |
---|---|
protected IDDecoder |
decoder |
protected IDDescriptor |
descriptor |
protected Subdetector |
detector |
protected int |
layerIndex |
protected boolean |
valid |
protected int[] |
values |
INVALID_INDEX
Constructor and Description |
---|
BaseIDDecoder() |
BaseIDDecoder(IDDescriptor id) |
Modifier and Type | Method and Description |
---|---|
long |
findCellContainingXYZ(double[] pos)
Locate a cell from a global position.
|
long |
findCellContainingXYZ(Hep3Vector pos)
Locate a cell from a global position.
|
BarrelEndcapFlag |
getBarrelEndcapFlag()
Get the flag that indicates barrel or endcap, i.e.
|
IDDecoder |
getDecoder() |
int |
getFieldCount()
Get the number of fields in this id description.
|
int |
getFieldIndex(String name)
Get field index by name.
|
String |
getFieldName(int index)
Get field name by index.
|
IDDescriptor |
getIDDescription()
Get the ID description of this decoder.
|
int |
getLayer()
Get the layer number for the current id.
|
long[] |
getNeighbourIDs()
Get the current cell's neighbors using default neighboring parameters (usually
1,1,1).
|
long[] |
getNeighbourIDs(int deltaLayer,
int deltaTheta,
int deltaPhi)
Get the current cell's neighbors using fully specified neighboring parameters.
|
double |
getPhi() |
double[] |
getPosition() |
Hep3Vector |
getPositionVector() |
Subdetector |
getSubdetector()
Get the Subdetector associated with this IDDecoder, or null if not applicable.
|
int |
getSystemID()
Get the system ID, i.e.
|
int |
getSystemNumber() |
double |
getTheta()
The decoded theta angle of this id.
|
int |
getValue(int index)
Get the value of a field by index.
|
int |
getValue(String field)
Get the value of the given field.
|
int[] |
getValues(int[] buffer)
Get all decoded field values.
|
int |
getVLayer()
Get the layer number, possibly adjusted for topologies such as EcalBarrel.
|
double |
getX() |
double |
getY() |
double |
getZ() |
boolean |
isValid() |
void |
setID(long id)
Load the decoder with a 64-bit id value from the hit.
|
void |
setIDDescription(IDDescriptor id)
Set the ID description of this decoder.
|
private void |
setLayerIndex(IDDescriptor id) |
void |
setSubdetector(Subdetector d) |
boolean |
supportsNeighbours()
Does this Decoder support cell neighboring?
|
String |
toString() |
protected IDDecoder decoder
protected IDDescriptor descriptor
protected int[] values
protected boolean valid
protected Subdetector detector
protected int layerIndex
public BaseIDDecoder()
public BaseIDDecoder(IDDescriptor id)
public IDDecoder getDecoder()
public double getTheta()
IDDecoder
public double[] getPosition()
getPosition
in interface IDDecoder
public void setID(long id)
IDDecoder
public int getValue(String field)
IDDecoder
public int getValue(int index)
IDDecoder
public int[] getValues(int[] buffer)
IDDecoder
public String getFieldName(int index)
IDDecoder
getFieldName
in interface IDDecoder
index
- The index of the field.public int getFieldIndex(String name)
IDDecoder
getFieldIndex
in interface IDDecoder
name
- The name of the field.public int getFieldCount()
IDDecoder
getFieldCount
in interface IDDecoder
public void setIDDescription(IDDescriptor id)
IDDecoder
setIDDescription
in interface IDDecoder
id
- The ID description.public IDDescriptor getIDDescription()
IDDecoder
getIDDescription
in interface IDDecoder
public boolean isValid()
public BarrelEndcapFlag getBarrelEndcapFlag()
IDDecoder
getBarrelEndcapFlag
in interface IDDecoder
public void setSubdetector(Subdetector d)
public Subdetector getSubdetector()
IDDecoder
getSubdetector
in interface IDDecoder
private void setLayerIndex(IDDescriptor id)
public int getLayer()
IDDecoder
public int getVLayer()
IDDecoder
IDDecoder.getLayer()
.public int getSystemID()
IDDecoder
getSystemID
in interface IDDecoder
public int getSystemNumber()
getSystemNumber
in interface IDDecoder
public long[] getNeighbourIDs(int deltaLayer, int deltaTheta, int deltaPhi)
IDDecoder
getNeighbourIDs
in interface IDDecoder
deltaLayer
- The number of layers to neighbor (plus or minus).deltaTheta
- The number of cells in theta to neighbor (plus or minus).deltaPhi
- The number of cells in phi to neighbor (plus or minus).public boolean supportsNeighbours()
IDDecoder
supportsNeighbours
in interface IDDecoder
public long[] getNeighbourIDs()
IDDecoder
getNeighbourIDs
in interface IDDecoder
public long findCellContainingXYZ(Hep3Vector pos)
IDDecoder
findCellContainingXYZ
in interface IDDecoder
pos
- The position.public long findCellContainingXYZ(double[] pos)
IDDecoder
findCellContainingXYZ
in interface IDDecoder
pos
- The position.public final Hep3Vector getPositionVector()
getPositionVector
in interface IDDecoder
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.