CMS 3D CMS Logo

MaterialEffectsSimulator.cc
Go to the documentation of this file.
1 
3 
4 #include <list>
5 
6 using std::list;
7 using std::pair;
8 
10  : A(A), Z(Z), density(density), radLen(radLen) {
11  _theUpdatedState.clear();
12 }
13 
15  // Don't delete the objects contained in the list
16  _theUpdatedState.clear();
17 }
18 
20  double radlen,
21  RandomEngineAndDistribution const* random) {
22  _theUpdatedState.clear();
24 
25  radLengths = radlen;
26  if (radLengths > 0.)
27  compute(Particle, random);
28 }
29 
31  double x = fabs(aVector.X());
32  double y = fabs(aVector.Y());
33  double z = fabs(aVector.Z());
34 
35  if (x < y)
36  return x < z ? XYZVector(0., aVector.Z(), -aVector.Y()) : XYZVector(aVector.Y(), -aVector.X(), 0.);
37  else
38  return y < z ? XYZVector(-aVector.Z(), 0., aVector.X()) : XYZVector(aVector.Y(), -aVector.X(), 0.);
39 }
virtual void compute(ParticlePropagator &Particle, RandomEngineAndDistribution const *)=0
Overloaded in all material effects updtators.
void updateState(ParticlePropagator &myTrack, double radlen, RandomEngineAndDistribution const *)
Compute the material effect (calls the sub class)
MaterialEffectsSimulator(double A=28.0855, double Z=14.0000, double density=2.329, double radLen=9.360)
XYZVector orthogonal(const XYZVector &) const
A vector orthogonal to another one (because it&#39;s not in XYZTLorentzVector)
std::vector< RawParticle > _theUpdatedState
Definition: APVGainStruct.h:7
math::XYZVector XYZVector
Definition: RawParticle.h:26