IAP GITLAB

Commit 497eb2ed authored by Tanguy Pierog's avatar Tanguy Pierog

new strategy for mother/daughter for hepmc or lhe output :

* istmax=0 or NOT EPOS : 2 beam particles are created and all real particles are then saved (first particles which are coming from the primary vertex and then decay products)
* istmax=1 AND EPOS : 2 beam particles are created to be the mother of all projectile and target nucleons (in case of nuclei) which are the mother of virtual particles defining the particle production type. Stable and unstable particles are daughters of these virtual particles.
In both cases, the link is complete from beam to final particles for all models.
In case of ROOT output we can't use nuclei as beam particle but the mother/daughter link not being currently saved it doesn't matter.
Tested for QGSJETII and EPOS and OK.


git-svn-id: https://devel-ik.fzk.de/svn/mc/crmc/trunk@4185 c7a5e08c-de06-0410-9364-b41cf42a0b17
parent 673a015c
...@@ -48,7 +48,7 @@ CRMC<OutputPolicy>::init() ...@@ -48,7 +48,7 @@ CRMC<OutputPolicy>::init()
fCfg.fTargetId, fCfg.fTargetId,
fCfg.fHEModel, fCfg.fHEModel,
fCfg.fProduceTables, fCfg.fProduceTables,
fCfg.fLHEout, fCfg.fTypout,
fCfg.GetOutputFileName().c_str(), fCfg.GetOutputFileName().c_str(),
fCfg.fParamFileName.c_str()); fCfg.fParamFileName.c_str());
...@@ -78,7 +78,7 @@ CRMC<OutputPolicy>::run() ...@@ -78,7 +78,7 @@ CRMC<OutputPolicy>::run()
cout << " ==[crmc]==> Collision number " << iColl+1 << endl; cout << " ==[crmc]==> Collision number " << iColl+1 << endl;
// loop over collisions // loop over collisions
fInterface.crmc_generate(fCfg.fLHEout,iColl+1, fInterface.crmc_generate(fCfg.fTypout,iColl+1,
gCRMC_data.fNParticles, gCRMC_data.fNParticles,
gCRMC_data.fImpactParameter, gCRMC_data.fImpactParameter,
gCRMC_data.fPartId[0], gCRMC_data.fPartId[0],
......
...@@ -23,7 +23,7 @@ CRMCoptions::CRMCoptions(int argc, char** argv) ...@@ -23,7 +23,7 @@ CRMCoptions::CRMCoptions(int argc, char** argv)
fTargetMomentum(-3500), fTargetMomentum(-3500),
fParamFileName("crmc.param"), fParamFileName("crmc.param"),
fOutputFileName(""), fOutputFileName(""),
fLHEout(false), fTypout(0),
fProduceTables(false), fProduceTables(false),
fSeedProvided(false), fSeedProvided(false),
fTest(false) fTest(false)
...@@ -144,8 +144,11 @@ CRMCoptions::ParseOptions(int argc, char** argv) ...@@ -144,8 +144,11 @@ CRMCoptions::ParseOptions(int argc, char** argv)
} }
} }
if (fOutputMode == eLHE) if (fOutputMode == eLHE || fOutputMode == eLHEGZ)
fLHEout = true; fTypout = 1;
if (fOutputMode == eROOT)
fTypout = -1;
// parameter readout // parameter readout
if (opt.count("seed")) { if (opt.count("seed")) {
...@@ -215,7 +218,7 @@ const ...@@ -215,7 +218,7 @@ const
{ {
if (pid < 10000) { if (pid < 10000) {
switch (fProjectileId) { switch (pid) {
case 120 : return "pi"; break; case 120 : return "pi"; break;
case -120 : return "antipi"; break; case -120 : return "antipi"; break;
case 1 : return "p"; break; case 1 : return "p"; break;
......
...@@ -44,12 +44,12 @@ class CRMCoptions { ...@@ -44,12 +44,12 @@ class CRMCoptions {
int fProjectileId; int fProjectileId;
int fTargetId; int fTargetId;
int fHEModel; int fHEModel;
int fTypout;
double fProjectileMomentum; double fProjectileMomentum;
double fTargetMomentum; double fTargetMomentum;
std::string fParamFileName; std::string fParamFileName;
std::string fOutputFileName; std::string fOutputFileName;
bool fLHEout;
bool fProduceTables; bool fProduceTables;
bool fSeedProvided; bool fSeedProvided;
bool fTest; bool fTest;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
c 15.01.2009 Simplified Main program and random number generator for epos c 15.01.2009 Simplified Main program and random number generator for epos
subroutine crmc_set_f(iEvent,iSeed,pproj,ptarg, subroutine crmc_set_f(iEvent,iSeed,pproj,ptarg,
$ ipart,itarg,imodel,itab,ilheout,lheoutfile,param) $ ipart,itarg,imodel,itab,itypout,lheoutfile,param)
*************************************************************** ***************************************************************
* *
...@@ -16,7 +16,7 @@ c 15.01.2009 Simplified Main program and random number generator for epos ...@@ -16,7 +16,7 @@ c 15.01.2009 Simplified Main program and random number generator for epos
* itarg - target particle type * itarg - target particle type
* imodel - HE model switch * imodel - HE model switch
* itab - force tables production or stop if missing * itab - force tables production or stop if missing
* ilheout - output type * itypout - output type
* lheoutfile - output file name * lheoutfile - output file name
* param - param file name * param - param file name
* *
...@@ -25,10 +25,10 @@ c 15.01.2009 Simplified Main program and random number generator for epos ...@@ -25,10 +25,10 @@ c 15.01.2009 Simplified Main program and random number generator for epos
include "epos.inc" include "epos.inc"
c Input values c Input values
integer iSeed,ipart,itarg,imodel,itab,ilheout,iEvent,iout integer iSeed,ipart,itarg,imodel,itab,itypout,iEvent,iout
double precision pproj, ptarg double precision pproj, ptarg
character*1000 param,lheoutfile,output character*1000 param,lheoutfile,output
common/lheoutput/iout,output common/typoutput/iout,output
real m1,m2 real m1,m2
double precision decms,e1,e2 double precision decms,e1,e2
...@@ -47,7 +47,7 @@ c Stop program if missing tables (after aaset) ...@@ -47,7 +47,7 @@ c Stop program if missing tables (after aaset)
if(itab.eq.1)producetables=.true. if(itab.eq.1)producetables=.true.
c Set common for crmc_init c Set common for crmc_init
iout=ilheout iout=itypout
output=lheoutfile output=lheoutfile
c Calculations of energy of the center-of-mass in the detector frame c Calculations of energy of the center-of-mass in the detector frame
...@@ -80,7 +80,7 @@ c Update some parameters value to run correctly ...@@ -80,7 +80,7 @@ c Update some parameters value to run correctly
c The parameters can be changed optionnaly by reading a file c The parameters can be changed optionnaly by reading a file
c (example.param) using the following subroutine call c (example.param) using the following subroutine call
call EposInput(param) !(it can be commented) call EposInput(param) !(it can be commented)
if ( model.ne.1 .and. model.ne.12 )istmax=0 !for most models daughter/mother link doesn't work if ( model.ne.1 )istmax=0 !for most models virtual mothers are not defined
c if you put what is in input.optns in example.param, you can even run c if you put what is in input.optns in example.param, you can even run
c exactly the same way (coded parameters are overwritten). Don't forget c exactly the same way (coded parameters are overwritten). Don't forget
...@@ -97,7 +97,7 @@ c will not run. ...@@ -97,7 +97,7 @@ c will not run.
implicit none implicit none
integer iout integer iout
character*1000 output character*1000 output
common/lheoutput/iout,output common/typoutput/iout,output
c initialization for the given energy c initialization for the given energy
call ainit call ainit
...@@ -150,7 +150,7 @@ c Fix final particles and some event parameters ...@@ -150,7 +150,7 @@ c Fix final particles and some event parameters
call afinal call afinal
c Fill HEP common c Fill HEP common
if(model.ne.4.and.model.ne.5)call hepmcstore if(model.ne.4.and.model.ne.5)call hepmcstore(iout) !use hepmcstore for non-HEP compatible events or non h-p models (Nucleus as projectile or target).
c optional Statistic information (only with debug level ish=1) c optional Statistic information (only with debug level ish=1)
call astati call astati
...@@ -375,7 +375,6 @@ c PDG ...@@ -375,7 +375,6 @@ c PDG
stop stop
endif endif
c Target definitions : for nucleons, idtarg does not exist c Target definitions : for nucleons, idtarg does not exist
c Mass number matarg as well as charge, latarg, must be defined c Mass number matarg as well as charge, latarg, must be defined
...@@ -413,12 +412,8 @@ c PDG ...@@ -413,12 +412,8 @@ c PDG
endif endif
if ( model.eq.1 ) then !model variable has no eposLHC istmax = 0 !final and mother particles (istmax=0 includes
istmax = 1 !final and mother particles (istmax=1 includes !real mother particles)
!mother particles)
else
istmax=0
endif
end end
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
!switch fusion off !nuclear effects due to high density (QGP) in EPOS !switch fusion off !nuclear effects due to high density (QGP) in EPOS
!more realistic but slow (can be switched off) !more realistic but slow (can be switched off)
!set istmax 1 !uncomment to get full daughter/mother particle chain with EPOS !set istmax 1 !include virtual mother particles with EPOS to identify particle source
!set isigma 2 !uncomment to get correct inelastic cross-section for heavy ions with EPOS !set isigma 2 !uncomment to get correct inelastic cross-section for heavy ions with EPOS
......
...@@ -263,8 +263,7 @@ c LIST is the code of final particle, P - its 4-momentum and mass. ...@@ -263,8 +263,7 @@ c LIST is the code of final particle, P - its 4-momentum and mass.
$ ' DPMJET particle ',k,' id :',ic,' before conversion' $ ' DPMJET particle ',k,' id :',ic,' before conversion'
$ , ' momentum :',(sngl(PHKK(i,k)),i=1,5) $ , ' momentum :',(sngl(PHKK(i,k)),i=1,5)
imaxhepstatus = MAX(1,MIN(ISTMAX+1,2)) IF(ISTHKK(k).GE.1 .AND. ISTHKK(k).LE.2)THEN !! if final particle
IF(ISTHKK(k).GE.1 .AND. ISTHKK(k).LE.imaxhepstatus)THEN !! if final particle
nptl=nptl+1 !! add 1 particle to stack nptl=nptl+1 !! add 1 particle to stack
nptlhep(k)=nptl nptlhep(k)=nptl
istptl(nptl)=ISTHKK(k)-1 !!0 means last generation other codes are e.g. for pomerons, remnants... istptl(nptl)=ISTHKK(k)-1 !!0 means last generation other codes are e.g. for pomerons, remnants...
......
This diff is collapsed.
...@@ -260,7 +260,7 @@ c LLIST is the code of final particle, P - its 4-momentum and mass. ...@@ -260,7 +260,7 @@ c LLIST is the code of final particle, P - its 4-momentum and mass.
$ ' PHOJET particle ',k,' id :',ic,' before conversion' $ ' PHOJET particle ',k,' id :',ic,' before conversion'
$ , ' momentum :',(sngl(PPHEP(i,k)),i=1,5) $ , ' momentum :',(sngl(PPHEP(i,k)),i=1,5)
IF(ISTHEPP(k).EQ.1)THEN IF(ISTHEPP(k).GE.1.AND.ISTHEPP(k).LE.2)THEN
c final particle c final particle
nptl=nptl+1 nptl=nptl+1
nptlhep(k)=nptl nptlhep(k)=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