|
||||
File indexing completed on 2025-01-18 09:55:23
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : M.Frank 0011 // 0012 //========================================================================== 0013 0014 #ifndef DDG4_GEANT4ISOTROPEGENERATOR_H 0015 #define DDG4_GEANT4ISOTROPEGENERATOR_H 0016 0017 // Framework include files 0018 #include <DDG4/Geant4ParticleGenerator.h> 0019 0020 /// Namespace for the AIDA detector description toolkit 0021 namespace dd4hep { 0022 0023 /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit 0024 namespace sim { 0025 /// Generate particles isotrop in space around origine (0,0,0) 0026 /** 0027 * \author M.Frank 0028 * \version 1.0 0029 * \ingroup DD4HEP_SIMULATION 0030 */ 0031 class Geant4IsotropeGenerator: public Geant4ParticleGenerator { 0032 protected: 0033 /// Property: Distribution name. Default: "uniform". Allowed: "uniform", "cos(theta)", "ffbar", "eta" 0034 std::string m_distribution; 0035 /// Property: Minimal phi angular value 0036 double m_phiMin; 0037 /// Property: Maximal phi angular value 0038 double m_phiMax; 0039 /// Property: Minimal theta angular value 0040 double m_thetaMin; 0041 /// Property: Maximal theta angular value 0042 double m_thetaMax; 0043 0044 /// Particle modification. Caller presets defaults to: ( direction = m_direction, momentum = [m_momentumMin, m_momentumMax]) 0045 /** Use this function to implement isotrop guns, multiple guns etc. 0046 User must return a UNIT vector, which gets scaled with momentum. 0047 */ 0048 virtual void getParticleDirection(int num, ROOT::Math::XYZVector& direction, double& momentum) const; 0049 /// e+e- --> ffbar particle distribution ~ 1 + cos^2(theta) 0050 void getParticleDirectionFFbar(int num, ROOT::Math::XYZVector& direction, double& momentum) const; 0051 /// e+e- --> ffbar particle distribution ~ 1 + cos^2(theta) 0052 void getParticleDirectionEta(int num, ROOT::Math::XYZVector& direction, double& momentum) const; 0053 /// Particle distribution ~ cos(theta) 0054 void getParticleDirectionCosTheta(int num, ROOT::Math::XYZVector& direction, double& momentum) const; 0055 /// Uniform particle distribution 0056 void getParticleDirectionUniform(int num, ROOT::Math::XYZVector& direction, double& momentum) const; 0057 0058 public: 0059 /// Inhibit default constructor 0060 Geant4IsotropeGenerator() = delete; 0061 /// Inhibit copy constructor 0062 Geant4IsotropeGenerator(const Geant4IsotropeGenerator& copy) = delete; 0063 /// Standard constructor 0064 Geant4IsotropeGenerator(Geant4Context* context, const std::string& name); 0065 /// Default destructor 0066 virtual ~Geant4IsotropeGenerator(); 0067 }; 0068 } // End namespace sim 0069 } // End namespace dd4hep 0070 #endif // DDG4_GEANT4ISOTROPEGENERATOR_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |