19#ifndef BDSARRAYOPERATORINDEXV_H
20#define BDSARRAYOPERATORINDEXV_H
21#include "BDSArrayOperatorIndex.hh"
41 for (
auto op : operators)
48 operators.push_back(operatorIn);
51 for (G4int i = 0; i < (G4int)ops.size(); i++)
52 {operatesOn[i] = operatesOn[i] || ops[i];}
56 virtual G4String
Name()
const
58 G4String result =
"Vector(";
59 for (
auto op : operators)
60 {result += op->Name() +
" ";}
72 for (
auto op : operators)
75 virtual void ApplyX(G4int& x)
const
77 for (
auto op : operators)
80 virtual void ApplyY(G4int& y)
const
82 for (
auto op : operators)
85 virtual void ApplyZ(G4int& z)
const
87 for (
auto op : operators)
90 virtual void ApplyT(G4int& t)
const
92 for (
auto op : operators)
96 virtual void TransformLimits(G4double& xMin, G4double& xMax,
97 G4double& yMin, G4double& yMax,
98 G4double& zMin, G4double& zMax,
99 G4double& tMin, G4double& tMax)
const
101 for (
auto op : operators)
102 {op->TransformLimits(xMin, xMax, yMin, yMax, zMin, zMax, tMin, tMax);}
105 std::vector<BDSArrayOperatorIndex*> operators;
Vectorised version of BDSArrayOperatorIndex.
virtual void Apply(G4int &x, G4int &y, G4int &z, G4int &t) const
virtual G4String Name() const
Supply a name of this operator for feedback to the user in print out.
void push_back(BDSArrayOperatorIndex *operatorIn)
Append an operator to the vector.
Interface for modifying by reference array indices.
virtual std::array< G4bool, 4 > OperatesOnXYZT() const
Return which axes this object operates on overall.