INSTRUCTIONS TO GENERATE MONTE CARLO There are 4 files of interest in /work/naia-clued0/bruce1/dimu_asym_2004/MC : run-mc : command macro that launches mc_runjob -macro=bruce.macro specifies working directory bruce.macro : specifies Pythia, d0gstar, d0sim, d0reco, and produces TMB's specifies destination directory ./dest, working directory ./work, sets minimum parton pT (PtGt 3.0), sets maximum number of generated Pythia events (1000000) and maximum number of selected Pythia events (500) bruce.rcp : specifies cuts for Pythia generation (before d0gstar) runTMB : to convert TMB's to TMBTree's To run: cd /work/naia-clued0/bruce1/dimu_asym_2004/MC cluesow run-mc Outputs in: ./dest To find out where logs are: find . -name "*.log" -print and obtain ./tmb-tree/jetreco/doc/jetreco.log ./work/test-04156151550/pythia/p14.05.01/task-stdout-stderr.log ./work/test-04156151550/d0gstar/p14.05.01/task-stdout-stderr.log ./work/test-04156151550/d0sim/p14.05.01/task-stdout-stderr.log ./work/test-04156151550/d0reco/p14.05.01/task-stdout-stderr.log ./work/test-04156151550/test-04156151550.sh.log ********************************************************** Here are the 4 files: run-mc : command macro that launches mc_runjob -macro=bruce.macro specifies working directory #!/bin/sh #CLUED0 -l cput=36:00:00 #CLUED0 -l pvmem=640mb #CLUED0 -l mem=512mb # to run: # cluesow run-mc # Lista los jobs en el pbs batch system # -u user # -n (indica nodo) # -f (full information) # qstat -u bruce1 -n echo "***** This JOB has landed in the CLUED0 node *****" uname -a echo "**************************************************" # This gets the environment . /etc/bashrc # Sets the current directory to the work directory # as specified by the batch system WORKDIR='NONE' pbssetup='/usr/local/etc/pbssetup.sh' if [ -r $pbssetup ]; then . $pbssetup if [ "$WORKDIR" == 'NONE' ] || [ "$WORKDIR" == "$HOME" ]; then echo "ERROR: WORKDIR is not set correctly, there is a problem with batch system!" exit 1 fi echo "INFO: Workdir is now $WORKDIR" else echo "ERROR: Could not find $pbssetup" exit 1 fi # Go to working directory on executing machine # this directory exists only in the executing machine #cd $WORKDIR # This is cluster wide. # path de trabajo donde estara el resultado (work,dest) cd /work/naia-clued0/bruce1/dimu_asym_2004/MC setup D0RunII p14.05.01 #setup mc_runjob v06-02-08 setup mc_runjob v06-02-11 # execute it mc_runjob -macro=bruce.macro # Copyback output in case some other place #cp -a * /work/naia-clued0/bruce1/dimu_asym_2004/MC/. ********************** bruce.macro : specifies Pythia, d0gstar, d0sim, d0reco, and produces TMB's specifies destination directory ./dest, working directory ./work, sets minimum parton pT (PtGt 3.0), sets maximum number of generated Pythia events (1000000) and maximum number of selected Pythia events (500) #MiniDB StandardD0 SaveOnMake LinkerOption pbsMemoryLimiter attach samglobal cfg samglobal define string ProducedByName bruce1 cfg samglobal define string OriginName fnal cfg samglobal define string Phase group-phase1 cfg samglobal define string FacilityName clued0 cfg samglobal define string Description test sample cfg samglobal define string DestinationDir ./dest cfg samglobal define string ProducedForName bruce1 cfg samglobal define string GroupName bphysics cfg samglobal define string JobName test- cfg samglobal define string Stream notstreamed cfg samglobal define string CurrentDir ./work cfg samglobal define string RunType Monte Carlo cfg samglobal define int UniquenessLevel 3 #LinkerEnv set MC_RUNJOB_CARD_PATH=/home/asanchez/work/cardfiles attach pythia cfg pythia define int NumRecords 1000000 cfg pythia define float EtaLt 4.2 cfg pythia define float EtaGt -4.2 cfg pythia define float PtGt 3.0 cfg pythia define string D0Release p14.05.01 cfg pythia define int UseMaxopt 1 cfg pythia define string UseEvtGen on cfg pythia define float CollisionEnergy 1960.0 cfg pythia define string PDFLibFunc CTEQ5L cfg pythia define string CardfileDir ckm cfg pythia define string Production qcd cfg pythia define string Decay stable-b-hadrons cfg pythia define string CardfileVersion v00-07-08 cfg pythia define int D0MessMaxEvents 200 #cfg pythia define int D0MessMaxEvents 10 cfg pythia define string D0MessRCPFile /work/naia-clued0/bruce1/dimu_asym_2004/MC/bruce.rcp #cfg pythia define string D0MessProcess bruce.rcp attach d0gstar cfg d0gstar define string KeepParticleCalEnergy off cfg d0gstar define string Geometry plate cfg d0gstar define string D0Release p14.05.01 cfg d0gstar define int UseMaxopt 0 attach d0sim cfg d0sim define string MergeMinBias on cfg d0sim define string MinBiOpt Poisson cfg d0sim define string CalorimeterNoise on cfg d0sim define string MinBiDataset ciea-mb-mcp14 cfg d0sim define string MinBiDir /work/cinvestres-clued0/asanchez/MB/mcp14/ cfg d0sim define float NumMinBi 0.8 cfg d0sim define int FarmBuildMBD 1 cfg d0sim define string D0Release p14.05.01 cfg d0sim define int UseMaxopt 1 attach d0reco cfg d0reco define string LinkToRundata on cfg d0reco define string FrameworkRCPName runD0reco_mc.rcp cfg d0reco define string D0Release p14.05.01 cfg d0reco define int UseMaxopt 1 attach runjob cfg runjob define string RunOption RunExec repeat 1 reset chain cfg pythia define int RunNumber 0 cfg pythia make seeds cfg d0gstar make seeds make job save print script cfg runjob run end return *************************************** bruce.rcp : specifies cuts for Pythia generation (before d0gstar) // $Id: d0_mess_b0jpsiks-mumu.rcp,v 1.1 2003/04/25 19:02:10 asanchez Exp $ // // File: d0_mess.rcp // // Author: Alberto Sanchez // Created: April 2003 // // Purpose: Control rcp for d0_mess event selector // Selects events with B0 and with two muons with // Pt>1.5 GeV/c and |Eta|<2.5 // string PackageName = "d0_mess" // turn on selector bool d0_mess_on = true int NumberOfCuts = 3 // un b-bbar o c-cbar en el evento con pT > 2.3 GeV string Cut1 = "(PdgId == 5 && Pt > 3.0) || (PdgId == 4 && Pt > 3.0)" string Cut2 = "(PdgId == -5 && Pt > 3.0) || (PdgId == -4 && Pt > 3.0)" // un muon con pT > 2.5 string Cut3 = "AbsPdgId == 13 && Pt > 2.5 && AbsEta < 2.1" //string Cut3 = "PdgId == 443 && ParentId == 511" //string Cut4 = "PdgId == 13 && Pt > 1.5 && AbsEta < 2.5 && ParentId == 443" //string Cut5 = "PdgId == -13 && Pt > 1.5 && AbsEta < 2.5 && ParentId == 443" //string Cut6 = "PdgId == 310 && ParentId == 511" ****************************************** runTMB : to convert TMB's to TMBTree's #!/bin/sh . /etc/bashrc # to run: # cluesow runTMB # # Lista los jobs en el pbs batch system # -u user # -n (indica nodo) # -f (full information) # qstat -u bruce1 -n cd /work/naia-clued0/bruce1/dimu_asym_2004/MC/tmb-tree #copy tarball # first must have done #cp /work/cinvestres-clued0/asanchez/d0c_tmb-p14.06.00-maxopt-Linux_07Jan2004000430.tar . #tar -xf d0c_tmb-p14.06.00-maxopt-Linux_07Jan2004000430.tar setup D0RunII p14.06.00 -O SRT_QUAL=maxopt setup d0tools # first create list of tmb's in /work/naia-clued0/bruce1/dimu_asym_2004/MC/tmb-tree : # ls -1 /work/naia-clued0/bruce1/dimu_asym_2004/MC/dest/d0reco/tmb* > tmbs.lst # and remove the *.py # or directly: # ls -1 /work/naia-clued0/bruce1/dimu_asym_2004/MC/dest/d0reco/tmb* \ | grep -v py > tmbs.lst # # tmbs.lst file with list of tmb's (one per line) # # output TMBTree in # tmb-tree/TMBAnalyze_x-p14.06.00-maxopt-Linux-tmbs.lst/tmb_tree.root # runTMBAnalyze -localrcp -localfwkrcp -localbuild -maxopt -nofpe -rcp=runTMBTreeMakerSAM_MC.rcp -rcppkg=tmb_analyze -filelist=tmbs.lst **********************************************