CMS 3D CMS Logo

G4ProcessHelper.h
Go to the documentation of this file.
1 #ifndef SimG4Core_CustomPhysics_G4ProcessHelper_H
2 #define SimG4Core_CustomPhysics_G4ProcessHelper_H
3 
4 #include "globals.hh"
5 #include "G4ParticleDefinition.hh"
6 #include "G4DynamicParticle.hh"
7 #include "G4Element.hh"
8 #include "G4Track.hh"
9 
11 
12 #include <vector>
13 #include <map>
14 
15 //Typedefs just made to make life easier :-)
16 typedef std::vector<G4int> ReactionProduct;
17 typedef std::vector<ReactionProduct> ReactionProductList;
18 typedef std::map<G4int, ReactionProductList> ReactionMap;
19 
20 class G4ParticleTable;
22 class HistoHelper;
23 class TProfile;
24 class TH1D;
25 
27 public:
29 
31 
32  G4bool ApplicabilityTester(const G4ParticleDefinition& aPart);
33 
34  G4double GetInclusiveCrossSection(const G4DynamicParticle* aParticle, const G4Element* anElement);
35 
36  //Make sure the element is known (for n/p-decision)
37  ReactionProduct GetFinalState(const G4Track& aTrack, G4ParticleDefinition*& aTarget);
38 
39 private:
40  G4ProcessHelper(const G4ProcessHelper&) = delete;
41  G4ProcessHelper& operator=(const G4ProcessHelper&) = delete;
42 
43  G4double Regge(const double boost);
44  G4double Pom(const double boost);
45 
46  G4double checkfraction;
47  G4int n_22;
48  G4int n_23;
49 
50  G4ParticleDefinition* theTarget;
51  G4ParticleDefinition* theProton;
52  G4ParticleDefinition* theNeutron;
53  G4ParticleDefinition* theRmesoncloud;
54  G4ParticleDefinition* theRbaryoncloud;
55 
57 
58  G4double PhaseSpace(const ReactionProduct& aReaction, const G4DynamicParticle* aDynamicParticle);
59 
60  G4double ReactionProductMass(const ReactionProduct& aReaction, const G4DynamicParticle* aDynamicParticle);
61 
62  G4bool ReactionGivesBaryon(const ReactionProduct& aReaction);
63 
64  G4bool ReactionIsPossible(const ReactionProduct& aReaction, const G4DynamicParticle* aDynamicParticle);
65 
66  void ReadAndParse(const G4String& str, std::vector<G4String>& tokens, const G4String& delimiters = " ");
67 
68  //Map of applicable particles
69  std::map<const G4ParticleDefinition*, G4bool> known_particles;
70 
71  //Map for physics parameters, name to value
72  std::map<G4String, G4double> parameters;
73 
74  //The parameters themselves
75  bool resonant;
76  double ek_0;
77  double gamma;
78  double amplitude;
80  bool reggemodel;
82  double mixing;
83 
84  //Proton-scattering processes
86 
87  //Neutron-scattering processes
89 
91  G4ParticleTable* particleTable;
92  HistoHelper* theHistoHelper;
93  TProfile* h_xsec_lab;
94  TProfile* h_xsec_cms;
95  TH1D* h_sqrts;
96  TProfile* h_q_p;
97  TProfile* h_q_gamma;
98 };
99 #endif
G4double ReactionProductMass(const ReactionProduct &aReaction, const G4DynamicParticle *aDynamicParticle)
G4ParticleTable * particleTable
G4ParticleDefinition * theProton
Definition: CLHEP.h:16
G4ParticleDefinition * theRmesoncloud
G4bool ApplicabilityTester(const G4ParticleDefinition &aPart)
G4ParticleDefinition * theNeutron
TProfile * h_xsec_lab
TProfile * h_q_gamma
G4double PhaseSpace(const ReactionProduct &aReaction, const G4DynamicParticle *aDynamicParticle)
std::vector< G4int > ReactionProduct
TProfile * h_xsec_cms
G4ProcessHelper & operator=(const G4ProcessHelper &)=delete
G4ParticleDefinition * theRbaryoncloud
void ReadAndParse(const G4String &str, std::vector< G4String > &tokens, const G4String &delimiters=" ")
HistoHelper * theHistoHelper
std::map< G4String, G4double > parameters
ReactionProduct GetFinalState(const G4Track &aTrack, G4ParticleDefinition *&aTarget)
double suppressionfactor
std::map< G4int, ReactionProductList > ReactionMap
G4double GetInclusiveCrossSection(const G4DynamicParticle *aParticle, const G4Element *anElement)
TProfile * h_q_p
ReactionMap pReactionMap
ReactionMap nReactionMap
std::map< const G4ParticleDefinition *, G4bool > known_particles
ReactionMap * theReactionMap
G4double Regge(const double boost)
CustomParticleFactory * fParticleFactory
G4ProcessHelper(const edm::ParameterSet &p, CustomParticleFactory *ptr)
G4double checkfraction
G4ParticleDefinition * theTarget
G4bool ReactionIsPossible(const ReactionProduct &aReaction, const G4DynamicParticle *aDynamicParticle)
#define str(s)
std::vector< ReactionProduct > ReactionProductList
G4bool ReactionGivesBaryon(const ReactionProduct &aReaction)
G4double Pom(const double boost)