SND@LHC Software
Loading...
Searching...
No Matches
MaterialEffects.h
Go to the documentation of this file.
1/* Copyright 2008-2014, Technische Universitaet Muenchen,
2 Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
3
4 This file is part of GENFIT.
5
6 GENFIT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published
8 by the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 GENFIT is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18*/
19
24#ifndef genfit_MaterialEffects_h
25#define genfit_MaterialEffects_h
26
27#include "RKTools.h"
29
30#include <iostream>
31#include <vector>
32
33#include <TObject.h>
34#include <TVector3.h>
35
36
37namespace genfit {
38
51class MaterialEffects {
52
53 private:
54
57
59
60
61public:
62
64 static void destruct();
65
68 bool isInitialized() { return materialInterface_ != nullptr; }
69
70 void setNoEffects(bool opt = true) {noEffects_ = opt;}
71
72 void setEnergyLossBetheBloch(bool opt = true) {energyLossBetheBloch_ = opt; noEffects_ = false;}
73 void setNoiseBetheBloch(bool opt = true) {noiseBetheBloch_ = opt; noEffects_ = false;}
74 void setNoiseCoulomb(bool opt = true) {noiseCoulomb_ = opt; noEffects_ = false;}
75 void setEnergyLossBrems(bool opt = true) {energyLossBrems_ = opt; noEffects_ = false;}
76 void setNoiseBrems(bool opt = true) {noiseBrems_ = opt; noEffects_ = false;}
78
84 void setMscModel(const std::string& modelName);
85
86
88 double effects(const std::vector<genfit::RKStep>& steps,
89 int materialsFXStart,
90 int materialsFXStop,
91 const double& mom,
92 const int& pdg,
93 M7x7* noise = nullptr);
94
100 void stepper(const RKTrackRep* rep,
101 M1x7& state7,
102 const double& mom, // momentum
103 double& relMomLoss, // relative momloss for the step will be added
104 const int& pdg,
105 MaterialProperties& currentMaterial,
106 StepLimits& limits,
107 bool varField = true);
108
109
110 private:
111
113 void getParticleParameters(double mom);
114
116
122
124
132 void noiseBetheBloch(M7x7& noise) const;
133
135
142 void noiseCoulomb(M7x7& noise,
143 const M1x3& direction) const;
144
146
150 double energyLossBrems() const;
151
153
156 void noiseBrems(M7x7& noise) const;
157
158
159 bool noEffects_;
160
162 bool noiseBetheBloch_;
163 bool noiseCoulomb_;
164 bool energyLossBrems_;
165 bool noiseBrems_;
166
168
169 const double me_; // electron mass (GeV)
170
171 double stepSize_; // stepsize
172
173 // cached values for energy loss and noise calculations
174 double mom_;
175 double beta_;
176 double dEdx_;
177 double gamma_;
178 double gammaSquare_;
179
180 double matDensity_;
181 double matZ_;
182 double matA_;
183 double radiationLength_;
184 double mEE_; // mean excitation energy
185
186 int pdg_;
187 int charge_;
188 double mass_;
189
190 int mscModelCode_;
191
193
194
195 //ClassDef(MaterialEffects, 1);
196
197};
198
199} /* End of namespace genfit */
202#endif // genfit_MaterialEffects_h
Abstract base class for geometry interfacing.
Stepper and energy loss/noise matrix calculation.
void setMscModel(const std::string &modelName)
Select the multiple scattering model that will be used during track fit.
void setNoEffects(bool opt=true)
void setNoiseBetheBloch(bool opt=true)
void noiseBrems(M7x7 &noise) const
calculation of energy loss straggeling
void noiseBetheBloch(M7x7 &noise) const
calculation of energy loss straggeling
double effects(const std::vector< genfit::RKStep > &steps, int materialsFXStart, int materialsFXStop, const double &mom, const int &pdg, M7x7 *noise=nullptr)
Calculates energy loss in the traveled path, optional calculation of noise matrix.
void setEnergyLossBrems(bool opt=true)
static MaterialEffects * instance_
void setEnergyLossBetheBloch(bool opt=true)
void ignoreBoundariesBetweenEqualMaterials(bool opt=true)
static MaterialEffects * getInstance()
static void destruct()
void stepper(const RKTrackRep *rep, M1x7 &state7, const double &mom, double &relMomLoss, const int &pdg, MaterialProperties &currentMaterial, StepLimits &limits, bool varField=true)
Returns maximum length so that a specified momentum loss will not be exceeded.
void getParticleParameters(double mom)
sets charge_, mass_ and calculates beta_, gamma_, fgammasquare;
void init(AbsMaterialInterface *matIfc)
set the material interface here. Material interface classes must be derived from AbsMaterialInterface...
AbsMaterialInterface * materialInterface_
depending on this number a specific msc model is chosen in the noiseCoulomb function.
void setNoiseCoulomb(bool opt=true)
double energyLossBetheBloch()
Returns energy loss.
double energyLossBrems() const
Returns energy loss.
void setNoiseBrems(bool opt=true)
void noiseCoulomb(M7x7 &noise, const M1x3 &direction) const
calculation of multiple scattering
Material properties needed e.g. for material effects calculation.
AbsTrackRep with 5D track parameterization in plane coordinates: (q/p, u', v', u, v)
Definition RKTrackRep.h:70
Helper to store different limits on the stepsize for the RKTRackRep.
Definition StepLimits.h:54
Matrix inversion tools.
Definition AbsBField.h:29
double M1x7[1 *7]
Definition RKTools.h:36
double M1x3[1 *3]
Definition RKTools.h:33
double M7x7[7 *7]
Definition RKTools.h:39