Functions | Variables
GFGeoMatManager.cxx File Reference
#include "GFGeoMatManager.h"
#include "math.h"
#include <cassert>
#include "TGeoMaterial.h"
#include "TGeoManager.h"
#include "GFException.h"

Go to the source code of this file.

Functions

float MeanExcEnergy_get (int Z)
 
float MeanExcEnergy_get (TGeoMaterial *)
 

Variables

const int MeanExcEnergy_NELEMENTS = 92
 
const float MeanExcEnergy_vals [MeanExcEnergy_NELEMENTS] = {19.2, 41.8, 40.0, 63.7, 76.0, 78., 82.0, 95.0, 115.0, 137.0, 149.0, 156.0, 166.0, 173.0, 173.0, 180.0, 174.0, 188.0, 190.0, 191.0, 216.0, 233.0, 245.0, 257.0, 272.0, 286.0, 297.0, 311.0, 322.0, 330.0, 334.0, 350.0, 347.0, 348.0, 343.0, 352.0, 363.0, 366.0, 379.0, 393.0, 417.0, 424.0, 428.0, 441.0, 449.0, 470.0, 470.0, 469.0, 488.0, 488.0, 487.0, 485.0, 491.0, 482.0, 488.0, 491.0, 501.0, 523.0, 535.0, 546.0, 560.0, 574.0, 580.0, 591.0, 614.0, 628.0, 650.0, 658.0, 674.0, 684.0, 694.0, 705.0, 718.0, 727.0, 736.0, 746.0, 757.0, 790.0, 790.0, 800.0, 810.0, 823.0, 823.0, 830.0, 825.0, 794.0, 827.0, 826.0, 841.0, 847.0, 878.0, 890.0}
 

Function Documentation

float MeanExcEnergy_get ( int  Z)

Definition at line 78 of file GFGeoMatManager.cxx.

78  {
79  if ((Z <= 0) || (Z > MeanExcEnergy_NELEMENTS))
80  throw GFException("MeanExcEnergy_get(): Z out of range", __LINE__, __FILE__).setFatal();
81  return MeanExcEnergy_vals[Z-1];
82 }
const float MeanExcEnergy_vals[MeanExcEnergy_NELEMENTS]
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:48
GFException & setFatal(bool b=true)
set fatal flag. if this is true, the fit stops for this current track repr.
Definition: GFException.h:78
const int MeanExcEnergy_NELEMENTS
float MeanExcEnergy_get ( TGeoMaterial *  mat)

Definition at line 84 of file GFGeoMatManager.cxx.

84  {
85  if(mat->IsMixture()){
86  double logMEE = 0.;
87  double denom = 0.;
88  TGeoMixture *mix = (TGeoMixture*)mat;
89  for(int i=0;i<mix->GetNelements();++i){
90  int index = int(floor((mix->GetZmixt())[i]));
91  //check whether the floor command worked
92  assert(fabs(index-((mix->GetZmixt())[i]))<1.e-3);
93  logMEE += 1./(mix->GetAmixt())[i]*(mix->GetWmixt())[i]*(mix->GetZmixt())[i]*log(MeanExcEnergy_get(index));
94  denom += (mix->GetWmixt())[i]*(mix->GetZmixt())[i]*1./(mix->GetAmixt())[i];
95  }
96  logMEE/=denom;
97  return exp(logMEE);
98  }
99  else{ // not a mixture
100  int index = int(floor(mat->GetZ()));
101  //check whether the floor command worked
102  assert(fabs(index-mat->GetZ())<1.e-3);
103  return MeanExcEnergy_get(index);
104  }
105 }
float MeanExcEnergy_get(int Z)
const double e

Variable Documentation

const int MeanExcEnergy_NELEMENTS = 92

Definition at line 75 of file GFGeoMatManager.cxx.

const float MeanExcEnergy_vals[MeanExcEnergy_NELEMENTS] = {19.2, 41.8, 40.0, 63.7, 76.0, 78., 82.0, 95.0, 115.0, 137.0, 149.0, 156.0, 166.0, 173.0, 173.0, 180.0, 174.0, 188.0, 190.0, 191.0, 216.0, 233.0, 245.0, 257.0, 272.0, 286.0, 297.0, 311.0, 322.0, 330.0, 334.0, 350.0, 347.0, 348.0, 343.0, 352.0, 363.0, 366.0, 379.0, 393.0, 417.0, 424.0, 428.0, 441.0, 449.0, 470.0, 470.0, 469.0, 488.0, 488.0, 487.0, 485.0, 491.0, 482.0, 488.0, 491.0, 501.0, 523.0, 535.0, 546.0, 560.0, 574.0, 580.0, 591.0, 614.0, 628.0, 650.0, 658.0, 674.0, 684.0, 694.0, 705.0, 718.0, 727.0, 736.0, 746.0, 757.0, 790.0, 790.0, 800.0, 810.0, 823.0, 823.0, 830.0, 825.0, 794.0, 827.0, 826.0, 841.0, 847.0, 878.0, 890.0}

Definition at line 76 of file GFGeoMatManager.cxx.