Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:33:39

0001 #!/bin/bash
0002 
0003 echo $1 $2 $3
0004 
0005 if [ "$1" == "?" ] 
0006 then
0007         echo "methode : ./relval_gedGsfE [a(nalyze),f(inalize),s(tore),p(ublish)] [i(nteractif),j(ob)] [r(eco),f(ast),p(ileup)]"
0008         echo "defaut = a j r"
0009         exit
0010 fi
0011 
0012 if [ "$1" != "a" ]
0013 then
0014         if [ "$1" != "f" ] 
0015         then
0016                 if [ "$1" != "s" ] 
0017                 then
0018                         if [ "$1" != "p" ]
0019             then
0020                 echo "pas de choix etape" 
0021                 echo "defaut = analyze"
0022                 CHOIX_ETAPE='analyze'
0023                 CHOIX_JOB='8nh'
0024             else
0025                 echo "publish"
0026                 CHOIX_ETAPE='publish'
0027                 CHOIX_JOB='1nh'
0028             fi
0029         else
0030             echo "store"
0031             CHOIX_ETAPE='force'
0032 #            CHOIX_ETAPE='store'
0033             CHOIX_JOB='1nh'
0034                 fi
0035         else
0036                 echo "finalize"
0037                 CHOIX_ETAPE='finalize'
0038         CHOIX_JOB='8nh'
0039         fi
0040 else
0041         echo "analyze"
0042         CHOIX_ETAPE='analyze'
0043     CHOIX_JOB='8nh'
0044 fi
0045 
0046 echo "*** CHOIX_ETAPE : " $1 $CHOIX_ETAPE
0047 
0048 if [ "$2" != "i" ] 
0049 then
0050         echo "pas d'interaction"
0051         echo "defaut = batch"
0052         CHOIX_INTERACTION="./electronBsub ${CHOIX_JOB} /afs/cern.ch/cms/utils/oval run ${CHOIX_ETAPE}.Val"
0053 else
0054         echo "interaction"
0055         CHOIX_INTERACTION="/afs/cern.ch/cms/utils/oval run ${CHOIX_ETAPE}.Val"
0056 fi
0057 
0058 echo "*** CHOIX_INTERACTION : " $2 $CHOIX_INTERACTION
0059 
0060 if [ "$3" != "r" ] 
0061 then
0062         if [ "$3" != "f" ] 
0063         then
0064                 if [ "$3" != "p" ] 
0065                 then
0066                         echo "pas de choix calcul" 
0067                         echo "defaut = FULL"
0068                         CHOIX_CALCUL='Full'
0069                 else
0070                         echo "PILES PileUp"
0071 #                       list="TTbarStartup ZEEStartup"
0072                         list="ZEEStartup"
0073 #                       list="TTbarStartup"
0074                         for element in $list    
0075                         do   
0076                         echo "element =" $element   
0077                         done
0078     if [ ! -d "PU25" ];then
0079         echo "Creation of PU25 folder";
0080         mkdir PU25
0081     else
0082         echo "PU25 folder already created";
0083     fi
0084     if [ ! -d "PU50" ];then
0085         echo "Creation of PU50 folder";
0086         mkdir PU50
0087     else
0088         echo "PU50 folder already created";
0089     fi
0090                         CHOIX_CALCUL='PileUp'
0091                 fi
0092         else
0093                 echo "FAST"
0094         list="TTbarStartup ZEEStartup"
0095 #           list="ZEEStartup "
0096 #       list="TTbarStartup"
0097         for element in $list    
0098         do   
0099             echo "element =" $element   
0100         done
0101     if [ ! -d "FAST" ];then
0102         echo "Creation of FAST folder";
0103         mkdir FAST
0104     else
0105         echo "FAST folder already created";
0106     fi
0107                 CHOIX_CALCUL='Fast'
0108         fi
0109 else
0110     echo "FULL"
0111 #       list="ZEE_14 " # HGCal
0112 #       list="QCDPt15To7000Flat_14TeV " # HGCal
0113         list="ZEE_14 QCD_Pt-15To7000_Flat_14TeV SingleElectronPt35Extended " # HGCal
0114     for element in $list    
0115     do   
0116         echo "element =" $element   
0117     done
0118     if [ ! -d "GED" ];then
0119         echo "Creation of GED folder";
0120         mkdir GED
0121     else
0122         echo "GED folder already created";
0123     fi
0124     if [ "$1" != "p" ]
0125     then
0126         CHOIX_CALCUL='Full'
0127     else
0128         CHOIX_CALCUL='gedvsgedFull'
0129     fi
0130 fi
0131 
0132 echo "*** CHOIX_CALCUL : " $3 $CHOIX_CALCUL
0133 
0134 echo "initialization done ... running"
0135 echo "--"
0136 if [ "$CHOIX_ETAPE" == "store" -o "$CHOIX_ETAPE" == "force" ]
0137     then
0138     echo "== store =="
0139     for var in `ls DQM*.root`
0140         do
0141             echo $var
0142             i=${var:38}
0143             #echo $i
0144             #echo ${i:0:$((${#i}-12))}
0145             j=${i:0:$((${#i}-12))}
0146             echo electronHistos.$j.root
0147                         var_final=electronHistos.$j.root
0148                         cp $var $var_final
0149         done
0150 fi
0151 
0152 if [ "$CHOIX_ETAPE" == "publish" ]
0153 then
0154     echo "publish"
0155     if [ "$CHOIX_CALCUL" == "Fast" ]
0156     then
0157         echo "FAST"
0158             for j in VsFull VsFast
0159         do
0160                     echo "---------- $j"
0161             for i in $list
0162                     do 
0163                             echo " == ${CHOIX_INTERACTION}${CHOIX_CALCUL}${j}${i}_gedGsfE"
0164                                 ${CHOIX_INTERACTION}${CHOIX_CALCUL}${j}${i}_gedGsfE
0165                     done
0166         done
0167     else # no FAST
0168         echo "noFAST"
0169         for i in $list
0170             do 
0171                     echo " == ${CHOIX_INTERACTION}${CHOIX_CALCUL}${i}_gedGsfE"
0172                         ${CHOIX_INTERACTION}${CHOIX_CALCUL}${i}_gedGsfE
0173                 done
0174     fi
0175     rm dd*.olog dqm*.root
0176 else # no publish
0177     echo "no publish"
0178     for i in $list
0179                 do 
0180                         echo " == ${CHOIX_INTERACTION}${CHOIX_CALCUL}${i}_gedGsfE"
0181                         ${CHOIX_INTERACTION}${CHOIX_CALCUL}${i}_gedGsfE
0182                 done
0183 fi
0184