Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:41

0001 #!/bin/sh
0002 #
0003 # V.M. Ghete 2010-06-10
0004 #
0005 
0006 # minimum number of required arguments
0007 NR_ARG=1
0008 
0009 if [[ $1 == "-help" || $1 == "--help" || $# == 0 ]]; then
0010     echo
0011     echo "Run the L1 emulator starting from a RAW file"
0012 
0013     echo
0014     echo "Usage:              "
0015     echo "   cmsrel CMSSW_4_X_Y"
0016     echo "   cd CMSSW_4_X_Y/src"
0017     echo "   cmsenv"
0018     echo "   addpkg L1Trigger/Configuration"  
0019     echo "   cd L1Trigger/Configuration/test"  
0020     echo "   ./L1EmulatorFromRaw.sh EventSampleType Global_Tag"
0021     echo
0022 
0023     echo "Event sample type follow the cmsDriver convention: " 
0024     echo "   data"
0025     echo "   mc"
0026     echo
0027 
0028     echo "Global tag must be given in one of the following formats: " 
0029     echo "   auto:mc"
0030     echo "   auto:startup"
0031     echo "   auto:com10"
0032     echo "   MC_42_V13" 
0033     echo "   START42_V13" 
0034     echo "   GR_R_42_V18" 
0035     echo
0036     echo "Default:"
0037     echo "   data: auto:com10"
0038     echo "   mc: auto:startup"
0039     echo
0040     echo "NOTE: the sample and the global tag must be consistent"
0041 
0042     if [[ $# < ${NR_ARG} ]]; then
0043       echo -e "\n $# arguments available, while ${NR_ARG} are required. \n Check command again."
0044     fi
0045 
0046     exit 1    
0047 fi
0048 
0049 EventSampleType=$1
0050 GlobalTag=$2
0051 
0052 #
0053 
0054 if [[ ${EventSampleType} == "data" ]]; then
0055 
0056     if [[ ${GlobalTag} == '' ]]; then
0057         GlobalTag='auto:com10'
0058         echo "No global tag given. Using by default: ${GlobalTag}"
0059     fi
0060 
0061     if [[ `echo ${GlobalTag} | grep auto` ]]; then
0062         gTag=${GlobalTag}
0063     else
0064         gTag=FrontierConditions_GlobalTag,${GlobalTag}::All
0065     fi
0066 
0067     cmsDriver.py l1EmulatorFromRaw -s RAW2DIGI,L1 -n 100 \
0068         --conditions ${gTag} \
0069         --datatier 'DIGI-RECO' \
0070         --eventcontent FEVTDEBUGHLT \
0071         --data \
0072         --filein /store/data/Run2011A/MinimumBias/RAW/v1/000/165/514/28C65E11-E584-E011-AED9-0030487CD700.root,/store/data/Run2011A/MinimumBias/RAW/v1/000/165/514/44C0FC26-EE84-E011-B657-003048F1C424.root \
0073         --customise=L1Trigger/Configuration/customise_l1EmulatorFromRaw \
0074         --processName='L1EmulRaw' \
0075         --no_exec
0076 
0077         exit 0   
0078         
0079 elif [[ ${EventSampleType} == "mc" ]]; then
0080 
0081     if [[ ${GlobalTag} == '' ]]; then
0082         GlobalTag='auto:startup'
0083         echo "No global tag given. Using by default: ${GlobalTag}"
0084     fi
0085 
0086     if [[ `echo ${GlobalTag} | grep auto` ]]; then
0087         gTag=${GlobalTag}
0088     else
0089         gTag=FrontierConditions_GlobalTag,${GlobalTag}::All
0090     fi
0091 
0092     cmsDriver.py l1EmulatorFromRaw -s RAW2DIGI,L1 -n 100 \
0093         --conditions ${gTag} \
0094         --datatier 'DIGI-RECO' \
0095         --eventcontent FEVTDEBUGHLT \
0096         --mc \
0097         --filein /store/relval/CMSSW_5_2_0_pre4/RelValTTbar/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0033/02B4D46B-BB51-E111-A789-003048678A76.root,/store/relval/CMSSW_5_2_0_pre4/RelValTTbar/GEN-SIM-DIGI-RAW-HLTDEBUG/START52_V1-v1/0033/0EAB51E9-BD51-E111-8C43-003048679228.root \
0098         --customise=L1Trigger/Configuration/customise_l1EmulatorFromRaw \
0099         --processName='L1EmulRaw' \
0100         --no_exec
0101 
0102         exit 0   
0103         
0104 else
0105 
0106     echo "Option for sample type ${EventSampleType} not valid."
0107     echo "Valid options:"
0108     echo "   data"
0109     echo "   mc"
0110     
0111     exit 1
0112 
0113 fi
0114 
0115 
0116     
0117