| 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 | // $Id: G4QNeutrinoPhysics.cc,v 1.4 2010/06/03 14:37:24 gunter Exp $
|
|---|
| 27 | // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
|
|---|
| 28 | //
|
|---|
| 29 | //---------------------------------------------------------------------------
|
|---|
| 30 | //
|
|---|
| 31 | // ClassName: G4QNeutrinoPhysics
|
|---|
| 32 | //
|
|---|
| 33 | // Author: 2009 M. V. Kosov
|
|---|
| 34 | //
|
|---|
| 35 | // Modified:
|
|---|
| 36 | //
|
|---|
| 37 | //----------------------------------------------------------------------------
|
|---|
| 38 | //
|
|---|
| 39 |
|
|---|
| 40 | #include "G4QNeutrinoPhysics.hh"
|
|---|
| 41 |
|
|---|
| 42 | G4QNeutrinoPhysics::G4QNeutrinoPhysics(G4int):
|
|---|
| 43 | G4VPhysicsConstructor("CHIPS neutrino-nuclear"), wasBuilt(false), nuEleActivated(false),
|
|---|
| 44 | nuMuoActivated(false), nuTauActivated(false), nuEleOn(false),
|
|---|
| 45 | nuMuoOn(false), nuTauOn(false), nuNucBias(1.), inelastic(0)
|
|---|
| 46 | {
|
|---|
| 47 | theMessenger = G4QMessenger::GetPointer();
|
|---|
| 48 | theMessenger->Add(this);
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | G4QNeutrinoPhysics::G4QNeutrinoPhysics(const G4String& name):
|
|---|
| 52 | G4VPhysicsConstructor(name), wasBuilt(false), nuEleActivated(false),
|
|---|
| 53 | nuMuoActivated(false), nuTauActivated(false), nuEleOn(false),
|
|---|
| 54 | nuMuoOn(false), nuTauOn(false), nuNucBias(1.), inelastic(0)
|
|---|
| 55 | {
|
|---|
| 56 | theMessenger = G4QMessenger::GetPointer();
|
|---|
| 57 | theMessenger->Add(this);
|
|---|
| 58 | }
|
|---|
| 59 |
|
|---|
| 60 | G4QNeutrinoPhysics::~G4QNeutrinoPhysics()
|
|---|
| 61 | {
|
|---|
| 62 | if(wasBuilt && inelastic) delete inelastic;
|
|---|
| 63 | }
|
|---|
| 64 |
|
|---|
| 65 | void G4QNeutrinoPhysics::ConstructParticle()
|
|---|
| 66 | {
|
|---|
| 67 | G4NeutrinoE::NeutrinoE();
|
|---|
| 68 | G4AntiNeutrinoE::AntiNeutrinoE();
|
|---|
| 69 | G4NeutrinoMu::NeutrinoMu();
|
|---|
| 70 | G4AntiNeutrinoMu::AntiNeutrinoMu();
|
|---|
| 71 | G4NeutrinoTau::NeutrinoTau();
|
|---|
| 72 | G4AntiNeutrinoTau::AntiNeutrinoTau();
|
|---|
| 73 | }
|
|---|
| 74 |
|
|---|
| 75 | void G4QNeutrinoPhysics::SetNuElNuclearOnOff(G4String& newSwitch)
|
|---|
| 76 | {
|
|---|
| 77 | if(wasBuilt) G4cout<<"G4QNeutrinoPhysics:No, processes are already builded!"<<G4endl;
|
|---|
| 78 | else if(newSwitch == "on" || newSwitch == "ON" || newSwitch == "On") nuEleOn = true;
|
|---|
| 79 | else nuEleOn = false;
|
|---|
| 80 | }
|
|---|
| 81 |
|
|---|
| 82 | void G4QNeutrinoPhysics::SetNuMuNuclearOnOff(G4String& newSwitch)
|
|---|
| 83 | {
|
|---|
| 84 | if(wasBuilt) G4cout<<"G4QNeutrinoPhysics:No, processes are already builded!"<<G4endl;
|
|---|
| 85 | else if(newSwitch == "on" || newSwitch == "ON" || newSwitch == "On") nuMuoOn = true;
|
|---|
| 86 | else nuMuoOn = false;
|
|---|
| 87 | }
|
|---|
| 88 |
|
|---|
| 89 | void G4QNeutrinoPhysics::SetNuTauNuclearOnOff(G4String& newSwitch)
|
|---|
| 90 | {
|
|---|
| 91 | if(wasBuilt) G4cout<<"G4QNeutrinoPhysics:No, processes are already builded!"<<G4endl;
|
|---|
| 92 | else if(newSwitch == "on" || newSwitch == "ON" || newSwitch == "On") nuTauOn = true;
|
|---|
| 93 | else nuTauOn = false;
|
|---|
| 94 | }
|
|---|
| 95 |
|
|---|
| 96 | void G4QNeutrinoPhysics::SetNuNuclearBias(G4double newValue)
|
|---|
| 97 | {
|
|---|
| 98 | if(wasBuilt) G4cout<<"G4QNeutrinoPhysics:No, processes are already builded!"<<G4endl;
|
|---|
| 99 | else nuNucBias = newValue;
|
|---|
| 100 | }
|
|---|
| 101 |
|
|---|
| 102 | void G4QNeutrinoPhysics::ConstructProcess()
|
|---|
| 103 | {
|
|---|
| 104 | if(wasBuilt) return;
|
|---|
| 105 | if(nuEleOn || nuMuoOn || nuTauOn)
|
|---|
| 106 | {
|
|---|
| 107 | wasBuilt = true;
|
|---|
| 108 | G4cout<<"Builded=>G4QNeutrinoPhysics: "<<nuEleOn<<", "<<nuMuoOn<<", "<<nuTauOn<<G4endl;
|
|---|
| 109 | inelastic = new G4QInelastic("neutrinoNuclear");
|
|---|
| 110 | inelastic->SetWeakNucBias(nuNucBias); // enough only once (static)
|
|---|
| 111 | if (nuEleOn) BuildNuEleNuclear();
|
|---|
| 112 | if (nuMuoOn) BuildNuMuoNuclear();
|
|---|
| 113 | if (nuTauOn) BuildNuTauNuclear();
|
|---|
| 114 | }
|
|---|
| 115 | }
|
|---|
| 116 |
|
|---|
| 117 | void G4QNeutrinoPhysics::BuildNuEleNuclear()
|
|---|
| 118 | {
|
|---|
| 119 | if(nuEleActivated) return;
|
|---|
| 120 | nuEleActivated = true;
|
|---|
| 121 | G4ProcessManager * pManager = 0;
|
|---|
| 122 |
|
|---|
| 123 | pManager = G4NeutrinoE::NeutrinoE()->GetProcessManager();
|
|---|
| 124 | pManager->AddDiscreteProcess(inelastic);
|
|---|
| 125 |
|
|---|
| 126 | pManager = G4AntiNeutrinoE::AntiNeutrinoE()->GetProcessManager();
|
|---|
| 127 | pManager->AddDiscreteProcess(inelastic);
|
|---|
| 128 | }
|
|---|
| 129 |
|
|---|
| 130 | void G4QNeutrinoPhysics::BuildNuMuoNuclear()
|
|---|
| 131 | {
|
|---|
| 132 | if(nuMuoActivated) return;
|
|---|
| 133 | nuMuoActivated = true;
|
|---|
| 134 | G4ProcessManager * pManager = 0;
|
|---|
| 135 |
|
|---|
| 136 | pManager = G4NeutrinoMu::NeutrinoMu()->GetProcessManager();
|
|---|
| 137 | pManager->AddDiscreteProcess(inelastic);
|
|---|
| 138 |
|
|---|
| 139 | pManager = G4AntiNeutrinoMu::AntiNeutrinoMu()->GetProcessManager();
|
|---|
| 140 | pManager->AddDiscreteProcess(inelastic);
|
|---|
| 141 | }
|
|---|
| 142 |
|
|---|
| 143 | void G4QNeutrinoPhysics::BuildNuTauNuclear()
|
|---|
| 144 | {
|
|---|
| 145 | if(nuTauActivated) return;
|
|---|
| 146 | nuTauActivated = true;
|
|---|
| 147 | G4ProcessManager * pManager = 0;
|
|---|
| 148 |
|
|---|
| 149 | pManager = G4NeutrinoTau::NeutrinoTau()->GetProcessManager();
|
|---|
| 150 | pManager->AddDiscreteProcess(inelastic);
|
|---|
| 151 |
|
|---|
| 152 | pManager = G4AntiNeutrinoTau::AntiNeutrinoTau()->GetProcessManager();
|
|---|
| 153 | pManager->AddDiscreteProcess(inelastic);
|
|---|
| 154 | }
|
|---|