ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GB06BOptrSplitAndKillByImportance.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GB06BOptrSplitAndKillByImportance.cc
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 //
28 //
31 
35 
36 
37 #include "G4ParticleDefinition.hh"
38 #include "G4ParticleTable.hh"
39 #include "G4VProcess.hh"
40 
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 
48  G4String name)
49  : G4VBiasingOperator(name),
50  fParallelWorld ( nullptr ),
51  fParallelWorldIndex ( -1 ),
52  fBiasingLimiterProcess ( nullptr )
53 {
55 
56  if ( fParticleToBias == 0 )
57  {
59  ed << "Particle `" << particleName << "' not found !" << G4endl;
60  G4Exception("GB06BOptrSplitAndKillByImportance(...)",
61  "exGB06.01",
63  ed);
64  }
65 
67  new GB06BOptnSplitAndKillByImportance("splitterFor_"+particleName);
68 
69 }
70 
71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
72 
74 {
76 }
77 
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79 
81 {
82  // ---------------
83  // -- Setup stage:
84  // ---------------
85  // -- get the particle process manager...
86  const G4ProcessManager* processManager = fParticleToBias->GetProcessManager();
87  // -- ... to obtain the biasing information shared among this particle processes:
89  // -- Remember the index of the parallel world:
92 
93  // -- Setup the biasing operation:
94  fSplitAndKillByImportance-> SetBiasingSharedData( fBiasingSharedData );
96  fSplitAndKillByImportance-> SetImportanceMap( &fImportanceMap );
97 
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101 
105  const G4BiasingProcessInterface* /*callingProcess*/)
106 {
107  // -- Check if current particle type is the one to bias:
108  if ( track->GetDefinition() != fParticleToBias ) return 0;
109 
110  // -- if so, request biasing:
112 
113 }
114