| 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 | #ifndef PhotInStackingAction_H
|
|---|
| 28 | #define PhotInStackingAction_H 1
|
|---|
| 29 |
|
|---|
| 30 | #include "globals.hh"
|
|---|
| 31 | #include "G4UserStackingAction.hh"
|
|---|
| 32 |
|
|---|
| 33 | #include "PhotInConstants.hh"
|
|---|
| 34 |
|
|---|
| 35 | #include "G4Track.hh"
|
|---|
| 36 | //#include "G4Step.hh"
|
|---|
| 37 | #include "G4ParticleDefinition.hh"
|
|---|
| 38 | #include "G4ParticleTypes.hh"
|
|---|
| 39 | #include "G4TouchableHistory.hh"
|
|---|
| 40 | #include "G4VPhysicalVolume.hh"
|
|---|
| 41 | #include "G4VProcess.hh"
|
|---|
| 42 |
|
|---|
| 43 | class PhotInStackingAction : public G4UserStackingAction
|
|---|
| 44 | {
|
|---|
| 45 | public:
|
|---|
| 46 | PhotInStackingAction();
|
|---|
| 47 | virtual ~PhotInStackingAction();
|
|---|
| 48 |
|
|---|
| 49 | virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
|
|---|
| 50 | virtual void PrepareNewEvent();
|
|---|
| 51 |
|
|---|
| 52 | static G4int GetNGamma (G4int i) { return PhotInNGamma [i]; }
|
|---|
| 53 | static G4int GetNElectron (G4int i) { return PhotInNElectron [i]; }
|
|---|
| 54 | static G4int GetNPositron (G4int i) { return PhotInNPositron [i]; }
|
|---|
| 55 | static G4int GetNNeutrons (G4int i) { return PhotInNNeutrons [i]; }
|
|---|
| 56 | static G4int GetNProtons (G4int i) { return PhotInNProtons [i]; }
|
|---|
| 57 | static G4int GetNDeuterons (G4int i) { return PhotInNDeuterons [i]; }
|
|---|
| 58 | static G4int GetNTritons (G4int i) { return PhotInNTritons [i]; }
|
|---|
| 59 | static G4int GetNHe3s (G4int i) { return PhotInNHe3s [i]; }
|
|---|
| 60 | static G4int GetNAlphas (G4int i) { return PhotInNAlphas [i]; }
|
|---|
| 61 | static G4int GetNLambdas (G4int i) { return PhotInNLambdas [i]; }
|
|---|
| 62 | static G4int GetNHeavyFrags(G4int i) { return PhotInNHeavyFrags[i]; }
|
|---|
| 63 | static G4int GetNMesons (G4int i) { return PhotInNMesons [i]; }
|
|---|
| 64 |
|
|---|
| 65 | static G4double GetEMinGamma (G4int i) { return PhotInEMinGamma [i]; }
|
|---|
| 66 | static G4double GetEMinElectron (G4int i) { return PhotInEMinElectron [i]; }
|
|---|
| 67 | static G4double GetEMinPositron (G4int i) { return PhotInEMinPositron [i]; }
|
|---|
| 68 | static G4double GetEMinNeutrons (G4int i) { return PhotInEMinNeutrons [i]; }
|
|---|
| 69 | static G4double GetEMinProtons (G4int i) { return PhotInEMinProtons [i]; }
|
|---|
| 70 | static G4double GetEMinDeuterons (G4int i) { return PhotInEMinDeuterons [i]; }
|
|---|
| 71 | static G4double GetEMinTritons (G4int i) { return PhotInEMinTritons [i]; }
|
|---|
| 72 | static G4double GetEMinHe3s (G4int i) { return PhotInEMinHe3s [i]; }
|
|---|
| 73 | static G4double GetEMinAlphas (G4int i) { return PhotInEMinAlphas [i]; }
|
|---|
| 74 | static G4double GetEMinLambdas (G4int i) { return PhotInEMinLambdas [i]; }
|
|---|
| 75 | static G4double GetEMinHeavyFrags(G4int i) { return PhotInEMinHeavyFrags[i]; }
|
|---|
| 76 | static G4double GetEMinMesons (G4int i) { return PhotInEMinMesons [i]; }
|
|---|
| 77 |
|
|---|
| 78 | static G4double GetEMaxGamma (G4int i) { return PhotInEMaxGamma [i]; }
|
|---|
| 79 | static G4double GetEMaxElectron (G4int i) { return PhotInEMaxElectron [i]; }
|
|---|
| 80 | static G4double GetEMaxPositron (G4int i) { return PhotInEMaxPositron [i]; }
|
|---|
| 81 | static G4double GetEMaxNeutrons (G4int i) { return PhotInEMaxNeutrons [i]; }
|
|---|
| 82 | static G4double GetEMaxProtons (G4int i) { return PhotInEMaxProtons [i]; }
|
|---|
| 83 | static G4double GetEMaxDeuterons (G4int i) { return PhotInEMaxDeuterons [i]; }
|
|---|
| 84 | static G4double GetEMaxTritons (G4int i) { return PhotInEMaxTritons [i]; }
|
|---|
| 85 | static G4double GetEMaxHe3s (G4int i) { return PhotInEMaxHe3s [i]; }
|
|---|
| 86 | static G4double GetEMaxAlphas (G4int i) { return PhotInEMaxAlphas [i]; }
|
|---|
| 87 | static G4double GetEMaxLambdas (G4int i) { return PhotInEMaxLambdas [i]; }
|
|---|
| 88 | static G4double GetEMaxHeavyFrags(G4int i) { return PhotInEMaxHeavyFrags[i]; }
|
|---|
| 89 | static G4double GetEMaxMesons (G4int i) { return PhotInEMaxMesons [i]; }
|
|---|
| 90 |
|
|---|
| 91 | private: //--- BODY ---
|
|---|
| 92 | // Can not be moved to the PhotInConstants.hh as static because there is a vector of Hits
|
|---|
| 93 | static G4int PhotInNGamma [PhotInDiNSections];
|
|---|
| 94 | static G4int PhotInNElectron [PhotInDiNSections];
|
|---|
| 95 | static G4int PhotInNPositron [PhotInDiNSections];
|
|---|
| 96 | static G4int PhotInNNeutrons [PhotInDiNSections];
|
|---|
| 97 | static G4int PhotInNProtons [PhotInDiNSections];
|
|---|
| 98 | static G4int PhotInNDeuterons [PhotInDiNSections];
|
|---|
| 99 | static G4int PhotInNTritons [PhotInDiNSections];
|
|---|
| 100 | static G4int PhotInNHe3s [PhotInDiNSections];
|
|---|
| 101 | static G4int PhotInNAlphas [PhotInDiNSections];
|
|---|
| 102 | static G4int PhotInNLambdas [PhotInDiNSections];
|
|---|
| 103 | static G4int PhotInNHeavyFrags[PhotInDiNSections];//Includes any nuclearFragment with A>4
|
|---|
| 104 | static G4int PhotInNMesons [PhotInDiNSections];//Includes pions and kaons of all signs
|
|---|
| 105 |
|
|---|
| 106 | static G4double PhotInEMinGamma [PhotInDiNSections];
|
|---|
| 107 | static G4double PhotInEMinElectron [PhotInDiNSections];
|
|---|
| 108 | static G4double PhotInEMinPositron [PhotInDiNSections];
|
|---|
| 109 | static G4double PhotInEMinNeutrons [PhotInDiNSections];
|
|---|
| 110 | static G4double PhotInEMinProtons [PhotInDiNSections];
|
|---|
| 111 | static G4double PhotInEMinDeuterons [PhotInDiNSections];
|
|---|
| 112 | static G4double PhotInEMinTritons [PhotInDiNSections];
|
|---|
| 113 | static G4double PhotInEMinHe3s [PhotInDiNSections];
|
|---|
| 114 | static G4double PhotInEMinAlphas [PhotInDiNSections];
|
|---|
| 115 | static G4double PhotInEMinLambdas [PhotInDiNSections];
|
|---|
| 116 | static G4double PhotInEMinHeavyFrags[PhotInDiNSections];
|
|---|
| 117 | static G4double PhotInEMinMesons [PhotInDiNSections];
|
|---|
| 118 |
|
|---|
| 119 | static G4double PhotInEMaxGamma [PhotInDiNSections];
|
|---|
| 120 | static G4double PhotInEMaxElectron [PhotInDiNSections];
|
|---|
| 121 | static G4double PhotInEMaxPositron [PhotInDiNSections];
|
|---|
| 122 | static G4double PhotInEMaxNeutrons [PhotInDiNSections];
|
|---|
| 123 | static G4double PhotInEMaxProtons [PhotInDiNSections];
|
|---|
| 124 | static G4double PhotInEMaxDeuterons [PhotInDiNSections];
|
|---|
| 125 | static G4double PhotInEMaxTritons [PhotInDiNSections];
|
|---|
| 126 | static G4double PhotInEMaxHe3s [PhotInDiNSections];
|
|---|
| 127 | static G4double PhotInEMaxAlphas [PhotInDiNSections];
|
|---|
| 128 | static G4double PhotInEMaxLambdas [PhotInDiNSections];
|
|---|
| 129 | static G4double PhotInEMaxHeavyFrags[PhotInDiNSections];
|
|---|
| 130 | static G4double PhotInEMaxMesons [PhotInDiNSections];
|
|---|
| 131 | };
|
|---|
| 132 |
|
|---|
| 133 | #endif
|
|---|
| 134 |
|
|---|