IAP GITLAB

Commit 6c37d84a authored by Tanguy Pierog's avatar Tanguy Pierog

update to use PDG code as input (and A*10000+Z*10 for nuclei (compatible with PDF nucleus code)

try to avoid cmake to overwrite crmc.param when it is existing but it doesn't work because of the cache.


git-svn-id: https://devel-ik.fzk.de/svn/mc/crmc/trunk@3040 c7a5e08c-de06-0410-9364-b41cf42a0b17
parent 8d7c5c7c
......@@ -133,8 +133,10 @@ TARGET_LINK_LIBRARIES (crmc ${EXTRA_MODELS})
## installation
# configure the parameter file
IF(NOT EXISTS ${PROJECT_BINARY_DIR}/crmc.param)
install(CODE "SET (CRMCROOT \"${PROJECT_BINARY_DIR}\")")
install(CODE "CONFIGURE_FILE (\"${PROJECT_SOURCE_DIR}/src/crmc.param.in\" \"${PROJECT_BINARY_DIR}/crmc.param\" @ONLY IMMEDIATE)")
ENDIF(NOT EXISTS ${PROJECT_BINARY_DIR}/crmc.param)
# install tabs
if(CMAKE_HOST_UNIX)
......
......@@ -53,7 +53,7 @@ CRMCoptions::ParseOptions(int argc, char** argv)
po::options_description desc("Options of CRMC");
ostringstream model_desc;
model_desc << "model [0=EPOS 1.99LHC, 1=EPOS 1.99"
model_desc << "model [0=EPOS LHC, 1=EPOS 1.99"
#ifdef __QGSJET01__
<< ", 2=QGSJET01"
#endif
......@@ -87,8 +87,8 @@ CRMCoptions::ParseOptions(int argc, char** argv)
("model,m", po::value<int>(), model_desc.str().c_str())
("projectile-momentum,p", po::value<double>(), "momentum/(GeV/c)")
("target-momentum,P", po::value<double>(), "momentum/(GeV/c)")
("projectile-id,i", po::value<int>(), "PDG or A*1000")
("target-id,I", po::value<int>(), "PDG or A*1000")
("projectile-id,i", po::value<int>(), "PDG or A*10000+Z*10")
("target-id,I", po::value<int>(), "PDG or A*10000+Z*10")
("config,c", po::value<string>(), "config file")
("out,f", po::value<string>(), "output file name (auto if none provided)")
;
......@@ -286,21 +286,19 @@ CRMCoptions::GetOutputFileName() const
case 12 : rootFileName << "C"; break;
case 207 : rootFileName << "Pb"; break;
default:
cout << " rootOut: error - unkown beam's Id" << fProjectileId << endl;
cout << " exit ..." << endl;
exit(1);
// update this
rootFileName << "pdg" ;
break;
}
switch (fTargetId) {
case 1 : rootFileName << "p"; break;
case -1 : rootFileName << "antip"; break;
case 12 : rootFileName << "C"; break;
case 207 : rootFileName << "Pb"; break;
case 1 : rootFileName << "_p"; break;
case -1 : rootFileName << "_antip"; break;
case 12 : rootFileName << "_C"; break;
case 207 : rootFileName << "_Pb"; break;
default:
cout << " rootOut: error - unkown target's Id" << fTargetId << endl;
cout << " exit ..." << endl;
exit(1);
// update this
rootFileName << "_" << "pdg" ;
break;
}
......
......@@ -61,7 +61,6 @@ c will not run.
c initialization for the given energy
if (model .gt. 1) call IniModel(model) ! Init. others models
call ainit
c Here the cross section sigineaa is defined
......@@ -156,7 +155,7 @@ c-----------------------------------------------------------------------
include "epos.inc"
double precision iecms
integer iSeed,ipart,itarg,iModel,iadd
integer iSeed,ipart,itarg,iModel,iadd,idtrafo
character*4 lhct
iframe=11 !11 puts it always in nucleon nucleon reference
......@@ -301,10 +300,22 @@ c pi-
idprojin = ipart !pi-
laproj = -1 !proj Z
maproj = 1 !proj A
c nuclei
elseif (ipart.gt.10000)then
idprojin=1120
laproj=mod(ipart,10000)/10 !proj Z
maproj=mod(ipart,10000000)/10000 !proj A
c PDG
else
idprojin=idtrafo('pdg','nxs',ipart)
laproj = -1 !proj Z
maproj = 1 !proj A
endif
if(idprojin.eq.99)then
print *,'Warning : projectile particle not known'
print *,' id particle must be +/-120(pi+/-)'
print *,' 1(proton) 12(carbon) 207(lead)'
print *,' 1(proton) 12(carbon) 207(lead) or PDG'
stop
endif
......@@ -328,15 +339,25 @@ c lead
idtargin=1120
latarg = 82 !targ Z
matarg = 207 !targ A
c nuclei
elseif (itarg.gt.10000)then
idtargin=1120
latarg=mod(itarg,10000)/10 !targ Z
matarg=mod(itarg,10000000)/10000 !targ A
c PDG
elseif (abs(itarg).eq.2112.or.abs(itarg).eq.2212)then
idtargin=idtrafo('pdg','nxs',itarg)
latarg = -1 !targ Z
matarg = 1 !targ A
else
print *,'Warning : target particle not known'
print *,' id particle must be '
print *,' 1(proton) 12(carbon) 207(lead)'
print *,' 1(proton) 12(carbon) 207(lead) or PDG'
stop
endif
istmax = 0 !only final particles (istmax=1 includes
istmax = 1 !only final particles (istmax=1 includes
!mother particles)
end
......@@ -353,7 +374,7 @@ c-----------------------------------------------------------------------
character*1000 iParam
nopen=0
ifop=35
ifop=52
open(unit=ifop,file=TRIM(iParam),status='old')
call aread
close(ifop)
......
......@@ -1996,7 +1996,7 @@ c nxs|pdg|qgs|cor|sib
* , 230,311,5,33,21 !k0
* , -230,-311,-5,34,22 !k0b
* , 20,310,5,16,12 !kshort
* , -20,-310,-5,10,11 !klong
* , -20,130,-5,10,11 !klong
* , 330,331,99,99,24 !etaprime
* , 111,113,99,51,27 !rho0
* , 121,213,99,52,25 !rho+
......
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