File indexing completed on 2025-01-31 09:21:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
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