210 likes | 343 Views
TFluka Implementation and Status. Andreas Morsch ALICE Offline Week 16/9/2004. User/Transport Code Interface. Geometry. Stepping. Configuration. FLUKA. Magnetic Field. Particle Source. Stacking. Implementation in trad. FORTRAN frameworks:
E N D
TFlukaImplementation and Status Andreas Morsch ALICE Offline Week 16/9/2004
User/Transport Code Interface Geometry Stepping Configuration FLUKA Magnetic Field Particle Source Stacking Implementation in trad. FORTRAN frameworks: User routines / common blocks + text files (input cards)
TFluka TFluka TFluka TFluka TFluka TFluka TFluka TFluka TFluka TFluka TFlukaMCGeometry TGeoMCGeometry TFlukaCutOption TFlukaConfigtOption TFlukaConfigOption TFlukaConfigtOption TFlukaCutOption TFlukaConfigtOption TFlukaCutOption TFlukaCutOption Class Structure idnrwr g1wr g1rtwr conhwr inihwr jomiwr lkdbwr lkfxwr lkmgwr lkwr nrmlwr rgrpwr isvhwr magfld TVirtualMC eedraw endraw mgdraw sodraw usdraw source abscff dffcff queffc rflct rfrndx stupre stprf TFluka Text Input Fluka Geometry Navigation FLUKA Fluka User Routines
VMC Interface Layer TVirtualMC TVirtualMCApplication TVirtualMCStack TFluka AliRun AliStack AliMC ALICE Specific
TFluka TFluka TFlukaCerenkov Geometry • Before: Flugg + Geant4 • Very unstable • Many crashes • Now • TGeo (see A. Gheata’s presentation) • TFlukaCerenkov to store optical properties • Magnetic field: magfld.cxx using TVirtualMCApplication::Field TGeoMaterial TGeoMedium
Geometry/Materials • Material definition and assignment via FLUKA input cards • MATERIAL • COMPOUND • LOW-MAT • ASSIGNMAT • Automatic, on request, generation of PEMF file (alice.pemf) needed for simulation of electromagnetic processes. • Fractional Z used by some detectors causes problems and will lead to un-precise or wrong simulation result • Request to change this using corrections provides by Ernesto Lopez • Not yet completed • Provisional automatic run-time fixes help to make the program running alice.inp TFlukaMCGeometry alice.pemf
Configuration • Using physics and cuts configuration is done via standard FLUKA formatted input file. • After initialisation input cards are added to a file corealice.inp to produce the input file alice.inp • Since input cards cannot be produced on the flight during initialisation all user cuts and process switches are collected in two TObjArrays containing instances of TFlukaCutOption and TFlukaConfigOption.
Configuration • Some solutions and open problems • HADR=0 implemented through THESHOLD input card • DCAY=0 not yet implemented • Kinetic energy cut for n, charged hadrons, muons not yet possible material by material
Particle Sources • Primary particles • source() gets primary particles from TVirtualMCStack • Secondary “User” Particles • Before getting the next primary particle source() checks if there are any unhandled secondary particles. If yes, they are put on the FLUKA stack.
Stepping • Fluka user routines rewritten in C++ • Call TVirtualMCApplication::Stepping • Pass stepping information to TFluka • current track ID, current region, process ID, ... • endraw • Called for energy deposition event • Handle Cerenkov quantum efficiency the G3 way • usdraw • Interaction identified by icode • mgdraw • Normal step • Signal track being resumed after secondary tracking • bxdraw • Boundary crossing • Double step signaling exiting and entering
G3/FLUKA: Differences in Stepping Behavior Sensitive Volume 2 1 Geant 3 1: entering 1: exiting 2: entering 2: exiting FLUKA 1: entering 1: disappeared 2: entering 2: exiting 1: entering 1:exiting 2 hits 3 hits
Stepping Actions • StopTrack() implemented for • Tracks in magnetic field • flag idisc in magfld() • Cerenkov Photons • Setting absorption coefficient to BIG value for one step. • SetMaxStep() • Cannot be implemented • Problem for TPC • Find solution by increasing stepping precision in TPC sensitive volume ?
Decays • Interfacing with TVirtualDecayer not foreseen in the near future. • However, especially the ForceDecay options are needed for signal production.
Stacking • FLUKA uses private stack during transport • Exception: Particles produced by user during stepping. Example: Feed-back photons • TVirtualMCStack acts as observer and mirrors FLUKA stack using the “hooks”: • stupre.cxx for particles from electromag. int. • stuprf.cxx for particles from hadronic int. • crnkvp.cxx for Cerenkov Photons
Stacking • For some processes (bremsstrahlung, delta-electrons, ...), FLUKA interrupts the tracking of the mother particle in order to follow the secondary first. • However, AliStack assumes that all daughter particles come in a continues series. For example firstDaughter = 5, lastDaughter = 8, means 5, 6, 7, 8 are daughter particles of the same mother. • AliStack::ReorderKine() reorders the stack entries after tracking of each primary particle. • New method TVirtualMC::SecondariesAreOrdered() used to communicate order of secondaries to TVirtualStack.
Organisation of the code TFluka fluka macro Fluka Config.C elasct.bin fluodt.dat input alice.pemf core alice .inp Sternheimer. dat neuxsc.bin nuclear.bin scripts runfluka geo. sh tmp sigmapi.bin
Proposed Validation Process • Phase I • For each detector • Try to run full event • Crashes ? Error messages ? • By-eye inspection of results • Event display • Compare basic hit distributions G3/FLUKA • Validate consistency of the stack • Hit -> track relations • mother<-> daughter relations • Phase II • Physics Validation • Comparison to test beam data
HMPID: 5 GeV Pions Geant3 FLUKA
Conclusions • Main stumbling blocks removed • Flugg replaced by TGeo • Automatic pem-file generation • Consequences of transport order • Stack reordering • Track resuming signaled to user • TFluka is ready for detailed testing • Consolidation of TGeo-FLUKA interface • see next talk