Commit ae3f2a63 authored by Tanguy Pierog's avatar Tanguy Pierog

keep original mass of QII to have correct energy conservation (since particles...

keep original mass of QII to have correct energy conservation (since particles are put on-shell in double precision in crmc now, previous problems with mass in QII are probably solved now)
use the same cross-section in hepmc file and in screen output (sigine in hp and sigineaa in pA/AB)

git-svn-id: https://devel-ik.fzk.de/svn/mc/crmc/trunk@5269 c7a5e08c-de06-0410-9364-b41cf42a0b17
parent 3874cb68
......@@ -268,15 +268,15 @@ CRMCoptions::ParseOptions(int argc, char** argv)
const double sqrts = opt["sqrts"].as<double>();
const double e = sqrts / 2.;
fTargetMomentum = -sqrt(e*e-pow(mass(fTargetId),2));
fProjectileMomentum = sqrt(e*e-pow(mass(fProjectileId),2));
fTargetMomentum = -sqrt((e+mass(fTargetId))*(e-mass(fTargetId)));
fProjectileMomentum = sqrt((e+mass(fProjectileId))*(e-mass(fProjectileId)));
fSqrts = sqrts;
else //set fSqrts
const double eTarget = sqrt(fTargetMomentum*fTargetMomentum + pow(mass(fTargetId),2));
const double eProjectile = sqrt(fProjectileMomentum*fProjectileMomentum + pow(mass(fProjectileId),2));
fSqrts = sqrt(pow(eTarget+eProjectile,2)-pow(fTargetMomentum+fProjectileMomentum,2));
fSqrts = sqrt(((eTarget+eProjectile)+(fTargetMomentum+fProjectileMomentum))*((eTarget+eProjectile)-(fTargetMomentum+fProjectileMomentum)));
......@@ -137,7 +137,11 @@ OutputPolicyHepMC::FillEvent(const CRMCoptions& cfg, const int nEvent)
// set cross section information for this event
HepMC::GenCrossSection theCrossSection;
if(cfg.fProjectileId>1 || cfg.fTargetId>1){
theCrossSection.set_cross_section(double(gCRMC_data.sigineaa)*1e9); //required in pB
theCrossSection.set_cross_section(double(gCRMC_data.sigine)*1e9); //required in pB
......@@ -366,10 +366,10 @@ c boost in CMS frame
call utlob5(yhaha, pptl(1,nptl), pptl(2,nptl)
. , pptl(3,nptl), pptl(4,nptl), pptl(5,nptl))
c give particle proper mass ...
. +pptl(3,nptl)**2+pptl(5,nptl)**2)
c give particle proper mass ... (but violate energy conservation)
c pptl(5,nptl)=amepo
c pptl(4,nptl)=sqrt(pptl(1,nptl)**2+pptl(2,nptl)**2
c . +pptl(3,nptl)**2+pptl(5,nptl)**2)
$ ' particle from qgsjet ',nptl,' id :',idptl(nptl)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment