|
|
|||
File indexing completed on 2026-09-19 08:37:24
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 /// \file HepMCG4PythiaInterface.hh 0027 /// \brief Definition of the HepMCG4PythiaInterface class 0028 0029 #ifndef HEPMC_G4_PYTHIA_INTERFACE_H 0030 #define HEPMC_G4_PYTHIA_INTERFACE_H 0031 0032 #include "HepMC/IO_HEPEVT.h" 0033 #include "HepMCG4Interface.hh" 0034 0035 class HepMCG4PythiaMessenger; 0036 0037 /// A generic interface class with Pythia event generator via HepMC. 0038 0039 class HepMCG4PythiaInterface : public HepMCG4Interface 0040 { 0041 protected: 0042 G4int verbose; 0043 G4int mpylist; 0044 HepMC::IO_HEPEVT hepevtio; 0045 0046 HepMCG4PythiaMessenger* messenger; 0047 0048 // In default, this is automatic conversion, Pythia->HEPEVT->HepMC, 0049 // by HepMC utilities. 0050 virtual HepMC::GenEvent* GenerateHepMCEvent(); 0051 0052 public: 0053 HepMCG4PythiaInterface(); 0054 ~HepMCG4PythiaInterface(); 0055 0056 // set/get methods 0057 void SetVerboseLevel(G4int i); 0058 G4int GetVerboseLevel() const; 0059 0060 void SetPylist(G4int i); 0061 G4int GetPylist() const; 0062 0063 // call pyxxx 0064 void CallPyinit(G4String frame, G4String beam, G4String target, G4double win); 0065 void CallPystat(G4int istat); 0066 0067 // random numbers operations 0068 void SetRandomSeed(G4int iseed); 0069 void CallPygive(G4String par); 0070 void CallPyrget(G4int lun, G4int move); 0071 void CallPyrset(G4int lun, G4int move); 0072 void PrintRandomStatus(std::ostream& ostr = G4cout) const; 0073 0074 // setup user parameters (empty in default). 0075 // Implement your parameters in a delived class if you want. 0076 virtual void SetUserParameters(); 0077 0078 virtual void Print() const; 0079 }; 0080 0081 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0082 inline void HepMCG4PythiaInterface::SetVerboseLevel(G4int i) 0083 { 0084 verbose = i; 0085 } 0086 0087 inline G4int HepMCG4PythiaInterface::GetVerboseLevel() const 0088 { 0089 return verbose; 0090 } 0091 0092 inline void HepMCG4PythiaInterface::SetPylist(G4int i) 0093 { 0094 mpylist = i; 0095 } 0096 0097 inline G4int HepMCG4PythiaInterface::GetPylist() const 0098 { 0099 return mpylist; 0100 } 0101 0102 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|