Class DetectorResponse

java.lang.Object
org.jlab.clas.detector.DetectorResponse
Direct Known Subclasses:
CalorimeterResponse, CherenkovResponse, RingCherenkovResponse, ScintillatorResponse, TaggerResponse

public class DetectorResponse extends Object
Author:
gavalian, baltzell
  • Constructor Details

    • DetectorResponse

      public DetectorResponse()
    • DetectorResponse

      public DetectorResponse(int sector, int layer, int component)
    • DetectorResponse

      public DetectorResponse(DetectorResponse r)
  • Method Details

    • copy

      public void copy(DetectorResponse r)
    • setTime

      public void setTime(double time)
    • setPosition

      public void setPosition(double x, double y, double z)
    • setMatchPosition

      public void setMatchPosition(double x, double y, double z)
    • setPath

      public void setPath(double path)
    • setEnergy

      public void setEnergy(double energy)
    • setStatus

      public void setStatus(int status)
    • getTime

      public double getTime()
    • getEnergy

      public double getEnergy()
    • getPath

      public double getPath()
    • getSector

      public int getSector()
    • getStatus

      public int getStatus()
    • getPosition

      public org.jlab.geom.prim.Vector3D getPosition()
    • getMatchedPosition

      public org.jlab.geom.prim.Vector3D getMatchedPosition()
    • getMatchedDistance

      public double getMatchedDistance()
    • getDescriptor

      public org.jlab.detector.base.DetectorDescriptor getDescriptor()
    • getHitIndex

      public int getHitIndex()
    • setHitIndex

      public void setHitIndex(int hitIndex)
    • addAssociation

      public void addAssociation(int asc)
    • getNAssociations

      public int getNAssociations()
    • getAssociation

      public int getAssociation(int index)
    • hasAssociation

      public boolean hasAssociation(int asc)
    • clearAssociations

      public void clearAssociations()
    • getPindexMask

      public int getPindexMask()
    • getAssociation

      public int getAssociation()
    • setAssociation

      public void setAssociation(int asc)
    • readHipoEvent

      public static List<DetectorResponse> readHipoEvent(org.jlab.io.base.DataEvent event, String bankName, org.jlab.detector.base.DetectorType type)
      reads DetectorResponse List from DataEvent class. it has to contain branches: sector and layer (type BYTE), x,y,z (type FLOAT) energy,time (type FLOAT)
      Parameters:
      event -
      bankName -
      type -
      Returns:
    • readHipoEvent

      public static List<DetectorResponse> readHipoEvent(org.jlab.io.base.DataEvent event, String bankName, org.jlab.detector.base.DetectorType type, double minEnergy)
      Reads a HIPO event, constructs list of detector responses then returns only entries with energy above given threshold.
      Parameters:
      event -
      bankName -
      type -
      minEnergy -
      Returns:
    • getListByEnergy

      public static List<DetectorResponse> getListByEnergy(List<DetectorResponse> responses, double minEnergy)
      Returns a list of detectorResponses where all entries have energy above given threshold.
      Parameters:
      responses - list of detector responses.
      minEnergy - minimum energy accepted
      Returns:
    • getListBySector

      public static List<DetectorResponse> getListBySector(List<DetectorResponse> list, org.jlab.detector.base.DetectorType type, int sector)
    • getListByLayer

      public static List<DetectorResponse> getListByLayer(List<DetectorResponse> list, org.jlab.detector.base.DetectorType type, int layer)
    • getListBySectorLayer

      public static List<DetectorResponse> getListBySectorLayer(List<DetectorResponse> list, org.jlab.detector.base.DetectorType type, int sector, int layer)
    • getSector

      public static int getSector(double phi)
    • toString

      public String toString()
      Overrides:
      toString in class Object