Skip to content
Snippets Groups Projects
Commit 2a9d1e6b authored by unknown's avatar unknown
Browse files

Add timestamp to returnvalue in Detectorclass

parent 3145ffbb
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ class Layer:
xLow = int(x/self.GridSize)*self.GridSize
else:
return ((None, None), (None, None), (self.Position, self.Position)) # if the Layer is not hit, return "None"
return ((None, None), (None, None), (self.Position, self.Position), (t,t)) # if the Layer is not hit, return "None"
if 0 <= y < 50:
yHigh = int(y/self.GridSize+1)*self.GridSize
......@@ -65,9 +65,9 @@ class Layer:
yLow = int(y/self.GridSize-1)*self.GridSize
else:
return ((None, None), (None, None), (self.Position, self.Position))
return ((None, None), (None, None), (self.Position, self.Position), (t,t))
return ((xHigh, xLow), (yHigh, yLow), (self.Position+0.0001, self.Position-0.0001))
return ((xHigh, xLow), (yHigh, yLow), (self.Position+0.0001, self.Position-0.0001), (t,t))
......@@ -85,7 +85,7 @@ class Detector:
"""Calculate for a given particle class the hit grid. The class needs the membervalues: vx, vy, vz, q, m - Velocity in 3 dimensions, charge, mass.
Returns the known passed volumes or "None" if one Layer is not hitted"""
result = np.array([[(0+0.0001,0-0.0001),(0+0.0001,0-0.0001),(0+0.0001,0-0.0001)]])
result = np.array([[(0+0.0001,0-0.0001),(0+0.0001,0-0.0001),(0+0.0001,0-0.0001), (0.,0.)]])
for Layer in self.Layers:
result = np.append(result, [Layer.detect(particle)], axis = 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment