Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:17:40

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 //
0027 // $Id: G4Pythia6Decayer.hh,v 1.2 2014/10/07 03:06:54 mccumber Exp $
0028 //
0029 /// \file eventgenerator/pythia/decayer6/include/G4Pythia6Decayer.hh
0030 /// \brief Definition of the G4Pythia6Decayer class
0031 //
0032 #ifndef G4_PYTHIA6_DECAYER_H
0033 #define G4_PYTHIA6_DECAYER_H
0034 
0035 #include "EDecayType.hh"
0036 #include "G4Pythia6DecayerMessenger.hh"
0037 #include "Pythia6.hh"
0038 
0039 #include <Geant4/G4ThreeVector.hh>  // for G4ThreeVector
0040 #include <Geant4/G4Types.hh>        // for G4int, G4bool
0041 #include <Geant4/G4VExtDecayer.hh>
0042 
0043 class G4DecayProducts;
0044 class G4DynamicParticle;
0045 class G4ParticleDefinition;
0046 class G4Track;
0047 
0048 namespace CLHEP
0049 {
0050   class HepLorentzVector;
0051 }
0052 
0053 /// Pythia6 decayer
0054 ///
0055 /// Implements the G4VExtDecayer abstract class using the Pythia6 interface.
0056 /// According to TPythia6Decayer class in Root:
0057 /// http://root.cern.ch/
0058 /// see http://root.cern.ch/root/License.html
0059 
0060 class G4Pythia6Decayer : public G4VExtDecayer
0061 {
0062  public:
0063   G4Pythia6Decayer();
0064   virtual ~G4Pythia6Decayer();
0065 
0066   virtual G4DecayProducts* ImportDecayProducts(const G4Track& track);
0067 
0068   void ForceDecayType(EDecayType decayType);
0069   void SetVerboseLevel(G4int verboseLevel) { fVerboseLevel = verboseLevel; }
0070 
0071  private:
0072   /// Not implemented
0073   G4Pythia6Decayer(const G4Pythia6Decayer& right);
0074   /// Not implemented
0075   G4Pythia6Decayer& operator=(const G4Pythia6Decayer& right);
0076 
0077   G4ParticleDefinition*
0078   GetParticleDefinition(const Pythia6Particle* p, G4bool warn = true) const;
0079   G4DynamicParticle* CreateDynamicParticle(const Pythia6Particle* p) const;
0080   G4ThreeVector GetParticlePosition(const Pythia6Particle* particle) const;
0081   G4ThreeVector GetParticleMomentum(const Pythia6Particle* particle) const;
0082 
0083   G4int CountProducts(G4int channel, G4int particle);
0084   void ForceParticleDecay(G4int particle, G4int product, G4int mult);
0085   void ForceParticleDecay(G4int particle,
0086                           G4int* products, G4int* mult, G4int npart);
0087   void ForceHadronicD();
0088   void ForceOmega();
0089   void ForceDecay(EDecayType decayType);
0090 
0091   void Decay(G4int pdg, const CLHEP::HepLorentzVector& p);
0092   G4int ImportParticles(ParticleVector* particles);
0093 
0094   static const EDecayType fgkDefaultDecayType;  ///< default decay type
0095 
0096   G4Pythia6DecayerMessenger fMessenger;  ///< command messenger
0097   G4int fVerboseLevel;                   ///< verbose level
0098   EDecayType fDecayType;                 ///< selected decay type
0099   ParticleVector* fDecayProductsArray;   ///< array of decay products
0100 };
0101 
0102 // ----------------------------------------------------------------------------
0103 
0104 #endif