Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:46:51

0001 #!/bin/bash
0002 
0003 if (( ${#LOCALRT} < 4 ))
0004 then
0005     echo Please setup your runtime environment!
0006     exit
0007 fi
0008 
0009 FILE=$1
0010 
0011 RUN=${FILE##*/}
0012 RUN=${RUN#h4b.}
0013 RUN=${RUN%.A.0.0.root}
0014 
0015 echo "for run: ${RUN}"
0016 SM="SM22"
0017 
0018 ABFILE=AB-${SM}-${RUN}.root
0019 
0020 echo "making rechits in: ${ABFILE}"
0021 
0022 LPFILE=LP-${SM}-${RUN}.root
0023 
0024 echo "making laser shape file: ${LPFILE}"
0025 
0026 LPTXT=LP-${SM}-${RUN}.txt
0027 
0028 #exit
0029 
0030 EVENTLIMIT="-1";
0031 
0032 
0033 ### create the file
0034 CFGFILE1=/tmp/runLaserSHAPE_${USER}.cfg
0035 cat > ${CFGFILE1}<<EOF
0036 process LASERSHAPE = {
0037 
0038   untracked PSet maxEvents = {untracked int32 input = ${EVENTLIMIT}}
0039 
0040 // Loads the events from testbeam files
0041         source = PoolSource { 
0042                 untracked vstring fileNames = { 'file:${FILE}' }
0043 //                untracked int32 maxEvents = ${EVENTLIMIT}
0044         }
0045 
0046 module ecalEBunpacker = EcalDCCUnpackingModule {}
0047 
0048 module ecalLaser = EcalLaserShapeTools {
0049   untracked int32 verbosity = 0
0050   string hitCollection = "ecalEBuncalibFixedAlphaBetaRecHits"
0051   string digiCollection = ""
0052   string hitProducer = "uncalibHitMaker"
0053   string digiProducer = "ecalEBunpacker"
0054   string pndiodeProducer = "ecalEBunpacker"
0055   untracked string HistogramOutFile = "histos_devel.root"
0056   untracked string rootOutFile = "${LPFILE}"
0057   untracked string txtOutFile = "${LPTXT}"
0058 } 
0059 
0060 path p = { ecalEBunpacker, ecalLaser }
0061 
0062 }
0063 EOF
0064 
0065 
0066 
0067 
0068 # run cmsRun
0069 LPLOG=LP-LOG.txt
0070 rm -f ${LPLOG}
0071 cmsRun ${CFGFILE1} >& ${LPLOG} &
0072 
0073 wait
0074 
0075 echo "LASER SHAPE DONE"
0076 
0077 
0078 CFGFILE2=/tmp/runLaserRECO_${USER}.cfg
0079 cat > ${CFGFILE2}<<EOF
0080 process LASERRECO = {
0081 
0082 include "CalibCalorimetry/EcalTrivialCondModules/data/EcalTrivialCondRetriever.cfi"
0083 
0084 untracked PSet maxEvents = {untracked int32 input = ${EVENTLIMIT} }
0085 
0086 source = PoolSource {
0087   untracked vstring fileNames = { 'file:${FILE}' }
0088   untracked bool debugFlag = false
0089 }
0090 
0091 module ecalEBunpacker = EcalDCCUnpackingModule {}
0092 
0093 #PNlook module has been removed. read directly in laser analyzer
0094 
0095 module ecaluncalibrechit = EcalFixedAlphaBetaFitUncalibRecHitProducer {
0096   InputTag EBdigiCollection = ecalEBunpacker:
0097   InputTag EEdigiCollection = ecalEBunpacker:eeDigis
0098   string EBhitCollection = "EcalUncalibRecHitsEB"
0099   string EEhitCollection = "EcalUncalibRecHitsEE"
0100   untracked string AlphaBetaFilename = "${LPTXT}"
0101 }
0102 
0103 module out = PoolOutputModule {
0104   untracked string fileName = "${ABFILE}"
0105 }
0106 
0107 path p = { ecalEBunpacker, ecaluncalibrechit }
0108 
0109 endpath ep = { out }
0110 
0111 }
0112 EOF
0113 
0114 RECOLOG=RECO-LOG.txt
0115 rm -f ${RECOLOG}
0116 cmsRun ${CFGFILE2} >& ${RECOLOG} &
0117 
0118 wait
0119 
0120 echo "DIGI+RECO DONE"
0121 
0122 exit
0123 
0124 
0125 
0126 
0127