Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:27

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 //
0028 
0029 #ifndef G4VSplitableHadron_h
0030 #define G4VSplitableHadron_h 1
0031 
0032 // ------------------------------------------------------------
0033 //      GEANT 4 class header file
0034 //
0035 //      ---------------- G4VSplitableHadron----------------
0036 //             by Gunter Folger, June 1998.
0037 //       class storing an interacting particle. Used by Parton String Models.
0038 // ------------------------------------------------------------
0039 
0040 #include "globals.hh"
0041 #include "G4ParticleDefinition.hh"
0042 #include "G4ReactionProduct.hh"
0043 #include "G4ThreeVector.hh"
0044 #include "G4LorentzVector.hh"
0045 
0046 class G4Nucleon;
0047 class G4Parton;
0048 class G4VKineticNucleon;
0049 
0050 #include <vector>
0051 
0052 class G4VSplitableHadron 
0053 {
0054   public:
0055     G4VSplitableHadron();
0056     G4VSplitableHadron(const G4ReactionProduct & aPrimary);
0057     G4VSplitableHadron(const G4Nucleon & aNucleon);
0058     G4VSplitableHadron(const G4VKineticNucleon * aNucleon);
0059 
0060     virtual ~G4VSplitableHadron();
0061 
0062     G4bool operator==(const G4VSplitableHadron &right) const;
0063     G4bool operator!=(const G4VSplitableHadron &right) const;
0064 
0065     void Set4Momentum(const G4LorentzVector &a4Momentum);
0066     const G4LorentzVector & Get4Momentum() const;
0067 
0068     void SetDefinition(const G4ParticleDefinition *aDefinition);
0069     const G4ParticleDefinition * GetDefinition() const;
0070       
0071     void IncrementCollisionCount(G4int aCount);
0072     void SetCollisionCount(G4int aCount);
0073 
0074     void SetTimeOfCreation(G4double aTime);
0075     G4double GetTimeOfCreation();
0076 
0077     void SetPosition(const G4ThreeVector &aPosition);
0078     const G4ThreeVector & GetPosition() const;
0079 
0080     void SetStatus(const G4int aStatus);
0081     G4int GetStatus();
0082 
0083     virtual void SplitUp() = 0;
0084     virtual void SetFirstParton(G4int PDGcode) = 0;
0085     virtual void SetSecondParton(G4int PDGcode)= 0;
0086     virtual G4Parton * GetNextParton() = 0 ;
0087     virtual G4Parton * GetNextAntiParton() = 0 ;
0088     G4bool IsSplit() { return isSplit;}
0089 
0090     G4int GetSoftCollisionCount();
0091 
0092     void Splitting() {isSplit = true;}
0093 
0094   private:
0095     G4VSplitableHadron(const G4VSplitableHadron &right);
0096     const G4VSplitableHadron & operator=(const G4VSplitableHadron &right);
0097 
0098     const G4ParticleDefinition *theDefinition;
0099 
0100     G4LorentzVector the4Momentum;
0101 
0102     G4double TimeOfCreation;
0103     G4ThreeVector thePosition;
0104     G4int theCollisionCount;
0105 
0106     G4int  curStatus;
0107     G4bool isSplit;
0108 };
0109 
0110 inline G4int G4VSplitableHadron::GetSoftCollisionCount()
0111 {
0112   return theCollisionCount;
0113 }
0114 
0115 inline void G4VSplitableHadron::SetCollisionCount(G4int aCount)
0116 {
0117   theCollisionCount = aCount;
0118 }
0119 
0120 inline void G4VSplitableHadron::Set4Momentum(const G4LorentzVector &a4Momentum)
0121 {
0122   the4Momentum=a4Momentum;
0123 }
0124 
0125 inline const G4LorentzVector & G4VSplitableHadron::Get4Momentum() const
0126 {
0127   return the4Momentum;
0128 }
0129 
0130 inline void G4VSplitableHadron::SetDefinition(const G4ParticleDefinition *aDefinition)
0131 {
0132   theDefinition=aDefinition;
0133 }
0134 
0135 inline const G4ParticleDefinition * G4VSplitableHadron::GetDefinition() const
0136 {
0137   return theDefinition;
0138 }
0139 
0140 inline void G4VSplitableHadron::IncrementCollisionCount(G4int aCount)
0141 {
0142   theCollisionCount += aCount;
0143 }
0144 
0145 inline void G4VSplitableHadron::SetTimeOfCreation(G4double aTime)
0146 {
0147   TimeOfCreation=aTime;
0148 }
0149 
0150 inline G4double G4VSplitableHadron::GetTimeOfCreation()
0151 {
0152   return TimeOfCreation; 
0153 }
0154 
0155 inline void G4VSplitableHadron::SetPosition(const G4ThreeVector &aPosition)
0156 {
0157   thePosition=aPosition;
0158 }
0159 
0160 inline const G4ThreeVector & G4VSplitableHadron::GetPosition() const
0161 {
0162   return thePosition;
0163 }
0164 
0165 inline void G4VSplitableHadron::SetStatus(G4int aStatus)
0166 {
0167   curStatus=aStatus;
0168 }
0169 
0170 inline G4int G4VSplitableHadron::GetStatus()
0171 {
0172   return curStatus; 
0173 }
0174 
0175 #endif
0176