// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // INCL++ intra-nuclear cascade model // Pekka Kaitaniemi, CEA and Helsinki Institute of Physics // Davide Mancusi, CEA // Alain Boudard, CEA // Sylvie Leray, CEA // Joseph Cugnon, University of Liege // #define INCLXX_IN_GEANT4_MODE 1 #include "globals.hh" /** \file G4INCLEventInfo.cc * \brief Simple container for output of event results. * * Contains the results of an INCL cascade. * * \date 21 January 2011 * \author Davide Mancusi */ #include "G4INCLEventInfo.hh" #include "G4INCLGlobals.hh" #include "G4INCLParticleTable.hh" #include namespace G4INCL { G4ThreadLocal Int_t EventInfo::eventNumber = 0; #ifdef INCL_INVERSE_KINEMATICS void EventInfo::fillInverseKinematics(const Double_t gamma) { const Double_t beta = std::sqrt(1.-1./(gamma*gamma)); for(Int_t i=0; i=1.) thetaPrime[i] = 0.; else if(cosThetaPrime<=-1.) thetaPrime[i] = 180.; else thetaPrime[i] = 180.*std::acos(cosThetaPrime)/Math::pi; } } #endif // INCL_INVERSE_KINEMATICS void EventInfo::remnantToParticle(const G4int remnantIndex) { A[nParticles] = ARem[remnantIndex]; Z[nParticles] = ZRem[remnantIndex]; emissionTime[nParticles] = stoppingTime; px[nParticles] = pxRem[remnantIndex]; py[nParticles] = pyRem[remnantIndex]; pz[nParticles] = pzRem[remnantIndex]; const G4double plab = std::sqrt(pxRem[remnantIndex]*pxRem[remnantIndex] +pyRem[remnantIndex]*pyRem[remnantIndex] +pzRem[remnantIndex]*pzRem[remnantIndex]); G4double pznorm = pzRem[remnantIndex]/plab; if(pznorm>1.) pznorm = 1.; else if(pznorm<-1.) pznorm = -1.; theta[nParticles] = 180.*std::acos(pznorm)/G4INCL::Math::pi; phi[nParticles] = 180.*std::atan2(pyRem[remnantIndex],pxRem[remnantIndex])/G4INCL::Math::pi; EKin[nParticles] = EKinRem[remnantIndex]; origin[nParticles] = -1; // Origin: cascade history.push_back(""); // history nParticles++; // assert(history.size()==(unsigned int)nParticles); } }