Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
MaterialEffects.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MaterialEffects.h
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
"
28
#include "
AbsMaterialInterface.h
"
29
30
#include <iostream>
31
#include <vector>
32
33
#include <TVector3.h>
34
35
36
namespace
genfit {
37
50
class
MaterialEffects
{
51
52
private
:
53
54
MaterialEffects
();
55
virtual
~MaterialEffects
();
56
57
static
MaterialEffects
*
instance_
;
58
59
60
public
:
61
62
static
MaterialEffects
*
getInstance
();
63
static
void
destruct
();
64
66
void
init
(
AbsMaterialInterface
* matIfc);
67
bool
isInitialized
() {
return
materialInterface_
!=
nullptr
; }
68
69
void
setNoEffects
(
bool
opt =
true
) {
noEffects_
= opt;}
70
71
void
setEnergyLossBetheBloch
(
bool
opt =
true
) {
energyLossBetheBloch_
= opt;
noEffects_
=
false
;}
72
void
setNoiseBetheBloch
(
bool
opt =
true
) {
noiseBetheBloch_
= opt;
noEffects_
=
false
;}
73
void
setNoiseCoulomb
(
bool
opt =
true
) {
noiseCoulomb_
= opt;
noEffects_
=
false
;}
74
void
setEnergyLossBrems
(
bool
opt =
true
) {
energyLossBrems_
= opt;
noEffects_
=
false
;}
75
void
setNoiseBrems
(
bool
opt =
true
) {
noiseBrems_
= opt;
noEffects_
=
false
;}
76
void
ignoreBoundariesBetweenEqualMaterials
(
bool
opt =
true
) {
ignoreBoundariesBetweenEqualMaterials_
= opt;}
77
void
setMagCharge
(
double
magCharge) {
mag_charge_
= magCharge;}
78
84
void
setMscModel
(
const
std::string
& modelName);
85
86
88
double
effects
(
const
std::vector<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
Material
& currentMaterial,
106
StepLimits
& limits,
107
bool
varField =
true
);
108
109
void
setDebugLvl
(
unsigned
int
lvl = 1);
110
111
112
void
drawdEdx
(
int
pdg
= 11);
113
114
private
:
115
117
void
getParticleParameters
();
118
119
void
getMomGammaBeta
(
double
Energy,
120
double
& mom,
double
& gammaSquare,
double
& gamma,
double
& betaSquare)
const
;
121
123
126
double
momentumLoss
(
double
stepSign,
double
mom,
bool
linear);
127
129
double
dEdx
(
double
Energy);
130
131
133
double
dEdxBetheBloch
(
double
betaSquare,
double
gamma,
double
gammasquare)
const
;
134
136
144
void
noiseBetheBloch
(
M7x7
& noise,
double
mom,
double
betaSquare,
double
gamma,
double
gammaSquare)
const
;
145
147
154
void
noiseCoulomb
(
M7x7
& noise,
155
const
M1x3
& direction,
double
momSquare,
double
betaSquare)
const
;
156
158
162
double
dEdxBrems
(
double
mom)
const
;
163
165
167
void
noiseBrems
(
M7x7
& noise,
double
momSquare,
double
betaSquare)
const
;
168
169
170
171
bool
noEffects_
;
172
173
bool
energyLossBetheBloch_
;
174
bool
noiseBetheBloch_
;
175
bool
noiseCoulomb_
;
176
bool
energyLossBrems_
;
177
bool
noiseBrems_
;
178
179
bool
ignoreBoundariesBetweenEqualMaterials_
;
180
181
const
double
me_
;
// electron mass (GeV)
182
183
double
stepSize_
;
// stepsize
184
185
// cached values for energy loss and noise calculations
186
double
dEdx_
;
// Runkge Kutta dEdx
187
double
E_
;
// Runge Kutta Energy
188
double
matDensity_
;
189
double
matZ_
;
190
double
matA_
;
191
double
radiationLength_
;
192
double
mEE_
;
// mean excitation energy
193
194
int
pdg_
;
195
double
charge_
;
196
double
mag_charge_
;
// in units of e+
197
double
mass_
;
198
199
int
mscModelCode_
;
200
201
AbsMaterialInterface
*
materialInterface_
;
202
203
unsigned
int
debugLvl_
;
204
205
// ClassDef(MaterialEffects, 1);
206
207
};
208
209
}
/* End of namespace genfit */
212
#endif // genfit_MaterialEffects_h
GenFit
blob
master
trackReps
include
MaterialEffects.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:17
using
1.8.2 with
sPHENIX GitHub integration