FastSimulation
MaterialEffects
src
MaterialEffectsSimulator.cc
Go to the documentation of this file.
1
2
#include "
FastSimulation/MaterialEffects/interface/MaterialEffectsSimulator.h
"
3
4
#include <list>
5
6
using
std::list;
7
using
std::pair;
8
9
MaterialEffectsSimulator::MaterialEffectsSimulator
(
double
A
,
double
Z
,
double
density
,
double
radLen
)
10
:
A
(
A
),
Z
(
Z
),
density
(
density
),
radLen
(
radLen
) {
11
_theUpdatedState
.clear();
12
}
13
14
MaterialEffectsSimulator::~MaterialEffectsSimulator
() {
15
// Don't delete the objects contained in the list
16
_theUpdatedState
.clear();
17
}
18
19
void
MaterialEffectsSimulator::updateState
(
ParticlePropagator
&
Particle
,
20
double
radlen,
21
RandomEngineAndDistribution
const
* random) {
22
_theUpdatedState
.clear();
23
theClosestChargedDaughterId
= -1;
24
25
radLengths
= radlen;
26
if
(
radLengths
> 0.)
27
compute
(
Particle
, random);
28
}
29
30
XYZVector
MaterialEffectsSimulator::orthogonal
(
const
XYZVector
& aVector)
const
{
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
}
DDAxes::y
MaterialEffectsSimulator.h
MaterialEffectsSimulator::_theUpdatedState
std::vector< RawParticle > _theUpdatedState
Definition:
MaterialEffectsSimulator.h:82
XYZVector
math::XYZVector XYZVector
Definition:
RawParticle.h:26
DDAxes::x
MaterialEffectsSimulator::theClosestChargedDaughterId
int theClosestChargedDaughterId
Definition:
MaterialEffectsSimulator.h:94
MaterialEffectsSimulator::compute
virtual void compute(ParticlePropagator &Particle, RandomEngineAndDistribution const *)=0
Overloaded in all material effects updtators.
MaterialEffectsSimulator::~MaterialEffectsSimulator
virtual ~MaterialEffectsSimulator()
Definition:
MaterialEffectsSimulator.cc:14
MaterialEffectsSimulator::updateState
void updateState(ParticlePropagator &myTrack, double radlen, RandomEngineAndDistribution const *)
Compute the material effect (calls the sub class)
Definition:
MaterialEffectsSimulator.cc:19
MaterialEffectsSimulator::orthogonal
XYZVector orthogonal(const XYZVector &) const
A vector orthogonal to another one (because it's not in XYZTLorentzVector)
Definition:
MaterialEffectsSimulator.cc:30
DDAxes::z
MaterialEffectsSimulator::MaterialEffectsSimulator
MaterialEffectsSimulator(double A=28.0855, double Z=14.0000, double density=2.329, double radLen=9.360)
Definition:
MaterialEffectsSimulator.cc:9
fastSimProducer_cff.radLen
radLen
Definition:
fastSimProducer_cff.py:62
MaterialEffectsSimulator::radLengths
double radLengths
Definition:
MaterialEffectsSimulator.h:84
A
ParticlePropagator
Definition:
ParticlePropagator.h:28
Particle
Definition:
Particle.py:1
BeamSpotPI::Z
Definition:
BeamSpotPayloadInspectorHelper.h:33
fastSimProducer_cff.density
density
Definition:
fastSimProducer_cff.py:61
RandomEngineAndDistribution
Definition:
RandomEngineAndDistribution.h:18
Generated for CMSSW Reference Manual by
1.8.16