Package org.jlab.clas.detector
Class DetectorParticle
java.lang.Object
org.jlab.clas.detector.DetectorParticle
- All Implemented Interfaces:
Comparable
- Direct Known Subclasses:
DetectorParticlePOCA,DetectorParticleTraj
- Author:
- gavalian, baltzell
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Doubleprotected DetectorTrackprotected final List<DetectorResponse>protected final org.jlab.detector.base.DetectorType[] -
Constructor Summary
ConstructorsConstructorDescriptionDetectorParticle(int charge, double px, double py, double pz) DetectorParticle(int charge, double px, double py, double pz, double vx, double vy, double vz) DetectorParticle(DetectorTrack track) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd detector response to the particlevoidaddResponse(DetectorResponse res, boolean match) voidclear()doublecompare(double x, double y, double z) doublecompare(org.jlab.clas.physics.Vector3 vec) intintcountResponses(org.jlab.detector.base.DetectorType type) intcountResponses(org.jlab.detector.base.DetectorType type, int layer) static DetectorParticlecreateNeutral(double x, double y, double z) static DetectorParticlecreateNeutral(double x, double y, double z, double vx, double vy, double vz) static DetectorParticlestatic DetectorParticlecreateNeutral(DetectorResponse resp, org.jlab.clas.physics.Vector3 vertex) doublegetBeta()doublegetBeta(org.jlab.detector.base.DetectorType type, int layer, double startTime) intintgetCherenkovSignal(List<DetectorResponse> responses, org.jlab.detector.base.DetectorType type) doublegetChi2()returns chi2 of score.float[][]floatgetCovMatrix(int ii, int jj) intgetDetectorHit(List<DetectorResponse> hitList, org.jlab.detector.base.DetectorType type, int detectorLayer, double distanceThreshold) doublegetDetectorHitQuality(List<DetectorResponse> hitList, int index, org.jlab.geom.prim.Vector3D hitRes) getDetectorResponses(org.jlab.detector.base.DetectorType type) org.jlab.geom.prim.Line3DgetDistance(DetectorResponse response) doublegetEnergy(org.jlab.detector.base.DetectorType type) doublegetEnergy(org.jlab.detector.base.DetectorType type, int layer) doublegetEnergyFraction(org.jlab.detector.base.DetectorType type) org.jlab.geom.prim.Line3DgetHit(org.jlab.detector.base.DetectorType type) getHit(org.jlab.detector.base.DetectorType type, int layer) org.jlab.geom.prim.Line3DdoublegetMass()doublegetNDF()doublegetNeutralBeta(org.jlab.detector.base.DetectorType type, List<Integer> layers, double startTime) Calculate beta for given detector type/layer, prioritized by layer:doublegetNphe(org.jlab.detector.base.DetectorType type) doubledoublegetPathLength(double x, double y, double z) doublegetPathLength(org.jlab.detector.base.DetectorType type, int layer) doublegetPathLength(org.jlab.geom.prim.Vector3D vec) org.jlab.clas.physics.ParticlegetPhysicsParticle(int pid) intgetPid()doublegetResponse(org.jlab.detector.base.DetectorType type, int layer) Deprecated.Just for backward compatibility for any external usageintgetScore()returns particle score.intDeprecated.Just for backward compatibility for any external usageintgetSector(org.jlab.detector.base.DetectorType type) intgetSector(org.jlab.detector.base.DetectorType type, int layer) doubledoublegetTheoryBeta(int id) doublegetTime(org.jlab.detector.base.DetectorType type) doublegetTime(org.jlab.detector.base.DetectorType type, int layer) getTrack()doubleintintintintintdoublegetVertexTime(org.jlab.detector.base.DetectorType type, int layer) doublegetVertexTime(org.jlab.detector.base.DetectorType type, int layer, int pid) booleanhasHit(org.jlab.detector.base.DetectorType type) booleanhasHit(org.jlab.detector.base.DetectorType type, int layer) booleanreturns whether this is the trigger particle.voidsetBeta(double beta) voidsetCharge(int charge) voidsetChi2(double chi2) Chi square of score determination.voidsetDedx()For charged particles with scintillator responses, use dx from its track's trajectory to calculate dedx.voidsetMass(double mass) voidsetPid(int pid) voidsetPidQuality(double q) voidsetScore(int score) Particle score combined number that represents which detectors were hit HTCC - 1000, FTOF - 100, EC - 10 SCORE = HTCC + FTOF + ECvoidsetStartTime(double time) voidsetStatus(double minNpheHtcc, double minNpheLtcc) voidsetTriggerParticle(boolean val) set this as the trigger particle.toString()org.jlab.clas.physics.Vector3vector()org.jlab.clas.physics.Vector3vertex()
-
Field Details
-
DEFAULTQUALITY
-
responseStore
-
detectorTrack
-
-
Constructor Details
-
DetectorParticle
public DetectorParticle() -
DetectorParticle
-
DetectorParticle
public DetectorParticle(int charge, double px, double py, double pz) -
DetectorParticle
public DetectorParticle(int charge, double px, double py, double pz, double vx, double vy, double vz)
-
-
Method Details
-
getStartTime
public double getStartTime() -
setStartTime
public void setStartTime(double time) -
createNeutral
public static DetectorParticle createNeutral(double x, double y, double z, double vx, double vy, double vz) -
createNeutral
-
createNeutral
-
createNeutral
public static DetectorParticle createNeutral(DetectorResponse resp, org.jlab.clas.physics.Vector3 vertex) -
getTrackTrajectory
-
clear
public void clear() -
addResponse
-
countResponses
public int countResponses(org.jlab.detector.base.DetectorType type, int layer) -
countResponses
public int countResponses(org.jlab.detector.base.DetectorType type) -
getPhysicsParticle
public org.jlab.clas.physics.Particle getPhysicsParticle(int pid) -
compare
public double compare(org.jlab.clas.physics.Vector3 vec) -
compare
public double compare(double x, double y, double z) -
getTrackIndex
public int getTrackIndex() -
getCovMatrix
public float[][] getCovMatrix() -
getCovMatrix
public float getCovMatrix(int ii, int jj) -
setScore
public void setScore(int score) Particle score combined number that represents which detectors were hit HTCC - 1000, FTOF - 100, EC - 10 SCORE = HTCC + FTOF + EC- Parameters:
score-
-
setChi2
public void setChi2(double chi2) Chi square of score determination.- Parameters:
chi2-
-
getScore
public int getScore()returns particle score.- Returns:
-
isTriggerParticle
public boolean isTriggerParticle()returns whether this is the trigger particle. -
setTriggerParticle
public void setTriggerParticle(boolean val) set this as the trigger particle. -
getSector
public int getSector(org.jlab.detector.base.DetectorType type, int layer) -
getSector
public int getSector(org.jlab.detector.base.DetectorType type) -
getSector
public int getSector()Deprecated.Just for backward compatibility for any external usage -
getChi2
public double getChi2()returns chi2 of score.- Returns:
-
addResponse
add detector response to the particle- Parameters:
res-
-
hasHit
public boolean hasHit(org.jlab.detector.base.DetectorType type) -
hasHit
public boolean hasHit(org.jlab.detector.base.DetectorType type, int layer) -
getDetectorResponses
-
getDetectorResponses
-
getHit
-
getHit
-
getResponse
Deprecated.Just for backward compatibility for any external usage -
getTrack
-
getBeta
public double getBeta() -
getNDF
public double getNDF() -
getTrackChi2
public double getTrackChi2() -
getTrackDetector
public int getTrackDetector() -
getTrackSector
public int getTrackSector() -
getTrackDetectorID
public int getTrackDetectorID() -
getTrackStatus
public int getTrackStatus() -
getFirstCross
public org.jlab.geom.prim.Line3D getFirstCross() -
getLastCross
public org.jlab.geom.prim.Line3D getLastCross() -
getStatus
-
getMass
public double getMass() -
getPid
public int getPid() -
getPidQuality
public double getPidQuality() -
setPidQuality
public void setPidQuality(double q) -
vector
public org.jlab.clas.physics.Vector3 vector() -
vertex
public org.jlab.clas.physics.Vector3 vertex() -
getPathLength
public double getPathLength() -
getCharge
public int getCharge() -
getPathLength
public double getPathLength(org.jlab.geom.prim.Vector3D vec) -
getPathLength
public double getPathLength(double x, double y, double z) -
getTime
public double getTime(org.jlab.detector.base.DetectorType type) -
getEnergyFraction
public double getEnergyFraction(org.jlab.detector.base.DetectorType type) -
getEnergy
public double getEnergy(org.jlab.detector.base.DetectorType type) -
getEnergy
public double getEnergy(org.jlab.detector.base.DetectorType type, int layer) -
getPathLength
public double getPathLength(org.jlab.detector.base.DetectorType type, int layer) -
getBeta
public double getBeta(org.jlab.detector.base.DetectorType type, int layer, double startTime) -
setStatus
public void setStatus(double minNpheHtcc, double minNpheLtcc) -
setBeta
public void setBeta(double beta) -
setMass
public void setMass(double mass) -
setPid
public void setPid(int pid) -
setCharge
public void setCharge(int charge) -
getDetectorHit
public int getDetectorHit(List<DetectorResponse> hitList, org.jlab.detector.base.DetectorType type, int detectorLayer, double distanceThreshold) -
getDetectorHitQuality
public double getDetectorHitQuality(List<DetectorResponse> hitList, int index, org.jlab.geom.prim.Vector3D hitRes) -
getDistance
-
getTheoryBeta
public double getTheoryBeta(int id) -
getNphe
public double getNphe(org.jlab.detector.base.DetectorType type) -
getVertexTime
public double getVertexTime(org.jlab.detector.base.DetectorType type, int layer) -
getVertexTime
public double getVertexTime(org.jlab.detector.base.DetectorType type, int layer, int pid) -
getCherenkovSignal
public int getCherenkovSignal(List<DetectorResponse> responses, org.jlab.detector.base.DetectorType type) -
getTime
public double getTime(org.jlab.detector.base.DetectorType type, int layer) -
getNeutralBeta
public double getNeutralBeta(org.jlab.detector.base.DetectorType type, List<Integer> layers, double startTime) Calculate beta for given detector type/layer, prioritized by layer: -
setDedx
public void setDedx()For charged particles with scintillator responses, use dx from its track's trajectory to calculate dedx. This overrides the dx provided from the scintillator services. -
compareTo
- Specified by:
compareToin interfaceComparable
-
toString
-