Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4QNeutrinoPhysics.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//
26// $Id$
27//
28//---------------------------------------------------------------------------
29//
30// ClassName: G4QNeutrinoPhysics
31//
32// Author: 2009 M. V. Kosov
33//
34// Modified:
35//
36//----------------------------------------------------------------------------
37//
38
39#include "G4QNeutrinoPhysics.hh"
40
42 G4VPhysicsConstructor("CHIPS neutrino-nuclear"), wasBuilt(false), nuEleActivated(false),
43 nuMuoActivated(false), nuTauActivated(false), nuEleOn(false),
44 nuMuoOn(false), nuTauOn(false), nuNucBias(1.), inelastic(0)
45{
46 theMessenger = G4QMessenger::GetPointer();
47 theMessenger->Add(this);
48}
49
51 G4VPhysicsConstructor(name), wasBuilt(false), nuEleActivated(false),
52 nuMuoActivated(false), nuTauActivated(false), nuEleOn(false),
53 nuMuoOn(false), nuTauOn(false), nuNucBias(1.), inelastic(0)
54{
55 theMessenger = G4QMessenger::GetPointer();
56 theMessenger->Add(this);
57}
58
60{
61 if(wasBuilt && inelastic) delete inelastic;
62}
63
65{
72}
73
75{
76 if(wasBuilt) G4cout<<"G4QNeutrinoPhysics:No, processes are already builded!"<<G4endl;
77 else if(newSwitch == "on" || newSwitch == "ON" || newSwitch == "On") nuEleOn = true;
78 else nuEleOn = false;
79}
80
82{
83 if(wasBuilt) G4cout<<"G4QNeutrinoPhysics:No, processes are already builded!"<<G4endl;
84 else if(newSwitch == "on" || newSwitch == "ON" || newSwitch == "On") nuMuoOn = true;
85 else nuMuoOn = false;
86}
87
89{
90 if(wasBuilt) G4cout<<"G4QNeutrinoPhysics:No, processes are already builded!"<<G4endl;
91 else if(newSwitch == "on" || newSwitch == "ON" || newSwitch == "On") nuTauOn = true;
92 else nuTauOn = false;
93}
94
96{
97 if(wasBuilt) G4cout<<"G4QNeutrinoPhysics:No, processes are already builded!"<<G4endl;
98 else nuNucBias = newValue;
99}
100
102{
103 if(wasBuilt) return;
104 if(nuEleOn || nuMuoOn || nuTauOn)
105 {
106 wasBuilt = true;
107 G4cout<<"Builded=>G4QNeutrinoPhysics: "<<nuEleOn<<", "<<nuMuoOn<<", "<<nuTauOn<<G4endl;
108 inelastic = new G4QInelastic("neutrinoNuclear");
109 inelastic->SetWeakNucBias(nuNucBias); // enough only once (static)
110 if (nuEleOn) BuildNuEleNuclear();
111 if (nuMuoOn) BuildNuMuoNuclear();
112 if (nuTauOn) BuildNuTauNuclear();
113 }
114}
115
116void G4QNeutrinoPhysics::BuildNuEleNuclear()
117{
118 if(nuEleActivated) return;
119 nuEleActivated = true;
120 G4ProcessManager * pManager = 0;
121
123 pManager->AddDiscreteProcess(inelastic);
124
126 pManager->AddDiscreteProcess(inelastic);
127}
128
129void G4QNeutrinoPhysics::BuildNuMuoNuclear()
130{
131 if(nuMuoActivated) return;
132 nuMuoActivated = true;
133 G4ProcessManager * pManager = 0;
134
136 pManager->AddDiscreteProcess(inelastic);
137
139 pManager->AddDiscreteProcess(inelastic);
140}
141
142void G4QNeutrinoPhysics::BuildNuTauNuclear()
143{
144 if(nuTauActivated) return;
145 nuTauActivated = true;
146 G4ProcessManager * pManager = 0;
147
149 pManager->AddDiscreteProcess(inelastic);
150
152 pManager->AddDiscreteProcess(inelastic);
153}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
static G4AntiNeutrinoE * AntiNeutrinoE()
static G4AntiNeutrinoMu * AntiNeutrinoMu()
static G4AntiNeutrinoTau * AntiNeutrinoTau()
static G4NeutrinoE * NeutrinoE()
Definition: G4NeutrinoE.cc:85
static G4NeutrinoMu * NeutrinoMu()
Definition: G4NeutrinoMu.cc:85
static G4NeutrinoTau * NeutrinoTau()
G4ProcessManager * GetProcessManager() const
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static void SetWeakNucBias(G4double ccnB=1.)
void Add(G4QNeutrinoPhysics *weak)
Definition: G4QMessenger.cc:95
static G4QMessenger * GetPointer()
Definition: G4QMessenger.cc:89
void SetNuNuclearBias(G4double newValue)
G4QNeutrinoPhysics(G4int verbose=1)
void SetNuElNuclearOnOff(G4String &aState)
void SetNuMuNuclearOnOff(G4String &aState)
void SetNuTauNuclearOnOff(G4String &aState)