source: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParticle.hh @ 962

Last change on this file since 962 was 962, checked in by garnier, 15 years ago

update processes

File size: 5.8 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26//
27// $Id: G4QParticle.hh,v 1.24 2006/06/29 20:06:33 gunter Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30//      ---------------- G4QParticle ----------------
31//             by Mikhail Kossov, Sept 1999.
32//  class header for Particles in the CHIPS Model
33// ---------------------------------------------------
34
35#ifndef G4QParticle_h
36#define G4QParticle_h 1
37
38#include <iostream>
39#include "globals.hh"
40#include "G4QDecayChanVector.hh"
41
42class G4QParticle
43{
44public:
45  // Constructors
46  G4QParticle();                             // Default Constructor
47  G4QParticle(G4bool f, G4int theQCode);     // QCode Constructor, f-verbose
48  G4QParticle(G4int thePDG);                 // PDGCode Constructor
49  G4QParticle(const G4QParticle& right);     // Copy Constructor by value
50  G4QParticle(G4QParticle* right);           // Copy Constructor by pointer
51
52  ~G4QParticle();                            // Public Destructor
53
54  // Operators
55  const G4QParticle& operator=(const G4QParticle& right);
56  G4bool             operator==(const G4QParticle& rhs) const;
57  G4bool             operator!=(const G4QParticle& rhs) const;
58
59  // Selectors
60  G4QPDGCode          GetQPDG() const;          // Get a PDG-Particle of the Particle
61  G4int               GetPDGCode() const;       // Get a PDG Code of the Particle
62  G4int               GetQCode() const;         // Get a Q Code of the Particle
63  G4int               GetSpin() const;          // Get 2s+1 of the Particle
64  G4int               GetCharge() const;        // Get a Charge of the Particle
65  G4int               GetStrange() const;       // Get a Strangeness of the Particle
66  G4int               GetBaryNum() const;       // Get a Baryon Number of the Particle
67  G4QContent          GetQContent();            // Get Quark Content of the Particle
68  G4QDecayChanVector  GetDecayVector();         // Get a Decay Vector for the Particle
69  G4double            GetMass();                // Get a mass value for the Particle
70  G4double            GetWidth();               // Get a width value for the Particle
71
72  // Modifiers
73  G4QDecayChanVector InitDecayVector(G4int Q);// Init DecayVector in theCHIPSWorld by QCode
74  void InitPDGParticle(G4int thePDGCode);
75  void InitQParticle(G4int theQCode);
76
77  // General
78  G4double MinMassOfFragm();                    // Minimal mass of decaing fragments
79
80private:
81  // Encapsulated functions
82
83private:
84  // the Body
85  G4QPDGCode          aQPDG;
86  G4QDecayChanVector  aDecay;
87  G4QContent          aQuarkCont;       // @@ Secondary (added for acceleration - check)
88};
89
90// Not member operators
91std::ostream&   operator<<(std::ostream& lhs, G4QParticle& rhs);
92// Not member functions
93//----------------------------------------------------------------------------------------
94
95inline G4bool G4QParticle::operator==(const G4QParticle& rhs) const {return this==&rhs;}
96inline G4bool G4QParticle::operator!=(const G4QParticle& rhs) const {return this!=&rhs;}
97 
98inline G4QPDGCode    G4QParticle::GetQPDG()    const {return aQPDG;}
99inline G4int         G4QParticle::GetQCode()   const {return aQPDG.GetQCode();}
100inline G4int         G4QParticle::GetPDGCode() const {return aQPDG.GetPDGCode();}
101inline G4int         G4QParticle::GetSpin()    const {return aQPDG.GetSpin();}
102inline G4int         G4QParticle::GetCharge()  const {return aQuarkCont.GetCharge();}
103inline G4int         G4QParticle::GetStrange() const {return aQuarkCont.GetStrangeness();}
104inline G4int         G4QParticle::GetBaryNum() const {return aQuarkCont.GetBaryonNumber();}
105inline G4QContent    G4QParticle::GetQContent()      {return aQuarkCont;}
106inline G4QDecayChanVector G4QParticle::GetDecayVector() {return aDecay;}
107inline G4double      G4QParticle::GetMass()          {return aQPDG.GetMass();}
108inline G4double      G4QParticle::GetWidth()         {return aQPDG.GetWidth();}
109
110inline G4double G4QParticle::MinMassOfFragm()
111{
112  G4int nCh=aDecay.size();
113  G4double m=GetMass();
114  G4double min=m;
115  if(nCh)
116  {
117    min=aDecay[0]->GetMinMass();
118    if(nCh>1) for(G4int j=1; j<nCh; j++)
119        {
120      G4double next=aDecay[j]->GetMinMass();
121      if(next<min) min=next;
122        }
123  }
124  G4double w=GetWidth();
125  G4double lim=m+.001;
126  if(w)   lim-=1.5*w;
127  if(min<lim) min=lim;
128  return min;
129}
130
131#endif
132
133
134
Note: See TracBrowser for help on using the repository browser.