File indexing completed on 2024-04-06 12:11:16
0001
0002 #include "FastSimulation/MaterialEffects/interface/MaterialEffectsSimulator.h"
0003
0004 #include <list>
0005
0006 using std::list;
0007 using std::pair;
0008
0009 MaterialEffectsSimulator::MaterialEffectsSimulator(double A, double Z, double density, double radLen)
0010 : A(A), Z(Z), density(density), radLen(radLen) {
0011 _theUpdatedState.clear();
0012 }
0013
0014 MaterialEffectsSimulator::~MaterialEffectsSimulator() {
0015
0016 _theUpdatedState.clear();
0017 }
0018
0019 void MaterialEffectsSimulator::updateState(ParticlePropagator& Particle,
0020 double radlen,
0021 RandomEngineAndDistribution const* random) {
0022 _theUpdatedState.clear();
0023 theClosestChargedDaughterId = -1;
0024
0025 radLengths = radlen;
0026 if (radLengths > 0.)
0027 compute(Particle, random);
0028 }
0029
0030 XYZVector MaterialEffectsSimulator::orthogonal(const XYZVector& aVector) const {
0031 double x = fabs(aVector.X());
0032 double y = fabs(aVector.Y());
0033 double z = fabs(aVector.Z());
0034
0035 if (x < y)
0036 return x < z ? XYZVector(0., aVector.Z(), -aVector.Y()) : XYZVector(aVector.Y(), -aVector.X(), 0.);
0037 else
0038 return y < z ? XYZVector(-aVector.Z(), 0., aVector.X()) : XYZVector(aVector.Y(), -aVector.X(), 0.);
0039 }