Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:26

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // INCL++ intra-nuclear cascade model
0027 // Alain Boudard, CEA-Saclay, France
0028 // Joseph Cugnon, University of Liege, Belgium
0029 // Jean-Christophe David, CEA-Saclay, France
0030 // Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
0031 // Sylvie Leray, CEA-Saclay, France
0032 // Davide Mancusi, CEA-Saclay, France
0033 //
0034 #define INCLXX_IN_GEANT4_MODE 1
0035 
0036 #include "globals.hh"
0037 
0038 /** \file G4INCLEventInfo.hh
0039  * \brief Simple container for output of event results.
0040  *
0041  * Contains the results of an INCL cascade.
0042  *
0043  * \date 21 January 2011
0044  * \author Davide Mancusi
0045  */
0046 
0047 #ifndef G4INCLEVENTINFO_HH_HH
0048 #define G4INCLEVENTINFO_HH_HH 1
0049 
0050 #include "G4INCLParticleType.hh"
0051 #ifdef INCL_ROOT_USE
0052 #include <Rtypes.h>
0053 #endif
0054 #include <string>
0055 #include <vector>
0056 #include <algorithm>
0057 
0058 namespace G4INCL {
0059 #ifndef INCL_ROOT_USE
0060     typedef G4int Int_t;
0061     typedef short Short_t;
0062     typedef G4float Float_t;
0063     typedef G4double Double_t;
0064     typedef G4bool Bool_t;
0065 #endif
0066 
0067     struct EventInfo {
0068       EventInfo() :
0069         nParticles(0),
0070         event(0),
0071         eventBias((Float_t)0.0),
0072         nRemnants(0),
0073         projectileType(0),
0074         At(0),
0075         Zt(0),
0076         St(0),
0077         Ap(0),
0078         Zp(0),
0079         Sp(0),
0080         Ep((Float_t)0.0),
0081         impactParameter((Float_t)0.0),
0082         nCollisions(0),
0083         stoppingTime((Float_t)0.0),
0084         EBalance((Float_t)0.0),
0085         firstEBalance((Float_t)0.0),
0086         pLongBalance((Float_t)0.0),
0087         pTransBalance((Float_t)0.0),
0088         nCascadeParticles(0),
0089         transparent(false),
0090         annihilationP(false),
0091         annihilationN(false),
0092         forcedCompoundNucleus(false),
0093         nucleonAbsorption(false),
0094         pionAbsorption(false),
0095         nDecays(0),
0096         nSrcCollisions(0),
0097         nSrcPairs(0),
0098         nBlockedCollisions(0),
0099         nBlockedDecays(0),
0100         effectiveImpactParameter((Float_t)0.0),
0101         deltasInside(false),
0102         sigmasInside(false),
0103         kaonsInside(false),
0104         antikaonsInside(false),
0105         lambdasInside(false),
0106         forcedDeltasInside(false),
0107         forcedDeltasOutside(false),
0108         forcedPionResonancesOutside(false),
0109         absorbedStrangeParticle(false),
0110         forcedSigmaOutside(false),
0111         forcedStrangeInside(false),
0112         emitLambda(0),
0113         emitKaon(false),
0114         clusterDecay(false),
0115         firstCollisionTime((Float_t)0.0),
0116         firstCollisionXSec((Float_t)0.0),
0117         firstCollisionSpectatorPosition((Float_t)0.0),
0118         firstCollisionSpectatorMomentum((Float_t)0.0),
0119         firstCollisionIsElastic(false),
0120         nReflectionAvatars(0),
0121         nCollisionAvatars(0),
0122         nDecayAvatars(0),
0123         nUnmergedSpectators(0),
0124         nEnergyViolationInteraction(0)
0125 
0126       {
0127         std::fill_n(A, maxSizeParticles, 0);
0128         std::fill_n(Z, maxSizeParticles, 0);
0129         std::fill_n(S, maxSizeParticles, 0);
0130         std::fill_n(J, maxSizeParticles, 0);
0131         std::fill_n(PDGCode, maxSizeParticles, 0);
0132         std::fill_n(ParticleBias, maxSizeParticles, (Float_t)0.0);
0133         std::fill_n(EKin, maxSizeParticles, (Float_t)0.0);
0134         std::fill_n(px, maxSizeParticles, (Float_t)0.0);
0135         std::fill_n(py, maxSizeParticles, (Float_t)0.0);
0136         std::fill_n(pz, maxSizeParticles, (Float_t)0.0);
0137         std::fill_n(theta, maxSizeParticles, (Float_t)0.0);
0138         std::fill_n(phi, maxSizeParticles, (Float_t)0.0);
0139         std::fill_n(origin, maxSizeParticles, 0);
0140         std::fill_n(parentResonancePDGCode, maxSizeParticles, 0);
0141         std::fill_n(parentResonanceID, maxSizeParticles, 0);
0142         std::fill_n(emissionTime, maxSizeParticles, (Float_t)0.0);
0143         std::fill_n(ARem, maxSizeRemnants, 0);
0144         std::fill_n(ZRem, maxSizeRemnants, 0);
0145         std::fill_n(SRem, maxSizeRemnants, 0);
0146         std::fill_n(EStarRem, maxSizeRemnants, (Float_t)0.0);
0147         std::fill_n(JRem, maxSizeRemnants, (Float_t)0.0);
0148         std::fill_n(EKinRem, maxSizeRemnants, (Float_t)0.0);
0149         std::fill_n(pxRem, maxSizeRemnants, (Float_t)0.0);
0150         std::fill_n(pyRem, maxSizeRemnants, (Float_t)0.0);
0151         std::fill_n(pzRem, maxSizeRemnants, (Float_t)0.0);
0152         std::fill_n(thetaRem, maxSizeRemnants, (Float_t)0.0);
0153         std::fill_n(phiRem, maxSizeRemnants, (Float_t)0.0);
0154         std::fill_n(jxRem, maxSizeRemnants, (Float_t)0.0);
0155         std::fill_n(jyRem, maxSizeRemnants, (Float_t)0.0);
0156         std::fill_n(jzRem, maxSizeRemnants, (Float_t)0.0);
0157         std::fill_n(EKinPrime, maxSizeParticles, (Float_t)0.0);
0158         std::fill_n(pzPrime, maxSizeParticles, (Float_t)0.0);
0159         std::fill_n(thetaPrime, maxSizeParticles, (Float_t)0.0);
0160       }
0161 
0162       /** \brief Number of the event */
0163       static G4ThreadLocal Int_t eventNumber;
0164 
0165       /** \brief Maximum array size for remnants */
0166       static const Short_t maxSizeRemnants = 10;
0167 
0168       /** \brief Maximum array size for emitted particles */
0169       static const Short_t maxSizeParticles = 1000;
0170 
0171       /** \brief Number of particles in the final state */
0172       Short_t nParticles;
0173       /** \brief Sequential number of the event in the event loop */
0174       Int_t event;
0175       /** \brief Particle mass number */
0176       Short_t A[maxSizeParticles];
0177       /** \brief Particle charge number */
0178       Short_t Z[maxSizeParticles];
0179       /** \brief Particle strangeness number */
0180       Short_t S[maxSizeParticles];
0181       /** \brief Particle angular momemtum */
0182       Short_t J[maxSizeParticles];
0183       /** \brief PDG numbering of the particles */
0184       Int_t PDGCode[maxSizeParticles];
0185       /** \brief Event bias */
0186       Float_t eventBias;
0187       /** \brief Particle weight due to the bias */
0188       Float_t ParticleBias[maxSizeParticles];
0189       /** \brief Particle kinetic energy [MeV] */
0190       Float_t EKin[maxSizeParticles];
0191       /** \brief Particle momentum, x component [MeV/c] */
0192       Float_t px[maxSizeParticles];
0193       /** \brief Particle momentum, y component [MeV/c] */
0194       Float_t py[maxSizeParticles];
0195       /** \brief Particle momentum, z component [MeV/c] */
0196       Float_t pz[maxSizeParticles];
0197       /** \brief Particle momentum polar angle [radians] */
0198       Float_t theta[maxSizeParticles];
0199       /** \brief Particle momentum azimuthal angle [radians] */
0200       Float_t phi[maxSizeParticles];
0201       /** \brief Origin of the particle
0202        *
0203        * Should be -1 for cascade particles, or the number of the remnant for
0204        * de-excitation particles. */
0205       Short_t origin[maxSizeParticles];
0206       /** \brief Particle's parent resonance PDG code */
0207       Int_t parentResonancePDGCode[maxSizeParticles];
0208       /** \brief Particle's parent resonance unique ID identifier */
0209       Int_t parentResonanceID[maxSizeParticles];
0210       /** \brief History of the particle
0211        *
0212        * Condensed information about the de-excitation chain of a particle. For
0213        * cascade particles, it is just an empty string. For particles arising
0214        * from the de-excitation of a cascade remnant, it is a string of
0215        * characters. Each character represents one or more identical steps in
0216        * the de-excitation process. The currently defined possible character
0217        * values and their meanings are the following:
0218        *
0219        * e: evaporation product
0220        * E: evaporation residue
0221        * m: multifragmentation
0222        * a: light partner in asymmetric fission or IMF emission
0223        * A: heavy partner in asymmetric fission or IMF emission
0224        * f: light partner in fission
0225        * F: heavy partner in fission
0226        * s: saddle-to-scission emission
0227        * n: non-statistical emission (decay) */
0228       std::vector<std::string> history;
0229       /** \brief Number of remnants */
0230       Short_t nRemnants;
0231       /** \brief Projectile particle type */
0232       Int_t projectileType;
0233       /** \brief Mass number of the target nucleus */
0234       Short_t At;
0235       /** \brief Charge number of the target nucleus */
0236       Short_t Zt;
0237       /** \brief Strangeness number of the target nucleus */
0238       Short_t St;
0239       /** \brief Mass number of the projectile nucleus */
0240       Short_t Ap;
0241       /** \brief Charge number of the projectile nucleus */
0242       Short_t Zp;
0243       /** \brief Strangeness number of the projectile nucleus */
0244       Short_t Sp;
0245       /** \brief Projectile kinetic energy given as input */
0246       Float_t Ep;
0247       /** \brief Impact parameter [fm] */
0248       Float_t impactParameter;
0249       /** \brief Number of accepted two-body collisions */
0250       Int_t nCollisions;
0251       /** \brief Cascade stopping time [fm/c] */
0252       Float_t stoppingTime;
0253       /** \brief Energy-conservation balance [MeV] */
0254       Float_t EBalance;
0255       /** \brief First value for the energy-conservation balance [MeV] */
0256       Float_t firstEBalance;
0257       /** \brief Longitudinal momentum-conservation balance [MeV/c] */
0258       Float_t pLongBalance;
0259       /** \brief Transverse momentum-conservation balance [MeV/c] */
0260       Float_t pTransBalance;
0261       /** \brief Number of cascade particles */
0262       Short_t nCascadeParticles;
0263       /** \brief True if the event is transparent */
0264       Bool_t transparent;
0265       /** \brief True if annihilation at rest on a proton */
0266       Bool_t annihilationP;
0267       /** \brief True if annihilation at rest on a neutron */
0268       Bool_t annihilationN;
0269       /** \brief True if the event is a forced CN */
0270       Bool_t forcedCompoundNucleus;
0271       /** \brief True if the event is a nucleon absorption */
0272       Bool_t nucleonAbsorption;
0273       /** \brief True if the event is a pion absorption */
0274       Bool_t pionAbsorption;
0275       /** \brief Number of accepted Delta decays */
0276       Int_t nDecays;
0277       /** \brief Number of accepted SRC collisions */
0278       Int_t nSrcCollisions;
0279       /** \brief Number of src pairs */
0280       Int_t nSrcPairs;
0281       /** \brief Number of two-body collisions blocked by Pauli or CDPP */
0282       Int_t nBlockedCollisions;
0283       /** \brief Number of decays blocked by Pauli or CDPP */
0284       Int_t nBlockedDecays;
0285       /** \brief Effective (Coulomb-distorted) impact parameter [fm] */
0286       Float_t effectiveImpactParameter;
0287       /** \brief Event involved deltas in the nucleus at the end of the cascade */
0288       Bool_t deltasInside;
0289       /** \brief Event involved sigmas in the nucleus at the end of the cascade */
0290       Bool_t sigmasInside;
0291       /** \brief Event involved kaons in the nucleus at the end of the cascade */
0292       Bool_t kaonsInside;
0293       /** \brief Event involved antikaons in the nucleus at the end of the cascade */
0294       Bool_t antikaonsInside;
0295       /** \brief Event involved lambdas in the nucleus at the end of the cascade */
0296       Bool_t lambdasInside;
0297       /** \brief Event involved forced delta decays inside the nucleus */
0298       Bool_t forcedDeltasInside;
0299       /** \brief Event involved forced delta decays outside the nucleus */
0300       Bool_t forcedDeltasOutside;
0301       /** \brief Event involved forced eta/omega decays outside the nucleus */
0302       Bool_t forcedPionResonancesOutside;
0303       /** \brief Event involved forced strange absorption inside the nucleus */
0304       Bool_t absorbedStrangeParticle;
0305       /** \brief Event involved forced Sigma Zero decays outside the nucleus */
0306       Bool_t forcedSigmaOutside;
0307       /** \brief Event involved forced antiKaon/Sigma absorption inside the nucleus */
0308       Bool_t forcedStrangeInside;
0309       /** \brief Number of forced Lambda emit out of the nucleus */
0310       Int_t emitLambda;
0311       /** \brief Event involved forced Kaon emission */
0312       Bool_t emitKaon;
0313       /** \brief Event involved cluster decay */
0314       Bool_t clusterDecay;
0315       /** \brief Time of the first collision [fm/c] */
0316       Float_t firstCollisionTime;
0317       /** \brief Cross section of the first collision (mb) */
0318       Float_t firstCollisionXSec;
0319       /** \brief Position of the spectator on the first collision (fm) */
0320       Float_t firstCollisionSpectatorPosition;
0321       /** \brief Momentum of the spectator on the first collision (fm) */
0322       Float_t firstCollisionSpectatorMomentum;
0323       /** \brief True if the first collision was elastic */
0324       Bool_t firstCollisionIsElastic;
0325       /** \brief Number of reflection avatars */
0326       Int_t nReflectionAvatars;
0327       /** \brief Number of collision avatars */
0328       Int_t nCollisionAvatars;
0329       /** \brief Number of decay avatars */
0330       Int_t nDecayAvatars;
0331       /** \brief Number of dynamical spectators that were merged back into the projectile remnant */
0332       Int_t nUnmergedSpectators;
0333       /** \brief Number of attempted collisions/decays for which the energy-conservation algorithm failed to find a solution. */
0334       Int_t nEnergyViolationInteraction;
0335       /** \brief Emission time [fm/c] */
0336       Float_t emissionTime[maxSizeParticles];
0337       /** \brief Remnant mass number */
0338       Short_t ARem[maxSizeRemnants];
0339       /** \brief Remnant charge number */
0340       Short_t ZRem[maxSizeRemnants];
0341       /** \brief Remnant strangeness number */
0342       Short_t SRem[maxSizeRemnants];
0343       /** \brief Remnant excitation energy [MeV] */
0344       Float_t EStarRem[maxSizeRemnants];
0345       /** \brief Remnant spin [\f$\hbar\f$] */
0346       Float_t JRem[maxSizeRemnants];
0347       /** \brief Remnant kinetic energy [MeV] */
0348       Float_t EKinRem[maxSizeRemnants];
0349       /** \brief Remnant momentum, x component [MeV/c] */
0350       Float_t pxRem[maxSizeRemnants];
0351       /** \brief Remnant momentum, y component [MeV/c] */
0352       Float_t pyRem[maxSizeRemnants];
0353       /** \brief Remnant momentum, z component [MeV/c] */
0354       Float_t pzRem[maxSizeRemnants];
0355       /** \brief Remnant momentum polar angle [radians] */
0356       Float_t thetaRem[maxSizeRemnants];
0357       /** \brief Remnant momentum azimuthal angle [radians] */
0358       Float_t phiRem[maxSizeRemnants];
0359       /** \brief Remnant angular momentum, x component [\f$\hbar\f$] */
0360       Float_t jxRem[maxSizeRemnants];
0361       /** \brief Remnant angular momentum, y component [\f$\hbar\f$] */
0362       Float_t jyRem[maxSizeRemnants];
0363       /** \brief Remnant angular momentum, z component [\f$\hbar\f$] */
0364       Float_t jzRem[maxSizeRemnants];
0365       /** \brief Particle kinetic energy, in inverse kinematics [MeV] */
0366       Float_t EKinPrime[maxSizeParticles];
0367       /** \brief Particle momentum, z component, in inverse kinematics [MeV/c] */
0368       Float_t pzPrime[maxSizeParticles];
0369       /** \brief Particle momentum polar angle, in inverse kinematics [radians] */
0370       Float_t thetaPrime[maxSizeParticles];
0371 
0372       /** \brief Reset the EventInfo members */
0373       void reset() {
0374         nParticles = 0;
0375         event = 0;
0376         eventBias = (Float_t)0.0;
0377         history.clear();
0378         nRemnants = 0;
0379         projectileType = 0;
0380         At = 0;
0381         Zt = 0;
0382         St = 0;
0383         Ap = 0;
0384         Zp = 0;
0385         Sp = 0;
0386         Ep = (Float_t)0.0;
0387         impactParameter = (Float_t)0.0;
0388         nCollisions = 0;
0389         stoppingTime = (Float_t)0.0;
0390         EBalance = (Float_t)0.0;
0391         firstEBalance = (Float_t)0.0;
0392         pLongBalance = (Float_t)0.0;
0393         pTransBalance = (Float_t)0.0;
0394         nCascadeParticles = 0;
0395         transparent = false;
0396         annihilationP = false;
0397         annihilationN = false;
0398         forcedCompoundNucleus = false;
0399         nucleonAbsorption = false;
0400         pionAbsorption = false;
0401         nDecays = 0;
0402         nSrcCollisions = 0;
0403         nSrcPairs = 0;
0404         nBlockedCollisions = 0;
0405         nBlockedDecays = 0;
0406         effectiveImpactParameter = (Float_t)0.0;
0407         deltasInside = false;
0408         sigmasInside = false;
0409         kaonsInside = false;
0410         antikaonsInside = false;
0411         lambdasInside = false;
0412         forcedDeltasInside = false;
0413         forcedDeltasOutside = false;
0414         forcedPionResonancesOutside = false;
0415         absorbedStrangeParticle = false;
0416         forcedSigmaOutside = false;
0417         forcedStrangeInside = false;
0418         emitLambda = 0;
0419         emitKaon = false;
0420         clusterDecay = false;
0421         firstCollisionTime = (Float_t)0.0;
0422         firstCollisionXSec = (Float_t)0.0;
0423         firstCollisionSpectatorPosition = (Float_t)0.0;
0424         firstCollisionSpectatorMomentum = (Float_t)0.0;
0425         firstCollisionIsElastic = false;
0426         nReflectionAvatars = 0;
0427         nCollisionAvatars = 0;
0428         nDecayAvatars = 0;
0429         nUnmergedSpectators = 0;
0430         nEnergyViolationInteraction = 0;
0431 
0432       }
0433 
0434       /// \brief Move a remnant to the particle array
0435       void remnantToParticle(const G4int remnantIndex);
0436 
0437       /// \brief Fill the variables describing the reaction in inverse kinematics
0438       void fillInverseKinematics(const Double_t gamma);
0439     };
0440 }
0441 
0442 #endif /* G4INCLEVENTINFO_HH_HH */