|
|
Go to the documentation of this file.
39 bool doPairProduction = matEff.
getParameter<
bool>(
"PairProduction");
40 bool doBremsstrahlung = matEff.
getParameter<
bool>(
"Bremsstrahlung");
41 bool doEnergyLoss = matEff.
getParameter<
bool>(
"EnergyLoss");
42 bool doMultipleScattering = matEff.
getParameter<
bool>(
"MultipleScattering");
43 bool doNuclearInteraction = matEff.
getParameter<
bool>(
"NuclearInteraction");
44 bool doG4NuclInteraction = matEff.
getParameter<
bool>(
"G4NuclearInteraction");
45 bool doMuonBremsstrahlung = matEff.
getParameter<
bool>(
"MuonBremsstrahlung");
54 if (doPairProduction) {
59 if (doBremsstrahlung) {
65 if (doMuonBremsstrahlung) {
78 if (doMultipleScattering) {
82 if (doNuclearInteraction) {
116 std::vector<std::vector<double> >
ratios;
137 std::map<int, int> idMap;
140 for (
unsigned i = 0;
i < idProtons.size(); ++
i)
141 idMap[idProtons[
i]] = 2212;
144 for (
unsigned i = 0;
i < idAntiProtons.size(); ++
i)
145 idMap[idAntiProtons[
i]] = -2212;
148 for (
unsigned i = 0;
i < idNeutrons.size(); ++
i)
149 idMap[idNeutrons[
i]] = 2112;
152 for (
unsigned i = 0;
i < idAntiNeutrons.size(); ++
i)
153 idMap[idAntiNeutrons[
i]] = -2112;
156 for (
unsigned i = 0;
i < idK0Ls.size(); ++
i)
157 idMap[idK0Ls[
i]] = 130;
160 for (
unsigned i = 0;
i < idKplusses.size(); ++
i)
161 idMap[idKplusses[
i]] = 321;
164 for (
unsigned i = 0;
i < idKminusses.size(); ++
i)
165 idMap[idKminusses[
i]] = -321;
168 for (
unsigned i = 0;
i < idPiplusses.size(); ++
i)
169 idMap[idPiplusses[
i]] = 211;
172 for (
unsigned i = 0;
i < idPiminusses.size(); ++
i)
173 idMap[idPiminusses[
i]] = -211;
176 if (doG4NuclInteraction) {
251 <<
" WARNING: A non valid vertex was found in photon conv. -> " << ivertex << std::endl;
286 int daughId = mySimEvent.
addSimTrack(&(*DaughterIter), ivertex);
299 <<
" WARNING: A non valid vertex was found in nucl. int. -> " << ivertex << std::endl;
330 <<
" WARNING: A non valid vertex was found in brem -> " << ivertex << std::endl;
355 <<
" WARNING: A non valid vertex was found in muon brem -> " << ivertex << std::endl;
394 double zed = fabs(myTrack.
particle().
Z());
402 for (
unsigned int iLayer = 0; iLayer < layer.
fudgeNumber(); ++iLayer) {
417 return layer.
forward() ? layer.
disk()->normalVector()
double radLengths(const TrackerLayer &layer, ParticlePropagator &myTrack)
The number of radiation lengths traversed.
MultipleScatteringSimulator * MultipleScattering
RawParticle const & particle() const
The particle being propagated.
double E() const
energy of the momentum
PairProductionSimulator * PairProduction
std::vector< RawParticle >::const_iterator RHEP_const_iter
const XYZTLorentzVector & vertex() const
the vertex fourvector
int pid() const
get the HEP particle ID number
double Pt() const
transverse momentum
double fudgeFactor(unsigned iFudge) const
T getUntrackedParameter(std::string const &, T const &) const
double fudgeMax(unsigned iFudge) const
Global3DVector GlobalVector
double charge() const
get the MEASURED charge
double fudgeMin(unsigned iFudge) const
Log< level::Warning, false > LogWarning
void interact(FSimEvent &simEvent, const TrackerLayer &layer, ParticlePropagator &PP, unsigned i, RandomEngineAndDistribution const *)
const MediumProperties & mediumProperties() const
double Z() const
z of vertex
void updateState(ParticlePropagator &myTrack, double radlen, RandomEngineAndDistribution const *)
Compute the material effect (calls the sub class)
FSimTrack & track(int id) const
Return track with given Id.
~MaterialEffects()
Default destructor.
GlobalVector theNormalVector
void setNormalVector(const GlobalVector &normal)
Sets the vector normal to the surface traversed.
int addSimTrack(const RawParticle *p, int iv, int ig=-1, const HepMC::GenVertex *ev=nullptr)
Add a new track to the Event and to the various lists.
const FSimVertex vertex() const
Origin vertex.
int closestDaughterId()
The id of the closest charged daughter (filled for nuclear interactions only)
const math::XYZTLorentzVector & position() const
Temporary (until CMSSW moves to Mathcore) - No ! Actually very useful.
unsigned int fudgeNumber() const
Set a fudge factor for material inhomogeneities in this layer.
double Y() const
y of vertex
MaterialEffects(const edm::ParameterSet &matEff)
Constructor.
unsigned int layerNumber() const
Returns the layer number.
double Py() const
y of the momentum
virtual void save()
Used by NuclearInteractionSimulator to save last sampled event.
double R() const
vertex radius
bool forward() const
Is the layer forward ?
MuonBremsstrahlungSimulator * MuonBremsstrahlung
GlobalVector normalVector(const TrackerLayer &layer, ParticlePropagator &myTrack) const
The vector normal to the surface traversed.
double X() const
x of vertex
unsigned nDaughters() const
Returns the number of daughters.
void setClosestDaughterId(int id)
Set the index of the closest charged daughter.
T getParameter(std::string const &) const
RHEP_const_iter endDaughters() const
Returns const iterator to the end of the daughters list.
int addSimVertex(const XYZTLorentzVector &decayVertex, int im=-1, FSimVertexType::VertexType type=FSimVertexType::ANY)
Add a new vertex to the Event and to the various lists.
Abs< T >::type abs(const T &t)
void save()
Save nuclear interaction information.
BremsstrahlungSimulator * Bremsstrahlung
std::pair< OmniClusterRef, TrackingParticleRef > P
double Px() const
x of the momentum
double Pz() const
z of the momentum
EnergyLossSimulator * EnergyLoss
MaterialEffectsSimulator * NuclearInteraction
const BoundSurface & surface() const
Returns the surface.
BoundDisk const * disk() const
Returns the surface.
RHEP_const_iter beginDaughters() const
Returns const iterator to the beginning of the daughters list.
lengthRatio
Default is 0.020 for algo 1;.