This file lists details of how ROGUE runs and how to modify it. It is intended only for people who are familiar with the code and need to modify it. ** PARTICLE.DAT Every particle that ROGUE knows about has a listing. Charge conjugates have an abreviated listing and decay modes etc. are taken from the particle. Each particle is listed starting with a line of asterisks, the next line conatins the particle number which will appear as the particles ID number in the God's block, the particle name, the particle number of the charge conjugate (the same as the particle number if it is it's own canjugate), the mass, the decay c*tau, charge, 2*spin, parity, and the PDG particle code (for recognizing the particle in LUND output). If there are any decay modes, they appear on the following lines with either a blank in the first column or a "S", the branching ratio in percent, and the names of the daughters. When the file is read, branching ratios are renormalized to one, except for the decay modes marked with the "S" (for Save). There are no precise positions for any of the numbers or words, only the order is important. Charge conjugates list a particle number, a name and the words "charge conjugate". The first 32 particles should not be moved. Simulation of decays, tracing, scattering, bremming, conversions, HC etc. all make hard-wired checks on particle ID. Non-charm resonances appear below 100. New ones can be added between 61 and 99 with no modifications to the code. Charm particles start with 100, mesons in the range 100 to 149 and baryons starting with 150. These ranges also need to be preserved because the generation and scattering make hard-wired checks. New particles of the appropriate type can be added in these ranges. If the charm particles need to be moved to allow for many new resonances for example, the routines that need to be modified are RGGEN, RGCHARM, RGMCS, and RGPURGE. "Charge conjugates" must appear in the particle list after the particle. Daughters listed in the decay of a particle need to be defined before they are referenced. This means that the list is approximently in increasing mass order. There are a few aliases in RGTRAN such as ELECTRON=E-. ** What needs to be updated RGPERIOD The rogue run number IRGRUN should be selected from real run numbers according to targeting*luminosity. All run dependence should be triggered off of this. The target position should be updated. A segmented target should probably be done with changing ZTUP and ZTDOWN to arrays. This will effect RGATARG and also RGPHOT where it checks for absorption of the charm photon and sets the primary. A change in the target geometry needs to be reflected in MCS.DAT. If there are massive changes in target scattering, this could possibly be handled by letting RGPERIOD update the scattering stops on the fly. RGBEAM Needs to be updated with a better electron spectrum when it is known. Also beam profile needs to be updated. Since the beam profile and divergence will probably be measured at the target as oppossed to the radiator, RGBEAM might pick x x' y and y' at the target, then project back upstream to the radiator, return that x and y as well as x' and y'. RGPHOT, RGPILE would then add x' and y' to SLXE and SLYE from SHOWER. MCS.DAT,MAT.DAT Needs to be reviewed, PWC Z's may change and straw tubes need to be added. SHOWER Assumes a 27% radiator 40 meters upstream of the target, may need to be updated. RESHSIM Needs to be installed. MICROSIM Could be speeded by by creating one stopping location per station as oppossed to per plane. CHAMSIM, RGTRANCHM Needs updated efficiences and last wires. CERSIM needs updated geometry in MNEWCEL.DAT. I pity the person stuck with this. In fact it might be easier to rewrite the Cherenkov simulation, it is far more complex than neccessary. HXVSIM,OHSIM Need updated efficiencies PILE, PILEMU Defaults should be updated when they are better known. RGTRIG Everything here needs to be reviewed. Straw tubes and muon These geometries, common blocks and the detectors themselves may change. ** Version file Every update should be recorded here. Sart with a new line: #nnn date your name Where nnn is the new version. RGVER.CDF should be updated with the new current version number. The subsequent lines in VERSION.DAT should explain the update. It might look like this: # 0 3-MAY-1994 RLC Creation # 1 DATE RLC COMMENTS ON FIRST UPDATE BLAH BLAH BLAH ** Muon run To make a tape simulating a muon run, replace RGGENE with a routine that creates the muon (see RGPILE) and set DOTRIG=F. Everything else should work normally. ** Diffractive production. Replace RGCROSS with an appropriate energy dependence. Replace RGGEN with a routine that calls RGENTER to create the psi. You probably want to specify the psi decay: GENERATE GAMMA(PSI(MU+,MU-)) and call RGENTER with mode=1. Everything else should work normally. ROGUE calling structure. To initialize: RGGENI RGREAD RGRDRG RGVER RGSSTEP LUGIVE PYINIT RGTRKI SPCRC STRAWGEOM TROCLO BFDATA MCRNITB RGSMCS CERINI MUGEOM RGSSTOP RGRECI USJINIT USMISC RGPLOT(-1) generation initialization read the DKSPEC file read the ROGUE control file read the version file, check updates decode the specified decays pass initializations to LUND initialize LUND tracing initialization read the MCS stops set stopping locations reconstruction initialization, begin run record user plots Loop over the requested number of events: RGGENE generate an event RGPHOT draw a charm photon RGPERIOD choose a pseudo run number and set target RGBEAM beam x and y SHOWER shower electron in radiator RGATARG check target acceptence RGCROSS cross section rejection RGGEN generation PYINKI tell LUND the photon energy PYEVNT LUND generate RGCHARM check generated state for requested state RGMODE draw a decay mode for D*'s if a D is requested RGENTER enter a particle in the God's block and decay it RGMASS draw a mass for a particle RGMODE draw a decay mode RGPHASE phase space RGPHASE RGPILE pile-up electrons and muons RGBEAM SHOWER RGTRKE clear arrays, trace an event RGTRKE2 init microstrips separately due to a parameter conflict RGTRK trace a particle RESHSIM HARE magnet tracing MICROSIM CHAMSIM CERSIM HCSIM ACCSIM RGMCS HXVSIM OHSIM IESIM RGROT RGTRIG RGTRANMIC RGTRANCHM RGTRANCER RGTRANSTR RGTRANMU RGPURGE RGGBSW RGRECE SYSANAL USPKEV RGGBDUMP RGPLOT(0) MCS rotate daughters of a particle set trigger bits sort, clean up microstrip hits PWC hits Cherenkov hits Straw tube hits Muon hits purge unwanted info from the God's block switch two particles in the God's block reconstruct an event user reconstruction if reconstruction is not called dump an event to the log file user plots At the end of the job: RGEND USJEND RGPLOT(1) user plots Three routines are not listed above: function RGRAN random number function GAUSS Gaussian random number subroutine POISSN Poisson distribution.