1 |
mzanetti |
1.1 |
#!/usr/bin/env python
|
2 |
|
|
|
3 |
|
|
from DataFormats.FWLite import Events, Handle
|
4 |
|
|
|
5 |
|
|
def edmObjects() :
|
6 |
|
|
handles = {}
|
7 |
|
|
handles['muons'] = Handle ("std::vector<reco::Muon>")
|
8 |
mzanetti |
1.2 |
handles['electrons'] = Handle ("std::vector<reco::GsfElectron>")
|
9 |
|
|
handles['photons'] = Handle ("std::vector<reco::Photon>")
|
10 |
|
|
handles['missingEnergy'] = Handle("std::vector<reco::PFMET>")
|
11 |
|
|
handles['jets'] = Handle("std::vector<reco::PFJet>")
|
12 |
|
|
handles['conversions'] = Handle ("std::vector<reco::Conversion>")
|
13 |
|
|
|
14 |
mzanetti |
1.1 |
labels = {}
|
15 |
|
|
labels['muons'] = ("muons")
|
16 |
mzanetti |
1.2 |
labels['electrons'] = ("gsfElectrons")
|
17 |
|
|
labels['photons'] = ("photons")
|
18 |
|
|
labels['missingEnergy'] = ("pfMet")
|
19 |
|
|
labels['jets'] = ("ak5PFJets")
|
20 |
|
|
labels['conversions'] = ("allConversions")
|
21 |
|
|
|
22 |
mzanetti |
1.1 |
return handles, labels
|
23 |
|
|
|
24 |
mzanetti |
1.2 |
def getDataset(eosPath='/store/user/klute/LEP3/ZZ'):
|
25 |
mzanetti |
1.1 |
import subprocess
|
26 |
|
|
inputFilesSet = []
|
27 |
mzanetti |
1.2 |
eosFolderContent = subprocess.Popen('cmsLs '+eosPath, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
28 |
mzanetti |
1.1 |
for line in eosFolderContent.stdout.readlines():
|
29 |
|
|
filename = ''
|
30 |
|
|
if len(line)>1:
|
31 |
|
|
filename = line.split()[4]
|
32 |
|
|
#print filename
|
33 |
mzanetti |
1.2 |
if filename.find('.root')>-1 and filename.find('aod')>-1 and filename.find('aod.root')==-1:
|
34 |
mzanetti |
1.1 |
inputFilesSet.append('root://eoscms.cern.ch//eos/cms/'+filename)
|
35 |
|
|
return inputFilesSet
|
36 |
|
|
|
37 |
|
|
|
38 |
mzanetti |
1.2 |
lep3Datasets = {'signal':('/store/cmst3/user/pjanot/LEP3/',240),
|
39 |
|
|
'WW':('/store/cmst3/user/pjanot/LEP3/WW/',17200),
|
40 |
|
|
'qqbar':('/store/cmst3/user/pjanot/LEP3/QQBAR/',50300),
|
41 |
|
|
'ZZ':('/store/user/klute/LEP3/ZZ/',1000),
|
42 |
|
|
}
|