Changeset 8626 for trunk


Ignore:
Timestamp:
06/29/07 15:33:20 (17 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8625 r8626  
    3333       builddatasets.php to menu.php (function InitFindOffData), so that
    3434       the values are also available in sequinfo-aio.php
     35   
     36   * scripts/dospectrum:
     37     - completely new version using condor dag
     38   
     39   * scripts/preparemc:
     40     - new version
     41     - adapted path
     42     - giving mars not needed anymore
     43     - adapted to 8 digit run numbers for MC
    3544
    3645
  • trunk/MagicSoft/Mars/scripts/dospectrum

    r8482 r8626  
    11#!/bin/sh
    2 #
     2# 
    33# ========================================================================
    44#
     
    1818#
    1919#
    20 #   Author(s): Daniela Dorner  05/2006 <mailto:dorner@astro.uni-wuerzburg.de>
    21 #
    22 #   Copyright: MAGIC Software Development, 2000-2006
     20#   Author(s): Daniela Dorner  06/2007 <mailto:dorner@astro.uni-wuerzburg.de>
     21#
     22#   Copyright: MAGIC Software Development, 2000-2007
    2323#
    2424#
    2525# ========================================================================
    2626#
    27 #
    28 #
    2927##############################################################################
    3028#
    31 # This script creates the ganymed.rc files with different parameter sets (the
    32 # parameters 1 and 3 are changed in steps). Then the script runs ganymed and
    33 # sponde for this different parameter sets.
    34 #
    35 # variables, that have to be set by the user:
    36 #
    37 # - path          directory, where the files are stored
    38 # - mars          directory, where your Mars version is stored
    39 # - dataset       dataset file, which shall be used (filename without path)
    40 #                  the file has to be stored in the dataset directory in the
    41 #                  path
    42 # - par*step      step width for changing the parameter *
    43 # - par*numminus  number of steps going to smaller values of the parameter *
    44 # - par*num       number of steps for changing the parameter *
    45 # - spondenum     number of sponde rc file (also of the root and log file)
    46 # - ganymednum    number of ganymed root file
    47 #
    48 # Please make sure, that you provide the following files:
    49 # - $path/setup/ganymed$ganymednum.rc
    50 # - $path/setup/sponde$spondenum.rc
    51 # - $path/datasets/mcdataset-for-sponde.txt (if you use the script preparemc,
    52 #    this file is produced automatically)
    53 # - $path/datasets/$datasetfilename (you give the datasetfilename below, but
    54 #    you have to make sure, that it is in the directory $path/datasets
    55 #
    56 # To re-run ganymed (e.g. with new Software-Version), you have to delete
    57 # the ganymed*.root files or set a new ganymednum.
    58 # 
     29# This script is:
     30# - writing rc-files with different sets of cuts
     31#   the set of cuts can be steered with the variables
     32#   $par3step, $par3numminus, $par3num and
     33#   $par1step, $par1numminus, $par1num
     34#     par*step     step width for changing the parameter *
     35#                  (suggested value: 0.005)
     36#     par*numminus number of steps going to smaller values of the parameter *
     37#                  (starting value in your ganymed.rc file)
     38#     par*num      number of steps for changing the parameter *
     39#     par3: Cut1.Param3 from the ganymed.rc file
     40#     par1: Cut1.Param1 from the ganymed.rc file
     41# - writing a condor dag file for spectrum study
     42#   With submitting this dag file with condor_submit_dag to condor from your
     43#   Mars directroy you are running ganymed and sponde for all different rc
     44#   files. The condor dag man is taking care of the order of the jobs,
     45#   i.e. that sponde is started just when ganymed has been finished.
     46#
     47# To start several spondes please set the arrays $spondes.
     48# It is also possible to start new spondes without rerunning
     49# ganymed and/or the other spondes. To do so, please set the
     50# variables $doganymed and $spondedones accordingly
     51#
     52# Remark: You have to submit the condor dag file from your Mars directory.
     53# 
     54# For more detailed information read the comments directly before
     55# each variable.
     56#
    5957##############################################################################
    60 
    61 
    62 # to be set by the user
    63 path=/home/dorner/crabspectrum
    64 mars=/home/dorner/mars.cvs
    65 datasetfilename=datasetcrab2005-2.txt
    66 spondenum=0
    67 ganymednum=1
    68 # settings for parameter 3
     58#
     59
     60#
     61# instructions and setup of the script
     62# please set the variables according to your analysis
     63#
     64
     65# path for you analysis
     66path=/home/dorner/final_analysis
     67# path where your condor dagfile is stored and where you need
     68# the files processds.submit and processsponde.submit
     69condorpath=$path/condor
     70# path to store your resourcefiles
     71# you should have there the ganymed.rc, which you want to use
     72# and your sponde.rc files
     73rcpath=$path/resources
     74ganymedrc=$rcpath/ganymed_onoff.rc
     75# outpath for your spectrum results
     76# a directory for each set of cuts will be created there and
     77# the ganymed and sponde output will be stored in these directories
     78specpath=/results/spectrumSet2
     79# name of your dataset
     80# it has to be stored as dataset$dataset.txt in the directory
     81# $path/datasets
     82dataset="20060002"
     83# this is the name of the condor-dag file, which you have to submit
     84# with condor_submit_dag from your Mars directory
     85dagfile=$condorpath/set2spectrum.dag3
     86# here you define whether ganymed still has to be done
     87# if yes, set the variable $doganymed to "yes"
     88#doganymed="yes"
     89doganymed="no"
     90# sponde.rc files have to be in the directory $rcpath
     91# they need to have the naming sponde1.rc, sponde2.rc, sponde3.rc
     92# (numbers in the following array)
     93# the sponde.root files will be named in the same way (sponde(num).root)
     94spondes=( 1 2 )
     95# in this array you define whether the sponde is already done
     96spondedones=( "done" "" )
     97
     98# this is the mc dataset, which has been created with the script
     99# preparemc
     100mcdataset=$path/mc/mcdataset2.txt
     101
     102# values for par3
    69103par3step=0.005
    70104par3numminus=10
    71105par3num=13
    72 # settings for parameter 1
     106# values for par1
    73107par1step=0.005
    74108par1numminus=1
    75 par1num=7
    76 
    77 
    78 function printsetup()
    79 {
    80    echo "you set the following parameters: "
    81    echo " path:       $path "
    82    echo " ganymedrc:  $ganymedrc"
    83    echo " sponderc:   $sponderc"
    84    echo " dataset:    $dataset"
    85    echo " mcdataset:  $mcdataset"
    86    echo " spondenum:  $spondenum"
    87    echo " ganymednum: $ganymednum"
    88    echo " par1:       -$par1numminus to $par1num in $par1step steps"
    89    echo " par3:       -$par3numminus to $par3num in $par3step steps"
    90 }
    91 
    92 #general variables
    93 datasetpath=$path/datasets
    94 setuppath=$path/setup
    95 #resultpath=$path/ganyspec
    96 resultpath=$path/ganyspec`echo $datasetfilename | sed -e 's/[.]txt//'`
    97 dataset=$datasetpath/$datasetfilename
    98 mcdataset=$datasetpath/mcdataset-for-sponde.txt
    99 ganymedrc=$setuppath/ganymed$ganymednum.rc
    100 sponderc=$setuppath/sponde$spondenum.rc
    101 setuplog=$setuppath/setup`date +%F-%H-%M-%S`.log
    102 
    103 if ! ls $ganymedrc >/dev/null 2>&1
    104 then
    105    echo "couldn't find $ganymedrc."
    106    echo "please provide the file $ganymedrc and re-run the script"
    107    exit
    108 fi
    109 
    110 if ! ls $sponderc >/dev/null 2>&1
    111 then
    112    echo "couldn't find $sponderc."
    113    echo "do you want to continue anyhow? (ganymed will be done)"
    114    echo "please insert y, if you want continue"
    115    echo "              n, if you want quit"
    116 
    117    answer=`head -n 1`
    118    case $answer in
    119       y) echo "continue creating rc files and running ganymed"
    120          ;;
    121       n) echo "please provide the file $ganymedrc and re-run the script"
    122          exit
    123          ;;
    124       *) echo "your answer is not clear -> exit"
    125          exit
    126          ;;
    127    esac
    128    
    129 fi
    130 
    131 #start of the script
    132 printsetup
    133 printsetup > $setuplog
    134 
    135 mkdir -pv $resultpath
    136 
    137 echo "generating the ganymed.rc files with different parameter sets"
    138 # generating the ganymed.rc files with different parameter sets
     109par1num=7
     110
     111#
     112# end of setup
     113# beginning of script
     114#
     115
     116# some checks
     117# checking if the given files and paths are existing
     118if ! [ -e $mcdataset ]
     119then
     120   echo "Your mc dataset file $mcdataset does not exist."
     121   exit
     122fi
     123if ! [ -e $path$specpath ]
     124then
     125   echo "Your output path $path$specpath does not exist."
     126   exit
     127fi
     128if ! [ -e $path/datasets/dataset$dataset.txt ]
     129then
     130   echo "Your dataset file $path/datasets/dataset$dataset.txt does not exist."
     131   exit
     132fi
     133if ! [ -e $ganymedrc ]
     134then
     135   echo "Your ganymed rc file $ganymedrc does not exist."
     136   exit
     137fi
     138for (( l=0 ; l < ${#spondes[@]} ; l++ ))
     139do
     140   if ! [ -e $rcpath/sponde${spondes[$l]}.rc ]
     141   then
     142      echo "Your sponde rc file $rcpath/sponde${spondes[$l]}.rc does not exist."
     143      exit
     144   fi
     145done
     146
     147# get the parameters
    139148par3=`cat $ganymedrc | grep 'Cut1.Param3' | cut -d: -f2`
    140149par1=`cat $ganymedrc | grep 'Cut1.Param1' | cut -d: -f2`
    141 
    142 echo "parameter: 3 $par3 ,  1 $par1"
    143 
     150echo "parameters: "
     151echo "  par3= $par3"
     152echo "  par1= $par1"
     153echo ""
     154
     155# calculate the parameters with which you start
    144156start3=`echo $par3 - \( $par3numminus*$par3step \) | bc `
    145157start1=`echo $par1 - \( $par1numminus*$par1step \) | bc `
    146 echo "start: 1: $start1 3: $start3"
    147 
     158echo "start: "
     159echo "  par1: $start1 "
     160echo "  par3: $start3"
     161echo ""
     162
     163
     164# function to print the lines for ganymed to the dag file
     165function printganydagentry()
     166{
     167   if [ "$doganymed" = "yes" ]
     168   then
     169      echo "JOB  gany$name $condorpath/processds.submit"
     170   else
     171      echo "JOB  gany$name $condorpath/processds.submit DONE"
     172   fi
     173   echo "VARS gany$name path=\"$path\""
     174   echo "VARS gany$name out=\"$dir\""
     175   echo "VARS gany$name ds=\"$dataset\""
     176   echo "VARS gany$name num=\"$dataset\""
     177   echo "VARS gany$name rc=\"$rcfile\""
     178   echo ""
     179}
     180
     181# function to print the lines for sponde to the dag file
     182function printspecdagentry()
     183{
     184   sponderc=$rcpath/sponde$1.rc
     185   if [ "$2" = "done" ]
     186   then
     187      echo "JOB  spec$1_$name $condorpath/processsponde.submit DONE"
     188   else
     189      echo "JOB  spec$1_$name $condorpath/processsponde.submit"
     190   fi
     191   echo "VARS spec$1_$name path=\"/home/dorner/final_analysis\""
     192   echo "VARS spec$1_$name out=\"$outpath\""
     193   echo "VARS spec$1_$name rc=\"$sponderc\""
     194   echo "VARS spec$1_$name spondenum=\"$1\""
     195   echo "VARS spec$1_$name mcds=\"$mcdataset\""
     196   echo "VARS spec$1_$name num=\"$dataset\""
     197   echo ""
     198   echo "PARENT gany$name CHILD spec$1_$name "
     199   echo ""
     200}
     201
     202echo "writing dag file $dagfile for dataset $dataset"
     203echo "# dag file for dataset $dataset" > $dagfile
     204echo "" >> $dagfile
    148205val1=$start1
    149206val3=$start3
    150 
     207count=0
    151208for (( i=0 ; i < $par3num ; i++ ))
    152209do
    153210   for (( j=0 ; j < $par1num ; j++ ))
    154211   do
    155 #      echo "i: $i - j: $j ------- par1: $val1 and par3: $val3"
    156       dir=$resultpath/set${val1}_${val3}
    157       if ! ls $dir >/dev/null 2>&1
     212      name=${val1}_${val3}
     213      dir=$specpath/ganyspec$name
     214      outpath=$path$dir
     215      rcfile=$outpath/ganymed_${name}_onoff.rc
     216      if ! [ -d $outpath ]
    158217      then
    159          mkdir -pv $dir
     218         mkdir -v $outpath
    160219      fi
    161 #      rcfile=$dir/ganymed_${val1}_${val3}_onoff.rc
    162       rcfile=$dir/`basename $ganymedrc`
    163       if ! ls $rcfile >/dev/null 2>&1
    164       then
    165          cat $ganymedrc | sed -e s/"${par1}"/"   ${val1}"/ -e s/"${par3}"/"  ${val3}"/ > $rcfile
    166       else
    167          echo "rcfile $rcfile already exists"
    168       fi
     220      cat $ganymedrc | sed -e s/"${par1}"/"   ${val1}"/ -e s/"${par3}"/"  ${val3}"/ > $rcfile
    169221      val1=`echo $val1 + $par1step | bc`
     222      echo " writing dag entry for set of cuts par1: $val1, par3: $val3"
     223      echo "# ganymed and sponde for dataset $dataset with cuts $name" >> $dagfile
     224      echo "" >> $dagfile
     225      printganydagentry  >> $dagfile
     226      for (( k=0 ; k < ${#spondes[@]} ; k++ ))
     227      do
     228         printspecdagentry ${spondes[$k]} ${spondedones[$k]} >> $dagfile
     229      done
     230      echo "" >> $dagfile
     231      count=`echo $count + 1 | bc`
    170232   done
    171233   val3=`echo $val3 + $par3step | bc`
     
    173235done
    174236
    175 
    176 # running ganymed and sponde for different parameter sets
    177 
    178 # function running ganymed and sponde for a set of cuts
    179 function dospec()
    180 {
    181    cd $mars
    182 
    183    name=$set/ganymed`printf %08d $ganymednum`
    184    ganymedfile=$name.root
    185    if ! ls $ganymedfile >/dev/null 2>&1
    186    then
    187       cd $mars
    188 #      rc=`ls $set/ganymed_*onoff.rc`
    189       ganymedlog=$name.log
    190       echo "starting ganymed for set $set ..."
    191       if ! condor_run ./ganymed -b -f --n=$ganymednum --log=$ganymedlog --out=$set --config=$set/`basename $ganymedrc` $dataset >/dev/null
    192       then
    193          echo "condor is not working "
    194          return
    195       fi
    196    else
    197       echo "ganymed for set $set already done => continue with sponde"
    198    fi
    199 
    200    if ! ls $sponderc >/dev/null 2>&1
    201    then
    202       echo "ERROR: spondercfile $sponderc is missing"
    203       return
    204    fi
    205    spondefile=$set/sponde$spondenum-g$ganymednum.root
    206    spondelog=$set/sponde$spondenum-g$ganymednum.log
    207    if ! ls $spondefile >/dev/null 2>&1
    208    then
    209       echo "starting sponde for set $set ..."
    210       if ! condor_run ./sponde -b -f --log=$spondelog --config=$sponderc -f $ganymedfile $mcdataset $spondefile >/dev/null
    211       then
    212          echo "condor is not working "
    213          return
    214       fi
    215       echo "finished sponde for set $set ..."
    216    else
    217       echo "sponde $spondenum for set $set already done => please remove sponde files or give new spondenum"
    218    fi
    219 }
    220 
    221 
    222 sets=`find $resultpath -type d`
    223 for set in ${sets[@]}
    224 do
    225 #   echo "set: "$set
    226    if [ "$set" == "$resultpath" ]
    227    then
    228       continue
    229    fi
    230    dospec &
    231    sleep 3
    232 done
    233 
    234 
     237echo ""
     238echo "finished writing condor dag file "$dagfile
     239echo "in total $count different sets of cuts are used"
     240echo ""
     241echo "you can submit it now with \"condor_submit_dag -f $dagfile\" from your Mars directory"
     242echo ""
     243
  • trunk/MagicSoft/Mars/scripts/preparemc

    r8227 r8626  
    11#!/bin/sh
    2 #
    32# ========================================================================
    43#
     
    2019#   Author(s): Daniela Dorner  05/2006 <mailto:dorner@astro.uni-wuerzburg.de>
    2120#
    22 #   Copyright: MAGIC Software Development, 2000-2006
     21#   Copyright: MAGIC Software Development, 2000-2007
    2322#
    2423#
     
    3332#
    3433# variables, that have to be set by the user:
    35 # - dir          directory, where the mc sequence and dataset files are stored
     34# - path         directory, where the mc sequence and dataset files are stored
    3635#                 be careful: don't move the sequence files afterwards, as the
    3736#                 paths are stored in the datasetfiles
    38 # - mars         directory, where your Mars version is stored
    39 #                 only needed, if you want to create a rf-root-file for the
    40 #                 energy estimation
    4137# - zdmin        minimum zenith distance
    4238# - zdmax        maximum zenith distance
     
    4844# - numruns      num of runs, that are in the sequence file, which are used
    4945#                 for training (SequencesOn in $mcdataset)
    50 # - trainenergy  if set to 'yes', the rf for energy estimation is trained
     46#
     47# Remark: For the training of the RF for the energy estimation you need the
     48# macro trainengery.C in the path $path/macros in a modified version, i.e. the
     49# inputfile (mcdataset) and the outputfile (rf-root file) are given as
     50# options: $macrospath/trainenergy.C+\("\"$mcdataset\""\,"\"$rffile\""\)
    5151#
     52# Remark: You have to run the script in your Mars directory.
    5253#
    5354##############################################################################
    5455
    5556
     57path=/home/dorner/final_analysis
     58mcoutpath=$path/mc
     59macrospath=$path/macros
     60mcdataset=$mcoutpath/mcdataset.txt
     61mcdataset2=$mcoutpath/mcdataset2.txt
    5662
    57 #to be set by the user
    58 dir=/home/dorner/crabspectrum
    59 mars=/home/dorner/mars.cvs
    60 zdmin=5
     63zdmin=17
    6164zdmax=35
    6265psf=14
    63 modes=( "02" "04" ) # e.g. nowobble
    64 numruns=5
    65 # set here if you want to train a rf-engery-estimator
    66 #trainenergy=
    67 trainenergy="yes"
     66modes=( "02" ) # nowobble
     67numruns=3
    6868
     69# be careful with $date, when path changes
     70mcpath=/magic/montecarlo
    6971
    70 # begin of script
    71 datasetdir=$dir/datasets
    72 sequencedir=$dir/sequences
    73 setupdir=$dir/setup
    74 mcdir=/magic/montecarlo
    75 mcrawdir=$mcdir/rawfiles
    76 mcstardir=$mcdir/star
    77 mcdataset=$datasetdir/mcdataset-test-train.txt
    78 mcdataset2=$datasetdir/mcdataset-for-sponde.txt
    79 
    80 # make directories
    81 mkdir -pv $dir
    82 mkdir -v $sequencedir
    83 mkdir -v $datasetdir
    84 
    85 #calculation of the zbin
    8672zbinmin=`echo "scale=2 ; 100*(1 - c($zdmin*3.14/180))+1" | bc -l`
    8773zbinmax=`echo "scale=2 ; 100*(1 - c($zdmax*3.14/180))+1" | bc -l`
     74
    8875zbinmin=`echo $zbinmin | cut -d. -f1`
    8976zbinmax=`echo $zbinmax | cut -d. -f1`
    90 echo "zd: min: $zbinmin max: $zbinmax"
    91 echo "numruns: $numruns"
     77
     78echo "zd:   min: $zdmin max: $zdmax"
     79echo "zbin: min: $zbinmin max: $zbinmax"
     80echo "$numruns runs are classified as test the rest as train"
    9281
    9382j=0
    94 for mode in ${modes[@]}
     83for mode in $modes
    9584do
    96    echo "mode: "$mode
    9785   for (( i=$zbinmin ; i < $zbinmax ; i++ ))
    9886   do
    9987      zbin=`printf %02d $i`
    100       echo "zbin: $zbin"
    101       path=$mcrawdir/19$zbin/$mode/$psf
    102       runsforfirst=
    103 
    104       runs=(`ls $path 2>/dev/null | grep Gamma | cut -d_ -f2 | sed -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' | tr "\n" " "`)
     88      path=$mcpath/rawfiles/19$zbin/$mode/$psf
     89      runs=(`ls $path | grep Gamma | cut -d_ -f2 | sed -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' | tr "\n" " "`)
    10590      if [ "$runs" = "" ]
    10691      then
     
    10893         continue
    10994      fi
     95      echo "found ${#runs[@]} Gamma MC files in path "$path
    11096
     97      runsforfirst=""
    11198      firstrun=${runs[0]}
    11299      secondrun=${runs[${numruns}]}
     
    119106         unset runs[$k]
    120107      done
    121       mcrawdir2=`echo $mcrawdir | sed -e 's/\//\\\\\//g'`
    122       date=`echo $path | sed -e "s/$mcrawdir2\///" -e 's/\//-/g'`
    123 #      date=`echo $path | cut -c 22-31 | sed -e 's/\//-/g'`
     108      date=`echo $path | cut -d/ -f5-7 | sed -e 's/\//-/g'`
    124109     
    125       trainsequfile=$sequencedir/sequence$firstrunno.txt
     110      trainsequfile=$mcoutpath/sequence$firstrunno.txt
    126111      trainsequences[$j]=$firstrunno
    127112      echo "  writing train-sequfile "$trainsequfile
     
    133118      echo "DatRuns:         $firstrun$runsforfirst" >> $trainsequfile
    134119      echo "" >> $trainsequfile
     120      echo "MonteCarlo: Yes" >> $trainsequfile
     121      echo "" >> $trainsequfile
    135122
    136       testsequfile=$sequencedir/sequence$secondrunno.txt
     123      testsequfile=$mcoutpath/sequence$secondrunno.txt
    137124      testsequences[$j]=$secondrunno
    138       echo "  writing test-sequfile "$testsequfile
     125#      echo "writing test-sequfile "$testsequfile
    139126      echo "Sequence:        $secondrun" > $testsequfile
    140127      echo "Night:           $date" >> $testsequfile
     
    144131      echo "DatRuns:         ${runs[@]}" >> $testsequfile
    145132      echo "" >> $testsequfile
     133      echo "MonteCarlo: Yes" >> $testsequfile
     134      echo "" >> $testsequfile
    146135     
    147136      j=$j+1
     
    149138done
    150139
    151 
    152140echo "# test sequences: ${#testsequences[@]}"
    153141echo "# train sequences: ${#trainsequences[@]}"
    154 
    155 echo "writing dataset files $mcdataset and $mcdataset2"
    156142
    157143echo "AnalysisNumber: 1 " > $mcdataset
     
    173159   numtrain=${trainsequences[$i]}
    174160   notrain=`echo $numtrain | cut -c 0-4`
    175    echo "Sequence$numtrain.File: $sequencedir/sequence$numtrain.txt" >> $mcdataset
    176    echo "Sequence$numtrain.Dir:  $mcstardir/$notrain/$numtrain" >> $mcdataset
    177    echo "Sequence$numtrain.File: $sequencedir/sequence$numtrain.txt" >> $mcdataset2
    178    echo "Sequence$numtrain.Dir:  $mcstardir/$notrain/$numtrain" >> $mcdataset2
     161   echo "Sequence$numtrain.File: $mcoutpath/sequence$numtrain.txt" >> $mcdataset
     162   echo "Sequence$numtrain.Dir:  $mcpath/star/$notrain/$numtrain" >> $mcdataset
     163   echo "Sequence$numtrain.File: $mcoutpath/sequence$numtrain.txt" >> $mcdataset2
     164   echo "Sequence$numtrain.Dir:  $mcpath/star/$notrain/$numtrain" >> $mcdataset2
    179165
    180166   numtest=${testsequences[$i]}
    181167   notest=`echo $numtest | cut -c 0-4`
    182    echo "Sequence$numtest.File: $sequencedir/sequence$numtest.txt" >> $mcdataset
    183    echo "Sequence$numtest.Dir:  $mcstardir/$notrain/$numtrain" >> $mcdataset
    184    echo "Sequence$numtest.File: $sequencedir/sequence$numtest.txt" >> $mcdataset2
    185    echo "Sequence$numtest.Dir:  $mcstardir/$notrain/$numtrain" >> $mcdataset2
     168   echo "Sequence$numtest.File: $mcoutpath/sequence$numtest.txt" >> $mcdataset
     169   echo "Sequence$numtest.Dir:  $mcpath/star/$notrain/$numtrain" >> $mcdataset
     170   echo "Sequence$numtest.File: $mcoutpath/sequence$numtest.txt" >> $mcdataset2
     171   echo "Sequence$numtest.Dir:  $mcpath/star/$notrain/$numtrain" >> $mcdataset2
    186172done
    187173
    188174
    189 if [ "$trainenergy" == "yes" ]
    190 then
    191    echo "creating rf-root-file for energy-estimation..."
    192    cd $mars
    193    logfile=$setupdir/trainenergy.log
     175logfile=$mcoutpath/trainenergy.log
     176rffile=$mcoutpath/rf-energy.root
    194177
    195    root -q -b $mars/datacenter/macros/trainenergy.C+\("\"$mcdataset\""\,"\"$setupdir/\""\) | tee $logfile
    196 fi
     178echo "mcdataset: $mcdataset"
     179echo "rffile: $rffile"
     180echo "macrospath: $macrospath"
     181root -q -b $macrospath/trainenergy.C+\("\"$mcdataset\""\,"\"$rffile\""\) | tee $logfile
     182
Note: See TracChangeset for help on using the changeset viewer.