Commit 8248aed2 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

DetectorField: speed up by setting both together

parent fc28c3fa
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -17,12 +17,7 @@ namespace allpix {
     * Vector field template specialization of helper function for field flipping
     */
    template <> void flip_vector_components<ROOT::Math::XYZVector>(ROOT::Math::XYZVector& vec, bool x, bool y) {
        if(x) {
            vec.SetX(-vec.x());
        }
        if(y) {
            vec.SetY(-vec.y());
        }
        vec.SetXYZ((x ? -vec.x() : vec.x()), (y ? -vec.y() : vec.y()), vec.z());
    }

    /*