IAP GITLAB

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) ...@@ -268,15 +268,15 @@ CRMCoptions::ParseOptions(int argc, char** argv)
{ {
const double sqrts = opt["sqrts"].as<double>(); const double sqrts = opt["sqrts"].as<double>();
const double e = sqrts / 2.; const double e = sqrts / 2.;
fTargetMomentum = -sqrt(e*e-pow(mass(fTargetId),2)); fTargetMomentum = -sqrt((e+mass(fTargetId))*(e-mass(fTargetId)));
fProjectileMomentum = sqrt(e*e-pow(mass(fProjectileId),2)); fProjectileMomentum = sqrt((e+mass(fProjectileId))*(e-mass(fProjectileId)));
fSqrts = sqrts; fSqrts = sqrts;
} }
else //set fSqrts else //set fSqrts
{ {
const double eTarget = sqrt(fTargetMomentum*fTargetMomentum + pow(mass(fTargetId),2)); const double eTarget = sqrt(fTargetMomentum*fTargetMomentum + pow(mass(fTargetId),2));
const double eProjectile = sqrt(fProjectileMomentum*fProjectileMomentum + pow(mass(fProjectileId),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)));
} }
DumpConfig(); DumpConfig();
......
...@@ -137,7 +137,11 @@ OutputPolicyHepMC::FillEvent(const CRMCoptions& cfg, const int nEvent) ...@@ -137,7 +137,11 @@ OutputPolicyHepMC::FillEvent(const CRMCoptions& cfg, const int nEvent)
#ifdef HEPMC_HAS_CROSS_SECTION #ifdef HEPMC_HAS_CROSS_SECTION
// set cross section information for this event // set cross section information for this event
HepMC::GenCrossSection theCrossSection; 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.sigineaa)*1e9); //required in pB
}else{
theCrossSection.set_cross_section(double(gCRMC_data.sigine)*1e9); //required in pB
}
fEvtHepMC->set_cross_section(theCrossSection); fEvtHepMC->set_cross_section(theCrossSection);
#endif #endif
......
...@@ -366,10 +366,10 @@ c boost in CMS frame ...@@ -366,10 +366,10 @@ c boost in CMS frame
call utlob5(yhaha, pptl(1,nptl), pptl(2,nptl) call utlob5(yhaha, pptl(1,nptl), pptl(2,nptl)
. , pptl(3,nptl), pptl(4,nptl), pptl(5,nptl)) . , pptl(3,nptl), pptl(4,nptl), pptl(5,nptl))
c give particle proper mass ... c give particle proper mass ... (but violate energy conservation)
pptl(5,nptl)=amepo c pptl(5,nptl)=amepo
pptl(4,nptl)=sqrt(pptl(1,nptl)**2+pptl(2,nptl)**2 c pptl(4,nptl)=sqrt(pptl(1,nptl)**2+pptl(2,nptl)**2
. +pptl(3,nptl)**2+pptl(5,nptl)**2) c . +pptl(3,nptl)**2+pptl(5,nptl)**2)
if(ish.ge.5)write(ifch,'(a,i5,a,i5,a,4(e10.4,1x),f6.3)') if(ish.ge.5)write(ifch,'(a,i5,a,i5,a,4(e10.4,1x),f6.3)')
$ ' particle from qgsjet ',nptl,' id :',idptl(nptl) $ ' 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