G4QGSParticipants.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 #ifndef G4QGSParticipants_h
00027 #define G4QGSParticipants_h 1
00028 
00029 #include "Randomize.hh"
00030 #include "G4VParticipants.hh"
00031 #include "G4Nucleon.hh"
00032 #include "G4InteractionContent.hh"
00033 #include "G4PomeronCrossSection.hh"
00034 #include "G4QGSDiffractiveExcitation.hh"
00035 #include "G4SingleDiffractiveExcitation.hh"
00036 #include "G4PartonPair.hh" 
00037 #include "G4QGSMSplitableHadron.hh" 
00038 #include "G4V3DNucleus.hh"
00039 
00040 
00041 class G4QGSParticipants : public G4VParticipants
00042 {
00043 public:
00044         G4QGSParticipants();
00045         G4QGSParticipants(const G4QGSParticipants &right);
00046         const G4QGSParticipants & operator=(const G4QGSParticipants &right);
00047         virtual ~G4QGSParticipants();
00048 
00049         int operator==(const G4QGSParticipants &right) const;
00050         int operator!=(const G4QGSParticipants &right) const;
00051 
00052         virtual void DoLorentzBoost(G4ThreeVector aBoost)
00053         {
00054                 if(theNucleus) theNucleus->DoLorentzBoost(aBoost);
00055                 theBoost = aBoost;
00056         }
00057 
00058         G4PartonPair* GetNextPartonPair();
00059         void BuildInteractions(const G4ReactionProduct  &thePrimary);
00060         void StartPartonPairLoop();
00061 
00062 protected:
00063         virtual G4VSplitableHadron* SelectInteractions(const G4ReactionProduct  &thePrimary);
00064         void SplitHadrons(); 
00065         void PerformSoftCollisions();
00066         void PerformDiffractiveCollisions();
00067 
00068 protected:
00069         struct DeleteInteractionContent {void operator()(G4InteractionContent*aC){delete aC;}};
00070         std::vector<G4InteractionContent*> theInteractions;
00071         struct DeleteSplitableHadron{void operator()(G4VSplitableHadron*aS){delete aS;}};
00072         std::vector<G4VSplitableHadron*>   theTargets;
00073         struct DeletePartonPair{void operator()(G4PartonPair*aP){delete aP;}};
00074         std::vector<G4PartonPair*>   thePartonPairs;
00075 
00076         G4SingleDiffractiveExcitation theSingleDiffExcitation;
00077         G4QGSDiffractiveExcitation theDiffExcitaton;
00078         G4int ModelMode;
00079         G4bool IsSingleDiffractive();
00080 
00081         G4ThreeVector theBoost;
00082 
00083 protected:
00084         // model parameters HPW
00085         enum  { SOFT, DIFFRACTIVE };
00086         const G4int nCutMax;
00087         const G4double ThresholdParameter;
00088         const G4double QGSMThreshold;
00089         const G4double theNucleonRadius;
00090 
00091 };
00092 
00093 
00094 inline G4bool G4QGSParticipants::IsSingleDiffractive()
00095 {
00096         G4bool result=false;
00097         if(G4UniformRand()<1.) result = true;
00098         return result;
00099 }
00100 
00101 inline void G4QGSParticipants::StartPartonPairLoop()
00102 {
00103 }
00104 
00105 inline G4PartonPair* G4QGSParticipants::GetNextPartonPair()
00106 {
00107         if (thePartonPairs.empty()) return 0;
00108         G4PartonPair * result = thePartonPairs.back();
00109         thePartonPairs.pop_back();
00110         return result;
00111 }
00112 
00113 
00114 inline void G4QGSParticipants::SplitHadrons()
00115 {
00116         unsigned int i;
00117         for(i = 0; i < theInteractions.size(); i++)
00118         {
00119                 theInteractions[i]->SplitHadrons();
00120         }
00121 }
00122 
00123 #endif
00124 
00125 

Generated on Mon May 27 17:49:34 2013 for Geant4 by  doxygen 1.4.7