# haddInputFileNames = [] for tauPtResOption in tauPtResOptions: haddInputFileNames.append( os.path.join( outputFilePath, os.path.basename(fileNames_FWLiteTauPtResAnalyzer[tauPtResOption] ['outputFileName']))) haddShellFileName = os.path.join( outputFilePath, 'harvestTauPtResHistograms_%s_%s.csh' % (sampleZtautau, version)) haddOutputFileName = os.path.join( outputFilePath, 'analyzeTauPtResHistograms_all_%s_%s.root' % (sampleZtautau, version)) retVal_hadd = \ buildConfigFile_hadd(executable_hadd, haddShellFileName, haddInputFileNames, haddOutputFileName) haddLogFileName = retVal_hadd['logFileName'] #-------------------------------------------------------------------------------- def make_MakeFile_vstring(list_of_strings): retVal = "" for i, string_i in enumerate(list_of_strings): if i > 0: retVal += " " retVal += string_i return retVal # done building config files, now build Makefile... makeFileName = "Makefile_TauPtResAnalysis"
bsubFileNames_harvesting[sampleToAnalyze][channelToAnalyze][metResolution_label]['final_harvest_files']: # CV: # (1) file name of final harvesting output file is stored at index[1] in final_harvest_file-tuple # (cf. TauAnalysis/Configuration/python/tools/harvestingLXBatch.py) # (2) assume that .root files containing histograms for single sample and single channel # are copied to local disk via rfcp prior to running 'hadd' final_haddInputFileNames[channelToAnalyze].append( os.path.join(outputFilePath_channel, os.path.basename(final_harvest_file[1]))) final_haddShellFileNames[channelToAnalyze] = \ os.path.join(configFilePath, 'harvestSVfitPerformanceHistograms_%s.csh' % version) final_haddOutputFileNames[channelToAnalyze] = \ os.path.join(outputFilePath_channel, 'svFitPerformanceAnalysisPlots_all_%s.root' % version) retVal_final_hadd = \ buildConfigFile_hadd(executable_hadd, final_haddShellFileNames[channelToAnalyze], final_haddInputFileNames[channelToAnalyze], final_haddOutputFileNames[channelToAnalyze]) final_haddJobNames[channelToAnalyze] = 'final_hadd_%s' % channelToAnalyze final_haddLogFileNames[channelToAnalyze] = retVal_final_hadd['logFileName'] #-------------------------------------------------------------------------------- def make_MakeFile_vstring(list_of_strings): retVal = "" for i, string_i in enumerate(list_of_strings): if i > 0: retVal += " " retVal += string_i return retVal
fileNames_FWLiteTauPtResAnalyzer[tauPtResOption]['logFileName'] = logFileName_full #-------------------------------------------------------------------------------- #-------------------------------------------------------------------------------- # # build shell script for running 'hadd' in order to collect histograms # for all "seed", "add" and strip Pt thresholds into single .root file # haddInputFileNames = [] for tauPtResOption in tauPtResOptions: haddInputFileNames.append(os.path.join(outputFilePath, os.path.basename(fileNames_FWLiteTauPtResAnalyzer[tauPtResOption]['outputFileName']))) haddShellFileName = os.path.join(outputFilePath, 'harvestTauPtResHistograms_%s_%s.csh' % (sampleZtautau, version)) haddOutputFileName = os.path.join(outputFilePath, 'analyzeTauPtResHistograms_all_%s_%s.root' % (sampleZtautau, version)) retVal_hadd = \ buildConfigFile_hadd(executable_hadd, haddShellFileName, haddInputFileNames, haddOutputFileName) haddLogFileName = retVal_hadd['logFileName'] #-------------------------------------------------------------------------------- def make_MakeFile_vstring(list_of_strings): retVal = "" for i, string_i in enumerate(list_of_strings): if i > 0: retVal += " " retVal += string_i return retVal # done building config files, now build Makefile... makeFileName = "Makefile_TauPtResAnalysis" makeFile = open(makeFileName, "w") makeFile.write("\n")
for final_harvest_file in \ bsubFileNames_harvesting[sampleToAnalyze][channelToAnalyze][metResolution_label]['final_harvest_files']: # CV: # (1) file name of final harvesting output file is stored at index[1] in final_harvest_file-tuple # (cf. TauAnalysis/Configuration/python/tools/harvestingLXBatch.py) # (2) assume that .root files containing histograms for single sample and single channel # are copied to local disk via rfcp prior to running 'hadd' final_haddInputFileNames[channelToAnalyze].append( os.path.join(outputFilePath_channel, os.path.basename(final_harvest_file[1]))) final_haddShellFileNames[channelToAnalyze] = \ os.path.join(configFilePath, 'harvestSVfitPerformanceHistograms_%s.csh' % version) final_haddOutputFileNames[channelToAnalyze] = \ os.path.join(outputFilePath_channel, 'svFitPerformanceAnalysisPlots_all_%s.root' % version) retVal_final_hadd = \ buildConfigFile_hadd(executable_hadd, final_haddShellFileNames[channelToAnalyze], final_haddInputFileNames[channelToAnalyze], final_haddOutputFileNames[channelToAnalyze]) final_haddJobNames[channelToAnalyze] = 'final_hadd_%s' % channelToAnalyze final_haddLogFileNames[channelToAnalyze] = retVal_final_hadd['logFileName'] #-------------------------------------------------------------------------------- def make_MakeFile_vstring(list_of_strings): retVal = "" for i, string_i in enumerate(list_of_strings): if i > 0: retVal += " " retVal += string_i return retVal # done building config files, now build Makefile... makeFileName = "Makefile_SVfitPerformanceAnalysis_AHtautau"