Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExExChAntiBarionBuilder.cc
Go to the documentation of this file.
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 //
28 //
29 
31 #include "G4ParticleDefinition.hh"
32 #include "G4ParticleTable.hh"
33 #include "G4ProcessManager.hh"
34 
35 // Wrapper
37 
39 ExExChAntiBarionBuilder(): wasActivated(false)
40 {
41  theAntiProtonInelastic=new G4AntiProtonInelasticProcess;
42  theAntiNeutronInelastic=new G4AntiNeutronInelasticProcess;
43  theAntiDeuteronInelastic=new G4AntiDeuteronInelasticProcess;
44  theAntiTritonInelastic=new G4AntiTritonInelasticProcess;
45  theAntiHe3Inelastic=new G4AntiHe3InelasticProcess;
46  theAntiAlphaInelastic=new G4AntiAlphaInelasticProcess;
47 }
48 
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50 
53  delete theAntiProtonInelastic;
54  delete theAntiNeutronInelastic;
55  delete theAntiDeuteronInelastic;
56  delete theAntiTritonInelastic;
57  delete theAntiHe3Inelastic;
58  delete theAntiAlphaInelastic;
59 }
60 
61 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
62 
65 {
66  wasActivated = true;
67 
68  std::vector<G4VAntiBarionBuilder *>::iterator i;
69  for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
70  {
71  (*i)->Build(theAntiProtonInelastic);
72  (*i)->Build(theAntiNeutronInelastic);
73  (*i)->Build(theAntiDeuteronInelastic);
74  (*i)->Build(theAntiTritonInelastic);
75  (*i)->Build(theAntiHe3Inelastic);
76  (*i)->Build(theAntiAlphaInelastic);
77  }
78  G4ProcessManager * theProcMan;
80  XWrapperDiscreteProcess* theAntiProtonInelastic_wr =
82  theAntiProtonInelastic_wr->RegisterProcess(theAntiProtonInelastic,1);
83  theProcMan->AddDiscreteProcess(theAntiProtonInelastic_wr);
84 
86  theProcMan->AddDiscreteProcess(theAntiNeutronInelastic);
87 
89  XWrapperDiscreteProcess* theAntiDeuteronInelastic_wr =
91  theAntiDeuteronInelastic_wr->RegisterProcess(theAntiDeuteronInelastic,1);
92  theProcMan->AddDiscreteProcess(theAntiDeuteronInelastic_wr);
93 
95  XWrapperDiscreteProcess* theAntiTritonInelastic_wr =
97  theAntiTritonInelastic_wr->RegisterProcess(theAntiTritonInelastic,1);
98  theProcMan->AddDiscreteProcess(theAntiTritonInelastic_wr);
99 
100  theProcMan = G4AntiHe3::AntiHe3()->GetProcessManager();
101  XWrapperDiscreteProcess* theAntiHe3Inelastic_wr =
103  theAntiHe3Inelastic_wr->RegisterProcess(theAntiHe3Inelastic,1);
104  theProcMan->AddDiscreteProcess(theAntiHe3Inelastic_wr);
105 
106  theProcMan = G4AntiAlpha::AntiAlpha()->GetProcessManager();
107  XWrapperDiscreteProcess* theAntiAlphaInelastic_wr =
109  theAntiAlphaInelastic_wr->RegisterProcess(theAntiAlphaInelastic,1);
110  theProcMan->AddDiscreteProcess(theAntiAlphaInelastic_wr);
111 }
112 
static G4AntiHe3 * AntiHe3()
Definition: G4AntiHe3.cc:94
Definition of the ExExChAntiBarionBuilder class.
static G4AntiDeuteron * AntiDeuteron()
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4AntiAlpha * AntiAlpha()
Definition: G4AntiAlpha.cc:89
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:93
Definition of the XWrapperDiscreteProcess class.
G4ProcessManager * GetProcessManager() const
void RegisterProcess(G4VDiscreteProcess *)
static G4AntiTriton * AntiTriton()
Definition: G4AntiTriton.cc:94
static G4AntiNeutron * AntiNeutron()