CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
MaterialEffects Class Reference

#include <MaterialEffects.h>

Public Member Functions

double energyLoss () const
 Return the energy loss by ionization in the current layer. More...
 
EnergyLossSimulatorenergyLossSimulator () const
 Return the Energy Loss engine. More...
 
void interact (FSimEvent &simEvent, const TrackerLayer &layer, ParticlePropagator &PP, unsigned i)
 
 MaterialEffects (const edm::ParameterSet &matEff, const RandomEngine *engine)
 Constructor. More...
 
MultipleScatteringSimulatormultipleScatteringSimulator () const
 Return the Multiple Scattering engine. More...
 
MuonBremsstrahlungSimulatormuonBremsstrahlungSimulator () const
 Return the Muon Bremsstrahlung engine. More...
 
void save ()
 Save nuclear interaction information. More...
 
double thickness () const
 Return the thickness of the current layer. More...
 
 ~MaterialEffects ()
 Default destructor. More...
 

Private Member Functions

GlobalVector normalVector (const TrackerLayer &layer, ParticlePropagator &myTrack) const
 The vector normal to the surface traversed. More...
 
double radLengths (const TrackerLayer &layer, ParticlePropagator &myTrack)
 The number of radiation lengths traversed. More...
 

Private Attributes

BremsstrahlungSimulatorBremsstrahlung
 
EnergyLossSimulatorEnergyLoss
 
MultipleScatteringSimulatorMultipleScattering
 
MuonBremsstrahlungSimulatorMuonBremsstrahlung
 
NuclearInteractionSimulatorNuclearInteraction
 
PairProductionSimulatorPairProduction
 
double pTmin
 
const RandomEnginerandom
 
double theEnergyLoss
 
GlobalVector theNormalVector
 
double theTECFudgeFactor
 
double theThickness
 
bool use_hardcoded
 

Detailed Description

Definition at line 50 of file MaterialEffects.h.

Constructor & Destructor Documentation

MaterialEffects::MaterialEffects ( const edm::ParameterSet matEff,
const RandomEngine engine 
)

Constructor.

Definition at line 25 of file MaterialEffects.cc.

References funct::A, Bremsstrahlung, EnergyLoss, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, analyzePatCOC_cfg::inputFile, j, MultipleScattering, MuonBremsstrahlung, NuclearInteraction, PairProduction, pTmin, random, plotFactory::ratios, AlCaHLTBitMon_QueryRunRegistry::string, theTECFudgeFactor, use_hardcoded, and Gflash::Z.

30  pTmin(999.), random(engine), use_hardcoded(1)
31 {
32  // Set the minimal photon energy for a Brem from e+/-
33 
34  use_hardcoded = matEff.getParameter<bool >("use_hardcoded_geometry");
35 
36  bool doPairProduction = matEff.getParameter<bool>("PairProduction");
37  bool doBremsstrahlung = matEff.getParameter<bool>("Bremsstrahlung");
38  bool doEnergyLoss = matEff.getParameter<bool>("EnergyLoss");
39  bool doMultipleScattering = matEff.getParameter<bool>("MultipleScattering");
40  bool doNuclearInteraction = matEff.getParameter<bool>("NuclearInteraction");
41  bool doMuonBremsstrahlung = matEff.getParameter<bool>("MuonBremsstrahlung");
42 
43  double A = matEff.getParameter<double>("A");
44  double Z = matEff.getParameter<double>("Z");
45  double density = matEff.getParameter<double>("Density");
46  double radLen = matEff.getParameter<double>("RadiationLength");
47 
48  // Set the minimal pT before giving up the dE/dx treatment
49 
50  if ( doPairProduction ) {
51 
52  double photonEnergy = matEff.getParameter<double>("photonEnergy");
53  PairProduction = new PairProductionSimulator(photonEnergy,
54  random);
55 
56  }
57 
58  if ( doBremsstrahlung ) {
59 
60  double bremEnergy = matEff.getParameter<double>("bremEnergy");
61  double bremEnergyFraction = matEff.getParameter<double>("bremEnergyFraction");
62  Bremsstrahlung = new BremsstrahlungSimulator(bremEnergy,
63  bremEnergyFraction,
64  random);
65 
66  }
67 //muon Brem+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
68  if ( doMuonBremsstrahlung ) {
69 
70  double bremEnergy = matEff.getParameter<double>("bremEnergy");
71  double bremEnergyFraction = matEff.getParameter<double>("bremEnergyFraction");
72  MuonBremsstrahlung = new MuonBremsstrahlungSimulator(random,A,Z,density,radLen,bremEnergy,
73  bremEnergyFraction);
74 
75  }
76 
77 
78  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
79 
80  if ( doEnergyLoss ) {
81 
82  pTmin = matEff.getParameter<double>("pTmin");
83  EnergyLoss = new EnergyLossSimulator(random,A,Z,density,radLen);
84 
85  }
86 
87  if ( doMultipleScattering ) {
88 
89  MultipleScattering = new MultipleScatteringSimulator(random,A,Z,density,radLen);
90 
91  }
92 
93  if ( doNuclearInteraction ) {
94 
95  // The energies simulated
96  std::vector<double> pionEnergies
97  = matEff.getUntrackedParameter<std::vector<double> >("pionEnergies");
98 
99  // The particle types simulated
100  std::vector<int> pionTypes
101  = matEff.getUntrackedParameter<std::vector<int> >("pionTypes");
102 
103  // The corresponding particle names
104  std::vector<std::string> pionNames
105  = matEff.getUntrackedParameter<std::vector<std::string> >("pionNames");
106 
107  // The corresponding particle masses
108  std::vector<double> pionMasses
109  = matEff.getUntrackedParameter<std::vector<double> >("pionMasses");
110 
111  // The smallest momentum for inelastic interactions
112  std::vector<double> pionPMin
113  = matEff.getUntrackedParameter<std::vector<double> >("pionMinP");
114 
115  // The interaction length / radiation length ratio for each particle type
116  std::vector<double> lengthRatio
117  = matEff.getParameter<std::vector<double> >("lengthRatio");
118  // std::map<int,double> lengthRatio;
119  // for ( unsigned i=0; i<theLengthRatio.size(); ++i )
120  // lengthRatio[ pionTypes[i] ] = theLengthRatio[i];
121 
122  // A global fudge factor for TEC layers (which apparently do not react to
123  // hadrons the same way as all other layers...
124  theTECFudgeFactor = matEff.getParameter<double>("fudgeFactor");
125 
126  // The evolution of the interaction lengths with energy
127  std::vector<double> theRatios
128  = matEff.getUntrackedParameter<std::vector<double> >("ratios");
129  //std::map<int,std::vector<double> > ratios;
130  //for ( unsigned i=0; i<pionTypes.size(); ++i ) {
131  // for ( unsigned j=0; j<pionEnergies.size(); ++j ) {
132  // ratios[ pionTypes[i] ].push_back(theRatios[ i*pionEnergies.size() + j ]);
133  // }
134  //}
135  std::vector< std::vector<double> > ratios;
136  ratios.resize(pionTypes.size());
137  for ( unsigned i=0; i<pionTypes.size(); ++i ) {
138  for ( unsigned j=0; j<pionEnergies.size(); ++j ) {
139  ratios[i].push_back(theRatios[ i*pionEnergies.size() + j ]);
140  }
141  }
142 
143  // The smallest momentum for elastic interactions
144  double pionEnergy
145  = matEff.getParameter<double>("pionEnergy");
146 
147  // The algorithm to compute the distance between primary and secondaries
148  // when a nuclear interaction occurs
149  unsigned distAlgo
150  = matEff.getParameter<unsigned>("distAlgo");
151  double distCut
152  = matEff.getParameter<double>("distCut");
153 
154  // The file to read the starting interaction in each files
155  // (random reproducibility in case of a crash)
157  = matEff.getUntrackedParameter<std::string>("inputFile");
158 
159  // Build the ID map (i.e., what is to be considered as a proton, etc...)
160  std::map<int,int> idMap;
161  // Protons
162  std::vector<int> idProtons
163  = matEff.getUntrackedParameter<std::vector<int> >("protons");
164  for ( unsigned i=0; i<idProtons.size(); ++i )
165  idMap[idProtons[i]] = 2212;
166  // Anti-Protons
167  std::vector<int> idAntiProtons
168  = matEff.getUntrackedParameter<std::vector<int> >("antiprotons");
169  for ( unsigned i=0; i<idAntiProtons.size(); ++i )
170  idMap[idAntiProtons[i]] = -2212;
171  // Neutrons
172  std::vector<int> idNeutrons
173  = matEff.getUntrackedParameter<std::vector<int> >("neutrons");
174  for ( unsigned i=0; i<idNeutrons.size(); ++i )
175  idMap[idNeutrons[i]] = 2112;
176  // Anti-Neutrons
177  std::vector<int> idAntiNeutrons
178  = matEff.getUntrackedParameter<std::vector<int> >("antineutrons");
179  for ( unsigned i=0; i<idAntiNeutrons.size(); ++i )
180  idMap[idAntiNeutrons[i]] = -2112;
181  // K0L's
182  std::vector<int> idK0Ls
183  = matEff.getUntrackedParameter<std::vector<int> >("K0Ls");
184  for ( unsigned i=0; i<idK0Ls.size(); ++i )
185  idMap[idK0Ls[i]] = 130;
186  // K+'s
187  std::vector<int> idKplusses
188  = matEff.getUntrackedParameter<std::vector<int> >("Kplusses");
189  for ( unsigned i=0; i<idKplusses.size(); ++i )
190  idMap[idKplusses[i]] = 321;
191  // K-'s
192  std::vector<int> idKminusses
193  = matEff.getUntrackedParameter<std::vector<int> >("Kminusses");
194  for ( unsigned i=0; i<idKminusses.size(); ++i )
195  idMap[idKminusses[i]] = -321;
196  // pi+'s
197  std::vector<int> idPiplusses
198  = matEff.getUntrackedParameter<std::vector<int> >("Piplusses");
199  for ( unsigned i=0; i<idPiplusses.size(); ++i )
200  idMap[idPiplusses[i]] = 211;
201  // pi-'s
202  std::vector<int> idPiminusses
203  = matEff.getUntrackedParameter<std::vector<int> >("Piminusses");
204  for ( unsigned i=0; i<idPiminusses.size(); ++i )
205  idMap[idPiminusses[i]] = -211;
206 
207  // Construction
209  new NuclearInteractionSimulator(pionEnergies, pionTypes, pionNames,
210  pionMasses, pionPMin, pionEnergy,
211  lengthRatio, ratios, idMap,
212  inputFile, distAlgo, distCut, random);
213  }
214 
215 }
const double Z[kNumberCalorimeter]
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
dictionary ratios
Definition: plotFactory.py:68
PairProductionSimulator * PairProduction
const RandomEngine * random
MuonBremsstrahlungSimulator * MuonBremsstrahlung
int j
Definition: DBlmapReader.cc:9
BremsstrahlungSimulator * Bremsstrahlung
EnergyLossSimulator * EnergyLoss
NuclearInteractionSimulator * NuclearInteraction
MultipleScatteringSimulator * MultipleScattering
MaterialEffects::~MaterialEffects ( )

Default destructor.

Definition at line 218 of file MaterialEffects.cc.

References Bremsstrahlung, EnergyLoss, MultipleScattering, MuonBremsstrahlung, NuclearInteraction, and PairProduction.

218  {
219 
220  if ( PairProduction ) delete PairProduction;
221  if ( Bremsstrahlung ) delete Bremsstrahlung;
222  if ( EnergyLoss ) delete EnergyLoss;
225 //Muon Brem
227 }
PairProductionSimulator * PairProduction
MuonBremsstrahlungSimulator * MuonBremsstrahlung
BremsstrahlungSimulator * Bremsstrahlung
EnergyLossSimulator * EnergyLoss
NuclearInteractionSimulator * NuclearInteraction
MultipleScatteringSimulator * MultipleScattering

Member Function Documentation

double MaterialEffects::energyLoss ( ) const
inline

Return the energy loss by ionization in the current layer.

Definition at line 76 of file MaterialEffects.h.

References theEnergyLoss.

Referenced by TrajectoryManager::createPSimHits().

76 { return theEnergyLoss; }
EnergyLossSimulator* MaterialEffects::energyLossSimulator ( ) const
inline

Return the Energy Loss engine.

Definition at line 84 of file MaterialEffects.h.

References EnergyLoss.

Referenced by MuonSimHitProducer::applyMaterialEffects(), and CalorimetryManager::MuonMipSimulation().

84  {
85  return EnergyLoss;
86  }
EnergyLossSimulator * EnergyLoss
void MaterialEffects::interact ( FSimEvent simEvent,
const TrackerLayer layer,
ParticlePropagator PP,
unsigned  i 
)

Steer the various interaction processes in the Tracker Material and update the FSimEvent

Energy loss

Multiple scattering

Definition at line 229 of file MaterialEffects.cc.

References abs, FBaseSimEvent::addSimTrack(), FBaseSimEvent::addSimVertex(), MaterialEffectsSimulator::beginDaughters(), FSimVertexType::BREM_VERTEX, Bremsstrahlung, RawParticle::charge(), MaterialEffectsSimulator::closestDaughterId(), MaterialEffectsSimulator::endDaughters(), EnergyLoss, TrackerLayer::layerNumber(), MultipleScattering, MuonBremsstrahlung, MaterialEffectsSimulator::nDaughters(), normalVector(), FSimVertexType::NUCL_VERTEX, NuclearInteraction, FSimVertexType::PAIR_VERTEX, PairProduction, RawParticle::pid(), FSimVertex::position(), pTmin, radLengths(), FSimTrack::setClosestDaughterId(), MaterialEffectsSimulator::setNormalVector(), theEnergyLoss, theNormalVector, theTECFudgeFactor, FBaseSimEvent::track(), MaterialEffectsSimulator::updateState(), use_hardcoded, FSimTrack::vertex(), and RawParticle::vertex().

Referenced by TrajectoryManager::reconstruct().

232  {
233 
235  double radlen;
236  theEnergyLoss = 0;
237  theNormalVector = normalVector(layer,myTrack);
238  radlen = radLengths(layer,myTrack);
239 
240 //-------------------
241 // Photon Conversion
242 //-------------------
243 
244  if ( PairProduction && myTrack.pid()==22 ) {
245 
246  //
247  PairProduction->updateState(myTrack,radlen);
248 
249  if ( PairProduction->nDaughters() ) {
250  //add a vertex to the mother particle
251  int ivertex = mySimEvent.addSimVertex(myTrack.vertex(),itrack,
253 
254  // Check if it is a valid vertex first:
255  if (ivertex>=0) {
256  // This was a photon that converted
257  for ( DaughterIter = PairProduction->beginDaughters();
258  DaughterIter != PairProduction->endDaughters();
259  ++DaughterIter) {
260 
261  mySimEvent.addSimTrack(&(*DaughterIter), ivertex);
262 
263  }
264  // The photon converted. Return.
265  return;
266  }
267  else {
268  edm::LogWarning("MaterialEffects") << " WARNING: A non valid vertex was found in photon conv. -> " << ivertex << std::endl;
269  }
270 
271  }
272 
273  }
274 
275  if ( myTrack.pid() == 22 ) return;
276 
277 //------------------------
278 // Nuclear interactions
279 //------------------------
280 
281  if ( NuclearInteraction && abs(myTrack.pid()) > 100
282  && abs(myTrack.pid()) < 1000000) {
283 
284  // Simulate a nuclear interaction
285  double factor = 1.0;
286  if(use_hardcoded){
287  if (layer.layerNumber() >= 19 && layer.layerNumber() <= 27 )
288  factor = theTECFudgeFactor;
289  }
290  NuclearInteraction->updateState(myTrack,radlen*factor);
291 
292  if ( NuclearInteraction->nDaughters() ) {
293 
294  //add a end vertex to the mother particle
295  int ivertex = mySimEvent.addSimVertex(myTrack.vertex(),itrack,
297 
298  // Check if it is a valid vertex first:
299  if (ivertex>=0) {
300  // This was a hadron that interacted inelastically
301  int idaugh = 0;
302  for ( DaughterIter = NuclearInteraction->beginDaughters();
303  DaughterIter != NuclearInteraction->endDaughters();
304  ++DaughterIter) {
305 
306  // The daughter in the event
307  int daughId = mySimEvent.addSimTrack(&(*DaughterIter), ivertex);
308 
309  // Store the closest daughter in the mother info (for later tracking purposes)
310  if ( NuclearInteraction->closestDaughterId() == idaugh++ ) {
311  if ( mySimEvent.track(itrack).vertex().position().Pt() < 4.0 )
312  mySimEvent.track(itrack).setClosestDaughterId(daughId);
313  }
314 
315  }
316  // The hadron is destroyed. Return.
317  return;
318  }
319  else {
320  edm::LogWarning("MaterialEffects") << " WARNING: A non valid vertex was found in nucl. int. -> " << ivertex << std::endl;
321  }
322 
323  }
324 
325  }
326 
327  if ( myTrack.charge() == 0 ) return;
328 
330 
331 //----------------
332 // Bremsstrahlung
333 //----------------
334 
335  if ( Bremsstrahlung && abs(myTrack.pid())==11 ) {
336 
337  Bremsstrahlung->updateState(myTrack,radlen);
338 
339  if ( Bremsstrahlung->nDaughters() ) {
340 
341  // Add a vertex, but do not attach it to the electron, because it
342  // continues its way...
343  int ivertex = mySimEvent.addSimVertex(myTrack.vertex(),itrack,
345 
346  // Check if it is a valid vertex first:
347  if (ivertex>=0) {
348  for ( DaughterIter = Bremsstrahlung->beginDaughters();
349  DaughterIter != Bremsstrahlung->endDaughters();
350  ++DaughterIter) {
351  mySimEvent.addSimTrack(&(*DaughterIter), ivertex);
352  }
353  }
354  else {
355  edm::LogWarning("MaterialEffects") << " WARNING: A non valid vertex was found in brem -> " << ivertex << std::endl;
356  }
357 
358  }
359 
360  }
361 
362 //---------------------------
363 // Muon_Bremsstrahlung
364 //--------------------------
365 
366  if ( MuonBremsstrahlung && abs(myTrack.pid())==13 ) {
367 
368  MuonBremsstrahlung->updateState(myTrack,radlen);
369 
370  if ( MuonBremsstrahlung->nDaughters() ) {
371 
372  // Add a vertex, but do not attach it to the muon, because it
373  // continues its way...
374  int ivertex = mySimEvent.addSimVertex(myTrack.vertex(),itrack,
376 
377  // Check if it is a valid vertex first:
378  if (ivertex>=0) {
379  for ( DaughterIter = MuonBremsstrahlung->beginDaughters();
380  DaughterIter != MuonBremsstrahlung->endDaughters();
381  ++DaughterIter) {
382  mySimEvent.addSimTrack(&(*DaughterIter), ivertex);
383  }
384  }
385  else {
386  edm::LogWarning("MaterialEffects") << " WARNING: A non valid vertex was found in muon brem -> " << ivertex << std::endl;
387  }
388 
389  }
390 
391  }
392 
396 
397  if ( EnergyLoss )
398  {
399  theEnergyLoss = myTrack.E();
400  EnergyLoss->updateState(myTrack,radlen);
401  theEnergyLoss -= myTrack.E();
402  }
403 
404 
408 
409  if ( MultipleScattering && myTrack.Pt() > pTmin ) {
410  // MultipleScattering->setNormalVector(normalVector(layer,myTrack));
412  MultipleScattering->updateState(myTrack,radlen);
413  }
414 
415 }
RHEP_const_iter beginDaughters() const
Returns const iterator to the beginning of the daughters list.
unsigned nDaughters() const
Returns the number of daughters.
unsigned int layerNumber() const
Returns the layer number.
Definition: TrackerLayer.h:82
int closestDaughterId()
The id of the closest charged daughter (filled for nuclear interactions only)
void setNormalVector(const GlobalVector &normal)
Sets the vector normal to the surface traversed.
PairProductionSimulator * PairProduction
#define abs(x)
Definition: mlp_lapack.h:159
GlobalVector normalVector(const TrackerLayer &layer, ParticlePropagator &myTrack) const
The vector normal to the surface traversed.
MuonBremsstrahlungSimulator * MuonBremsstrahlung
std::vector< RawParticle >::const_iterator RHEP_const_iter
RHEP_const_iter endDaughters() const
Returns const iterator to the end of the daughters list.
double radLengths(const TrackerLayer &layer, ParticlePropagator &myTrack)
The number of radiation lengths traversed.
void updateState(ParticlePropagator &myTrack, double radlen)
Compute the material effect (calls the sub class)
BremsstrahlungSimulator * Bremsstrahlung
GlobalVector theNormalVector
EnergyLossSimulator * EnergyLoss
NuclearInteractionSimulator * NuclearInteraction
MultipleScatteringSimulator * MultipleScattering
MultipleScatteringSimulator* MaterialEffects::multipleScatteringSimulator ( ) const
inline

Return the Multiple Scattering engine.

Definition at line 79 of file MaterialEffects.h.

References MultipleScattering.

Referenced by MuonSimHitProducer::applyMaterialEffects().

79  {
80  return MultipleScattering;
81  }
MultipleScatteringSimulator * MultipleScattering
MuonBremsstrahlungSimulator* MaterialEffects::muonBremsstrahlungSimulator ( ) const
inline

Return the Muon Bremsstrahlung engine.

Definition at line 89 of file MaterialEffects.h.

References MuonBremsstrahlung.

Referenced by MuonSimHitProducer::applyMaterialEffects().

89  {
90  return MuonBremsstrahlung;
91  }
MuonBremsstrahlungSimulator * MuonBremsstrahlung
GlobalVector MaterialEffects::normalVector ( const TrackerLayer layer,
ParticlePropagator myTrack 
) const
private

The vector normal to the surface traversed.

Definition at line 459 of file MaterialEffects.cc.

References TrackerLayer::disk(), TrackerLayer::forward(), RawParticle::R(), RawParticle::X(), and RawParticle::Y().

Referenced by interact().

460  {
461  return layer.forward() ?
462  layer.disk()->normalVector() :
463  GlobalVector(myTrack.X(),myTrack.Y(),0.)/myTrack.R();
464 }
bool forward() const
Is the layer forward ?
Definition: TrackerLayer.h:70
double R() const
vertex radius
Definition: RawParticle.h:277
BoundDisk * disk() const
Returns the surface.
Definition: TrackerLayer.h:79
double Y() const
y of vertex
Definition: RawParticle.h:274
double X() const
x of vertex
Definition: RawParticle.h:273
Global3DVector GlobalVector
Definition: GlobalVector.h:10
double MaterialEffects::radLengths ( const TrackerLayer layer,
ParticlePropagator myTrack 
)
private

The number of radiation lengths traversed.

Definition at line 418 of file MaterialEffects.cc.

References TrackerLayer::forward(), TrackerLayer::fudgeFactor(), TrackerLayer::fudgeMax(), TrackerLayer::fudgeMin(), TrackerLayer::fudgeNumber(), Surface::mediumProperties(), P, RawParticle::R(), MediumProperties::radLen(), TrackerLayer::surface(), theNormalVector, theThickness, and RawParticle::Z().

Referenced by interact().

419  {
420 
421  // Thickness of layer
423 
424  GlobalVector P(myTrack.Px(),myTrack.Py(),myTrack.Pz());
425 
426  // Effective length of track inside layer (considering crossing angle)
427  // double radlen = theThickness / fabs(P.dot(theNormalVector)/(P.mag()*theNormalVector.mag()));
428  double radlen = theThickness / fabs(P.dot(theNormalVector)) * P.mag();
429 
430  // This is a series of fudge factors (from the geometry description),
431  // to describe the layer inhomogeneities (services, cables, supports...)
432  double rad = myTrack.R();
433  double zed = fabs(myTrack.Z());
434 
435  double factor = 1;
436 
437  // Are there fudge factors for this layer
438  if ( layer.fudgeNumber() )
439 
440  // If yes, loop on them
441  for ( unsigned int iLayer=0; iLayer < layer.fudgeNumber(); ++iLayer ) {
442 
443  // Apply to R if forward layer, to Z if barrel layer
444  if ( ( layer.forward() && layer.fudgeMin(iLayer) < rad && rad < layer.fudgeMax(iLayer) ) ||
445  ( !layer.forward() && layer.fudgeMin(iLayer) < zed && zed < layer.fudgeMax(iLayer) ) ) {
446  factor = layer.fudgeFactor(iLayer);
447  break;
448  }
449 
450  }
451 
452  theThickness *= factor;
453 
454  return radlen * factor;
455 
456 }
float radLen() const
bool forward() const
Is the layer forward ?
Definition: TrackerLayer.h:70
double fudgeFactor(unsigned iFudge) const
Definition: TrackerLayer.h:108
#define P
double R() const
vertex radius
Definition: RawParticle.h:277
double fudgeMax(unsigned iFudge) const
Definition: TrackerLayer.h:105
double Z() const
z of vertex
Definition: RawParticle.h:275
unsigned int fudgeNumber() const
Set a fudge factor for material inhomogeneities in this layer.
Definition: TrackerLayer.h:101
const BoundSurface & surface() const
Returns the surface.
Definition: TrackerLayer.h:73
GlobalVector theNormalVector
double fudgeMin(unsigned iFudge) const
Definition: TrackerLayer.h:102
const MediumProperties & mediumProperties() const
Definition: Surface.h:120
void MaterialEffects::save ( )

Save nuclear interaction information.

Definition at line 467 of file MaterialEffects.cc.

References NuclearInteraction, and NuclearInteractionSimulator::save().

Referenced by Vispa.Main.TabController.TabController::allowClose(), Vispa.Main.TabController.TabController::checkModificationTimestamp(), and TrajectoryManager::reconstruct().

467  {
468 
469  // Save current nuclear interactions in the event libraries.
471 
472 }
NuclearInteractionSimulator * NuclearInteraction
void save()
Save current nuclear interaction (for later use)
double MaterialEffects::thickness ( ) const
inline

Return the thickness of the current layer.

Definition at line 73 of file MaterialEffects.h.

References theThickness.

Referenced by TrajectoryManager::createPSimHits().

73 { return theThickness; }

Member Data Documentation

BremsstrahlungSimulator* MaterialEffects::Bremsstrahlung
private

Definition at line 106 of file MaterialEffects.h.

Referenced by interact(), MaterialEffects(), and ~MaterialEffects().

EnergyLossSimulator* MaterialEffects::EnergyLoss
private
MultipleScatteringSimulator* MaterialEffects::MultipleScattering
private
MuonBremsstrahlungSimulator* MaterialEffects::MuonBremsstrahlung
private
NuclearInteractionSimulator* MaterialEffects::NuclearInteraction
private

Definition at line 111 of file MaterialEffects.h.

Referenced by interact(), MaterialEffects(), save(), and ~MaterialEffects().

PairProductionSimulator* MaterialEffects::PairProduction
private

Definition at line 105 of file MaterialEffects.h.

Referenced by interact(), MaterialEffects(), and ~MaterialEffects().

double MaterialEffects::pTmin
private

Definition at line 114 of file MaterialEffects.h.

Referenced by interact(), and MaterialEffects().

const RandomEngine* MaterialEffects::random
private

Definition at line 124 of file MaterialEffects.h.

Referenced by MaterialEffects().

double MaterialEffects::theEnergyLoss
private

Definition at line 117 of file MaterialEffects.h.

Referenced by energyLoss(), and interact().

GlobalVector MaterialEffects::theNormalVector
private

Definition at line 115 of file MaterialEffects.h.

Referenced by interact(), and radLengths().

double MaterialEffects::theTECFudgeFactor
private

Definition at line 118 of file MaterialEffects.h.

Referenced by interact(), and MaterialEffects().

double MaterialEffects::theThickness
private

Definition at line 116 of file MaterialEffects.h.

Referenced by radLengths(), and thickness().

bool MaterialEffects::use_hardcoded
private

Definition at line 126 of file MaterialEffects.h.

Referenced by interact(), and MaterialEffects().