src
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
}
MaterialEffectsSimulator::compute
virtual void compute(ParticlePropagator &Particle, RandomEngineAndDistribution const *)=0
Overloaded in all material effects updtators.
Particle
Definition:
Particle.py:1
MaterialEffectsSimulator::updateState
void updateState(ParticlePropagator &myTrack, double radlen, RandomEngineAndDistribution const *)
Compute the material effect (calls the sub class)
Definition:
MaterialEffectsSimulator.cc:19
MaterialEffectsSimulator.h
ParticlePropagator
Definition:
ParticlePropagator.h:28
fastSimProducer_cff.radLen
radLen
Definition:
fastSimProducer_cff.py:63
beamSpotPI::Z
Definition:
BeamSpotPayloadInspectorHelper.h:38
MaterialEffectsSimulator::~MaterialEffectsSimulator
virtual ~MaterialEffectsSimulator()
Definition:
MaterialEffectsSimulator.cc:14
MaterialEffectsSimulator::MaterialEffectsSimulator
MaterialEffectsSimulator(double A=28.0855, double Z=14.0000, double density=2.329, double radLen=9.360)
Definition:
MaterialEffectsSimulator.cc:9
MaterialEffectsSimulator::orthogonal
XYZVector orthogonal(const XYZVector &) const
A vector orthogonal to another one (because it's not in XYZTLorentzVector)
Definition:
MaterialEffectsSimulator.cc:30
fastSimProducer_cff.density
density
Definition:
fastSimProducer_cff.py:62
MaterialEffectsSimulator::radLengths
double radLengths
Definition:
MaterialEffectsSimulator.h:84
DDAxes::y
MaterialEffectsSimulator::_theUpdatedState
std::vector< RawParticle > _theUpdatedState
Definition:
MaterialEffectsSimulator.h:82
DDAxes::z
A
Definition:
APVGainStruct.h:7
XYZVector
math::XYZVector XYZVector
Definition:
RawParticle.h:26
MaterialEffectsSimulator::theClosestChargedDaughterId
int theClosestChargedDaughterId
Definition:
MaterialEffectsSimulator.h:94
DDAxes::x
RandomEngineAndDistribution
Definition:
RandomEngineAndDistribution.h:18
Generated for CMSSW Reference Manual by
1.8.14