Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:21:53

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 /*
0027  * ============================================================================
0028  *
0029  *       Filename:  CexmcProductionModelData.cc
0030  *
0031  *    Description:  SCM/LAB lorentz vector of the particles in reaction
0032  *
0033  *        Version:  1.0
0034  *        Created:  28.12.2009 22:59:10
0035  *       Revision:  none
0036  *       Compiler:  gcc
0037  *
0038  *         Author:  Alexey Radkov (), 
0039  *        Company:  PNPI
0040  *
0041  * ============================================================================
0042  */
0043 
0044 #include <iostream>
0045 #include "CexmcProductionModelData.hh"
0046 
0047 
0048 CexmcProductionModelData::CexmcProductionModelData()
0049 {
0050 }
0051 
0052 
0053 CexmcProductionModelData::CexmcProductionModelData(
0054                       const G4LorentzVector &  incidentParticleSCM_,
0055                       const G4LorentzVector &  incidentParticleLAB_,
0056                       const G4LorentzVector &  nucleusParticleSCM_,
0057                       const G4LorentzVector &  nucleusParticleLAB_,
0058                       const G4LorentzVector &  outputParticleSCM_,
0059                       const G4LorentzVector &  outputParticleLAB_,
0060                       const G4LorentzVector &  nucleusOutputParticleSCM_,
0061                       const G4LorentzVector &  nucleusOutputParticleLAB_,
0062                       const G4ParticleDefinition *  incidentParticle_,
0063                       const G4ParticleDefinition *  nucleusParticle_,
0064                       const G4ParticleDefinition *  outputParticle_,
0065                       const G4ParticleDefinition *  nucleusOutputParticle_ ) :
0066     incidentParticleSCM( incidentParticleSCM_ ),
0067     incidentParticleLAB( incidentParticleLAB_ ),
0068     nucleusParticleSCM( nucleusParticleSCM_ ),
0069     nucleusParticleLAB( nucleusParticleLAB_ ),
0070     outputParticleSCM( outputParticleSCM_ ),
0071     outputParticleLAB( outputParticleLAB_ ),
0072     nucleusOutputParticleSCM( nucleusOutputParticleSCM_ ),
0073     nucleusOutputParticleLAB( nucleusOutputParticleLAB_ ),
0074     incidentParticle( incidentParticle_ ), nucleusParticle( nucleusParticle_ ),
0075     outputParticle( outputParticle_ ),
0076     nucleusOutputParticle( nucleusOutputParticle_ )
0077 {
0078 }
0079 
0080 
0081 std::ostream &  operator<<( std::ostream &  out,
0082                             const CexmcProductionModelData &  data )
0083 {
0084     std::ostream::fmtflags  savedFlags( out.flags() );
0085     std::streamsize         prec( out.precision() );
0086 
0087     out.precision( 4 );
0088     out.flags( std::ios::fixed );
0089 
0090     out << std::endl;
0091     out << "       Incident particle       (LAB) : " <<
0092            data.incidentParticle->GetParticleName() << " " <<
0093            G4BestUnit( data.incidentParticleLAB, "Energy" ) << " -- " <<
0094            G4BestUnit( data.incidentParticleLAB.e(), "Energy" ) << std::endl;
0095     out << "                               (SCM) : " <<
0096            data.incidentParticle->GetParticleName() << " " <<
0097            G4BestUnit( data.incidentParticleSCM, "Energy" ) << " -- " <<
0098            G4BestUnit( data.incidentParticleSCM.e(), "Energy" ) << std::endl;
0099     out << "       Nucleus particle        (LAB) : " <<
0100            data.nucleusParticle->GetParticleName() << " " <<
0101            G4BestUnit( data.nucleusParticleLAB, "Energy" ) << " -- " <<
0102            G4BestUnit( data.nucleusParticleLAB.e(), "Energy" ) << std::endl;
0103     out << "                               (SCM) : " <<
0104            data.nucleusParticle->GetParticleName() << " " <<
0105            G4BestUnit( data.nucleusParticleSCM, "Energy" ) << " -- " <<
0106            G4BestUnit( data.nucleusParticleSCM.e(), "Energy" ) << std::endl;
0107     out << "       Output particle         (LAB) : " <<
0108            data.outputParticle->GetParticleName() << " " <<
0109            G4BestUnit( data.outputParticleLAB, "Energy" ) << " -- " <<
0110            G4BestUnit( data.outputParticleLAB.e(), "Energy" ) << std::endl;
0111     out << "                               (SCM) : " <<
0112            data.outputParticle->GetParticleName() << " " <<
0113            G4BestUnit( data.outputParticleSCM, "Energy" ) << " -- " <<
0114            G4BestUnit( data.outputParticleSCM.e(), "Energy" ) << std::endl;
0115     out << "       Nucleus output particle (LAB) : " <<
0116            data.nucleusOutputParticle->GetParticleName() << " " <<
0117            G4BestUnit( data.nucleusOutputParticleLAB, "Energy" ) << " -- " <<
0118            G4BestUnit( data.nucleusOutputParticleLAB.e(), "Energy" ) <<
0119            std::endl;
0120     out << "                               (SCM) : " <<
0121            data.nucleusOutputParticle->GetParticleName() << " " <<
0122            G4BestUnit( data.nucleusOutputParticleSCM, "Energy" ) << " -- " <<
0123            G4BestUnit( data.nucleusOutputParticleSCM.e(), "Energy" ) <<
0124            std::endl;
0125 
0126     out.precision( prec );
0127     out.flags( savedFlags );
0128 
0129     return out;
0130 }
0131