LDMX Software
G4BertiniHack.h
Go to the documentation of this file.
1
10#ifndef SIMCORE_BERTINI_G4BERTINIHACK_H
11#define SIMCORE_BERTINI_G4BERTINIHACK_H
12
13// Include standard library headers before the hack or it affects std::
14// internals
15#include <algorithm>
16#include <cmath>
17#include <cstdlib>
18#include <deque>
19#include <fstream>
20#include <iomanip>
21#include <ios>
22#include <iostream>
23#include <limits>
24#include <list>
25#include <map>
26#include <memory>
27#include <set>
28#include <sstream>
29#include <stack>
30#include <string>
31#include <utility>
32#include <vector>
33
34// Also include CLHEP headers before the hack since they're used by Geant4
35#include "CLHEP/Units/PhysicalConstants.h"
36#include "CLHEP/Units/SystemOfUnits.h"
37#include "CLHEP/Vector/LorentzVector.h"
38#include "CLHEP/Vector/ThreeVector.h"
39
40// Include Geant4 base headers that don't need hacking
41#include "G4LorentzVector.hh"
42#include "G4ThreeVector.hh"
43#include "globals.hh"
44
45// ============================================================================
46// BEGIN HACK: make private AND protected members accessible as public
47// ============================================================================
48// We need public (not protected) because protected members are only accessible
49// from derived classes of that SPECIFIC class. When we have:
50// G4CascadeInterface::collider (G4InuclCollider*)
51// and want to access:
52// collider->theIntraNucleiCascader
53// we need theIntraNucleiCascader to be public, since G4CascadeInterface
54// doesn't inherit from G4InuclCollider.
55//
56// We also need to hack 'protected' because some members like
57// G4CascadeHistory::HistoryEntry are declared protected, not private.
58#define private public
59#define protected public
60
61// Include the Geant4 Bertini cascade headers we need to hack
62// Order matters: include base classes before derived classes
63#include "G4CascadParticle.hh"
64#include "G4CascadeHistory.hh"
65#include "G4CollisionOutput.hh"
66#include "G4ElementaryParticleCollider.hh"
67#include "G4IntraNucleiCascader.hh"
68#include "G4InuclCollider.hh"
69#include "G4InuclElementaryParticle.hh"
70#include "G4InuclNuclei.hh"
71#include "G4NucleiModel.hh"
72
73// Include the main interface last
74#include "G4CascadeInterface.hh"
75
76// ============================================================================
77// END HACK: restore private and protected keywords
78// ============================================================================
79#undef private
80#undef protected
81
82#endif // SIMCORE_BERTINI_G4BERTINIHACK_H