projection plane on local coordinates
This commit is contained in:
@@ -45,12 +45,30 @@ class DetectorChamber : public ContainerBox {
|
||||
|
||||
public:
|
||||
|
||||
DetectorChamber() : BaseClass() {
|
||||
m_ProjectionPlane.origin = HPoint3f(0, 0, 0);
|
||||
m_ProjectionPlane.direction = HVector3f(0, 0, 1);
|
||||
}
|
||||
|
||||
DetectorChamber(const Vector3f &size) : BaseClass(size) {
|
||||
m_ProjectionPlane.origin = HPoint3f(0, 0, 0);
|
||||
m_ProjectionPlane.direction = HVector3f(0, 0, 1);
|
||||
}
|
||||
|
||||
// set the plane where muons hit is projected
|
||||
// to be represented with a direction vector
|
||||
// coordinates are local to the container box
|
||||
void SetProjectionPlane(const HLine3f &normal) { m_ProjectionPlane = normal; }
|
||||
|
||||
const HLine3f &GetProjectionPlane() const { return m_ProjectionPlane; }
|
||||
|
||||
HLine3f GetWorldProjectionPlane() const {
|
||||
HLine3f worldPlane;
|
||||
Matrix4f M = this->GetWorldMatrix();
|
||||
worldPlane.origin = M * m_ProjectionPlane.origin;
|
||||
worldPlane.direction = M * m_ProjectionPlane.direction;
|
||||
return worldPlane;
|
||||
}
|
||||
|
||||
MuonEvent ProjectMuonEvent(const MuonEvent &muon) const;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user