A sensor comprising: a permanent magnet mounted on a shaft that is subjected to detection by the sensor such that the permanent magnet is rotatable with the shaft; a magnetic yoke (42, 43) configured so that a rotational position of the magnetic yoke (42, 43) relative to the permanent magnet changes according to torsion of the shaft, the magnetic yoke being configured as a first and a second magnetic yoke; a magnetism collecting ring (44, 45) configured to surround the magnetic yoke (42, 43) and collect a magnetic flux from the magnetic yoke (42, 43); a circuit board on which a magnetic sensor (46, 47) that detects the magnetic flux collected by the magnetism collecting ring (44, 45) is mounted; and a sensor housing through which the shaft is inserted and that accommodates the permanent magnet, the magnetic yoke (42, 43), the magnetism collecting ring (44, 45), and the circuit board, wherein the sensor housing has an accommodating chamber accommodating at least the circuit board via an opening that opens in a direction crossing an axial direction of the shaft, the accommodating chamber having a box shape, a reinforcing member connecting two wall surfaces of the accommodating chamber that face each other in the axial direction of the shaft is provided in the accommodating chamber, the magnetism collecting ring includes a first magnetism collecting ring and a second magnetism collecting ring that are arranged next to each other in the axial direction of the shaft, each of the first magnetism collecting ring and the second magnetism collecting ring includes a first portion (71, 81) surrounding the magnetic yoke (42, 43) and a second portion (72, 82a, 82b) protruding outward in a radial direction of the first portion, the second portions (72, 82a, 82b) facing each other in the axial direction of the shaft, and the magnetic sensor (46, 47) mounted on the circuit board characterized in that the circuit board is interposed between the second portions (72, 82a, 82b), the first magnetism collecting ring is located to a side of the circuit board, the surface of the circuit board on which the magnetic sensor (46, 47) is mounted facing said side, the first portion and the second portion of the first magnetism collecting ring are separate members, the first portion of the first magnetism collecting ring is mounted at a position inside in the radial direction with respect to the reinforcing member, and the second portion of the first magnetism collecting ring is attached to the first portion of the first magnetism collecting ring from outside in the radial direction with respect to the reinforcing member such that the reinforcing member is interposed between the first portion and the second portion. a permanent magnet mounted on a shaft that is subjected to detection by the sensor such that the permanent magnet is rotatable with the shaft; a magnetic yoke (42, 43) configured so that a rotational position of the magnetic yoke (42, 43) relative to the permanent magnet changes according to torsion of the shaft, the magnetic yoke being configured as a first and a second magnetic yoke; a magnetism collecting ring (44, 45) configured to surround the magnetic yoke (42, 43) and collect a magnetic flux from the magnetic yoke (42, 43); a circuit board on which a magnetic sensor (46, 47) that detects the magnetic flux collected by the magnetism collecting ring (44, 45) is mounted; and a sensor housing through which the shaft is inserted and that accommodates the permanent magnet, the magnetic yoke (42, 43), the magnetism collecting ring (44, 45), and the circuit board, wherein the sensor housing has an accommodating chamber accommodating at least the circuit board via an opening that opens in a direction crossing an axial direction of the shaft, the accommodating chamber having a box shape, a reinforcing member connecting two wall surfaces of the accommodating chamber that face each other in the axial direction of the shaft is provided in the accommodating chamber, the magnetism collecting ring includes a first magnetism collecting ring and a second magnetism collecting ring that are arranged next to each other in the axial direction of the shaft, each of the first magnetism collecting ring and the second magnetism collecting ring includes a first portion (71, 81) surrounding the magnetic yoke (42, 43) and a second portion (72, 82a, 82b) protruding outward in a radial direction of the first portion, the second portions (72, 82a, 82b) facing each other in the axial direction of the shaft, and the magnetic sensor (46, 47) mounted on the circuit board characterized in that the circuit board is interposed between the second portions (72, 82a, 82b), the first magnetism collecting ring is located to a side of the circuit board, the surface of the circuit board on which the magnetic sensor (46, 47) is mounted facing said side, the first portion and the second portion of the first magnetism collecting ring are separate members, the first portion of the first magnetism collecting ring is mounted at a position inside in the radial direction with respect to the reinforcing member, and the second portion of the first magnetism collecting ring is attached to the first portion of the first magnetism collecting ring from outside in the radial direction with respect to the reinforcing member such that the reinforcing member is interposed between the first portion and the second portion.