Analysis Software
Documentation for sPHENIX simulation software
|
Stepper and energy loss/noise matrix calculation. More...
#include <GenFit/blob/master/trackReps/include/MaterialEffects.h>
Public Member Functions | |
void | init (AbsMaterialInterface *matIfc) |
set the material interface here. Material interface classes must be derived from AbsMaterialInterface. | |
bool | isInitialized () |
void | setNoEffects (bool opt=true) |
void | setEnergyLossBetheBloch (bool opt=true) |
void | setNoiseBetheBloch (bool opt=true) |
void | setNoiseCoulomb (bool opt=true) |
void | setEnergyLossBrems (bool opt=true) |
void | setNoiseBrems (bool opt=true) |
void | ignoreBoundariesBetweenEqualMaterials (bool opt=true) |
void | setMagCharge (double magCharge) |
void | setMscModel (const std::string &modelName) |
Select the multiple scattering model that will be used during track fit. | |
double | effects (const std::vector< 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 | stepper (const RKTrackRep *rep, M1x7 &state7, const double &mom, double &relMomLoss, const int &pdg, Material ¤tMaterial, StepLimits &limits, bool varField=true) |
Returns maximum length so that a specified momentum loss will not be exceeded. | |
void | setDebugLvl (unsigned int lvl=1) |
void | drawdEdx (int pdg=11) |
Static Public Member Functions | |
static MaterialEffects * | getInstance () |
static void | destruct () |
Private Member Functions | |
MaterialEffects () | |
virtual | ~MaterialEffects () |
void | getParticleParameters () |
sets charge_, mass_ | |
void | getMomGammaBeta (double Energy, double &mom, double &gammaSquare, double &gamma, double &betaSquare) const |
double | momentumLoss (double stepSign, double mom, bool linear) |
Returns momentum loss. | |
double | dEdx (double Energy) |
Calculate dEdx for a given energy. | |
double | dEdxBetheBloch (double betaSquare, double gamma, double gammasquare) const |
Uses Bethe Bloch formula to calculate dEdx. | |
void | noiseBetheBloch (M7x7 &noise, double mom, double betaSquare, double gamma, double gammaSquare) const |
calculation of energy loss straggeling | |
void | noiseCoulomb (M7x7 &noise, const M1x3 &direction, double momSquare, double betaSquare) const |
calculation of multiple scattering | |
double | dEdxBrems (double mom) const |
Returns dEdx. | |
void | noiseBrems (M7x7 &noise, double momSquare, double betaSquare) const |
calculation of energy loss straggeling | |
Private Attributes | |
bool | noEffects_ |
bool | energyLossBetheBloch_ |
bool | noiseBetheBloch_ |
bool | noiseCoulomb_ |
bool | energyLossBrems_ |
bool | noiseBrems_ |
bool | ignoreBoundariesBetweenEqualMaterials_ |
const double | me_ |
double | stepSize_ |
double | dEdx_ |
double | E_ |
double | matDensity_ |
double | matZ_ |
double | matA_ |
double | radiationLength_ |
double | mEE_ |
int | pdg_ |
double | charge_ |
double | mag_charge_ |
double | mass_ |
int | mscModelCode_ |
AbsMaterialInterface * | materialInterface_ |
depending on this number a specific msc model is chosen in the noiseCoulomb function. | |
unsigned int | debugLvl_ |
Static Private Attributes | |
static MaterialEffects * | instance_ = nullptr |
Stepper and energy loss/noise matrix calculation.
It provides functionality to limit the stepsize of an extrapolation in order not to exceed a specified maximum momentum loss. After propagation, the energy loss for the given length and (optionally) the noise matrix can be calculated. You have to set which energy-loss and noise mechanisms you want to use. At the moment, per default all energy loss and noise options are ON.
Definition at line 50 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 50 of file MaterialEffects.h
|
private |
Definition at line 43 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 43 of file MaterialEffects.cc
Referenced by getInstance().
|
privatevirtual |
Definition at line 68 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 68 of file MaterialEffects.cc
References materialInterface_.
Calculate dEdx for a given energy.
Definition at line 453 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 453 of file MaterialEffects.cc
References genfit::c_monopolePDGCode, charge_, dEdxBetheBloch(), dEdxBrems(), energyLossBetheBloch_, energyLossBrems_, getMomGammaBeta(), mag_charge_, and pdg_.
Referenced by drawdEdx(), and momentumLoss().
|
private |
Uses Bethe Bloch formula to calculate dEdx.
Definition at line 473 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 473 of file MaterialEffects.cc
References charge_, E, mass_, matA_, matDensity_, matZ_, me_, mEE_, and genfit::Exception::setFatal().
Referenced by dEdx().
Returns dEdx.
Can be called with any pdg, but only calculates dEdx for electrons and positrons (otherwise returns 0). Uses a gaussian approximation (Bethe-Heitler formula with Migdal corrections). For positrons, dEdx is weighed with a correction factor.
Definition at line 628 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 628 of file MaterialEffects.cc
References C, E, I, Acts::UnitConstants::J, matA_, matDensity_, matZ_, me_, pdg_, S(), Acts::UnitConstants::T, TauVsDIS_MachineLearning_Differentiation::X, and TauVsDIS_MachineLearning_Differentiation::Y.
Referenced by dEdx().
|
static |
Definition at line 79 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 79 of file MaterialEffects.cc
References instance_.
Referenced by genfit::MaterialEffectsTests::TearDown().
void genfit::MaterialEffects::drawdEdx | ( | int | pdg = 11 | ) |
Definition at line 830 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 830 of file MaterialEffects.cc
References genfit::c_monopolePDGCode, charge_, Acts::Svg::DetectorConverter::convert(), dEdx(), E, energyLossBetheBloch_, energyLossBrems_, genfit::AbsMaterialInterface::getMaterialParameters(), getParticleParameters(), i, genfit::AbsMaterialInterface::initTrack(), mag_charge_, mass_, matA_, matDensity_, materialInterface_, matZ_, mEE_, add_histos::outfile, pdg, pdg_, radiationLength_, and stepSize_.
double genfit::MaterialEffects::effects | ( | const std::vector< 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.
Definition at line 114 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 114 of file MaterialEffects.cc
References genfit::Material::A, genfit::c_monopolePDGCode, charge_, debugLvl_, genfit::debugOut, genfit::Material::density, E, E_, energyLossBetheBloch_, energyLossBrems_, check_license::err(), getMomGammaBeta(), getParticleParameters(), it, mag_charge_, mass_, matA_, matDensity_, materialInterface_, matZ_, genfit::Material::mEE, mEE_, momentumLoss(), TauVsDIS_MachineLearning_Differentiation::msg, noEffects_, noiseBetheBloch(), noiseBetheBloch_, noiseBrems(), noiseBrems_, noiseCoulomb(), noiseCoulomb_, merge_hashes::p, pdg, pdg_, genfit::Material::radiationLength, radiationLength_, genfit::Exception::setFatal(), stepSize_, and genfit::Material::Z.
Referenced by genfit::RKTrackRep::Extrap().
|
static |
Definition at line 73 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 73 of file MaterialEffects.cc
References instance_, and MaterialEffects().
Referenced by compareForthBackJacNoise(), genfit::RKTrackRep::estimateStep(), genfit::RKTrackRep::Extrap(), PHGenFit::Fitter::Fitter(), main(), genfit::MaterialEffectsTests::SetUp(), and genfit::MaterialEffectsTests::TearDown().
|
private |
Definition at line 374 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 374 of file MaterialEffects.cc
References mass_, and genfit::Exception::setFatal().
Referenced by dEdx(), and effects().
|
private |
sets charge_, mass_
Definition at line 366 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 366 of file MaterialEffects.cc
References charge_, mass_, and pdg_.
Referenced by drawdEdx(), effects(), and stepper().
|
inline |
Definition at line 76 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 76 of file MaterialEffects.h
References ignoreBoundariesBetweenEqualMaterials_.
void genfit::MaterialEffects::init | ( | AbsMaterialInterface * | matIfc | ) |
set the material interface here. Material interface classes must be derived from AbsMaterialInterface.
Definition at line 87 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 87 of file MaterialEffects.cc
References check_license::err(), materialInterface_, and TauVsDIS_MachineLearning_Differentiation::msg.
Referenced by PHGenFit::Fitter::Fitter(), main(), and genfit::MaterialEffectsTests::SetUp().
|
inline |
Definition at line 67 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 67 of file MaterialEffects.h
References materialInterface_.
Returns momentum loss.
Also sets dEdx_ and E_.
Definition at line 392 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 392 of file MaterialEffects.cc
References debugLvl_, genfit::debugOut, dEdx(), dEdx_, E_, mass_, step, and stepSize_.
Referenced by effects(), and stepper().
|
private |
calculation of energy loss straggeling
For the energy loss straggeling, different formulas are used for different regions:
Needs dEdx_, which is calculated in momentumLoss, so it has to be called afterwards!
Definition at line 497 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 497 of file MaterialEffects.cc
References alpha, charge_, dEdx_, std::tr1::f1, std::tr1::f2, I, mass_, matA_, matDensity_, matZ_, me_, Jetscape::Nc, and stepSize_.
Referenced by effects().
|
private |
calculation of energy loss straggeling
Can be called with any pdg, but only calculates straggeling for electrons and positrons.
Definition at line 805 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 805 of file MaterialEffects.cc
References charge_, pdg_, radiationLength_, and stepSize_.
Referenced by effects().
|
private |
calculation of multiple scattering
This function first calcuates a MSC variance based on the current material and step length 2 different formulas for the MSC variance are implemeted. One can select the formula via "setMscModel". With the MSC variance and the current direction of the track a full 7D noise matrix is calculated. This noise matrix is the additional noise at the end of fStep in the 7D globa cooridnate system taking even the (co)variances of the position coordinates into account.
Definition at line 557 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 557 of file MaterialEffects.cc
References KFPMath::a, assert, genfit::RKMatrix< nRows, nCols >::begin(), charge_, genfit::RKMatrix< nRows, nCols >::end(), i, matZ_, mscModelCode_, radiationLength_, step, and stepSize_.
Referenced by effects().
void genfit::MaterialEffects::setDebugLvl | ( | unsigned int | lvl = 1 | ) |
Definition at line 823 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 823 of file MaterialEffects.cc
References debugLvl_, materialInterface_, and genfit::AbsMaterialInterface::setDebugLvl().
|
inline |
Definition at line 71 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 71 of file MaterialEffects.h
References energyLossBetheBloch_, and noEffects_.
|
inline |
Definition at line 74 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 74 of file MaterialEffects.h
References energyLossBrems_, and noEffects_.
|
inline |
Definition at line 77 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 77 of file MaterialEffects.h
References mag_charge_.
void genfit::MaterialEffects::setMscModel | ( | const std::string & | modelName | ) |
Select the multiple scattering model that will be used during track fit.
At the moment two model are available GEANE and Highland. GEANE is the model was was present in Genfit first. Note that using this function has no effect if setNoiseCoulomb(false) is set.
Definition at line 98 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 98 of file MaterialEffects.cc
References genfit::errorOut, mscModelCode_, genfit::Exception::setFatal(), and genfit::Exception::what().
|
inline |
Definition at line 69 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 69 of file MaterialEffects.h
References noEffects_.
Referenced by compareForthBackJacNoise(), and main().
|
inline |
Definition at line 72 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 72 of file MaterialEffects.h
References noEffects_, and noiseBetheBloch_.
|
inline |
Definition at line 75 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 75 of file MaterialEffects.h
References noEffects_, and noiseBrems_.
|
inline |
Definition at line 73 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 73 of file MaterialEffects.h
References noEffects_, and noiseCoulomb_.
void genfit::MaterialEffects::stepper | ( | const RKTrackRep * | rep, |
M1x7 & | state7, | ||
const double & | mom, | ||
double & | relMomLoss, | ||
const int & | pdg, | ||
Material & | currentMaterial, | ||
StepLimits & | limits, | ||
bool | varField = true |
||
) |
Returns maximum length so that a specified momentum loss will not be exceeded.
The stepper returns the maximum length that the particle may travel, so that a specified relative momentum loss will not be exceeded, or the next material boundary is reached. The material crossed are stored together with their stepsizes.
Definition at line 219 of file MaterialEffects.cc.
View newest version in sPHENIX GitHub at line 219 of file MaterialEffects.cc
References genfit::Material::A, debugLvl_, genfit::debugOut, genfit::Material::density, E, check_license::err(), genfit::AbsMaterialInterface::findNextBoundary(), genfit::StepLimits::getLowestLimitSignedVal(), genfit::StepLimits::getLowestLimitVal(), genfit::AbsMaterialInterface::getMaterialParameters(), getParticleParameters(), genfit::StepLimits::getStepSign(), i, ignoreBoundariesBetweenEqualMaterials_, genfit::AbsMaterialInterface::initTrack(), matA_, matDensity_, materialInterface_, matZ_, genfit::Material::mEE, mEE_, momentumLoss(), TauVsDIS_MachineLearning_Differentiation::msg, noEffects_, pdg, pdg_, genfit::Material::Print(), genfit::Material::radiationLength, radiationLength_, genfit::RKTrackRep::RKPropagate(), genfit::Exception::setFatal(), genfit::StepLimits::setLimit(), step, stepSize_, genfit::stp_boundary, genfit::stp_momLoss, and genfit::Material::Z.
Referenced by genfit::RKTrackRep::estimateStep().
|
private |
Definition at line 195 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 195 of file MaterialEffects.h
Referenced by dEdx(), dEdxBetheBloch(), drawdEdx(), effects(), getParticleParameters(), noiseBetheBloch(), noiseBrems(), and noiseCoulomb().
|
private |
Definition at line 203 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 203 of file MaterialEffects.h
Referenced by effects(), momentumLoss(), setDebugLvl(), and stepper().
|
private |
Definition at line 186 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 186 of file MaterialEffects.h
Referenced by momentumLoss(), and noiseBetheBloch().
|
private |
Definition at line 187 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 187 of file MaterialEffects.h
Referenced by effects(), and momentumLoss().
|
private |
Definition at line 173 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 173 of file MaterialEffects.h
Referenced by dEdx(), drawdEdx(), effects(), and setEnergyLossBetheBloch().
|
private |
Definition at line 176 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 176 of file MaterialEffects.h
Referenced by dEdx(), drawdEdx(), effects(), and setEnergyLossBrems().
|
private |
Definition at line 179 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 179 of file MaterialEffects.h
Referenced by ignoreBoundariesBetweenEqualMaterials(), and stepper().
|
staticprivate |
Definition at line 57 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 57 of file MaterialEffects.h
Referenced by destruct(), and getInstance().
|
private |
Definition at line 196 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 196 of file MaterialEffects.h
Referenced by dEdx(), drawdEdx(), effects(), and setMagCharge().
|
private |
Definition at line 197 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 197 of file MaterialEffects.h
Referenced by dEdxBetheBloch(), drawdEdx(), effects(), getMomGammaBeta(), getParticleParameters(), momentumLoss(), and noiseBetheBloch().
|
private |
Definition at line 190 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 190 of file MaterialEffects.h
Referenced by dEdxBetheBloch(), dEdxBrems(), drawdEdx(), effects(), noiseBetheBloch(), and stepper().
|
private |
Definition at line 188 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 188 of file MaterialEffects.h
Referenced by dEdxBetheBloch(), dEdxBrems(), drawdEdx(), effects(), noiseBetheBloch(), and stepper().
|
private |
depending on this number a specific msc model is chosen in the noiseCoulomb function.
Definition at line 201 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 201 of file MaterialEffects.h
Referenced by drawdEdx(), effects(), init(), isInitialized(), setDebugLvl(), stepper(), and ~MaterialEffects().
|
private |
Definition at line 189 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 189 of file MaterialEffects.h
Referenced by dEdxBetheBloch(), dEdxBrems(), drawdEdx(), effects(), noiseBetheBloch(), noiseCoulomb(), and stepper().
|
private |
Definition at line 181 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 181 of file MaterialEffects.h
Referenced by dEdxBetheBloch(), dEdxBrems(), and noiseBetheBloch().
|
private |
Definition at line 192 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 192 of file MaterialEffects.h
Referenced by dEdxBetheBloch(), drawdEdx(), effects(), and stepper().
|
private |
Definition at line 199 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 199 of file MaterialEffects.h
Referenced by noiseCoulomb(), and setMscModel().
|
private |
Definition at line 171 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 171 of file MaterialEffects.h
Referenced by effects(), setEnergyLossBetheBloch(), setEnergyLossBrems(), setNoEffects(), setNoiseBetheBloch(), setNoiseBrems(), setNoiseCoulomb(), and stepper().
|
private |
Definition at line 174 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 174 of file MaterialEffects.h
Referenced by effects(), and setNoiseBetheBloch().
|
private |
Definition at line 177 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 177 of file MaterialEffects.h
Referenced by effects(), and setNoiseBrems().
|
private |
Definition at line 175 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 175 of file MaterialEffects.h
Referenced by effects(), and setNoiseCoulomb().
|
private |
Definition at line 194 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 194 of file MaterialEffects.h
Referenced by dEdx(), dEdxBrems(), drawdEdx(), effects(), getParticleParameters(), noiseBrems(), and stepper().
|
private |
Definition at line 191 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 191 of file MaterialEffects.h
Referenced by drawdEdx(), effects(), noiseBrems(), noiseCoulomb(), and stepper().
|
private |
Definition at line 183 of file MaterialEffects.h.
View newest version in sPHENIX GitHub at line 183 of file MaterialEffects.h
Referenced by drawdEdx(), effects(), momentumLoss(), noiseBetheBloch(), noiseBrems(), noiseCoulomb(), and stepper().