#!/bin/csh # Previous line indicates the beginning of a C shell script #-------------------------------------------------------------------- #runsingmu # #Sample title file to submit batch job (under UNIX) to simulate single # muons with CMSIM # Comments by R.Breedon, March-May 1998 # For more information, see incomplete and sometimes inaccurate entries # in the CMSIM User's Guide. Also see documentation for D0GSTAR # (especially FFread keywords), which was based on CMSIM at http:// # www-d0.fnal.gov/d0dist/dist/packages/d0gstar/devel/docs/html/d0gstar.html #--------------------------------------------------------------------- #Note that this file must have execute permission (e.g. chmod a+x runsingmu) # #Submit by typing: runsingmu $1 $2 $3 # where $1 = chosen random number (1 to 256) # $2 = chosen number of simulated muons # $3 = pT (GeV) of single muons # #Setup for 'development version' of CMSIM (sets environment variable CMS_VER) cmsdev #Titles for this batch job are put into a temporary directory (here on a # disk labelled /tmp) to allow multiple CMSIM batch jobs to run on the same # processor without interfering cd /tmp if ( -d $USER == 0 ) mkdir $USER cd /tmp/$USER if ( -d Run$1_$2_$3 == 0 ) mkdir Run$1_$2_$3 cd Run$1_$2_$3 #rm * echo created temporary directory /tmp/$USER/Run$1_$2_$3 if ( -f cms$CMS_VER.ttl == 1) rm cms$CMS_VER.ttl #if ( -f chetc.dat == 1) rm chetc.dat #if ( -f xsneut.dat == 1) rm xsneut.dat #ln -s $CMS_PATH/dat/chetc.dat chetc.dat #ln -s $CMS_PATH/dat/xsneut.dat xsneut.dat cat < cms$CMS_VER.ttl LIST C C Set "debug" flags: First event to dump, Last event, Print frequency C First event < 0 turns on additional dumping during GEANT initialization C after which it is set to its absolute value for event dump control. C The action of the event dumping is determined for both interactive and C batch running of CMSIM by the values set in SWIT. C For GEANT: Print frequency is independent of First and Last event and the C values in SWIT (it types out one line for every event modulo the value C of Print frequency) DEBUG -1 1 1 C DEBUG -1 100 1 * GPGKIN GPCXYZ GSXYZ GPHITS LULIST REFIT SWIT 1=0 2=0 3=0 5=0 6=0 7=2 8=100 C * 1st level optimization OPTI 2 C HADR 1 (GHEISHA) C HADR 2 (No secondaries) C HADR 3 (GHEISHA) C HADR 4 (GCALOR) C HADR 5 (MICAP) HADR 6 (FLUKA) FLUX FALSE TWOP FALSE CUTS 1=1.e-5 (CUTGAM) 2=1.e-5 (CUTELE) 3=0.001 (CUTNEU) 4=0.001 (CUTHAD) CUTS 5=0.001 (CUTMUO) 11=250. (tofmax) HSTA 'TIME' 'SIZE' 'MULT' 'NTRA' 'STAK' TIME 3=0 (NEVER TEST TIMEL EVENT) TIME 2=10. (TIME LEFT FOR UGLAST) RUNG 1 1 (USER RUN AND FIRST EVENT NUMBER) SELE 1 C------------------------------------------------------------------- C Nominal collision point and sigmas (cm) Lumi/10**34 BEAM 0. 0. 0. 0.0015 0.0015 5.3 0.1 geom 'cmse' 3 c GEOM 'CMSE' 3 'VCAL' 21 C 'CMSE' 3 'SVTX' 23 'MSGC' 13 (11 Si disk) C 'CMSE' 3 'SVTX' 33 'MSGC' 13 (10 Si disk) C 'CMSE' 3 'SVTX' 13 'MSGC' 13 ( 6-wheel, 13-disk) C 'HCAL' 0 C 'ECAL' 0 C C **Activate/Deactivate detector subsystems** C Sensitize (1) or de-sensitize (-1) subsystems following the hierarchy in C $CMS_DB/setup.tz (i.e., 'CALO' -1 turns off HITS simulation for VCAL, HCAL C and ECAL). Note that listed keywords must be in setup.tz, at least when C getting the geometry from TZ files (see RGET below). C This seems to determine what is entered into Event ntuple 901. SETS 'CMSE' 1 'CALO' -1 'TRAK' -1 C C DBUG 'CMSE' 1 'MCFX' 2 'VCAL' 0 DBUG 'CMSE' -1 C C **Book ntuples** C Controls histos and ntuples: output in CFIL 'HBKO' '... ' C HBOOK 'CMSE' 0 HBOOK 'CMSE' 63 C HBOOK 'CMSE' 15 C C **Digitization** C (Choose 'MCFX' 2 to fill ntuple 400) DIGI 'CMSE' 1 'MCFX' 2 C C **Trigger Primitives** TRGP 'CMSE' 0 C C **Hits reconstruction** RHIT 'CMSE' 1 'MCFX' 1 C C **Track reconstruction** C RECO 'CMSE' 0 'muon' 1 RECO 'CMSE' 1 C C **Neutron background ('junk') hits** C Adds partially correlated hits to CSCs based on parametrization of hits C arriving >150ns after bx JUNK 'CMSE' 0 C C **Pile up events** PILE 'CMSE' -1 C C **Magnetic field** FIEL 1.0 1.0 C C **Kinematics** (see choices at ...) C In this case, shoot pT=$3 GeV single mu+ through the acceptance region C of the entire muon system C Single particle mu+ eta(min) eta(max) phi(min) phi(max) pT(min) pT(max) kine 1 5. -2.4 2.4 0. 360. $3. $3. C (Note the decimal point required after the parameter entries since they C must be real numbers) C C **SAVE/GET**: Standard GEANT control cards to control structures I/O C in FZ format. (Standard GEANT structure names like HEAD,KINE,VERT,HITS C and DIGI are valid, as well as non-standard identifiers like RHIT and RECO) C GET 'HEAD' 'KINE' 'VERT' 'HITS' 'DIGI' C SAVE controls what event information is written into FZ file in CFIL 'EVTO' C (Generally to save disk space one writes only the banks one requires) C SAVE 'HEAD' 'KINE' 'VERT' 'HITS' 'DIGI' C C **RSAV/RGET**: Standard GEANT control cards to control structures I/O C in RZ format. Keyword 'INIT'controls writing/reading of the full detector C description to/from an RZ file. C Un-comment next line to read geometry from RZ file in CFIL 'DETI' RGET 'INIT' C If RGET is commented out, geometry will be constructed from default TZ titles C (typically one for each sub-detector) except for any number of C user-specified files in CFIL 'GTIT' C Un-comment next line to write geometry to RZ file in CFIL 'DETO' '... ' C RSAV 'INIT' C C **User database specification** (Note that space after file name is required) CFIL 'DETI' '$CMS_DB/geom_init_tdr.rz ' C 'DETO' '$CMS_DB/geom_init_tdr.rz ' 'HBKO' '/diskscr1/breedon/bin/rz/muon_$1_$2_$3.rz ' RUNG 1 1 (USER RUN AND FIRST EVENT NUMBER) RNDM $1 C **Trigger** (specify chosen number of events, here set by parameter $2) TRIG $2 C **Check magnetic field** C Books and fills standard magnetic field histograms accessible in PAW C in \\LUN1\USER C CHKF -1 C stop EOI switch ($PLISITE) case 'FNAL' : #IF FNAL setenv logname "/home/breedon/digi/`/usr/local/bin/funame -n`_digi_$1_$2_$3.log" breaksw case 'WISC' : #IF WISC setenv logname "/home/breedon/digi/`hostname`_muon_$1_$2_$3.log" breaksw default: #IF -FNAL setenv logname "/home/breedon/v112/log/`hostname -s`_muon_$1_$2_$3.log" endsw switch ($PLISITE) case 'FNAL' : $CMS_EXE/cms"$CMS_VER"b.exe < cms$CMS_VER.ttl > $logname breaksw default: nice +20 $CMS_EXE/cms"$CMS_VER"b.exe < cms$CMS_VER.ttl > $logname & endsw echo ---------------------------------------- echo $0 batch job submitted `date` echo ---------------------------------------- #: end of script