Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:33:03

0001 #!/bin/bash
0002 
0003 # warning: these scripts don't work for replaces on parameters in parameter's psets
0004 #          see the added comment in PATLayer1_ReplaceDefaults_fast.cff
0005 #
0006 #
0007 # file name settings
0008 export baseDir=${CMSSW_BASE}/src/PhysicsTools/PatAlgos
0009 export parser=${CMSSW_BASE}/src/PhysicsTools/PatAlgos/scripts/patReplaceParser.pl
0010 export fastReplacer=${CMSSW_BASE}/src/PhysicsTools/PatAlgos/scripts/patReplaceFast.pl
0011 if [ ! -d $baseDir ]; then 
0012   echo "*** " $baseDir not found
0013   echo "*** " Please make sure to run scramv1 run -[c]sh first
0014   exit -1
0015 fi
0016 export layer0FamosSetup=${baseDir}/data/famos/patLayer0_FamosSetup.cff
0017 export layer0FileFull=${baseDir}/test/patLayer0_ReplaceDefaults_full.cff
0018 export layer0FileFast=${baseDir}/test/patLayer0_ReplaceDefaults_fast.cff
0019 export layer1FamosSetup=${baseDir}/data/famos/patLayer1_FamosSetup.cff
0020 export layer1FileFull=${baseDir}/test/patLayer1_ReplaceDefaults_full.cff
0021 export layer1FileFast=${baseDir}/test/patLayer1_ReplaceDefaults_fast.cff
0022 
0023 # make backups of the old ones
0024 if [ -e $layer0FileFull ]; then mv $layer0FileFull $layer0FileFull.bak; fi
0025 if [ -e $layer0FileFast ]; then mv $layer0FileFast $layer0FileFast.bak; fi
0026 if [ -e $layer1FileFull ]; then mv $layer1FileFull $layer1FileFull.bak; fi
0027 if [ -e $layer1FileFast ]; then mv $layer1FileFast $layer1FileFast.bak; fi
0028 
0029 # Define input directories
0030 export dataDir=${baseDir}/data
0031 export recDir=${dataDir}/recoLayer0
0032 export clDir=${dataDir}/cleaningLayer0
0033 export mcDir=${dataDir}/mcMatchLayer0
0034 export prodDir=${dataDir}/producersLayer1
0035 export selDir=${dataDir}/selectionLayer1
0036 
0037 # produce the replace-file
0038 cat > $layer0FileFull << EOF
0039 
0040 ############################
0041 ### PAT Layer-0 cleaning ###
0042 ############################
0043 `${parser} ${clDir}/caloJetCleaner.cfi`
0044 `${parser} ${clDir}/caloMetCleaner.cfi`
0045 `${parser} ${clDir}/electronCleaner.cfi`
0046 `${parser} ${clDir}/muonCleaner.cfi`
0047 `${parser} ${clDir}/pfTauCleaner.cfi`
0048 `${parser} ${clDir}/photonCleaner.cfi`
0049 
0050 ###############################
0051 ### PAT Layer-0 MC matching ###
0052 ###############################
0053 `${parser} ${mcDir}/muonMatch.cfi`
0054 `${parser} ${mcDir}/electronMatch.cfi`
0055 `${parser} ${mcDir}/photonMatch.cfi`
0056 `${parser} ${mcDir}/tauMatch.cfi`
0057 `${parser} ${mcDir}/jetMatch.cfi`
0058 
0059 ###############################
0060 ### PAT Layer-0 jets        ###
0061 ###############################
0062 `${parser} ${recDir}/jetTracksCharge.cff`
0063 
0064 
0065 EOF
0066 
0067 # adapt layer 1 replace-file for fast simulation
0068 cp $layer0FileFull $layer0FileFast
0069 ${fastReplacer} $layer0FileFast $layer0FamosSetup
0070 
0071 
0072 # produce the replace-file
0073 cat > $layer1FileFull << EOF
0074 
0075 ####################################
0076 ### PAT Layer-1 object producers ###
0077 ####################################
0078 `${parser} ${prodDir}/muonProducer.cfi`
0079 `${parser} ${prodDir}/electronProducer.cfi`
0080 `${parser} ${prodDir}/photonProducer.cfi`
0081 `${parser} ${prodDir}/tauProducer.cfi`
0082 `${parser} ${prodDir}/jetProducer.cfi`
0083 `${parser} ${prodDir}/metProducer.cfi`
0084 
0085 ####################################
0086 ### PAT Layer-1 Object Selectors ###
0087 ####################################
0088 `${parser} ${selDir}/muonSelector.cfi`
0089 `${parser} ${selDir}/electronSelector.cfi`
0090 `${parser} ${selDir}/photonSelector.cfi`
0091 `${parser} ${selDir}/tauSelector.cfi`
0092 `${parser} ${selDir}/jetSelector.cfi`
0093 `${parser} ${selDir}/metSelector.cfi`
0094 
0095 #################################
0096 ### PAT Layer-1 Count Filters ###
0097 #################################
0098 `${parser} ${selDir}/muonMinFilter.cfi`
0099 `${parser} ${selDir}/muonMaxFilter.cfi`
0100 `${parser} ${selDir}/electronMinFilter.cfi`
0101 `${parser} ${selDir}/electronMaxFilter.cfi`
0102 `${parser} ${selDir}/photonMinFilter.cfi`
0103 `${parser} ${selDir}/photonMaxFilter.cfi`
0104 `${parser} ${selDir}/tauMinFilter.cfi`
0105 `${parser} ${selDir}/tauMaxFilter.cfi`
0106 `${parser} ${selDir}/jetMinFilter.cfi`
0107 `${parser} ${selDir}/jetMaxFilter.cfi`
0108 `${parser} ${selDir}/leptonCountFilter.cfi`
0109 
0110 EOF
0111 
0112 # adapt layer 1 replace-file for fast simulation
0113 cp $layer1FileFull $layer1FileFast
0114 ${fastReplacer} $layer1FileFast $layer1FamosSetup