| 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: G4WidthTableTest.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 "G4ResonanceNames.hh"
|
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 | int main()
|
|---|
| 88 | {
|
|---|
| 89 | // MGP ---- HBOOK initialization
|
|---|
| 90 | HepTupleManager* hbookManager;
|
|---|
| 91 | G4String fileName = "wtables.hbook";
|
|---|
| 92 | hbookManager = new HBookFile(fileName, 58);
|
|---|
| 93 | assert (hbookManager != 0);
|
|---|
| 94 |
|
|---|
| 95 | // ==== Initialization phase ====
|
|---|
| 96 |
|
|---|
| 97 | G4ParticleDefinition* gamma = G4Gamma::GammaDefinition();
|
|---|
| 98 |
|
|---|
| 99 | G4ParticleDefinition* proton = G4Proton::ProtonDefinition();
|
|---|
| 100 | G4ParticleDefinition* antiProton = G4AntiProton::AntiProtonDefinition();
|
|---|
| 101 | G4ParticleDefinition* neutron = G4Neutron::NeutronDefinition();
|
|---|
| 102 | G4ParticleDefinition* antiNeutron = G4AntiNeutron::AntiNeutronDefinition();
|
|---|
| 103 |
|
|---|
| 104 | G4ParticleDefinition* pionPlus = G4PionPlus::PionPlusDefinition();
|
|---|
| 105 | G4ParticleDefinition* pionMinus = G4PionMinus::PionMinusDefinition();
|
|---|
| 106 | G4ParticleDefinition* pionZero = G4PionZero::PionZeroDefinition();
|
|---|
| 107 |
|
|---|
| 108 | G4ParticleDefinition* kaonPlus = G4KaonPlus::KaonPlusDefinition();
|
|---|
| 109 | G4ParticleDefinition* kaonMinus = G4KaonMinus::KaonMinusDefinition();
|
|---|
| 110 |
|
|---|
| 111 | G4ParticleDefinition* lambda = G4Lambda::LambdaDefinition();
|
|---|
| 112 |
|
|---|
| 113 | G4ParticleDefinition* theMuonPlus = G4MuonPlus::MuonPlusDefinition();
|
|---|
| 114 | G4ParticleDefinition* theMuonMinus = G4MuonMinus::MuonMinusDefinition();
|
|---|
| 115 |
|
|---|
| 116 | G4ParticleDefinition* theNeutrinoMu = G4NeutrinoMu::NeutrinoMuDefinition();
|
|---|
| 117 | G4ParticleDefinition* theAntiNeutrinoMu = G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
|
|---|
| 118 |
|
|---|
| 119 | // Construct resonances
|
|---|
| 120 | G4ShortLivedConstructor shortLived;
|
|---|
| 121 | shortLived.ConstructParticle();
|
|---|
| 122 |
|
|---|
| 123 | // Get the particle table
|
|---|
| 124 | G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
|---|
| 125 | // particleTable->DumpTable("ALL");
|
|---|
| 126 |
|
|---|
| 127 | // ==== End of the initialization phase ====
|
|---|
| 128 |
|
|---|
| 129 |
|
|---|
| 130 | // The list of resonances handled by the Kinetic Model
|
|---|
| 131 | G4ResonanceNames* resonanceList = new G4ResonanceNames;
|
|---|
| 132 |
|
|---|
| 133 |
|
|---|
| 134 | // ==== Nucleons ====
|
|---|
| 135 |
|
|---|
| 136 | G4cout << proton->GetParticleName()
|
|---|
| 137 | << G4endl;
|
|---|
| 138 |
|
|---|
| 139 | G4cout << neutron->GetParticleName()
|
|---|
| 140 | << G4endl;
|
|---|
| 141 |
|
|---|
| 142 | // ===== Delta =====
|
|---|
| 143 |
|
|---|
| 144 | const std::vector<G4String> listDelta = resonanceList->DeltaNames();
|
|---|
| 145 | G4int nDelta = listDelta.size();
|
|---|
| 146 | G4cout << G4endl << "===== Delta ===== " << G4endl;
|
|---|
| 147 |
|
|---|
| 148 | G4int i;
|
|---|
| 149 | for (i=0; i<nDelta; i++)
|
|---|
| 150 | {
|
|---|
| 151 | // Particle information
|
|---|
| 152 | G4String name = listDelta[i];
|
|---|
| 153 | G4ParticleDefinition* def = particleTable->FindParticle(name);
|
|---|
| 154 | if (def == 0) G4cout << name << "does not have a ParticleDefinition " << G4endl;
|
|---|
| 155 | G4cout << def->GetParticleName() << G4endl;
|
|---|
| 156 | G4DecayTable* decayTable = def->GetDecayTable();
|
|---|
| 157 | decayTable->DumpInfo();
|
|---|
| 158 | }
|
|---|
| 159 |
|
|---|
| 160 |
|
|---|
| 161 | // ===== Excited Nucleons =====
|
|---|
| 162 |
|
|---|
| 163 | G4cout << G4endl << "===== Excited Nucleons ===== " << G4endl;
|
|---|
| 164 |
|
|---|
| 165 | const std::vector<G4String> listNstar = resonanceList->NstarNames();
|
|---|
| 166 | G4int nNstar = listNstar.size();
|
|---|
| 167 |
|
|---|
| 168 | for (i=0; i<nNstar; i++)
|
|---|
| 169 | {
|
|---|
| 170 | G4String name = listNstar[i];
|
|---|
| 171 | G4ParticleDefinition* def = particleTable->FindParticle(name);
|
|---|
| 172 | if (def == 0) G4cout << name << "does not have a ParticleDefinition " << G4endl;
|
|---|
| 173 | G4cout << def->GetParticleName() << G4endl;
|
|---|
| 174 | G4DecayTable* decayTable = def->GetDecayTable();
|
|---|
| 175 | decayTable->DumpInfo();
|
|---|
| 176 | }
|
|---|
| 177 |
|
|---|
| 178 |
|
|---|
| 179 | // ===== Excited Deltas =====
|
|---|
| 180 |
|
|---|
| 181 | G4cout << G4endl << "===== Excited Deltas ===== " << G4endl;
|
|---|
| 182 |
|
|---|
| 183 | const std::vector<G4String> listDeltastar = resonanceList->DeltastarNames();
|
|---|
| 184 | G4int nDeltastar = listDeltastar.size();
|
|---|
| 185 |
|
|---|
| 186 | for (i=0; i<nDeltastar; i++)
|
|---|
| 187 | {
|
|---|
| 188 | G4String name = listDeltastar[i];
|
|---|
| 189 | G4ParticleDefinition* def = particleTable->FindParticle(name);
|
|---|
| 190 | if (def == 0) G4cout << name << "does not have a ParticleDefinition " << G4endl;
|
|---|
| 191 | G4cout << def->GetParticleName() << G4endl;
|
|---|
| 192 | G4DecayTable* decayTable = def->GetDecayTable();
|
|---|
| 193 | decayTable->DumpInfo();
|
|---|
| 194 | }
|
|---|
| 195 |
|
|---|
| 196 | // ===== Lambdas =====
|
|---|
| 197 |
|
|---|
| 198 | G4cout << G4endl << "===== Lambdas ===== " << G4endl;
|
|---|
| 199 |
|
|---|
| 200 | const std::vector<G4String> listLambda = resonanceList->LambdaNames();
|
|---|
| 201 | G4int nLambda = listLambda.size();
|
|---|
| 202 |
|
|---|
| 203 | for (i=0; i<nLambda; i++)
|
|---|
| 204 | {
|
|---|
| 205 | G4String name = listLambda[i];
|
|---|
| 206 | G4ParticleDefinition* def = particleTable->FindParticle(name);
|
|---|
| 207 | if (def == 0) G4cout << name << "does not have a ParticleDefinition " << G4endl;
|
|---|
| 208 | G4cout << def->GetParticleName() << G4endl;
|
|---|
| 209 | G4DecayTable* decayTable = def->GetDecayTable();
|
|---|
| 210 | decayTable->DumpInfo();
|
|---|
| 211 | }
|
|---|
| 212 |
|
|---|
| 213 |
|
|---|
| 214 | // ===== Sigmas =====
|
|---|
| 215 |
|
|---|
| 216 | G4cout << G4endl << "===== Sigmas ===== " << G4endl;
|
|---|
| 217 |
|
|---|
| 218 | const std::vector<G4String> listSigma = resonanceList->SigmaNames();
|
|---|
| 219 | G4int nSigma = listSigma.size();
|
|---|
| 220 |
|
|---|
| 221 | for (i=0; i<nSigma; i++)
|
|---|
| 222 | {
|
|---|
| 223 | G4String name = listSigma[i];
|
|---|
| 224 | G4ParticleDefinition* def = particleTable->FindParticle(name);
|
|---|
| 225 | if (def == 0) G4cout << name << "does not have a ParticleDefinition " << G4endl;
|
|---|
| 226 | G4cout << def->GetParticleName() << G4endl;
|
|---|
| 227 | G4DecayTable* decayTable = def->GetDecayTable();
|
|---|
| 228 | decayTable->DumpInfo();
|
|---|
| 229 | }
|
|---|
| 230 |
|
|---|
| 231 |
|
|---|
| 232 | // ===== Xis =====
|
|---|
| 233 |
|
|---|
| 234 | G4cout << G4endl << "===== Xis ===== " << G4endl;
|
|---|
| 235 |
|
|---|
| 236 | const std::vector<G4String> listXi = resonanceList->XiNames();
|
|---|
| 237 | G4int nXi = listXi.size();
|
|---|
| 238 |
|
|---|
| 239 | for (i=0; i<nXi; i++)
|
|---|
| 240 | {
|
|---|
| 241 | G4String name = listXi[i];
|
|---|
| 242 | G4ParticleDefinition* def = particleTable->FindParticle(name);
|
|---|
| 243 | if (def == 0) G4cout << name << "does not have a ParticleDefinition " << G4endl;
|
|---|
| 244 | G4cout << def->GetParticleName() << G4endl;
|
|---|
| 245 | G4DecayTable* decayTable = def->GetDecayTable();
|
|---|
| 246 | decayTable->DumpInfo();
|
|---|
| 247 | }
|
|---|
| 248 |
|
|---|
| 249 |
|
|---|
| 250 | hbookManager->write();
|
|---|
| 251 |
|
|---|
| 252 | G4cout << "ntuples are in file " << fileName<< G4endl;
|
|---|
| 253 |
|
|---|
| 254 | delete resonanceList;
|
|---|
| 255 |
|
|---|
| 256 | return EXIT_SUCCESS;
|
|---|
| 257 | }
|
|---|