Public Member Functions | |
def | __init__ |
def | initCrab |
def | initProcess |
def | run |
def | writeCfg |
Public Attributes | |
config | |
crab_cfg | |
dir | |
outputfile | |
process | |
project | |
pset_name | |
pset_template | |
task |
Definition at line 6 of file DTAnalysisResiduals.py.
def DTAnalysisResiduals::DTAnalysisResiduals::__init__ | ( | self, | |
run, | |||
dir, | |||
config | |||
) |
Definition at line 7 of file DTAnalysisResiduals.py.
00008 : 00009 self.pset_name = 'dtAnalysisResiduals_cfg.py' 00010 self.outputfile = 'residuals.root' 00011 self.config = config 00012 self.dir = dir 00013 00014 self.pset_template = 'CalibMuon.DTCalibration.dtResidualCalibration_cfg' 00015 if hasattr(self.config,'runOnCosmics') and self.config.runOnCosmics: 00016 self.pset_template = 'CalibMuon.DTCalibration.dtResidualCalibration_cosmics_cfg' 00017 00018 self.process = None 00019 self.crab_cfg = None 00020 self.initProcess() 00021 self.initCrab() 00022 self.task = CrabTask(self.dir,self.crab_cfg)
def DTAnalysisResiduals::DTAnalysisResiduals::initCrab | ( | self | ) |
Definition at line 67 of file DTAnalysisResiduals.py.
00068 : 00069 crab_cfg_parser = loadCrabCfg() 00070 loadCrabDefault(crab_cfg_parser,self.config) 00071 crab_cfg_parser.set('CMSSW','pset',self.pset_name) 00072 crab_cfg_parser.set('CMSSW','output_file',self.outputfile) 00073 crab_cfg_parser.remove_option('USER','additional_input_files') 00074 00075 if hasattr(self.config,'inputTTrigDB') and self.config.inputTTrigDB: 00076 addCrabInputFile(crab_cfg_parser,self.config.inputTTrigDB) 00077 00078 if hasattr(self.config,'inputVDriftDB') and self.config.inputVDriftDB: 00079 addCrabInputFile(crab_cfg_parser,self.config.inputVDriftDB) 00080 00081 if hasattr(self.config,'inputT0DB') and self.config.inputT0DB: 00082 addCrabInputFile(crab_cfg_parser,self.config.inputT0DB) 00083 00084 self.crab_cfg = crab_cfg_parser
def DTAnalysisResiduals::DTAnalysisResiduals::initProcess | ( | self | ) |
Definition at line 23 of file DTAnalysisResiduals.py.
00024 : 00025 self.process = loadCmsProcess(self.pset_template) 00026 self.process.GlobalTag.globaltag = self.config.globaltag 00027 self.process.dtResidualCalibration.rootFileName = self.outputfile 00028 self.process.dtResidualCalibration.detailedAnalysis = True 00029 # Update Event Setup 00030 if hasattr(self.config,'inputDBTag') and self.config.inputDBTag: 00031 tag = self.config.inputDBTag 00032 record = self.config.inputDBRcd 00033 connect = self.config.connectStrDBTag 00034 moduleName = 'customDB%s' % record 00035 addPoolDBESSource(process = self.process, 00036 moduleName = moduleName,record = record,tag = tag, 00037 connect = connect) 00038 00039 if hasattr(self.config,'inputTTrigDB') and self.config.inputTTrigDB: 00040 label = '' 00041 if hasattr(self.config,'runOnCosmics') and self.config.runOnCosmics: label = 'cosmics' 00042 addPoolDBESSource(process = self.process, 00043 moduleName = 'tTrigDB',record = 'DTTtrigRcd',tag = 'ttrig',label = label, 00044 connect = 'sqlite_file:%s' % os.path.basename(self.config.inputTTrigDB)) 00045 00046 if hasattr(self.config,'inputVDriftDB') and self.config.inputVDriftDB: 00047 addPoolDBESSource(process = self.process, 00048 moduleName = 'vDriftDB',record = 'DTMtimeRcd',tag = 'vDrift', 00049 connect = 'sqlite_file:%s' % os.path.basename(self.config.inputVDriftDB)) 00050 00051 if hasattr(self.config,'inputT0DB') and self.config.inputT0DB: 00052 addPoolDBESSource(process = self.process, 00053 moduleName = 't0DB',record = 'DTT0Rcd',tag = 't0', 00054 connect = 'sqlite_file:%s' % os.path.basename(self.config.inputT0DB)) 00055 00056 # Update sequences 00057 if hasattr(self.config,'runOnRAW') and self.config.runOnRAW: 00058 if hasattr(self.config,'runOnMC') and self.config.runOnMC: 00059 getattr(self.process,self.config.digilabel).inputLabel = 'rawDataCollector' 00060 prependPaths(self.process,self.config.digilabel) 00061 00062 if hasattr(self.config,'preselection') and self.config.preselection: 00063 pathsequence = self.config.preselection.split(':')[0] 00064 seqname = self.config.preselection.split(':')[1] 00065 self.process.load(pathsequence) 00066 prependPaths(self.process,seqname)
def DTAnalysisResiduals::DTAnalysisResiduals::run | ( | self | ) |
Definition at line 89 of file DTAnalysisResiduals.py.
def DTAnalysisResiduals::DTAnalysisResiduals::writeCfg | ( | self | ) |
Definition at line 85 of file DTAnalysisResiduals.py.
Definition at line 7 of file DTAnalysisResiduals.py.
Definition at line 7 of file DTAnalysisResiduals.py.
Definition at line 7 of file DTAnalysisResiduals.py.
Definition at line 7 of file DTAnalysisResiduals.py.
Definition at line 7 of file DTAnalysisResiduals.py.
Definition at line 89 of file DTAnalysisResiduals.py.
Definition at line 7 of file DTAnalysisResiduals.py.
Definition at line 7 of file DTAnalysisResiduals.py.
Definition at line 7 of file DTAnalysisResiduals.py.