#some files

#https://cmsweb.cern.ch/das/request?input=dataset%3D%2FTT_TuneCUETP8M2T4_13TeV-powheg-pythia8%2FPhaseIFall16MiniAOD-FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1%2FMINIAODSIM&instance=prod%2Fglobal

#File: /store/mc/PhaseIFall16MiniAOD/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/MINIAODSIM/FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1/110000/021021EC-E0FD-E611-BBAD-0025905B85BA.root
#File size: 3.1GB, File type: EDM, Number of events: 52940, Site: T2_CN_Beijing, T1_US_FNAL_Disk, T1_DE_KIT_MSS, T1_DE_KIT_Buffer
#Dataset, Sites, Runs, Parents, Children, Lumis, Download Sources: phedexdbs3 show
#File: /store/mc/PhaseIFall16MiniAOD/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/MINIAODSIM/FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1/110000/043B7D89-D8FD-E611-9F58-0025905B85BA.root
#File size: 4.2GB, File type: EDM, Number of events: 71340, Site: T2_CN_Beijing, T1_US_FNAL_Disk, T1_DE_KIT_MSS, T1_DE_KIT_Buffer
#Dataset, Sites, Runs, Parents, Children, Lumis, Download Sources: phedexdbs3 show
#File: /store/mc/PhaseIFall16MiniAOD/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/MINIAODSIM/FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1/110000/04561138-A4FC-E611-818B-02163E01349D.root
#File size: 3.7GB, File type: EDM, Number of events: 64300, Site: T2_CN_Beijing, T1_US_FNAL_Disk, T1_DE_KIT_MSS, T1_DE_KIT_Buffer
#Dataset, Sites, Runs, Parents, Children, Lumis, Download Sources: phedexdbs3 show
#File: /store/mc/PhaseIFall16MiniAOD/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/MINIAODSIM/FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1/110000/064BE4A5-29F9-E611-A7BC-002590E7E012.root
#File size: 701.4MB, File type: EDM, Number of events: 11936, Site: T2_CN_Beijing, T1_US_FNAL_Disk, T1_DE_KIT_MSS, T1_DE_KIT_Buffer
#Dataset, Sites, Runs, Parents, Children, Lumis, Download Sources: phedexdbs3 show
#File: /store/mc/PhaseIFall16MiniAOD/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/MINIAODSIM/FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1/110000/0656CD80-D8FD-E611-AB6D-0CC47A4C8E70.root
#File size: 3.8GB, File type: EDM, Number of events: 65332, Site: T2_CN_Beijing, T1_US_FNAL_Disk, T1_DE_KIT_MSS, T1_DE_KIT_Buffer
#Dataset, Sites, Runs, Parents, Children, Lumis, Download Sources: phedexdbs3 show
#File: /store/mc/PhaseIFall16MiniAOD/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/MINIAODSIM/FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1/110000/084AE8BE-72FB-E611-B702-C454449229EB.root
#File size: 27.7MB, File type: EDM, Number of events: 388, Site: T2_CN_Beijing, T1_US_FNAL_Disk, T1_DE_KIT_MSS, T1_DE_KIT_Buffer
#Dataset, Sites, Runs, Parents, Children, Lumis, Download Sources: phedexdbs3 show
#File: /store/mc/PhaseIFall16MiniAOD/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/MINIAODSIM/FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1/110000/0A7DA5F2-7DFC-E611-A586-02163E01A29A.root
#File size: 2.1GB, File type: EDM, Number of events: 36296, Site: T2_CN_Beijing, T1_US_FNAL_Disk, T1_DE_KIT_MSS, T1_DE_KIT_Buffer
#Dataset, Sites, Runs, Parents, Children, Lumis, Download Sources: phedexdbs3 show
#File: /store/mc/PhaseIFall16MiniAOD/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/MINIAODSIM/FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1/110000/10531A9F-2AF8-E611-A485-FA163EC963A3.root
#File size: 2.3GB, File type: EDM, Number of events: 38944, Site: T2_CN_Beijing, T1_US_FNAL_Disk, T1_DE_KIT_MSS, T1_DE_KIT_Buffer
#Dataset, Sites, Runs, Parents, Children, Lumis, Download Sources: phedexdbs3 show
#File: /store/mc/PhaseIFall16MiniAOD/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/MINIAODSIM/FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1/110000/149A6314-98F9-E611-972E-047D7BD6DD64.root
#File size: 145.3MB, File type: EDM, Number of events: 2440, Site: T2_CN_Beijing, T1_US_FNAL_Disk, T1_DE_KIT_MSS, T1_DE_KIT_Buffer
#Dataset, Sites, Runs, Parents, Children, Lumis, Download Sources: phedexdbs3 show
#File: /store/mc/PhaseIFall16MiniAOD/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/MINIAODSIM/FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1/110000/1A01C01A-E2FD-E611-84EC-0025905B85DE.root
#File size: 3.1GB, File type: EDM, Number of events: 53504, Site: T2_CN_Beijing, T1_US_FNAL_Disk, T1_DE_KIT_MSS, T1_DE_KIT_Buffer
#Dataset, Sites, Runs, Parents, Children, Lumis, Download Sources: phedexdbs3 show


import FWCore.ParameterSet.Config as cms
process = cms.Process("Pippo")

#process.load("FWCore.MessageService.MessageLogger_cfi")

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )


process.load('Configuration/StandardSequences/GeometryDB_cff')
process.load('Configuration/StandardSequences/MagneticField_38T_cff')
process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
process.load('Configuration/StandardSequences/Reconstruction_cff')
process.load('Configuration/EventContent/EventContent_cff')
process.GlobalTag.globaltag = '80X_mcRun2_asymptotic_2016_v3'
process.options = cms.untracked.PSet()

#process.options.numberOfThreads = cms.untracked.uint32(1)

process.source = cms.Source("PoolSource",
    # replace 'myfile.root' with the source file you want to use
    fileNames = cms.untracked.vstring(
        #'root://xrootd-cms.infn.it//store/relval/CMSSW_8_1_0_pre16/RelValTTbar_13/GEN-SIM-RECO/PU25ns_81X_upgrade2017_realistic_v22_HS-v1/10000/007A655B-7FB7-E611-A316-0025905B858C.root'
        #'root://xrootd-cms.infn.it//store/mc/RunIISpring16MiniAODv2/TT_TuneCUETP8M1_13TeV-powheg-pythia8-evtgen/MINIAODSIM/PUSpring16_80X_mcRun2_asymptotic_2016_miniAODv2_v0-v1/00000/02EA5736-2C3F-E611-AAD2-0CC47A4D99A4.root'
        #'root://xrootd-cms.infn.it//store/relval/CMSSW_8_1_0_pre16/RelValTTbar_13/GEN-SIM-RECO/PU25ns_81X_upgrade2017_realistic_v22_HS-v1/10000/007A655B-7FB7-E611-A316-0025905B858C.root'
        
        "file:021021EC-E0FD-E611-BBAD-0025905B85BA.root"
        ##"root://xrootd-cms.infn.it//store/mc/PhaseIFall16MiniAOD/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/MINIAODSIM/FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1/110000/021021EC-E0FD-E611-BBAD-0025905B85BA.root",
     #"root://xrootd-cms.infn.it//store/mc/PhaseIFall16MiniAOD/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/MINIAODSIM/FlatPU28to62HcalNZSRAW_PhaseIFall16_81X_upgrade2017_realistic_v26-v1/110000/043B7D89-D8FD-E611-9F58-0025905B85BA.root"
    )#,
    #skipEvents=cms.untracked.uint32(36590)
)

#for MC jet flavour
#process.load("PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi")
#process.load("PhysicsTools.JetMCAlgos.AK4PFJetsMCFlavourInfos_cfi")
#process.ak4JetFlavourInfos.jets = cms.InputTag("ak4PFJetsCHS")
#process.ak4JetFlavourInfos.hadronFlavourHasPriority = cms.bool(True)
#process.flavourSeq = cms.Sequence(
    #process.selectedHadronsAndPartons *
    #process.ak4JetFlavourInfos
#)


process.analyzer1 = cms.EDAnalyzer('AnalyzerSignedIP_MINIAOD_wArr',
 #jetMCSrc = cms.InputTag("ak4JetFlavourInfos"),
#    bits = cms.InputTag("TriggerResults","","HLT"),
#    prescales = cms.InputTag("patTrigger"),
#    objects = cms.InputTag("selectedPatTrigger"),
#    generatorInfo = cms.InputTag("generator"),
)

outfile='RECOArrays.root'

process.TFileService = cms.Service("TFileService",
    fileName = cms.string(outfile) )


process.p = cms.Path(process.analyzer1)


