From: Vasilis Vlachoudis (Vasilis.Vlachoudis@cern.ch)
Date: Fri Jul 01 2005 - 17:10:07 CEST
This is a multi-part message in MIME format.
------_=_NextPart_001_01C57E4E.F7A8B217
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
Hi
You can use the stuprf.f (see attached file) routine to keep the
information you need when a particle is produced. At later time with the
fluscw.f you record the information you need.
The attached file stores the Id, position and energy of the parent
particle after an inelastic interaction or a decay event. Then inside
the fluscw.f you can add a write statement like
WRITE(20,*) ' ',ISPUSR(1), SPAUSR(1), SPAUSR(2),
+ SPAUSR(3), SPAUSR(4)
WRITE(20,*) ' ',ISPUSR(2), SPAUSR(5), SPAUSR(6),
+ SPAUSR(7), SPAUSR(8)
Vasilis
-----Original Message-----
From: owner-fluka-discuss@fisica.unimi.it
[mailto:owner-fluka-discuss@fisica.unimi.it] On Behalf Of Jean-Eric
Campagne
Sent: Thursday, 30 June 2005 11:08
To: fluka-discuss@fluka.org
Subject: record secondary part. properties
Hi everybody
I am a FLUKA novice and I would like to do the following things:
1) define a Beryllium target Dx:160mm, Dy=3D2mm,Dz=3D800mm
2) shoot proton of 400GeV/c in it
3) catch only particles going out this target and store the following=20
caracteristics:
a) event number
b) PDG Code of the particle
c) x,y,z at the exit of the target
d) px,py,pz,Energy at the exit of the target
e) x_p,y_p,z_p of the production vertex
f) px_p,py_p,pz_p,E_p at the production vertex
g) weigth of the particle
4) store the informations in some ways (ASCII file may be sufficient).
Along this program I have partially succeeded, and for instance I do
not=20
manage to get the variables defined at production vertex for only the=20
particle exiting the target.
Below I give you my modified fluscw.f and the cible.inp data cards. May
be=20
someone can spend some times to help me...
Jean-Eric
--------------------------------------- FLUSCW.F
---------------------------
double precision FUNCTION FLUSCW(IJ,PLA,TXX,TYY,TZZ,WEE,XX,YY,ZZ,
+ NREG,IOLREG,LLO,ICALL)
************************************************************
c
c Write in unit 25 the particles exiting the target.
c Unit 25 will be the input file of the collector (horn)
c simulation
c
c************************************************************
include '(IOUNIT)'
include '(DBLPRC)'
include '(DIMPAR)'
include '(TRACKR)'
double precision uPx, uPy, uPz
integer EvtCount
save EvtCount
data EvtCount /0/
LOGICAL LFIRST
SAVE LFIRST
DATA LFIRST /.true./
* return message from first call
if(LFIRST)then
OPEN(UNIT=3D25, FILE=3D'input.dat',STATUS=3D'NEW')
write(LUNOUT,*)'FLUSCW called'
LFIRST =3D .false.
endif
if(ij.eq.1.and.IOLREG.eq.2.0.and.NREG.eq.3.0.and.
+ ZZ.lt.1e-6) then
c A proton enters in the target: new event.
EvtCount =3D EvtCount +1
endif
if(IOLREG.eq.3.0.and.NREG.eq.2.0) then
c compute momentum in the 3 dirs
uPx =3D Ptrack*TXX
uPy =3D Ptrack*TYY
uPz =3D Ptrack*TZZ
write(25,200)EvtCount,IJ, XX, YY, ZZ, uPx, uPy,
+ uPz,Etrack,WEE
endif
200 format(I8,I3,F10.5,F10.5,F10.5,E14.6,E14.6,E14.6,F8.1,
+ F8.1,E12.4)
FLUSCW =3D 1.0
END
---------------------------------------- CIBLE.INP
----------------------
TITLE
Proton beam interaction in a beryllium target
DEFAULTS NEW-DEFA
*23456789 123456789 123456789 123456789 123456789 123456789 123456789=20
123456789
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
..+...
BEAM -400.0
PROTON
BEAMPOS 0.0 0.0 -10.0
GEOBEGIN COMBINAT
target
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
..+...
SPH 1 0.0 0.0 0.0 150.0
SPH 2 0.0 0.0 0.0 140.0
RPP 3 -8.0 8.0 -0.1 0.1 0.0 80.0
END
* black hole
1 5 1 -2
* vacuum
2 5 2 -3
* target
3 5 3
END
GEOEND
*23456789 123456789 123456789 123456789 123456789 123456789 123456789=20
123456789
*MATERIAL 80.0 200.59 13.5460 16.0 MERCURY
*
* External Black Hole
ASSIGNMAT 1.0 1.0
* Vacuum
ASSIGNMAT 2.0 2.0
* target (Standard Beryllium)
ASSIGNMAT 5.0 3.0
*
*23456789 123456789 123456789 123456789 123456789 123456789 123456789=20
123456789
*
EMF
EMFCUT -0.0002 -0.0002 1.0 3.0
STEPSIZE 0.0005 0.01 1.0 3.0
****SCORE 208.0 211.0
OUTLEVEL 1.0 7.0
* **** Scoring ****
EXTRAWEI 1.0
*RESNUCLEI 3.0 33.0 3.0 1.0
Dummy
*23456789 123456789 123456789 123456789 123456789 123456789 123456789=20
123456789
USRBDX 1.0 201.0 48.0 2.0 3.0 1.0 target
USRBDX 10000. 0.01 1.0 1.
&
*
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
..+...
RANDOMIZE 1. 0. 0. 0. 0. 0.
0.
START 200000.0 99999999. 0.0 0.0
STOP
........................................................................
...
.LAL - IN2P3 - CNRS
.LAL - B.P 34 - 91898 Orsay Cedex - France
.Piece 108
.Tel +33 (0)1 64 46 84 29
.Fax +33 (0)1 64 46 83 97
........................................................................
...
........................................................................
...
.LAL - IN2P3 - CNRS
.LAL - B.P 34 - 91898 Orsay Cedex - France
.Piece 108
.Tel +33 (0)1 64 46 84 29
.Fax +33 (0)1 64 46 83 97
........................................................................
...
------_=_NextPart_001_01C57E4E.F7A8B217
Content-Type: application/octet-stream;
name="stuprf.f"
Content-Transfer-Encoding: base64
Content-Description: stuprf.f
Content-Disposition: attachment;
filename="stuprf.f"
KiQgQ1JFQVRFIFNUVVBSRi5GT1IKKkNPUFkgU1RVUFJGCioKKj09PSBzdHVwcmYgPT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qCioKICAg
ICAgU1VCUk9VVElORSBTVFVQUkYgKCBJSiwgTVJFRywgWFgsIFlZLCBaWiwgTlVNU0VDLCBOUFBS
TVIgKQoKICAgICAgSU5DTFVERSAnKERCTFBSQyknCiAgICAgIElOQ0xVREUgJyhESU1QQVIpJwog
ICAgICBJTkNMVURFICcoSU9VTklUKScKKgoqLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSoKKiAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAq
CiogICAgIFNlVCBVc2VyIFBSb3BlcnRpZXMgZm9yIEZsdWthIHBhcnRpY2xlczogICAgICAgICAg
ICAgICAgICAgICAgICAgKgoqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKiAgICAgQ3JlYXRlZCBvbiAgMDkgb2N0
b2JlciAxOTk3ICBieSAgICBBbGZyZWRvIEZlcnJhcmkgJiBQYW9sYSBTYWxhICAqCiogICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJbmZuIC0gTWlsYW4g
ICAgICAgKgoqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICoKKiAgICAgTGFzdCBjaGFuZ2Ugb24gIDE0LWF1Zy05OSAg
ICBieSAgICBBbGZyZWRvIEZlcnJhcmkgICAgICAgICAgICAgICAqCiogICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgoq
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICoKKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCioKICAgICAgSU5DTFVERSAnKEVWVEZMRykn
CiAgICAgIElOQ0xVREUgJyhTVEFDSyknCiAgICAgIElOQ0xVREUgJyhUUkFDS1IpJwoqCiAgICAg
IExPVVNFICAgKExTVEFDSykgID0gTExPVVNFCiAgICAgIERPID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KiAgfCAgU2F2
ZSBpbnNpZGUgU3BhcmVrIHRoZSBwcm9kdWN0aW9uIHBvc2l0aW9uOgogICAgICAgICBTUEFSRUsg
KDUsTFNUQUNLKSA9IFhYCiAgICAgICAgIFNQQVJFSyAoNixMU1RBQ0spID0gWVkKICAgICAgICAg
U1BBUkVLICg3LExTVEFDSykgPSBaWgogICAgICAgICBTUEFSRUsgKDgsTFNUQUNLKSA9IFRLRSAo
TFNUQUNLKQogICAgICBFTkQgSUYKKiAgfAoqICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSoKKiAgSW5jcmVtZW50IHRo
ZSB0cmFjayBudW1iZXIgYW5kIHB1dCBpdCBpbnRvIHRoZSBsYXN0IGZsYWc6CiAgICAgIElGICgg
TlVNU0VDIC5HVC4gTlBQUk1SICkgVEhFTgogICAgICAgICBJRiAoIE5UUkNLUyAuRVEuIDIwMDAw
MDAwMDAgKSBOVFJDS1MgPSAtMjAwMDAwMDAwMAogICAgICAgICBOVFJDS1MgPSBOVFJDS1MgKyAx
CiAgICAgICAgIElTUEFSSyAoTUtCTVgyLExTVEFDSykgPSBOVFJDS1MKICAgICAgRU5EIElGCiAg
ICAgIFJFVFVSTgoqPT09IEVuZCBvZiBzdWJyb3V0aW5lIFN0dXByZiA9PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PSoKICAgICAgRU5ECgo=
------_=_NextPart_001_01C57E4E.F7A8B217--
This archive was generated by hypermail 2.1.6 : Fri Jul 01 2005 - 17:57:02 CEST