ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ParticleHPInelasticCompFS.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4ParticleHPInelasticCompFS.hh
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 //
26 //
27 // P. Arce, June-2014 Conversion neutron_hp to particle_hp
28 //
29 // June-2019 - E. Mendoza - re-build "two_body_reaction", to be used by
30 // incident charged particles (now isotropic emission in the CMS).
31 // Also restrict nresp use below 20 MeV (for future developments).
32 // Add photon emission when no data available.
33 
34 #ifndef G4ParticleHPInelasticCompFS_h
35 #define G4ParticleHPInelasticCompFS_h 1
36 
37 #include "globals.hh"
38 #include "G4HadProjectile.hh"
39 #include "G4HadFinalState.hh"
41 #include "G4ParticleHPAngular.hh"
46 #include "G4Nucleus.hh"
47 
48 #include "G4NRESP71M03.hh"
49 
51 {
52  public:
53 
55  {
56  QI.resize(51);
57  LR.resize(51);
58  for(G4int i=0; i<51; i++) {
59  hasXsec = true;
60  theXsection[i] = 0;
61  theEnergyDistribution[i] = 0;
63  theEnergyAngData[i] = 0;
64  theFinalStatePhotons[i] = 0;
65  QI[i] = 0.0;
66  LR[i] = 0;
67  }
68  }
69 
71  {
72  for(G4int i=0; i<51; i++) {
73  if (theXsection[i] != 0) delete theXsection[i];
74  if (theEnergyDistribution[i] != 0) delete theEnergyDistribution[i];
75  if (theAngularDistribution[i] != 0) delete theAngularDistribution[i];
76  if (theEnergyAngData[i] != 0) delete theEnergyAngData[i];
77  if (theFinalStatePhotons[i] != 0) delete theFinalStatePhotons[i];
78  }
79  }
80 
81  void Init(G4double A, G4double Z, G4int M, G4String& dirName,
82  G4String& aSFType, G4ParticleDefinition*);
83 
84  void InitGammas(G4double AR, G4double ZR);
85 
86  virtual G4HadFinalState* ApplyYourself(const G4HadProjectile& theTrack) = 0;
87 
88  virtual G4ParticleHPFinalState* New() = 0;
89 
90  virtual G4double GetXsec(G4double anEnergy)
91  {
92  return std::max(0., theXsection[50]->GetY(anEnergy));
93  }
94 
95  virtual G4ParticleHPVector* GetXsec() { return theXsection[50]; }
96 
98 
99  void CompositeApply(const G4HadProjectile& theTrack,
100  G4ParticleDefinition* aHadron);
101 
102  inline void InitDistributionInitialState(G4ReactionProduct& anIncidentPart,
103  G4ReactionProduct& aTarget,
104  G4int it)
105  {
106  if (theAngularDistribution[it] != 0) {
108  theAngularDistribution[it]->SetProjectileRP(anIncidentPart);
109  }
110 
111  if (theEnergyAngData[it] != 0) {
112  theEnergyAngData[it]->SetTarget(aTarget);
113  theEnergyAngData[it]->SetProjectileRP(anIncidentPart);
114  }
115  }
116 
117  protected:
118 
123 
125 
128 
129  protected:
130  std::vector<G4double> QI;
131  std::vector<G4int> LR;
132 
133  private:
134  // (projectile, target, hadron, mu of hadron)
136  G4ReactionProduct* product, G4double resExcitationEnergy);
137 
139  G4bool use_nresp71_model(const G4ParticleDefinition* aDefinition, const G4int it,
141 
142 };
143 
144 #endif