EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GFMaterialEffects.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GFMaterialEffects.h
1 /* Copyright 2008-2009, Technische Universitaet Muenchen,
2  Authors: Christian Hoeppner & Sebastian Neubert
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 GFMATERIALEFFECTS_H
25 #define GFMATERIALEFFECTS_H
26 
27 #include<iostream>
28 #include "RKTools.h"
29 #include "TObject.h"
30 #include <vector>
31 #include "TVector3.h"
32 #include "TMatrixT.h"
33 #include "GFPointPath.h"
34 
49 class GFMaterialEffects : public TObject {
50 private:
52  virtual ~GFMaterialEffects();
53 
55 
56 public:
58  static void destruct();
59 
60  void setNoEffects(bool opt = true) {fNoEffects = opt;}
61 
62  void setEnergyLossBetheBloch(bool opt = true) {fEnergyLossBetheBloch = opt; fNoEffects = false;}
63  void setNoiseBetheBloch(bool opt = true) {fNoiseBetheBloch = opt; fNoEffects = false;}
64  void setNoiseCoulomb(bool opt = true) {fNoiseCoulomb = opt; fNoEffects = false;}
65  void setEnergyLossBrems(bool opt = true) {fEnergyLossBrems = opt; fNoEffects = false;}
66  void setNoiseBrems(bool opt = true) {fNoiseBrems = opt; fNoEffects = false;}
67 
72  void setMscModel(const std::string& modelName);
73 
74 
76  double effects(const std::vector<GFPointPath>& points,
77  const double& mom,
78  const int& pdg,
79  double& xx0,
80  const bool& doNoise = false,
81  double* noise7x7 = NULL,
82  const double* jacobian7x7 = NULL,
83  const TVector3* directionBefore = NULL,
84  const TVector3* directionAfter = NULL);
85 
87 
90  double stepper(const double& maxStep, // maximum step. unsigned!
91  const double& maxAngleStep, // maximum step due to curvature. unsigned!
92  const double& posx,
93  const double& posy,
94  const double& posz,
95  const double& dirx,
96  const double& diry,
97  const double& dirz,
98  const double& mom, // momentum
99  double& relMomLoss, // relative momloss for the step will be added
100  const int& pdg);
101 
102 
103 private:
105  void getParticleParameters(double mom);
106 
108  void getMaterialParameters(TGeoMaterial* mat);
109 
111 
116  double energyLossBetheBloch(const double& mom);
117 
119 
127  void noiseBetheBloch(const double& mom,
128  double* noise) const;
129 
131 
320  void noiseCoulomb(const double& mom,
321  double* noise,
322  const double* jacobian,
323  const TVector3* directionBefore,
324  const TVector3* directionAfter) const;
325 
327 
331  double energyLossBrems(const double& mom) const;
332 
334 
337  void noiseBrems(const double& mom,
338  double* noise) const;
339 
340 
342 
348 
349  const double me; // electron mass (GeV)
350 
351  double fstep; // stepsize
352 
353  // cached values for energy loss and noise calculations
354  double fbeta;
355  double fdedx;
356  double fgamma;
357  double fgammaSquare;
358 
359  double fmatDensity;
360  double fmatZ;
361  double fmatA;
363  double fmEE; // mean excitation energy
364 
365  int fpdg;
366  double fcharge;
367  double fmass;
368 
370 
371 public:
373 
374 };
375 
376 #endif
377