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 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  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 //---------------------------------------------------------------------------
 28 //
 29 // ClassName:   G4NeutrinoPhysics
 30 //
 31 // Author: 2023 V. Ivanchenko extracted from G4EmExtraPhysics
 32 //
 33 // Modified:
 34 //
 35 //
 36 ///////////////////////////////////////////////////////////////
 37 
 38 #include "G4NeutrinoPhysics.hh"
 39 
 40 #include "G4SystemOfUnits.hh"
 41 #include "G4ParticleDefinition.hh"
 42 #include "G4ProcessManager.hh"
 43 
 44 #include "G4Electron.hh"
 45 #include "G4AntiNeutrinoE.hh"
 46 #include "G4NeutrinoE.hh"
 47 #include "G4AntiNeutrinoMu.hh"
 48 #include "G4NeutrinoMu.hh"
 49 #include "G4AntiNeutrinoTau.hh"
 50 #include "G4NeutrinoTau.hh"
 51 
 52 #include "G4NeutrinoElectronProcess.hh"
 53 #include "G4NeutrinoElectronTotXsc.hh"
 54 #include "G4NeutrinoElectronCcModel.hh"
 55 #include "G4NeutrinoElectronNcModel.hh"
 56 
 57 #include "G4MuNeutrinoNucleusProcess.hh"
 58 #include "G4TauNeutrinoNucleusProcess.hh"
 59 #include "G4ElNeutrinoNucleusProcess.hh"
 60 #include "G4NuVacOscProcess.hh"
 61 
 62 #include "G4MuNeutrinoNucleusTotXsc.hh"
 63 #include "G4TauNeutrinoNucleusTotXsc.hh"
 64 #include "G4ElNeutrinoNucleusTotXsc.hh"
 65 
 66 #include "G4NuMuNucleusCcModel.hh"
 67 #include "G4NuMuNucleusNcModel.hh"
 68 #include "G4ANuMuNucleusCcModel.hh"
 69 #include "G4ANuMuNucleusNcModel.hh"
 70 
 71 #include "G4NuTauNucleusCcModel.hh"
 72 #include "G4NuTauNucleusNcModel.hh"
 73 #include "G4ANuTauNucleusCcModel.hh"
 74 #include "G4ANuTauNucleusNcModel.hh"
 75 
 76 #include "G4NuElNucleusCcModel.hh"
 77 #include "G4NuElNucleusNcModel.hh"
 78 #include "G4ANuElNucleusCcModel.hh"
 79 #include "G4ANuElNucleusNcModel.hh"
 80  
 81 // factory
 82 #include "G4PhysicsConstructorFactory.hh"
 83 //
 84 G4_DECLARE_PHYSCONSTR_FACTORY(G4NeutrinoPhysics);
 85 
 86 //////////////////////////////////////
 87 
 88 G4NeutrinoPhysics::G4NeutrinoPhysics(G4int ver): 
 89   G4VPhysicsConstructor("NeutrinoPhys"),
 90   verbose(ver)
 91 {
 92   theMessenger = new G4NeutrinoPhysicsMessenger(this);
 93   if(verbose > 1) G4cout << "### G4NeutrinoPhysics" << G4endl;
 94 }
 95 
 96 G4NeutrinoPhysics::~G4NeutrinoPhysics()
 97 {
 98   delete theMessenger;
 99 }
100 
101 void G4NeutrinoPhysics::NuETotXscActivated(G4bool val)
102 {
103   fNuETotXscActivated = val;
104 }
105 
106 void G4NeutrinoPhysics::SetNuOscillation(G4bool val)
107 {
108   fNuOscillation = val;
109 }
110 
111 void G4NeutrinoPhysics::SetNuEleCcBias(G4double bf)
112 {
113   if(bf > 0.0) fNuEleCcBias = bf;
114 }
115 
116 void G4NeutrinoPhysics::SetNuEleNcBias(G4double bf)
117 {
118   if(bf > 0.0) fNuEleNcBias = bf;
119 }
120 
121 void G4NeutrinoPhysics::SetNuNucleusBias(G4double bf)
122 {
123   if(bf > 0.0) fNuNucleusBias = bf;
124 }
125 
126 void G4NeutrinoPhysics::SetNuOscDistanceBias(G4double bf)
127 {
128   if(bf > 0.0) fNuOscDistanceBias = bf;
129 }
130 
131 void G4NeutrinoPhysics::SetNuDetectorName(const G4String& dn)
132 {
133   fNuDetectorName = dn;
134 }
135 
136 void G4NeutrinoPhysics::SetNuOscDistanceName(const G4String& dn)
137 {
138   fNuOscDistanceName = dn;
139 }
140 
141 /////////////////////////////////////////////////
142 
143 void G4NeutrinoPhysics::ConstructParticle()
144 {
145   G4Electron::Electron();
146   G4AntiNeutrinoE::AntiNeutrinoE();
147   G4NeutrinoE::NeutrinoE();
148   G4AntiNeutrinoMu::AntiNeutrinoMu();
149   G4NeutrinoMu::NeutrinoMu();
150   G4AntiNeutrinoTau::AntiNeutrinoTau();
151   G4NeutrinoTau::NeutrinoTau();
152 }
153 
154 void G4NeutrinoPhysics::ConstructProcess()
155 {
156   const G4ParticleDefinition* p[6] = {
157     G4AntiNeutrinoE::AntiNeutrinoE(),
158     G4NeutrinoE::NeutrinoE(),
159     G4AntiNeutrinoMu::AntiNeutrinoMu(),
160     G4NeutrinoMu::NeutrinoMu(),
161     G4AntiNeutrinoTau::AntiNeutrinoTau(),
162     G4NeutrinoTau::NeutrinoTau()
163   };
164 
165   // neutrino vacuum oscillation process
166   if (fNuOscillation) {
167     auto theNuVacOscProcess = new G4NuVacOscProcess(fNuOscDistanceName);
168     theNuVacOscProcess->SetBiasingFactor(fNuOscDistanceBias);
169     
170 
171     for (G4int i=0; i<6; ++i) {
172       p[i]->GetProcessManager()->AddDiscreteProcess(theNuVacOscProcess);
173     }
174   }
175 
176   // neutrino-electron process
177   auto theNuEleProcess = new G4NeutrinoElectronProcess(fNuDetectorName);
178   G4NeutrinoElectronTotXsc* theNuEleTotXsc = new G4NeutrinoElectronTotXsc();
179 
180   if (fNuETotXscActivated) {
181     G4double bftot = std::max(fNuEleCcBias, fNuEleNcBias);
182     theNuEleProcess->SetBiasingFactor(bftot);
183   }
184   else {
185     theNuEleProcess->SetBiasingFactors(fNuEleCcBias, fNuEleNcBias);
186     theNuEleTotXsc->SetBiasingFactors(fNuEleCcBias, fNuEleNcBias);
187   }
188   theNuEleProcess->AddDataSet(theNuEleTotXsc);
189 
190   G4NeutrinoElectronCcModel* ccModel = new G4NeutrinoElectronCcModel();
191   G4NeutrinoElectronNcModel* ncModel = new G4NeutrinoElectronNcModel();
192   theNuEleProcess->RegisterMe(ccModel);
193   theNuEleProcess->RegisterMe(ncModel);
194 
195   for (G4int i=0; i<6; ++i) {
196     p[i]->GetProcessManager()->AddDiscreteProcess(theNuEleProcess);
197   }
198 
199   // nu_mu nucleus interactions
200   auto theNuMuNucleusProcess = new G4MuNeutrinoNucleusProcess(fNuDetectorName);
201   auto theNuMuNucleusTotXsc = new G4MuNeutrinoNucleusTotXsc();
202     
203   if (fNuETotXscActivated) {
204     theNuMuNucleusProcess->SetBiasingFactor(fNuNucleusBias);
205   }
206   theNuMuNucleusProcess->AddDataSet(theNuMuNucleusTotXsc);
207 
208   G4NuMuNucleusCcModel* numunuclcc = new G4NuMuNucleusCcModel();
209   G4NuMuNucleusNcModel* numunuclnc = new G4NuMuNucleusNcModel();
210   G4ANuMuNucleusCcModel* anumunuclcc = new G4ANuMuNucleusCcModel();
211   G4ANuMuNucleusNcModel* anumunuclnc = new G4ANuMuNucleusNcModel();
212     
213   theNuMuNucleusProcess->RegisterMe(numunuclcc);
214   theNuMuNucleusProcess->RegisterMe(numunuclnc);
215   theNuMuNucleusProcess->RegisterMe(anumunuclcc);
216   theNuMuNucleusProcess->RegisterMe(anumunuclnc);
217 
218   for (G4int i=2; i<=3; ++i) {
219     p[i]->GetProcessManager()->AddDiscreteProcess(theNuMuNucleusProcess);
220   }
221 
222   // nu_tau nucleus interactions
223   auto theNuTauNucleusProcess = new G4TauNeutrinoNucleusProcess(fNuDetectorName);
224   auto theNuTauNucleusTotXsc = new G4TauNeutrinoNucleusTotXsc();
225     
226   if(fNuETotXscActivated) {
227     theNuTauNucleusProcess->SetBiasingFactor(fNuNucleusBias);
228   }
229   theNuTauNucleusProcess->AddDataSet(theNuTauNucleusTotXsc);
230 
231   G4NuTauNucleusCcModel* nutaunuclcc = new G4NuTauNucleusCcModel();
232   G4NuTauNucleusNcModel* nutaunuclnc = new G4NuTauNucleusNcModel();
233   G4ANuTauNucleusCcModel* anutaunuclcc = new G4ANuTauNucleusCcModel();
234   G4ANuTauNucleusNcModel* anutaunuclnc = new G4ANuTauNucleusNcModel();
235     
236   theNuTauNucleusProcess->RegisterMe(nutaunuclcc);
237   theNuTauNucleusProcess->RegisterMe(nutaunuclnc);
238   theNuTauNucleusProcess->RegisterMe(anutaunuclcc);
239   theNuTauNucleusProcess->RegisterMe(anutaunuclnc);
240 
241   for (G4int i=4; i<=5; ++i) {
242     p[i]->GetProcessManager()->AddDiscreteProcess(theNuTauNucleusProcess);
243   }
244 
245   // nu_e nucleus interactions
246   auto theNuElNucleusProcess = new G4ElNeutrinoNucleusProcess(fNuDetectorName);
247   auto theNuElNucleusTotXsc = new G4ElNeutrinoNucleusTotXsc();
248     
249   if (fNuETotXscActivated) {
250     theNuElNucleusProcess->SetBiasingFactor(fNuNucleusBias);
251   }
252   theNuElNucleusProcess->AddDataSet(theNuElNucleusTotXsc);
253 
254   G4NuElNucleusCcModel* nuelnuclcc = new G4NuElNucleusCcModel();
255   G4NuElNucleusNcModel* nuelnuclnc = new G4NuElNucleusNcModel();
256   G4ANuElNucleusCcModel* anuelnuclcc = new G4ANuElNucleusCcModel();
257   G4ANuElNucleusNcModel* anuelnuclnc = new G4ANuElNucleusNcModel();
258     
259   theNuElNucleusProcess->RegisterMe(nuelnuclcc);
260   theNuElNucleusProcess->RegisterMe(nuelnuclnc);
261   theNuElNucleusProcess->RegisterMe(anuelnuclcc);
262   theNuElNucleusProcess->RegisterMe(anuelnuclnc);
263 
264   for (G4int i=0; i<=1; ++i) {
265     p[i]->GetProcessManager()->AddDiscreteProcess(theNuElNucleusProcess);
266   }
267 }
268