ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4INCLNucleus.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4INCLNucleus.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 // INCL++ intra-nuclear cascade model
27 // Alain Boudard, CEA-Saclay, France
28 // Joseph Cugnon, University of Liege, Belgium
29 // Jean-Christophe David, CEA-Saclay, France
30 // Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
31 // Sylvie Leray, CEA-Saclay, France
32 // Davide Mancusi, CEA-Saclay, France
33 //
34 #define INCLXX_IN_GEANT4_MODE 1
35 
36 #include "globals.hh"
37 
38 /*
39  * G4INCLNucleus.hh
40  *
41  * \date Jun 5, 2009
42  * \author Pekka Kaitaniemi
43  */
44 
45 #ifndef G4INCLNUCLEUS_HH_
46 #define G4INCLNUCLEUS_HH_
47 
48 #include <list>
49 #include <string>
50 
51 #include "G4INCLParticle.hh"
52 #include "G4INCLEventInfo.hh"
53 #include "G4INCLCluster.hh"
54 #include "G4INCLFinalState.hh"
55 #include "G4INCLStore.hh"
56 #include "G4INCLGlobals.hh"
57 #include "G4INCLParticleTable.hh"
58 #include "G4INCLConfig.hh"
59 #include "G4INCLConfigEnums.hh"
60 #include "G4INCLCluster.hh"
62 
63 namespace G4INCL {
64 
65  class Nucleus : public Cluster {
66  public:
67  Nucleus(G4int mass, G4int charge, G4int strangess, Config const * const conf, const G4double universeRadius=-1.);
68  virtual ~Nucleus();
69 
71  Nucleus(const Nucleus &rhs);
72 
74  Nucleus &operator=(const Nucleus &rhs);
75 
80  void initializeParticles();
81 
84  theZ += p->getZ();
85  theA += p->getA();
86  theS += p->getS();
88  if(p->isNucleon()) {
91  }
92  if(p->isPion()) {
95  }
96  if(p->isKaon() || p->isAntiKaon()) {
99  }
101  };
102 
106  void applyFinalState(FinalState *);
107 
108  G4int getInitialA() const { return theInitialA; };
109  G4int getInitialZ() const { return theInitialZ; };
110  G4int getInitialS() const { return theInitialS; };
111 
118 
123 
129  G4double S = 0.0;
130  ParticleList const &outgoing = theStore->getOutgoingParticles();
131  for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i) {
132  const ParticleType t = (*i)->getType();
133  switch(t) {
134  case Proton:
135  case Neutron:
136  case DeltaPlusPlus:
137  case DeltaPlus:
138  case DeltaZero:
139  case DeltaMinus:
140  case Lambda:
141  case PiPlus:
142  case PiMinus:
143  case KPlus:
144  case KMinus:
145  case KZero:
146  case KZeroBar:
147  case KShort:
148  case KLong:
149  case SigmaPlus:
150  case SigmaZero:
151  case SigmaMinus:
153  break;
154  case Composite:
155  S += (*i)->getZ() * thePotential->getSeparationEnergy(Proton)
156  + ((*i)->getA() + (*i)->getS() - (*i)->getZ()) * thePotential->getSeparationEnergy(Neutron)
157  - (*i)->getS() * thePotential->getSeparationEnergy(Lambda);
158  break;
159  default:
160  break;
161  }
162  }
163 
170  return S;
171  }
172 
178 
184 
190 
196 
201  G4bool decayOutgoingSigmaZero(G4double timeThreshold);
202 
208 
214 
221  G4bool decayMe();
222 
224  void emitInsidePions();
225 
228 
231 
234 
237 
243 
249 
255 
259  }
260 
263 
267  }
268 
271  return incomingMomentum;
272  }
273 
276 
279 
285 
288  ParticleList const &inside = theStore->getParticles();
289  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
290  if((*i)->isDelta()) return true;
291  return false;
292  }
293 
296  ParticleList const &inside = theStore->getParticles();
297  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
298  if((*i)->isAntiKaon()) return true;
299  return false;
300  }
301 
304  ParticleList const &inside = theStore->getParticles();
305  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
306  if((*i)->isLambda()) return true;
307  return false;
308  }
309 
312  ParticleList const &inside = theStore->getParticles();
313  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
314  if((*i)->isSigma()) return true;
315  return false;
316  }
317 
319  inline G4bool containsKaon() {
320  ParticleList const &inside = theStore->getParticles();
321  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
322  if((*i)->isKaon()) return true;
323  return false;
324  }
325 
327  inline G4bool containsEtas() {
328  ParticleList const &inside = theStore->getParticles();
329  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
330  if((*i)->isEta()) return true;
331  return false;
332  }
333 
336  ParticleList const &inside = theStore->getParticles();
337  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
338  if((*i)->isOmega()) return true;
339  return false;
340  }
341 
345  std::string print();
346 
347  Store* getStore() const {return theStore; };
348  void setStore(Store *s) {
349  delete theStore;
350  theStore = s;
351  };
352 
354 
359  G4bool isEventTransparent() const;
360 
365  G4bool hasRemnant() const { return remnant; }
366 
370  void fillEventInfo(EventInfo *eventInfo);
371 
373 
376  const G4double theTransmissionRadius = theDensity->getTransmissionRadius(p);
377  const G4double theParticleZ = p->getZ();
378  return PhysicalConstants::eSquared*(theZ-theParticleZ)*theParticleZ/theTransmissionRadius;
379  }
380 
385  G4int Z, A, S;
386  };
387 
389  ConservationBalance getConservationBalance(EventInfo const &theEventInfo, const G4bool afterRecoil) const;
390 
392  void useFusionKinematics();
393 
403  if(particle->isNucleon() || particle->isLambda() || particle->isResonance()){
404  const G4double pr = particle->getReflectionMomentum()/thePotential->getFermiMomentum(particle);
405  if(pr>=1.)
406  return getUniverseRadius();
407  else
408  return theDensity->getMaxRFromP(particle->getType(), pr);
409  }
410  else {
411  // Temporarily set RPION = RMAX
412  return getUniverseRadius();
413  //return 0.5*(theDensity->getTransmissionRadius(particle)+getUniverseRadius());
414  }
415  }
416 
419 
421  void setUniverseRadius(const G4double universeRadius) { theUniverseRadius=universeRadius; }
422 
425 
428 
431 
434  delete theProjectileRemnant;
436  }
437 
440 
443  delete theProjectileRemnant;
444  theProjectileRemnant = NULL;
445  }
446 
456 
458  inline void updatePotentialEnergy(Particle *p) const {
460  }
461 
463  void setDensity(NuclearDensity const * const d) {
464  theDensity=d;
467  };
468 
470  NuclearDensity const *getDensity() const { return theDensity; };
471 
474 
475  private:
482 
483  private:
495 
500 
504 
511 
514 
520 
526 
529 
532 
534  };
535 
536 }
537 
538 #endif /* G4INCLNUCLEUS_HH_ */