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 | // (Why only antiproton-proton, when the antiproton-nucleus is made? - M.K.) |
---|
26 | // 17.02.2009 M.Kossov, now it is recommended to use the G4QCaptureAtRest process |
---|
27 | #ifndef G4ProtonAntiProtonAtRestChips_h |
---|
28 | #define G4ProtonAntiProtonAtRestChips_h |
---|
29 | |
---|
30 | #include "globals.hh" |
---|
31 | #include "G4VRestProcess.hh" |
---|
32 | #include "G4ParticleTable.hh" |
---|
33 | #include "G4Quasmon.hh" |
---|
34 | #include "G4QHadronVector.hh" |
---|
35 | #include "G4ParticleChange.hh" |
---|
36 | #include "G4LorentzVector.hh" |
---|
37 | #include "G4DynamicParticle.hh" |
---|
38 | #include "G4IonTable.hh" |
---|
39 | #include "G4Neutron.hh" |
---|
40 | #include "G4StopElementSelector.hh" |
---|
41 | #include "G4ChiralInvariantPhaseSpace.hh" |
---|
42 | #include "G4HadronicProcessType.hh" |
---|
43 | |
---|
44 | class G4ProtonAntiProtonAtRestChips : public G4VRestProcess |
---|
45 | { |
---|
46 | private: |
---|
47 | // hide assignment operator as private |
---|
48 | G4ProtonAntiProtonAtRestChips& operator=(const G4ProtonAntiProtonAtRestChips &right); |
---|
49 | G4ProtonAntiProtonAtRestChips(const G4ProtonAntiProtonAtRestChips& ); |
---|
50 | |
---|
51 | public: |
---|
52 | |
---|
53 | G4ProtonAntiProtonAtRestChips(const G4String& processName= |
---|
54 | "AntiProtonAnnihilationAtRest") |
---|
55 | : G4VRestProcess (processName, fHadronic) |
---|
56 | { |
---|
57 | SetProcessSubType(fHadronAtRest); |
---|
58 | } |
---|
59 | |
---|
60 | ~G4ProtonAntiProtonAtRestChips() {} |
---|
61 | |
---|
62 | G4bool IsApplicable(const G4ParticleDefinition& aParticle) |
---|
63 | { |
---|
64 | return ( &aParticle == G4AntiProton::AntiProtonDefinition() ); |
---|
65 | } |
---|
66 | |
---|
67 | // null physics table |
---|
68 | void BuildPhysicsTable(const G4ParticleDefinition&){} |
---|
69 | |
---|
70 | G4double AtRestGetPhysicalInteractionLength(const G4Track&track, |
---|
71 | G4ForceCondition*condition); |
---|
72 | |
---|
73 | // zero mean lifetime |
---|
74 | G4double GetMeanLifeTime(const G4Track& aTrack, |
---|
75 | G4ForceCondition* condition) {return 0.0;} |
---|
76 | |
---|
77 | G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&); |
---|
78 | |
---|
79 | private: |
---|
80 | G4ChiralInvariantPhaseSpace theModel; |
---|
81 | G4StopElementSelector theSelector; // Assume identical laws as for muons |
---|
82 | }; |
---|
83 | |
---|
84 | inline |
---|
85 | G4VParticleChange * G4ProtonAntiProtonAtRestChips:: |
---|
86 | AtRestDoIt(const G4Track& aTrack, const G4Step&aStep) |
---|
87 | { |
---|
88 | // Create target |
---|
89 | G4Element * theTarget = theSelector.GetElement(aTrack.GetMaterial()); |
---|
90 | G4Nucleus aTargetNucleus(theTarget->GetN() ,theTarget->GetZ()); |
---|
91 | |
---|
92 | // Check model validity - note this will be a sub-branch in the ordinary stopping @@@@@@ |
---|
93 | // in the long haul. @@@@@@ |
---|
94 | if(aTrack.GetDynamicParticle()->GetDefinition() != G4AntiProton::AntiProton()) |
---|
95 | { |
---|
96 | throw G4HadronicException(__FILE__, __LINE__, |
---|
97 | "Calling G4ProtonAntiProtonAtRestChips with particle other than p-bar!!!"); |
---|
98 | } |
---|
99 | if(aTargetNucleus.GetZ() != 1) |
---|
100 | { |
---|
101 | throw G4HadronicException(__FILE__, __LINE__, |
---|
102 | "Calling G4ProtonAntiProtonAtRestChips for target other than Hydrogen!!!"); |
---|
103 | } |
---|
104 | |
---|
105 | // Call chips |
---|
106 | return theModel.ApplyYourself(aTrack, aTargetNucleus); |
---|
107 | } |
---|
108 | |
---|
109 | G4double G4ProtonAntiProtonAtRestChips:: |
---|
110 | AtRestGetPhysicalInteractionLength(const G4Track&track, |
---|
111 | G4ForceCondition*condition) |
---|
112 | { |
---|
113 | ResetNumberOfInteractionLengthLeft(); |
---|
114 | *condition = NotForced; |
---|
115 | currentInteractionLength = GetMeanLifeTime(track, condition); |
---|
116 | #ifdef CHIPSdebug |
---|
117 | if ((currentInteractionLength <0.0) || (verboseLevel>2)) |
---|
118 | { |
---|
119 | G4cout << "G4ProtonAntiProtonAtRestChips::AtRestGetPhysicalInteractionLength "; |
---|
120 | G4cout << "[ " << GetProcessName() << "]" <<G4endl; |
---|
121 | track.GetDynamicParticle()->DumpInfo(); |
---|
122 | G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl; |
---|
123 | G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<G4endl; |
---|
124 | } |
---|
125 | #endif |
---|
126 | return theNumberOfInteractionLengthLeft * currentInteractionLength; |
---|
127 | } |
---|
128 | #endif |
---|