Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-01 22:51:59

0001 from __future__ import print_function
0002 #
0003 # cfg file to produce L1GlobalTriggerRecord from a L1GlobalTriggerReadoutRecord
0004 # when running on RAW data, one also unpack the data
0005 #
0006 
0007 
0008 import FWCore.ParameterSet.Config as cms
0009 import sys
0010 
0011 
0012 ###################### user choices ######################
0013 # choose (pre)release
0014 latestRelease = 'CMSSW_3_5_X'
0015 useRelease = 'CMSSW_3_4_1'
0016 
0017 # choose the type of sample used:
0018 #   True for RelVal
0019 #   False for data
0020 
0021 # default value
0022 useRelValSample = True
0023 #
0024 # comment/uncomment the next line to choose sample type 
0025 # (un-commented selects data)
0026 useRelValSample=False 
0027 
0028 if useRelValSample == True :
0029     
0030     globalTag = 'MC'
0031     #globalTag = 'STARTUP'
0032     
0033     # RelVals 
0034     useSample = 'RelValQCD_Pt_80_120'
0035     #useSample = 'RelValTTbar'
0036     #useSample = 'RelValZTT'
0037  
0038     # data type: for RAW data, the unpacker sequence RawToDigi will be also run
0039     #dataType = 'RAW'
0040     dataType = 'RECO'
0041    
0042 else :
0043 
0044     # data type
0045     dataType = 'RAW'
0046     #dataType = 'StreamFile'
0047     #dataType = 'RECO'
0048     
0049     runNumber = 123596
0050     #runNumber = 116035
0051     #runNumber = 121560
0052 
0053 
0054 # change to True to use local files
0055 #     the type of file should match the choice of useRelValSample
0056 #     useGlobalTag must be defined here
0057 
0058 useLocalFiles = False 
0059 #useLocalFiles = True 
0060 
0061 if (useLocalFiles == True) :
0062     useGlobalTag = 'GR09_P_V8_34X'
0063     dataType = 'RECO'
0064     
0065 # number of events to be run (-1 for all)
0066 maxNumberEvents = 10
0067 #maxNumberEvents = -1
0068 
0069 ###################### end user choices ###################
0070 
0071 # global tags 
0072 if (useRelValSample == True) and (useLocalFiles == False) :
0073     
0074     if useRelease == 'CMSSW_3_5_X' :
0075         if globalTag == 'MC' :
0076             useGlobalTag = 'MC_3XY_V15'
0077         else :
0078             useGlobalTag = 'STARTUP3X_V15'
0079     elif useRelease == 'CMSSW_3_4_1' :
0080         if globalTag == 'MC' :
0081             useGlobalTag = 'MC_3XY_V15'
0082         else :
0083             useGlobalTag = 'STARTUP3X_V15'
0084     elif useRelease == 'CMSSW_3_3_6' :
0085         if globalTag == 'MC' :
0086             useGlobalTag = 'MC_3XY_V9B'
0087         else :
0088             useGlobalTag = 'STARTUP3X_V8M'
0089     else :
0090         print('Error: no global tag defined for release ', useRelease, ' used with RelVal sample')
0091         sys.exit()
0092    
0093 elif (useRelValSample == False) and (useLocalFiles == False) :
0094     # global tag
0095     
0096     if useRelease == 'CMSSW_3_5_X' :
0097         useGlobalTag = 'GR09_P_V8_34X'
0098     elif useRelease == 'CMSSW_3_4_1' :
0099         useGlobalTag = 'GR09_P_V8_34X'
0100     elif useRelease == 'CMSSW_3_3_6' :
0101         useGlobalTag = 'GR09_P_V8'
0102     else :
0103         print('Error: no global tag defined for release ', useRelease, ' used with data sample')
0104         sys.exit()
0105 else :
0106        print('Using local file(s) with global tag ',  useGlobalTag, ' and release ', useRelease)
0107      
0108 #
0109 #
0110 
0111 process = cms.Process("TestL1GtRecord")
0112 
0113 #
0114 # load and configure modules via Global Tag
0115 # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0116 
0117 process.load("Configuration.StandardSequences.GeometryDB_cff")
0118 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0119 
0120 process.GlobalTag.globaltag = useGlobalTag
0121 
0122 
0123 # number of events to be processed and source file
0124 process.maxEvents = cms.untracked.PSet(
0125     input=cms.untracked.int32(maxNumberEvents)
0126 )
0127 
0128 # for RAW data, run first the RAWTODIGI 
0129 if dataType == 'StreamFile' :
0130     readFiles = cms.untracked.vstring()
0131     process.source = cms.Source("NewEventStreamFileReader", fileNames=readFiles)
0132 else :        
0133     readFiles = cms.untracked.vstring()
0134     secFiles = cms.untracked.vstring() 
0135     process.source = cms.Source ('PoolSource', fileNames=readFiles, secondaryFileNames=secFiles)
0136 
0137 # type of sample used (True for RelVal, False for data)
0138 
0139 if (useRelValSample == True) and (useLocalFiles == False) :
0140     if useGlobalTag.count('IDEAL') or useGlobalTag.count('MC') :
0141         
0142         if (useRelease == 'CMSSW_3_5_X') and (useSample == 'RelValQCD_Pt_80_120') and (dataType == 'RECO') :
0143 
0144             print('   Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')  
0145 
0146             dataset = cms.untracked.vstring('/RelValQCD_Pt_80_120/CMSSW_3_5_0_pre3-MC_3XY_V15-v1/GEN-SIM-RECO')
0147             readFiles.extend( [
0148                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V15-v1/0006/1469E02C-D203-DF11-9C7F-00304879BAB2.root',
0149                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V15-v1/0005/E87FE5E9-4303-DF11-817C-0030487A3DE0.root',
0150                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V15-v1/0005/A063F4AC-4403-DF11-AB21-003048D2C092.root',
0151                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V15-v1/0005/9CFD43E8-4103-DF11-910C-0030487CD180.root',
0152                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V15-v1/0005/585E7702-4103-DF11-939A-0030487A18F2.root',
0153                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V15-v1/0005/3E675407-4303-DF11-9448-00304879BAB2.root',
0154                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V15-v1/0005/387D83E9-4403-DF11-8C17-00304879EDEA.root',
0155                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V15-v1/0005/1E7F273C-4303-DF11-B884-0030487A3C92.root' 
0156                 ] );
0157 
0158 
0159         elif (useRelease == 'CMSSW_3_5_X') and (useSample == 'RelValTTbar') and (dataType == 'RECO') :
0160             
0161             print('   Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')  
0162 
0163             dataset = cms.untracked.vstring('/RelValTTbar/CMSSW_3_5_0_pre3-MC_3XY_V15-v1/GEN-SIM-RECO')
0164             readFiles.extend( [
0165                 '/store/relval/CMSSW_3_5_0_pre3/RelValTTbar/GEN-SIM-RECO/MC_3XY_V15-v1/0006/E80BF730-D203-DF11-8667-0030487CD6DA.root',
0166                 '/store/relval/CMSSW_3_5_0_pre3/RelValTTbar/GEN-SIM-RECO/MC_3XY_V15-v1/0005/F8071FA0-0203-DF11-947E-0030487C90D4.root',
0167                 '/store/relval/CMSSW_3_5_0_pre3/RelValTTbar/GEN-SIM-RECO/MC_3XY_V15-v1/0005/B4B3D656-0403-DF11-890D-0030487C60AE.root',
0168                 '/store/relval/CMSSW_3_5_0_pre3/RelValTTbar/GEN-SIM-RECO/MC_3XY_V15-v1/0005/AEB20358-0503-DF11-85E1-0030487A18A4.root',
0169                 '/store/relval/CMSSW_3_5_0_pre3/RelValTTbar/GEN-SIM-RECO/MC_3XY_V15-v1/0005/AE60F36C-0203-DF11-863B-0030487C608C.root',
0170                 '/store/relval/CMSSW_3_5_0_pre3/RelValTTbar/GEN-SIM-RECO/MC_3XY_V15-v1/0005/82371379-0303-DF11-923E-0030487CD7C0.root',
0171                 '/store/relval/CMSSW_3_5_0_pre3/RelValTTbar/GEN-SIM-RECO/MC_3XY_V15-v1/0005/78D9A28B-0F03-DF11-8D39-00304879FBB2.root',
0172                 '/store/relval/CMSSW_3_5_0_pre3/RelValTTbar/GEN-SIM-RECO/MC_3XY_V15-v1/0005/787178D3-0903-DF11-8A43-0030487A1990.root',
0173                 '/store/relval/CMSSW_3_5_0_pre3/RelValTTbar/GEN-SIM-RECO/MC_3XY_V15-v1/0005/0802E3D1-0703-DF11-88B5-0030487A3C9A.root' 
0174                 ] );
0175 
0176         elif (useRelease == 'CMSSW_3_4_1') and (useSample == 'RelValQCD_Pt_80_120') and (dataType == 'RECO') :
0177 
0178             print('   Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')  
0179 
0180             dataset = cms.untracked.vstring('/RelValQCD_Pt_80_120/CMSSW_3_4_1-MC_3XY_V14-v1/GEN-SIM-RECO')
0181 
0182             readFiles.extend( [
0183                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V14-v1/0004/FE21D38C-7AED-DE11-8572-001D09F23F2A.root',
0184                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V14-v1/0004/EA8D76BF-B5ED-DE11-B84A-000423D9853C.root',
0185                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V14-v1/0004/D08D7EE2-7CED-DE11-B2CA-001D09F254CE.root',
0186                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V14-v1/0004/90EF4AA4-7CED-DE11-B81E-001D09F2AF1E.root',
0187                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V14-v1/0004/907B2B6B-7BED-DE11-83E5-0019B9F7312C.root',
0188                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V14-v1/0004/8C5DBBA2-7BED-DE11-AD49-001D09F290BF.root',
0189                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V14-v1/0004/6E9C78EE-79ED-DE11-BFD0-000423D98BC4.root',
0190                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/MC_3XY_V14-v1/0004/5E79FB96-7CED-DE11-9300-0019B9F7312C.root' 
0191                 ] );
0192 
0193         elif (useRelease == 'CMSSW_3_4_1') and (useSample == 'RelValTTbar') and (dataType == 'RECO') :
0194             
0195             print('   Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')  
0196 
0197             dataset = cms.untracked.vstring('/RelValTTbar/CMSSW_3_4_1-MC_3XY_V14-v1/GEN-SIM-RECO')
0198             readFiles.extend( [
0199                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/MC_3XY_V14-v1/0004/F4996794-A2ED-DE11-81E5-001D09F2423B.root',
0200                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/MC_3XY_V14-v1/0004/BCF09642-A1ED-DE11-A424-001D09F231B0.root',
0201                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/MC_3XY_V14-v1/0004/AA0AFA35-A2ED-DE11-A322-000423D98868.root',
0202                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/MC_3XY_V14-v1/0004/9C5ACF97-A1ED-DE11-9AA9-0030487A1990.root',
0203                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/MC_3XY_V14-v1/0004/88C36CAE-B6ED-DE11-A0C9-000423D985E4.root',
0204                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/MC_3XY_V14-v1/0004/6E40CDC2-A2ED-DE11-855A-001D09F29146.root',
0205                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/MC_3XY_V14-v1/0004/68F7F3F5-A1ED-DE11-A407-0030487A3C9A.root',
0206                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/MC_3XY_V14-v1/0004/5AF3C074-9FED-DE11-8F1C-001D09F241F0.root',
0207                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/MC_3XY_V14-v1/0004/40545697-A0ED-DE11-A389-001D09F24FEC.root' 
0208                 ] );
0209 
0210 
0211         else :
0212             print('Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.')    
0213             sys.exit()
0214 
0215         secFiles.extend([
0216             ])
0217 
0218     elif useGlobalTag.count('STARTUP') :
0219 
0220         if (useRelease == 'CMSSW_3_5_X') and (useSample == 'RelValQCD_Pt_80_120') and (dataType == 'RECO') :
0221         
0222             print('   Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')  
0223 
0224             dataset = cms.untracked.vstring('/RelValQCD_Pt_80_120/CMSSW_3_2_2-MC_31X_V3-v1/GEN-SIM-RECO')
0225             readFiles.extend( [
0226                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/B0026249-D103-DF11-A139-0030487A195C.root',
0227                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/9CDC89D9-0803-DF11-9D10-0030487CD13A.root',
0228                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/9C979251-0403-DF11-9C5F-0030487A17B8.root',
0229                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/9022DC83-0403-DF11-B5BA-001D09F23A20.root',
0230                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/8ACA874E-0503-DF11-B21A-0030487A1FEC.root',
0231                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/3CB6012F-0303-DF11-8183-0030487C60AE.root',
0232                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/1E6C658F-0B03-DF11-8913-0030487D1BCC.root',
0233                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/1A01CF8D-0303-DF11-9F31-0030487CD77E.root' 
0234                 ] );
0235 
0236 
0237         elif (useRelease == 'CMSSW_3_5_X') and (useSample == 'RelValTTbar') and (dataType == 'RECO') :
0238         
0239             print('   Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')  
0240 
0241             dataset = cms.untracked.vstring('/RelValTTbar/CMSSW_3_5_0_pre3-STARTUP3X_V15-v1/GEN-SIM-RECO')
0242             readFiles.extend( [
0243                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/B0026249-D103-DF11-A139-0030487A195C.root',
0244                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/9CDC89D9-0803-DF11-9D10-0030487CD13A.root',
0245                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/9C979251-0403-DF11-9C5F-0030487A17B8.root',
0246                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/9022DC83-0403-DF11-B5BA-001D09F23A20.root',
0247                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/8ACA874E-0503-DF11-B21A-0030487A1FEC.root',
0248                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/3CB6012F-0303-DF11-8183-0030487C60AE.root',
0249                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/1E6C658F-0B03-DF11-8913-0030487D1BCC.root',
0250                 '/store/relval/CMSSW_3_5_0_pre3/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V15-v1/0005/1A01CF8D-0303-DF11-9F31-0030487CD77E.root' 
0251                 ] );
0252 
0253 
0254         elif (useRelease == 'CMSSW_3_4_1') and (useSample == 'RelValQCD_Pt_80_120') and (dataType == 'RECO') :
0255         
0256             print('   Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')  
0257 
0258             dataset = cms.untracked.vstring('/RelValQCD_Pt_80_120/CMSSW_3_4_1-STARTUP3X_V14-v1/GEN-SIM-RECO')
0259             readFiles.extend( [
0260                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/D8AE64A2-8FED-DE11-B37B-000423D99658.root',
0261                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/D814474A-90ED-DE11-A54F-001D09F2A49C.root',
0262                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/D2235DA4-8FED-DE11-A5FE-001D09F241F0.root',
0263                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/C2371774-B6ED-DE11-9292-0030487C5CFA.root',
0264                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/B84A6EE6-8EED-DE11-9733-001D09F29321.root',
0265                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/58E9DA6E-8DED-DE11-91C8-003048D3756A.root',
0266                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/48D81FB5-91ED-DE11-9BFA-001617C3B5E4.root',
0267                 '/store/relval/CMSSW_3_4_1/RelValQCD_Pt_80_120/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/0AB1FC24-91ED-DE11-8A56-001D09F231B0.root' 
0268                 ] );
0269 
0270 
0271         elif (useRelease == 'CMSSW_3_4_1') and (useSample == 'RelValTTbar') and (dataType == 'RECO') :
0272         
0273             print('   Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')  
0274 
0275             dataset = cms.untracked.vstring('/RelValTTbar/CMSSW_3_4_1-STARTUP3X_V14-v1/GEN-SIM-RECO')
0276             readFiles.extend( [
0277                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/CE62D4D8-85ED-DE11-8BD2-000423D9853C.root',
0278                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/A0FB9B2E-85ED-DE11-8A8D-001D09F290CE.root',
0279                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/9A2F0DDF-85ED-DE11-B5D1-001D09F290CE.root',
0280                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/820C7C8C-86ED-DE11-83D4-001D09F295FB.root',
0281                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/685C77F0-87ED-DE11-A4A5-000423D60FF6.root',
0282                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/4CFCC894-86ED-DE11-B3F4-001D09F2447F.root',
0283                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/3EA206BD-B5ED-DE11-B481-000423D6C8E6.root',
0284                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/3CCCE28D-86ED-DE11-A583-000423D986C4.root',
0285                 '/store/relval/CMSSW_3_4_1/RelValTTbar/GEN-SIM-RECO/STARTUP3X_V14-v1/0004/2CF90F4D-87ED-DE11-A3AF-003048D375AA.root' 
0286                 ] );
0287 
0288 
0289         else :
0290             print('Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.')    
0291             sys.exit()
0292 
0293                 
0294         secFiles.extend([
0295             ])
0296         
0297     else :
0298         print('Error: Global Tag ', useGlobalTag, ' not defined.')    
0299         sys.exit()
0300 
0301 elif (useRelValSample == False) and (useLocalFiles == False) :
0302     if dataType == 'RAW' : 
0303 
0304         if runNumber == 123596 :
0305             dataset = '/Cosmics/BeamCommissioning09-v1/RAW'
0306     
0307             readFiles.extend( [
0308                 '/store/data/BeamCommissioning09/Cosmics/RAW/v1/000/123/596/8E21B4C8-74E2-DE11-ABAA-000423D999CA.root' 
0309                 ] );
0310 
0311             secFiles.extend([
0312                 ])
0313 
0314     
0315         elif runNumber == 116035 :
0316             dataset = '/Cosmics/Commissioning09-v3/RAW'
0317             print('   Running on set: '+ dataset + ' with global tag ' +  useGlobalTag) 
0318     
0319             readFiles.extend( [                        
0320                 '/store/data/Commissioning09/Cosmics/RAW/v3/000/116/035/34A8317D-76AF-DE11-91DB-000423D98DC4.root'
0321                 ]);                                                                                               
0322 
0323             secFiles.extend([
0324                 ])
0325         
0326         elif runNumber == 121560 :
0327             dataset = '/Cosmics/Commissioning09-v3/RAW'
0328             print('   Running on set: '+ dataset + ' with global tag ' +  useGlobalTag) 
0329     
0330             readFiles.extend( [                        
0331                 '/store/data/BeamCommissioning09/Cosmics/RAW/v1/000/121/560/DC089E4B-5ED4-DE11-A179-000423D98FBC.root'
0332                 ]);                                                                                               
0333 
0334             secFiles.extend([
0335                 ])
0336 
0337         else :
0338             print('Error: run ', runNumber, ' not defined.')    
0339             sys.exit()
0340 
0341     
0342     elif dataType == 'FileStream' : 
0343         # data dat
0344         readFiles.extend( [
0345                 'file:/lookarea_SM/MWGR_29.00105760.0001.A.storageManager.00.0000.dat'
0346         
0347             ] );
0348 
0349     else :
0350         print('Error: dataType ',dataType, ' not defined.')    
0351         sys.exit()
0352 
0353 else :
0354     readFiles.extend( [                        
0355         'file:/afs/cern.ch/user/g/ghete/scratch0/CmsswTestFiles/L1GtRecord_source.root'
0356         ]);                                                                                               
0357 
0358     secFiles.extend([
0359         ])
0360 
0361     print('Local file(s) ', readFiles)
0362 
0363 
0364 
0365 ###################
0366 
0367 
0368 
0369 # processes to be run
0370 
0371 # L1 GT record producer
0372 process.load("EventFilter.L1GlobalTriggerRawToDigi.l1GtRecord_cfi")
0373 
0374 # input tag for GT readout collection: 
0375 #     gtDigis       = GT emulator or GT unpacker (default)
0376 #replace l1GtRecord.L1GtReadoutRecordTag = l1GtEmulDigis
0377 
0378 
0379 # L1 GT trigger report for readout record
0380 import L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi
0381 process.l1GtTrigReadoutReport = L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi.l1GtTrigReport.clone()
0382 
0383 # boolean flag to select the input record
0384 #process.l1GtTrigReadoutReport.UseL1GlobalTriggerRecord = True
0385 
0386 # input tag for the GT record requested: 
0387 #   GT emulator:    gtDigis (DAQ record)
0388 #   GT unpacker:    gtDigis (DAQ record)
0389 #   GT lite record: l1GtRecord 
0390 process.l1GtTrigReadoutReport.L1GtRecordInputTag = "gtDigis"
0391 
0392 #process.l1GtTrigReadoutReport.PrintVerbosity = 2
0393 
0394 # print output: 0 = std::cout; 1 = LogTrace; 2 = LogVerbatim; 3 = LogInfo
0395 #process.l1GtTrigReadoutReport.PrintOutput = 1
0396 
0397 
0398 # L1 GT trigger report for lite record
0399 process.load("L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi")
0400 
0401 # boolean flag to select the input record
0402 process.l1GtTrigReport.UseL1GlobalTriggerRecord = True
0403 
0404 # input tag for the GT record requested: 
0405 #   GT emulator:    gtDigis (DAQ record)
0406 #   GT unpacker:    gtDigis (DAQ record)
0407 #   GT lite record: l1GtRecord 
0408 process.l1GtTrigReport.L1GtRecordInputTag = "l1GtRecord"
0409 
0410 #process.l1GtTrigReport.PrintVerbosity = 2
0411 
0412 # print output: 0 = std::cout; 1 = LogTrace; 2 = LogVerbatim; 3 = LogInfo
0413 #process.l1GtTrigReport.PrintOutput = 1
0414 
0415 # for RAW data, run first the RAWTODIGI 
0416 if dataType == 'RAW' :
0417     process.load('Configuration/StandardSequences/RawToDigi_Data_cff')
0418     process.p = cms.Path(process.RawToDigi+process.l1GtTrigReadoutReport+process.l1GtRecord+
0419                          process.l1GtTrigReport)
0420     
0421 else :        
0422     # path to be run for RECO
0423     process.p = cms.Path(process.l1GtTrigReadoutReport+process.l1GtRecord+
0424                          process.l1GtTrigReport)
0425 
0426 
0427 # Message Logger
0428 process.load('FWCore.MessageService.MessageLogger_cfi')
0429 process.MessageLogger.debugModules = ['l1GtRecord']
0430 process.MessageLogger.cerr.default.limit = 0
0431 process.MessageLogger.cerr.FwkReport.limit = 0
0432 process.MessageLogger.cerr.FwkSummary.limit = 0
0433 
0434 process.MessageLogger.files.debugs = cms.untracked.PSet( 
0435         threshold = cms.untracked.string('DEBUG'),
0436         DEBUG = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0437         INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0438         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0439         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0440         L1GlobalTriggerRecord = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0441         L1GtTrigReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0442         )
0443 
0444 process.MessageLogger.files.warnings = cms.untracked.PSet( 
0445         threshold = cms.untracked.string('WARNING'),
0446         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0447         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0448         L1GlobalTriggerRecord = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0449         L1GtTrigReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0450         )
0451 
0452 process.MessageLogger.files.errors = cms.untracked.PSet( 
0453         threshold = cms.untracked.string('ERROR'),
0454         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0455         L1GlobalTriggerRecord = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0456         L1GtTrigReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0457         )
0458 
0459 
0460 # output 
0461 process.outputL1GtRecord = cms.OutputModule("PoolOutputModule",
0462     fileName = cms.untracked.string('testGt_GtRecord_output.root'),
0463     # keep only unpacked data in the ROOT file
0464     outputCommands = cms.untracked.vstring('drop *', 
0465         'keep *_l1GtRecord_*_*')
0466 )
0467 
0468 process.outpath = cms.EndPath(process.outputL1GtRecord)
0469