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
G4ProcessHelper::~G4ProcessHelper
~G4ProcessHelper()
Definition: G4ProcessHelper.cc:107
G4ProcessHelper::G4ProcessHelper
G4ProcessHelper(const edm::ParameterSet &p, CustomParticleFactory *ptr)
Definition: G4ProcessHelper.cc:19
G4ProcessHelper::amplitude
double amplitude
Definition: G4ProcessHelper.h:78
G4ProcessHelper::theProton
G4ParticleDefinition * theProton
Definition: G4ProcessHelper.h:51
G4ProcessHelper::theRmesoncloud
G4ParticleDefinition * theRmesoncloud
Definition: G4ProcessHelper.h:53
G4ProcessHelper::h_q_p
TProfile * h_q_p
Definition: G4ProcessHelper.h:96
G4ProcessHelper
Definition: G4ProcessHelper.h:26
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
G4ProcessHelper::theTarget
G4ParticleDefinition * theTarget
Definition: G4ProcessHelper.h:50
G4ProcessHelper::ReactionIsPossible
G4bool ReactionIsPossible(const ReactionProduct &aReaction, const G4DynamicParticle *aDynamicParticle)
Definition: G4ProcessHelper.cc:402
G4ProcessHelper::known_particles
std::map< const G4ParticleDefinition *, G4bool > known_particles
Definition: G4ProcessHelper.h:69
G4ProcessHelper::h_q_gamma
TProfile * h_q_gamma
Definition: G4ProcessHelper.h:97
G4ProcessHelper::checkfraction
G4double checkfraction
Definition: G4ProcessHelper.h:46
G4ProcessHelper::n_22
G4int n_22
Definition: G4ProcessHelper.h:47
G4ProcessHelper::ApplicabilityTester
G4bool ApplicabilityTester(const G4ParticleDefinition &aPart)
Definition: G4ProcessHelper.cc:109
G4ProcessHelper::PhaseSpace
G4double PhaseSpace(const ReactionProduct &aReaction, const G4DynamicParticle *aDynamicParticle)
Definition: G4ProcessHelper.cc:416
G4ProcessHelper::particleTable
G4ParticleTable * particleTable
Definition: G4ProcessHelper.h:91
boost
Definition: CLHEP.h:16
G4ProcessHelper::theNeutron
G4ParticleDefinition * theNeutron
Definition: G4ProcessHelper.h:52
G4ProcessHelper::h_xsec_cms
TProfile * h_xsec_cms
Definition: G4ProcessHelper.h:94
G4ProcessHelper::operator=
G4ProcessHelper & operator=(const G4ProcessHelper &)=delete
ReactionProduct
std::vector< G4int > ReactionProduct
Definition: G4ProcessHelper.h:16
G4ProcessHelper::parameters
std::map< G4String, G4double > parameters
Definition: G4ProcessHelper.h:72
G4ProcessHelper::pReactionMap
ReactionMap pReactionMap
Definition: G4ProcessHelper.h:85
G4ProcessHelper::reggemodel
bool reggemodel
Definition: G4ProcessHelper.h:80
G4ProcessHelper::GetFinalState
ReactionProduct GetFinalState(const G4Track &aTrack, G4ParticleDefinition *&aTarget)
Definition: G4ProcessHelper.cc:187
str
#define str(s)
Definition: TestProcessor.cc:48
G4ProcessHelper::Regge
G4double Regge(const double boost)
Definition: G4ProcessHelper.cc:444
G4ProcessHelper::mixing
double mixing
Definition: G4ProcessHelper.h:82
G4ProcessHelper::ek_0
double ek_0
Definition: G4ProcessHelper.h:76
G4ProcessHelper::GetInclusiveCrossSection
G4double GetInclusiveCrossSection(const G4DynamicParticle *aParticle, const G4Element *anElement)
Definition: G4ProcessHelper.cc:116
edm::ParameterSet
Definition: ParameterSet.h:36
G4ProcessHelper::nReactionMap
ReactionMap nReactionMap
Definition: G4ProcessHelper.h:88
G4ProcessHelper::theHistoHelper
HistoHelper * theHistoHelper
Definition: G4ProcessHelper.h:92
G4ProcessHelper::fParticleFactory
CustomParticleFactory * fParticleFactory
Definition: G4ProcessHelper.h:90
G4ProcessHelper::ReactionGivesBaryon
G4bool ReactionGivesBaryon(const ReactionProduct &aReaction)
Definition: G4ProcessHelper.cc:409
G4ProcessHelper::h_sqrts
TH1D * h_sqrts
Definition: G4ProcessHelper.h:95
G4ProcessHelper::Pom
G4double Pom(const double boost)
Definition: G4ProcessHelper.cc:451
G4ProcessHelper::n_23
G4int n_23
Definition: G4ProcessHelper.h:48
G4ProcessHelper::theRbaryoncloud
G4ParticleDefinition * theRbaryoncloud
Definition: G4ProcessHelper.h:54
G4ProcessHelper::ReadAndParse
void ReadAndParse(const G4String &str, std::vector< G4String > &tokens, const G4String &delimiters=" ")
Definition: G4ProcessHelper.cc:422
G4ProcessHelper::gamma
double gamma
Definition: G4ProcessHelper.h:77
G4ProcessHelper::resonant
bool resonant
Definition: G4ProcessHelper.h:75
CustomParticleFactory
Definition: CustomParticleFactory.h:12
ReactionProductList
std::vector< ReactionProduct > ReactionProductList
Definition: G4ProcessHelper.h:17
ReactionMap
std::map< G4int, ReactionProductList > ReactionMap
Definition: G4ProcessHelper.h:18
G4ProcessHelper::suppressionfactor
double suppressionfactor
Definition: G4ProcessHelper.h:79
G4ProcessHelper::theReactionMap
ReactionMap * theReactionMap
Definition: G4ProcessHelper.h:56
ParameterSet.h
G4ProcessHelper::h_xsec_lab
TProfile * h_xsec_lab
Definition: G4ProcessHelper.h:93
G4ProcessHelper::ReactionProductMass
G4double ReactionProductMass(const ReactionProduct &aReaction, const G4DynamicParticle *aDynamicParticle)
Definition: G4ProcessHelper.cc:381
G4ProcessHelper::hadronlifetime
double hadronlifetime
Definition: G4ProcessHelper.h:81