source: trunk/source/processes/hadronic/models/binary_cascade/test/G4ParticleDump.cc@ 1201

Last change on this file since 1201 was 1199, checked in by garnier, 16 years ago

nvx fichiers dans CVS

File size: 7.5 KB
Line 
1//
2// ********************************************************************
3// * DISCLAIMER *
4// * *
5// * The following disclaimer summarizes all the specific disclaimers *
6// * of contributors to this software. The specific disclaimers,which *
7// * govern, are listed with their locations in: *
8// * http://cern.ch/geant4/license *
9// * *
10// * Neither the authors of this software system, nor their employing *
11// * institutes,nor the agencies providing financial support for this *
12// * work make any representation or warranty, express or implied, *
13// * regarding this software system or assume any liability for its *
14// * use. *
15// * *
16// * This code implementation is the intellectual property of the *
17// * GEANT4 collaboration. *
18// * By copying, distributing or modifying the Program (or any work *
19// * based on the Program) you indicate your acceptance of this *
20// * statement, and all its terms. *
21// ********************************************************************
22//
23//
24// -------------------------------------------------------------------
25// GEANT 4 class file --- Copyright CERN 1998
26// CERN Geneva Switzerland
27//
28//
29// File name: G4ParticleDump.cc
30//
31// Author: Maria Grazia Pia (pia@genova.infn.it),
32//
33// Creation date: 15 April 1999
34//
35// Modifications:
36//
37// -------------------------------------------------------------------
38
39#include "globals.hh"
40
41#include "G4ios.hh"
42#include <fstream>
43#include <iomanip>
44#include <iostream>
45#include <assert.h>
46#include <vector>
47
48#include "CLHEP/Hist/TupleManager.h"
49#include "CLHEP/Hist/HBookFile.h"
50#include "CLHEP/Hist/Histogram.h"
51#include "CLHEP/Hist/Tuple.h"
52
53#include "Randomize.hh"
54
55#include "G4AntiProton.hh"
56#include "G4AntiNeutron.hh"
57#include "G4Proton.hh"
58#include "G4Neutron.hh"
59#include "G4PionPlus.hh"
60#include "G4PionMinus.hh"
61#include "G4PionZero.hh"
62#include "G4Gamma.hh"
63#include "G4MuonMinus.hh"
64#include "G4MuonPlus.hh"
65#include "G4KaonMinus.hh"
66#include "G4KaonPlus.hh"
67#include "G4NeutrinoMu.hh"
68#include "G4AntiNeutrinoMu.hh"
69#include "G4Lambda.hh"
70
71#include "G4ParticleDefinition.hh"
72
73#include "G4VDecayChannel.hh"
74#include "G4DecayTable.hh"
75
76#include "G4KineticTrack.hh"
77#include "G4KineticTrackVector.hh"
78
79#include "G4VShortLivedParticle.hh"
80#include "G4ShortLivedConstructor.hh"
81#include "G4ParticleTable.hh"
82#include "G4ShortLivedTable.hh"
83
84#include "G4VXResonanceTable.hh"
85#include "G4XNNstarTable.hh"
86#include "G4XDeltaNstarTable.hh"
87#include "G4XDeltaDeltaTable.hh"
88#include "G4XNDeltaTable.hh"
89#include "G4XNDeltastarTable.hh"
90#include "G4XDeltaDeltastarTable.hh"
91
92#include "G4ResonanceNames.hh"
93
94
95int main()
96{
97
98 // ==== Initialization phase ====
99
100 G4ParticleDefinition* gamma = G4Gamma::GammaDefinition();
101
102 G4ParticleDefinition* proton = G4Proton::ProtonDefinition();
103 G4ParticleDefinition* antiProton = G4AntiProton::AntiProtonDefinition();
104 G4ParticleDefinition* neutron = G4Neutron::NeutronDefinition();
105 G4ParticleDefinition* antiNeutron = G4AntiNeutron::AntiNeutronDefinition();
106
107 G4ParticleDefinition* pionPlus = G4PionPlus::PionPlusDefinition();
108 G4ParticleDefinition* pionMinus = G4PionMinus::PionMinusDefinition();
109 G4ParticleDefinition* pionZero = G4PionZero::PionZeroDefinition();
110
111 G4ParticleDefinition* kaonPlus = G4KaonPlus::KaonPlusDefinition();
112 G4ParticleDefinition* kaonMinus = G4KaonMinus::KaonMinusDefinition();
113
114 G4ParticleDefinition* lambda = G4Lambda::LambdaDefinition();
115
116 G4ParticleDefinition* theMuonPlus = G4MuonPlus::MuonPlusDefinition();
117 G4ParticleDefinition* theMuonMinus = G4MuonMinus::MuonMinusDefinition();
118
119 G4ParticleDefinition* theNeutrinoMu = G4NeutrinoMu::NeutrinoMuDefinition();
120 G4ParticleDefinition* theAntiNeutrinoMu = G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
121
122 // Construct resonances
123 G4ShortLivedConstructor shortLived;
124 shortLived.ConstructParticle();
125
126 // Get the particle table
127 G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
128
129 // ==== End of the initialization phase ====
130
131 // The list of resonances handled by the Kinetic Model
132 G4ResonanceNames* resonanceList = new G4ResonanceNames;
133
134 // ==== Nucleons ====
135
136 G4cout << proton->GetParticleName()
137 <<": mass " << proton->GetPDGMass()
138 <<", width " << proton->GetPDGWidth()
139 <<", iSpin "<< proton->GetPDGiSpin()
140 <<", iIsospin " << proton->GetPDGiIsospin()
141 <<", iIsospin3 " << proton->GetPDGiIsospin3()
142 <<", subType " << proton->GetParticleSubType()
143 << G4endl;
144
145 G4cout << neutron->GetParticleName()
146 <<": mass " << neutron->GetPDGMass()
147 <<", width " << neutron->GetPDGWidth()
148 <<", iSpin "<< neutron->GetPDGiSpin()
149 <<", iIsospin " << neutron->GetPDGiIsospin()
150 <<", iIsospin3 " << neutron->GetPDGiIsospin3()
151 <<", subType " << neutron->GetParticleSubType()
152 << G4endl;
153
154 // ===== Delta =====
155
156 const std::vector<G4String> listDelta = resonanceList->DeltaNames();
157 G4int nDelta = listDelta.size();
158 G4cout << G4endl << "===== Delta ===== " << G4endl;
159
160 G4int i;
161 for (i=0; i<nDelta; i++)
162 {
163 // Particle information
164 G4String name = listDelta[i];
165 G4ParticleDefinition* def = particleTable->FindParticle(name);
166 if (def == 0) G4cout << name << "does not have a ParticleDefinition " << G4endl;
167 G4cout << def->GetParticleName()
168 <<": mass " << def->GetPDGMass()
169 <<", width " << def->GetPDGWidth()
170 <<", iSpin "<< def->GetPDGiSpin()
171 <<", iIsospin " << def->GetPDGiIsospin()
172 <<", iIsospin3 " << def->GetPDGiIsospin3()
173 <<", subType " << def->GetParticleSubType()
174 << G4endl;
175 }
176
177 // Excited Nucleons =====
178
179 G4cout << G4endl << "===== Excited Nucleons ===== " << G4endl;
180
181 const std::vector<G4String> listNstar = resonanceList->NstarNames();
182 G4int nNstar = listNstar.size();
183
184 for (i=0; i<nNstar; i++)
185 {
186 G4String name = listNstar[i];
187 G4ParticleDefinition* def = particleTable->FindParticle(name);
188 if (def == 0) G4cout << name << "does not have a ParticleDefinition " << G4endl;
189 G4cout << def->GetParticleName()
190 <<": mass " << def->GetPDGMass()
191 <<", width " << def->GetPDGWidth()
192 <<", iSpin "<< def->GetPDGiSpin()
193 <<", iIsospin " << def->GetPDGiIsospin()
194 <<", iIsospin3 " << def->GetPDGiIsospin3()
195 <<", subType " << def->GetParticleSubType()
196 << G4endl;
197 }
198
199 // ===== Excited Deltas =====
200
201 G4cout << G4endl << "===== Excited Deltas ===== " << G4endl;
202
203 const std::vector<G4String> listDeltastar = resonanceList->DeltastarNames();
204 G4int nDeltastar = listDeltastar.size();
205
206 for (i=0; i<nDeltastar; i++)
207 {
208 G4String name = listDeltastar[i];
209 G4ParticleDefinition* def = particleTable->FindParticle(name);
210 if (def == 0) G4cout << name << "does not have a ParticleDefinition " << G4endl;
211 G4cout << def->GetParticleName()
212 <<": mass " << def->GetPDGMass()
213 <<", width " << def->GetPDGWidth()
214 <<", iSpin "<< def->GetPDGiSpin()
215 <<", iIsospin " << def->GetPDGiIsospin()
216 <<", iIsospin3 " << def->GetPDGiIsospin3()
217 <<", subType " << def->GetParticleSubType()
218 << G4endl;
219 }
220
221
222 delete resonanceList;
223
224 return EXIT_SUCCESS;
225}
Note: See TracBrowser for help on using the repository browser.