FairRoot/PandaRoot
Macros | Functions | Variables
GFMaterialEffects.cxx File Reference
#include "GFMaterialEffects.h"
#include <iostream>
#include "stdlib.h"
#include "TDatabasePDG.h"
#include "TGeoMaterial.h"
#include "TGeoManager.h"
#include "math.h"
#include "assert.h"

Go to the source code of this file.

Macros

#define DEBUG   0
 

Functions

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

Variables

const int MeanExcEnergy_NELEMENTS = 93
 
const float MeanExcEnergy_vals [] = {1.e15, 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}
 

Macro Definition Documentation

#define DEBUG   0

Function Documentation

float MeanExcEnergy_get ( int  Z)

Definition at line 593 of file GFMaterialEffects.cxx.

References MeanExcEnergy_NELEMENTS, MeanExcEnergy_vals, and Z.

Referenced by GFMaterialEffects::getParameters(), and MeanExcEnergy_get().

593  {
594  assert(Z>=0&&Z<MeanExcEnergy_NELEMENTS);
595  return MeanExcEnergy_vals[Z];
596 }
const int MeanExcEnergy_NELEMENTS
const float MeanExcEnergy_vals[]
double Z
Definition: anaLmdDigi.C:68
float MeanExcEnergy_get ( TGeoMaterial *  mat)

Definition at line 598 of file GFMaterialEffects.cxx.

References exp(), i, log(), MeanExcEnergy_get(), and mix.

598  {
599  if(mat->IsMixture()){
600  double logMEE = 0.;
601  double denom = 0.;
602  TGeoMixture *mix = (TGeoMixture*)mat;
603  for(int i=0;i<mix->GetNelements();++i){
604  int index = int(floor((mix->GetZmixt())[i]));
605  logMEE += 1./(mix->GetAmixt())[i]*(mix->GetWmixt())[i]*(mix->GetZmixt())[i]*log(MeanExcEnergy_get(index));
606  denom += (mix->GetWmixt())[i]*(mix->GetZmixt())[i]*1./(mix->GetAmixt())[i];
607  }
608  logMEE/=denom;
609  return exp(logMEE);
610  }
611  else{ // not a mixture
612  int index = int(floor(mat->GetZ()));
613  return MeanExcEnergy_get(index);
614  }
615 }
friend F32vec4 exp(const F32vec4 &a)
Definition: P4_F32vec4.h:109
Int_t i
Definition: run_full.C:25
friend F32vec4 log(const F32vec4 &a)
Definition: P4_F32vec4.h:110
float MeanExcEnergy_get(int Z)
PndMixBackgroundEvents * mix
Definition: runrecoMix.C:67

Variable Documentation

const int MeanExcEnergy_NELEMENTS = 93

Definition at line 590 of file GFMaterialEffects.cxx.

Referenced by MeanExcEnergy_get().

const float MeanExcEnergy_vals[] = {1.e15, 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 591 of file GFMaterialEffects.cxx.

Referenced by MeanExcEnergy_get().