LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
RegisterAddG4PhysicsShorthands.cc
Go to the documentation of this file.
2 
3 #include "Geant4/globals.hh"
4 #include "Geant4/G4PhysListFactoryAlt.hh"
5 #include "Geant4/G4PhysicsConstructorRegistry.hh"
6 
7 #include "Geant4/G4PhysListRegistry.hh"
8 
9 
10 // trigger registration of shorthands
11 // for now be very verbose (2) ... so we know things have happened
13 
14 
15 void PrintAvailablePhysicsLists(G4int verbosity) {
16  G4cout << G4endl;
17  G4cout << "extensibleFactory: here are the available physics lists:"
18  << G4endl;
19  g4alt::G4PhysListFactory factory;
20  factory.PrintAvailablePhysLists();
21 
22  // if user asked for extra verbosity then print physics ctors as well
23  if ( verbosity > 1 ) {
24  G4cout << G4endl;
25  G4cout << "extensibleFactory: "
26  << "here are the available physics ctors that can be added:"
27  << G4endl;
28  G4PhysicsConstructorRegistry* g4pctorFactory =
29  G4PhysicsConstructorRegistry::Instance();
30  g4pctorFactory->PrintAvailablePhysicsConstructors();
31  }
32 }
33 
34 // set a short name for the plugin physics constructors
35 
36 bool RegisterAddG4PhysicsShorthands(int verbose) {
37 
38  G4PhysListRegistry* plReg = G4PhysListRegistry::Instance();
39 
40  plReg->AddPhysicsExtension("PY8TAUDK","Py8TauDecayerPhysics");
41  plReg->AddPhysicsExtension("PY8CHARMDK","Py8CharmDecayerPhysics");
42 
43  if (verbose > 0) {
44  //G4cout << G4endl;
45  //G4cout << __FILE__ << "::" << __LINE__ << G4endl;
46  //G4cout << G4endl;
48  }
49 
50  return true;
51 }
bool RegisterAddG4PhysicsShorthands(int verbose)
const bool AddG4PhysicsShorthandsRegistered
void PrintAvailablePhysicsLists(G4int verbosity)