@@ -54,7 +54,6 @@ def _forward(self, x):
5454 kappa = torch .abs (x [:,1 ]) + eps_like (x )
5555 return torch .stack ((angle , kappa ), dim = 1 )
5656
57-
5857class EnergyReconstruction (Task ):
5958 """Reconstructs energy."""
6059 # Requires one feature: untransformed energy
@@ -76,9 +75,40 @@ def _forward(self, x):
7675 pred = torch .stack ((energy , log_var ), dim = 1 )
7776 return pred
7877
78+ class VertexReconstruction (Task ):
79+ # Requires four features, x, y, z and t
80+ nb_inputs = 4
81+
82+ def _forward (self , x ):
83+
84+ # Scale xyz to roughly the right order of magnitude, leave time
85+ x [:,0 ] = x [:,0 ] * 1e2
86+ x [:,1 ] = x [:,1 ] * 1e2
87+ x [:,2 ] = x [:,2 ] * 1e2
88+
89+ return x
90+
91+ class PositionReconstruction (Task ):
92+ # Requires three features, x, y, z
93+ nb_inputs = 3
7994
95+ def _forward (self , x ):
96+
97+ # Scale to roughly the right order of magnitude
98+ x [:,0 ] = x [:,0 ] * 1e2
99+ x [:,1 ] = x [:,1 ] * 1e2
100+ x [:,2 ] = x [:,2 ] * 1e2
101+
102+ return x
80103
104+ class TimeReconstruction (Task ):
105+ # Requires on feature, time
106+ nb_inputs = 1
107+
108+ def _forward (self , x ):
81109
110+ # Leave as it is
111+ return x
82112
83113class BinaryClassificationTask (Task ):
84114 #requires one feature: probability of being neutrino?
0 commit comments