Package org.jlab.clas.detector
Class DetectorResponse
java.lang.Object
org.jlab.clas.detector.DetectorResponse
- Direct Known Subclasses:
- CalorimeterResponse,- CherenkovResponse,- FTResponse,- RingCherenkovResponse,- ScintillatorResponse,- TaggerResponse
- Author:
- gavalian, baltzell
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAssociation(int asc) voidvoidintintgetAssociation(int index) doubleintstatic List<DetectorResponse>getListByEnergy(List<DetectorResponse> responses, double minEnergy) Returns a list of detectorResponses where all entries have energy above given threshold.static List<DetectorResponse>getListByLayer(List<DetectorResponse> list, DetectorType type, int layer) static List<DetectorResponse>getListBySector(List<DetectorResponse> list, DetectorType type, int sector) static List<DetectorResponse>getListBySectorLayer(List<DetectorResponse> list, DetectorType type, int sector, int layer) doubleintdoublegetPath()intintstatic intgetSector(double phi) intdoublegetTime()booleanhasAssociation(int asc) static List<DetectorResponse>readHipoEvent(DataEvent event, String bankName, 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)static List<DetectorResponse>readHipoEvent(DataEvent event, String bankName, DetectorType type, double minEnergy) Reads a HIPO event, constructs list of detector responses then returns only entries with energy above given threshold.voidsetAssociation(int asc) voidsetEnergy(double energy) voidsetHitIndex(int hitIndex) voidsetMatchPosition(double x, double y, double z) voidsetPath(double path) voidsetPosition(double x, double y, double z) voidsetStatus(int status) voidsetTime(double time) toString()
- 
Constructor Details- 
DetectorResponsepublic DetectorResponse()
- 
DetectorResponsepublic DetectorResponse(int sector, int layer, int component) 
- 
DetectorResponse
 
- 
- 
Method Details- 
copy
- 
setTimepublic void setTime(double time) 
- 
setPositionpublic void setPosition(double x, double y, double z) 
- 
setMatchPositionpublic void setMatchPosition(double x, double y, double z) 
- 
setPathpublic void setPath(double path) 
- 
setEnergypublic void setEnergy(double energy) 
- 
setStatuspublic void setStatus(int status) 
- 
getTimepublic double getTime()
- 
getEnergypublic double getEnergy()
- 
getPathpublic double getPath()
- 
getSectorpublic int getSector()
- 
getStatuspublic int getStatus()
- 
getPosition
- 
getMatchedPosition
- 
getMatchedDistancepublic double getMatchedDistance()
- 
getDescriptor
- 
getHitIndexpublic int getHitIndex()
- 
setHitIndexpublic void setHitIndex(int hitIndex) 
- 
addAssociationpublic void addAssociation(int asc) 
- 
getNAssociationspublic int getNAssociations()
- 
getAssociationpublic int getAssociation(int index) 
- 
hasAssociationpublic boolean hasAssociation(int asc) 
- 
clearAssociationspublic void clearAssociations()
- 
getPindexMaskpublic int getPindexMask()
- 
getAssociationpublic int getAssociation()
- 
setAssociationpublic void setAssociation(int asc) 
- 
readHipoEventpublic static List<DetectorResponse> readHipoEvent(DataEvent event, String bankName, 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:
 
- 
readHipoEventpublic static List<DetectorResponse> readHipoEvent(DataEvent event, String bankName, 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:
 
- 
getListByEnergypublic 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:
 
- 
getListBySectorpublic static List<DetectorResponse> getListBySector(List<DetectorResponse> list, DetectorType type, int sector) 
- 
getListByLayerpublic static List<DetectorResponse> getListByLayer(List<DetectorResponse> list, DetectorType type, int layer) 
- 
getListBySectorLayerpublic static List<DetectorResponse> getListBySectorLayer(List<DetectorResponse> list, DetectorType type, int sector, int layer) 
- 
getSectorpublic static int getSector(double phi) 
- 
toString
 
-