GENFIT  Rev:NoNumberAvailable
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
genfit::MaterialEffects Class Reference

Stepper and energy loss/noise matrix calculation. More...

#include <MaterialEffects.h>

Collaboration diagram for genfit::MaterialEffects:
Collaboration graph

Public Member Functions

void init (AbsMaterialInterface *matIfc)
 set the material interface here. Material interface classes must be derived from AbsMaterialInterface. More...
 
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 setMscModel (const std::string &modelName)
 Select the multiple scattering model that will be used during track fit. More...
 
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. More...
 
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. More...
 
void setDebugLvl (unsigned int lvl=1)
 
void drawdEdx (int pdg=11)
 

Static Public Member Functions

static MaterialEffectsgetInstance ()
 
static void destruct ()
 

Private Member Functions

 MaterialEffects ()
 
virtual ~MaterialEffects ()
 
void getParticleParameters ()
 sets charge_, mass_ More...
 
void getMomGammaBeta (double Energy, double &mom, double &gammaSquare, double &gamma, double &betaSquare) const
 
double momentumLoss (double stepSign, double mom, bool linear)
 Returns momentum loss. More...
 
double dEdx (double Energy) const
 Calculate dEdx for a given energy. More...
 
double dEdxBetheBloch (double betaSquare, double gamma, double gammasquare) const
 Uses Bethe Bloch formula to calculate dEdx. More...
 
void noiseBetheBloch (M7x7 &noise, double mom, double betaSquare, double gamma, double gammaSquare) const
 calculation of energy loss straggeling More...
 
void noiseCoulomb (M7x7 &noise, const M1x3 &direction, double momSquare, double betaSquare) const
 calculation of multiple scattering More...
 
double dEdxBrems (double mom) const
 Returns dEdx. More...
 
void noiseBrems (M7x7 &noise, double momSquare, double betaSquare) const
 calculation of energy loss straggeling More...
 

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_
 
int charge_
 
double mass_
 
int mscModelCode_
 
AbsMaterialInterfacematerialInterface_
 depending on this number a specific msc model is chosen in the noiseCoulomb function. More...
 
unsigned int debugLvl_
 

Static Private Attributes

static MaterialEffectsinstance_ = nullptr
 

Detailed Description

Stepper and energy loss/noise matrix calculation.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)
Johannes Rauch (Technische Universität München, author)

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.

Constructor & Destructor Documentation

◆ MaterialEffects()

genfit::MaterialEffects::MaterialEffects ( )
private

Definition at line 42 of file MaterialEffects.cc.

Referenced by getInstance().

◆ ~MaterialEffects()

genfit::MaterialEffects::~MaterialEffects ( )
privatevirtual

Definition at line 66 of file MaterialEffects.cc.

References materialInterface_.

Member Function Documentation

◆ dEdx()

double genfit::MaterialEffects::dEdx ( double  Energy) const
private

Calculate dEdx for a given energy.

Definition at line 437 of file MaterialEffects.cc.

References dEdxBetheBloch(), dEdxBrems(), energyLossBetheBloch_, energyLossBrems_, and getMomGammaBeta().

Referenced by drawdEdx(), and momentumLoss().

◆ dEdxBetheBloch()

double genfit::MaterialEffects::dEdxBetheBloch ( double  betaSquare,
double  gamma,
double  gammasquare 
) const
private

Uses Bethe Bloch formula to calculate dEdx.

Definition at line 454 of file MaterialEffects.cc.

References charge_, mass_, matA_, matDensity_, matZ_, me_, mEE_, and genfit::Exception::setFatal().

Referenced by dEdx().

◆ dEdxBrems()

double genfit::MaterialEffects::dEdxBrems ( double  mom) const
private

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 609 of file MaterialEffects.cc.

References matA_, matDensity_, matZ_, me_, and pdg_.

Referenced by dEdx().

◆ destruct()

void genfit::MaterialEffects::destruct ( )
static

Definition at line 77 of file MaterialEffects.cc.

References instance_.

◆ drawdEdx()

void genfit::MaterialEffects::drawdEdx ( int  pdg = 11)

◆ effects()

double genfit::MaterialEffects::effects ( const std::vector< RKStep > &  steps,
int  materialsFXStart,
int  materialsFXStop,
const double &  mom,
const int &  pdg,
M7x7 noise = nullptr 
)

◆ getInstance()

MaterialEffects * genfit::MaterialEffects::getInstance ( )
static

Definition at line 71 of file MaterialEffects.cc.

References instance_, and MaterialEffects().

Referenced by genfit::RKTrackRep::estimateStep(), and genfit::RKTrackRep::Extrap().

◆ getMomGammaBeta()

void genfit::MaterialEffects::getMomGammaBeta ( double  Energy,
double &  mom,
double &  gammaSquare,
double &  gamma,
double &  betaSquare 
) const
private

Definition at line 358 of file MaterialEffects.cc.

References mass_, and genfit::Exception::setFatal().

Referenced by dEdx(), and effects().

◆ getParticleParameters()

void genfit::MaterialEffects::getParticleParameters ( )
private

sets charge_, mass_

Definition at line 350 of file MaterialEffects.cc.

References charge_, mass_, and pdg_.

Referenced by drawdEdx(), effects(), and stepper().

◆ ignoreBoundariesBetweenEqualMaterials()

void genfit::MaterialEffects::ignoreBoundariesBetweenEqualMaterials ( bool  opt = true)
inline

Definition at line 76 of file MaterialEffects.h.

References ignoreBoundariesBetweenEqualMaterials_.

◆ init()

void genfit::MaterialEffects::init ( AbsMaterialInterface matIfc)

set the material interface here. Material interface classes must be derived from AbsMaterialInterface.

Definition at line 85 of file MaterialEffects.cc.

References materialInterface_.

◆ isInitialized()

bool genfit::MaterialEffects::isInitialized ( )
inline

Definition at line 67 of file MaterialEffects.h.

References materialInterface_.

◆ momentumLoss()

double genfit::MaterialEffects::momentumLoss ( double  stepSign,
double  mom,
bool  linear 
)
private

Returns momentum loss.

Also sets dEdx_ and E_.

Definition at line 376 of file MaterialEffects.cc.

References debugLvl_, genfit::debugOut, dEdx(), dEdx_, E_, mass_, and stepSize_.

Referenced by effects(), and stepper().

◆ noiseBetheBloch()

void genfit::MaterialEffects::noiseBetheBloch ( M7x7 noise,
double  mom,
double  betaSquare,
double  gamma,
double  gammaSquare 
) const
private

calculation of energy loss straggeling

For the energy loss straggeling, different formulas are used for different regions:

  • Vavilov-Gaussian regime
  • Urban/Landau approximation
  • truncated Landau distribution
  • Urban model

Needs dEdx_, which is calculated in momentumLoss, so it has to be called afterwards!

Definition at line 478 of file MaterialEffects.cc.

References charge_, dEdx_, mass_, matA_, matDensity_, matZ_, me_, and stepSize_.

Referenced by effects().

◆ noiseBrems()

void genfit::MaterialEffects::noiseBrems ( M7x7 noise,
double  momSquare,
double  betaSquare 
) const
private

calculation of energy loss straggeling

Can be called with any pdg, but only calculates straggeling for electrons and positrons.

Definition at line 775 of file MaterialEffects.cc.

References charge_, pdg_, radiationLength_, and stepSize_.

Referenced by effects().

◆ noiseCoulomb()

void genfit::MaterialEffects::noiseCoulomb ( M7x7 noise,
const M1x3 direction,
double  momSquare,
double  betaSquare 
) const
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 538 of file MaterialEffects.cc.

References genfit::RKMatrix< nRows, nCols >::begin(), charge_, genfit::RKMatrix< nRows, nCols >::end(), matZ_, mscModelCode_, radiationLength_, and stepSize_.

Referenced by effects().

◆ setDebugLvl()

void genfit::MaterialEffects::setDebugLvl ( unsigned int  lvl = 1)

◆ setEnergyLossBetheBloch()

void genfit::MaterialEffects::setEnergyLossBetheBloch ( bool  opt = true)
inline

Definition at line 71 of file MaterialEffects.h.

References energyLossBetheBloch_, and noEffects_.

◆ setEnergyLossBrems()

void genfit::MaterialEffects::setEnergyLossBrems ( bool  opt = true)
inline

Definition at line 74 of file MaterialEffects.h.

References energyLossBrems_, and noEffects_.

◆ setMscModel()

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 96 of file MaterialEffects.cc.

References genfit::errorOut, mscModelCode_, genfit::Exception::setFatal(), and genfit::Exception::what().

◆ setNoEffects()

void genfit::MaterialEffects::setNoEffects ( bool  opt = true)
inline

Definition at line 69 of file MaterialEffects.h.

References noEffects_.

◆ setNoiseBetheBloch()

void genfit::MaterialEffects::setNoiseBetheBloch ( bool  opt = true)
inline

Definition at line 72 of file MaterialEffects.h.

References noEffects_, and noiseBetheBloch_.

◆ setNoiseBrems()

void genfit::MaterialEffects::setNoiseBrems ( bool  opt = true)
inline

Definition at line 75 of file MaterialEffects.h.

References noEffects_, and noiseBrems_.

◆ setNoiseCoulomb()

void genfit::MaterialEffects::setNoiseCoulomb ( bool  opt = true)
inline

Definition at line 73 of file MaterialEffects.h.

References noEffects_, and noiseCoulomb_.

◆ stepper()

void genfit::MaterialEffects::stepper ( const RKTrackRep rep,
M1x7 state7,
const double &  mom,
double &  relMomLoss,
const int &  pdg,
MaterialProperties currentMaterial,
StepLimits limits,
bool  varField = true 
)

Member Data Documentation

◆ charge_

int genfit::MaterialEffects::charge_
private

◆ debugLvl_

unsigned int genfit::MaterialEffects::debugLvl_
private

Definition at line 201 of file MaterialEffects.h.

Referenced by effects(), momentumLoss(), setDebugLvl(), and stepper().

◆ dEdx_

double genfit::MaterialEffects::dEdx_
private

Definition at line 185 of file MaterialEffects.h.

Referenced by momentumLoss(), and noiseBetheBloch().

◆ E_

double genfit::MaterialEffects::E_
private

Definition at line 186 of file MaterialEffects.h.

Referenced by effects(), and momentumLoss().

◆ energyLossBetheBloch_

bool genfit::MaterialEffects::energyLossBetheBloch_
private

Definition at line 172 of file MaterialEffects.h.

Referenced by dEdx(), drawdEdx(), effects(), and setEnergyLossBetheBloch().

◆ energyLossBrems_

bool genfit::MaterialEffects::energyLossBrems_
private

Definition at line 175 of file MaterialEffects.h.

Referenced by dEdx(), drawdEdx(), effects(), and setEnergyLossBrems().

◆ ignoreBoundariesBetweenEqualMaterials_

bool genfit::MaterialEffects::ignoreBoundariesBetweenEqualMaterials_
private

Definition at line 178 of file MaterialEffects.h.

Referenced by ignoreBoundariesBetweenEqualMaterials(), and stepper().

◆ instance_

MaterialEffects * genfit::MaterialEffects::instance_ = nullptr
staticprivate

Definition at line 57 of file MaterialEffects.h.

Referenced by destruct(), and getInstance().

◆ mass_

double genfit::MaterialEffects::mass_
private

◆ matA_

double genfit::MaterialEffects::matA_
private

◆ matDensity_

double genfit::MaterialEffects::matDensity_
private

◆ materialInterface_

AbsMaterialInterface* genfit::MaterialEffects::materialInterface_
private

depending on this number a specific msc model is chosen in the noiseCoulomb function.

Definition at line 199 of file MaterialEffects.h.

Referenced by drawdEdx(), effects(), init(), isInitialized(), setDebugLvl(), stepper(), and ~MaterialEffects().

◆ matZ_

double genfit::MaterialEffects::matZ_
private

◆ me_

const double genfit::MaterialEffects::me_
private

Definition at line 180 of file MaterialEffects.h.

Referenced by dEdxBetheBloch(), dEdxBrems(), and noiseBetheBloch().

◆ mEE_

double genfit::MaterialEffects::mEE_
private

Definition at line 191 of file MaterialEffects.h.

Referenced by dEdxBetheBloch(), drawdEdx(), effects(), and stepper().

◆ mscModelCode_

int genfit::MaterialEffects::mscModelCode_
private

Definition at line 197 of file MaterialEffects.h.

Referenced by noiseCoulomb(), and setMscModel().

◆ noEffects_

bool genfit::MaterialEffects::noEffects_
private

◆ noiseBetheBloch_

bool genfit::MaterialEffects::noiseBetheBloch_
private

Definition at line 173 of file MaterialEffects.h.

Referenced by effects(), and setNoiseBetheBloch().

◆ noiseBrems_

bool genfit::MaterialEffects::noiseBrems_
private

Definition at line 176 of file MaterialEffects.h.

Referenced by effects(), and setNoiseBrems().

◆ noiseCoulomb_

bool genfit::MaterialEffects::noiseCoulomb_
private

Definition at line 174 of file MaterialEffects.h.

Referenced by effects(), and setNoiseCoulomb().

◆ pdg_

int genfit::MaterialEffects::pdg_
private

◆ radiationLength_

double genfit::MaterialEffects::radiationLength_
private

Definition at line 190 of file MaterialEffects.h.

Referenced by drawdEdx(), effects(), noiseBrems(), noiseCoulomb(), and stepper().

◆ stepSize_

double genfit::MaterialEffects::stepSize_
private

The documentation for this class was generated from the following files: