ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/test/toto.py
Revision: 1.18
Committed: Wed Jun 10 11:17:06 2009 UTC (15 years, 10 months ago) by lethuill
Content type: text/x-python
Branch: MAIN
CVS Tags: all_2_2_9_02, all_2_2_9_01
Changes since 1.17: +42 -88 lines
Log Message:
Better protection against missing collection / Cleaning data format selection / Last iteration for migration to PAT of Photons

File Contents

# User Rev Content
1 lethuill 1.1 import FWCore.ParameterSet.Config as cms
2    
3     process = cms.Process("NewProcess")
4    
5 lethuill 1.15 # Keep the logging output to a nice level
6 lethuill 1.1 process.load("FWCore.MessageLogger.MessageLogger_cfi")
7    
8     process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
9    
10 lethuill 1.15 # Needed for GlobalPositionRcd
11     process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
12     process.GlobalTag.globaltag = 'IDEAL_V12::All'
13    
14 lethuill 1.1 # Global geometry
15     process.load("Configuration.StandardSequences.Geometry_cff")
16 lethuill 1.15 process.load('Configuration/StandardSequences/MagneticField_38T_cff')
17    
18     # Transient Track Builder
19     process.load("TrackingTools.TransientTrack.TransientTrackBuilder_cfi")
20 lethuill 1.1
21 lethuill 1.15 # Geometry needed for clustering and calo shapes variables
22 lethuill 1.1 process.load("RecoEcal.EgammaClusterProducers.geometryForClustering_cff")
23    
24     # ES cluster for pi0 discrimination variables
25     #process.load("RecoEcal.EgammaClusterProducers.preshowerClusterShape_cfi")
26    
27     # pi0 discrimination variables
28     #process.load("RecoEcal.EgammaClusterProducers.piZeroDiscriminators_cfi")
29    
30 lethuill 1.18 # Needed to re-run Photon Id
31     process.load("RecoEgamma.PhotonIdentification.photonId_cff")
32    
33 lethuill 1.1 process.maxEvents = cms.untracked.PSet(
34 lethuill 1.12 input = cms.untracked.int32(10)
35 lethuill 1.1 )
36    
37 lethuill 1.4
38 lethuill 1.1 process.source = cms.Source("PoolSource",
39 lethuill 1.4 # RECO
40 lethuill 1.8 # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_1_7__RelValTTbar__GEN-SIM-RECO__IDEAL_V9_v2__0002__56B92AB9-8B7E-DD11-A821-000423D6AF24.root')
41 lethuill 1.6 # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_1_10__RelValH130GGgluonfusion__GEN-SIM-DIGI-RAW-HLTDEBUG-RECO__STARTUP_V7_v1__0001__00616C72-FA9A-DD11-A526-00304867902E.root')
42     # fileNames = cms.untracked.vstring('file:/sps/cms/boumedie/data/0A249693-FC85-DD11-AE0A-000423D99896.root')
43     # fileNames = cms.untracked.vstring('file:/sps/cms/smgascon/MCatNLO_HiggsSM_H_2gamma_mH120_10TeV_cff_py_RAW2DIGI_RECO.root')
44 lethuill 1.12 # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_2_1__QCDpt170__Summer08_IDEAL_V11_redigi_v1__GEN-SIM-RECO__0010115D-6FE7-DD11-AFDC-0019B9E7CD05.root')
45 lethuill 1.18 # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_1_8__Summer08__H120_gg__GEN-SIM-RECO__IDEAL_V9_v1__0000__FE60393A-76E6-DD11-BDF1-001D0964474D.root')
46     # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_1_8__Summer08__H120_gg__GEN-SIM-RECO__IDEAL_V9_v1__0000__FAE31F8E-6CE6-DD11-A953-0015C5EC47A2.root')
47     # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_2_1__Summer08__H120_gg__GEN-SIM-RECO__IDEAL_V11_redigi_v2__0009__F8176F88-7124-DE11-BE7A-00151796C0E0.root')
48 lethuill 1.4 # AOD
49 lethuill 1.6 # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_1_7__Summer08__QCDDiJetPt380to470__AODSIM__IDEAL_V9_AODSIM_v1__0000__F630AA5F-EBA4-DD11-BABD-001D0967D71F.root')
50     # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_1_7__Summer08__TTJets-madgraph__AODSIM__IDEAL_V9_AODSIM_v1__0004__000BCB88-49AF-DD11-A760-00E081791887.root')
51 lethuill 1.18 # PAT + some RECO Collections
52 lethuill 1.11 # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_1_10__Summer08__TTJets-madgraph__IDEAL_V9__PATLayer1_OutputFromAOD_full_113.root')
53 lethuill 1.13 # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_2_3__PATLayer1_Output.fromRECOinputCSA08test2_full.root')
54 lethuill 1.18 # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_2_X__Farida__InclusiveMuPt15_IN2P3__PATL1_InclusiveMuPt15_Sum08_1.root')
55     fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_2_X__Farida__Hgg__PATL1_test.root')
56     # Only PAT Collections
57 lethuill 1.6 # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_1_10__TQAFLayer1_Output.fromAOD2110_IDEAL_full_0__PATOnly.root')
58 lethuill 1.1 )
59    
60    
61     process.analysis = cms.EDAnalyzer("TotoAnalyzer",
62     myConfig = cms.PSet(
63    
64 lethuill 1.18 # Data type of the PoolSource ( RECO / PAT )
65     #dataType = cms.untracked.string("RECO"), # use reco::Objects
66     dataType = cms.untracked.string("PAT"), # use pat::Objects
67 lethuill 1.4
68 lethuill 1.1 # Verbosite
69     # 0 = muet
70     # 1 = No evts tous les 10 ou 100 evts
71     # 2 = Indique fonctions executees et nb d'objets reconstruits a chaque evt
72     # 3 = Liste objets de haut niveau (electrons, muons, photons...)
73     # 4 = Liste tous les objets (haut niveau, clusters....)
74     # 5 = Debug
75 lethuill 1.12 verbosity = cms.untracked.int32(5),
76 lethuill 1.1
77     # name of output root file
78 lethuill 1.18 RootFileName = cms.untracked.string('PatAna.root'),
79 lethuill 1.1
80 lethuill 1.18 # DATASET Infos (will be written in runTree for bookeeping)
81 lethuill 1.17 xsection = cms.untracked.double(0.674770994),
82     description = cms.untracked.string('Le dataset pourri a Roberto'),
83 lethuill 1.18
84 lethuill 1.3 # What is written to rootuple
85 lethuill 1.13 doHLT = cms.untracked.bool(True),
86 lethuill 1.6 doMC = cms.untracked.bool(True),
87 lethuill 1.7 doPDFInfo = cms.untracked.bool(True),
88 lethuill 1.6 doSignalMuMuGamma = cms.untracked.bool(False), # not tested in 2.1.X...
89     doSignalTopTop = cms.untracked.bool(True),
90     # signalGenerator = cms.untracked.string('PYTHIA'),
91 lethuill 1.1 # signalGenerator = cms.untracked.string('COMPHEP'),
92     # signalGenerator = cms.untracked.string('ALPGEN'),
93 lethuill 1.6 signalGenerator = cms.untracked.string('MADGRAPH'),
94 lethuill 1.18 doPhotonConversionMC = cms.untracked.bool(True),
95 lethuill 1.6
96     doPhotonMC = cms.untracked.bool(True),
97     doElectronMC = cms.untracked.bool(True),
98     doMuonMC = cms.untracked.bool(True),
99     doJetMC = cms.untracked.bool(True),
100     doMETMC = cms.untracked.bool(True),
101     doUnstablePartsMC = cms.untracked.bool(True),
102 lethuill 1.12
103 lethuill 1.16 doBeamSpot = cms.untracked.bool(True),
104 lethuill 1.5 doPrimaryVertex = cms.untracked.bool(True),
105 lethuill 1.15 doTrack = cms.untracked.bool(True),
106 lethuill 1.1 doJet = cms.untracked.bool(True),
107     doMuon = cms.untracked.bool(True),
108     doElectron = cms.untracked.bool(True),
109 lethuill 1.12 doPhoton = cms.untracked.bool(True),
110 lethuill 1.18 doCluster = cms.untracked.bool(True),
111 lethuill 1.3 doMET = cms.untracked.bool(True),
112 lethuill 1.6
113 lethuill 1.15 doPhotonVertexCorrection = cms.untracked.bool(False),
114 lethuill 1.18 doPhotonIsolation = cms.untracked.bool(True),
115     doPhotonConversion = cms.untracked.bool(True),
116 lethuill 1.1 conversionLikelihoodWeightsFile = cms.untracked.string('RecoEgamma/EgammaTools/data/TMVAnalysis_Likelihood.weights.txt'),
117 lethuill 1.6
118 lethuill 1.1 # Draw MC particle tree
119 lethuill 1.8 drawMCTree = cms.untracked.bool(False),
120 lethuill 1.1 mcTreePrintP4 = cms.untracked.bool(True),
121     mcTreePrintPtEtaPhi = cms.untracked.bool(False),
122     mcTreePrintVertex = cms.untracked.bool(False),
123     mcTreePrintStatus = cms.untracked.bool(True),
124 lethuill 1.3 mcTreePrintIndex = cms.untracked.bool(True),
125 lethuill 1.18 mcTreeStatus = cms.untracked.vint32( 1,2,3 ), # accepted status codes
126 lethuill 1.3
127 lethuill 1.1 # MC particles acceptance cuts
128     photonMC_etaMax = cms.double(3.0),
129     photonMC_ptMin = cms.double(2.0),
130     electronMC_etaMax = cms.double(3.0),
131     electronMC_ptMin = cms.double(2.0),
132 lethuill 1.3 muonMC_etaMax = cms.double(3.0),
133 lethuill 1.2 muonMC_ptMin = cms.double(0.0),
134 lethuill 1.13 jetMC_etaMax = cms.double(10.0),
135     jetMC_ptMin = cms.double(0.0),
136 lethuill 1.6
137 lethuill 1.1 # Photon isolation
138 lethuill 1.18 basicClustersIsolation_BarrelBC_type = cms.int32(210), # Type of Clusters used for isolation in barrel (see TRootCluster.h for type definition)
139     basicClustersIsolation_EndcapBC_type = cms.int32(320), # Type of Clusters used for isolation in endcap (see TRootCluster.h for type definition)
140     basicClustersIsolation_DRmax = cms.double(0.3), # size of the DR cone around photon - Et of BC in this cone are added
141     basicClustersIsolation_ClusterEt_threshold = cms.double(0.0), # Et threshold for BC added in DR cone
142     basicClustersDoubleConeIsolation_BarrelBC_type = cms.int32(210), # Type of Clusters used for isolation in barrel (see TRootCluster.h for type definition)
143     basicClustersDoubleConeIsolation_EndcapBC_type = cms.int32(320), # Type of Clusters used for isolation in endcap (see TRootCluster.h for type definition)
144     basicClustersDoubleConeIsolation_DRmin = cms.double(0.05), # size of the inner DR cone around photon - BC in this cone are rejected
145     basicClustersDoubleConeIsolation_DRmax = cms.double(0.3), # size of the outer DR cone around photon - Et of BC with DRmin < DR < DRmax are added
146     basicClustersDoubleConeIsolation_ClusterEt_threshold = cms.double(0.0), # Et threshold for BC added in DR cone
147     hcalRecHitIsolation_DRmax = cms.double(0.3), # size of the DR cone around photon - Et of HCAL rechits in this cone are added
148     hcalRecHitIsolation_HitEt_threshold = cms.double(0.0), # Et threshold for HCAL rechits in DR cone
149     trackerIsolation_DRmax = cms.double(0.3), # size of the DR cone around photon - pt of tracks in this cone are added
150     trackerIsolation_pt_threshold = cms.double(0.0), # pt threshold for tracks added in DR cone
151     trackerIsolation_pixelLayers_threshold = cms.int32(0) # minimum number of pixel layers with measurement required for tracks to be added in DR cone isolation
152 lethuill 1.3 ),
153 lethuill 1.1
154 lethuill 1.4 producersNamesRECO = cms.PSet(
155 lethuill 1.18 dataType = cms.untracked.string("RECO"),
156     allowMissingCollection = cms.untracked.bool(True),
157 lethuill 1.3 hltProducer = cms.InputTag("TriggerResults","","HLT"),
158     genParticlesProducer = cms.InputTag("genParticles"),
159 lethuill 1.13 genJetsProducer = cms.InputTag("iterativeCone5GenJets"),
160     genMETsProducer = cms.InputTag("genMet"),
161 lethuill 1.16 beamSpotProducer = cms.InputTag("offlineBeamSpot"),
162 lethuill 1.3 primaryVertexProducer = cms.InputTag("offlinePrimaryVerticesWithBS"),
163     trackProducer = cms.InputTag("generalTracks"),
164 lethuill 1.6 #jetProducer = cms.InputTag("iterativeCone5CaloJets"),
165     jetProducer = cms.InputTag("iterativeCone5PFJets"),
166 lethuill 1.3 muonProducer = cms.InputTag("muons"),
167     electronProducer = cms.InputTag("pixelMatchGsfElectrons"),
168 lethuill 1.12 photonProducer = cms.InputTag("photons"),
169     photonIDProducer = cms.InputTag("PhotonIDProd","PhotonAssociatedID"),
170 lethuill 1.3 metProducer = cms.InputTag("met"),
171     barrelEcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
172     endcapEcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
173 lethuill 1.6 reducedBarrelEcalRecHitCollection = cms.InputTag("reducedEcalRecHitsEB"),
174     reducedEndcapEcalRecHitCollection = cms.InputTag("reducedEcalRecHitsEE"),
175 lethuill 1.3 hbheRecHitProducer = cms.InputTag("hbhereco"),
176     hoRecHitProducer = cms.InputTag("horeco"),
177 lethuill 1.12 hfRecHitProducer = cms.InputTag("hfreco")
178 lethuill 1.4 ),
179    
180 lethuill 1.18 producersNamesPAT = cms.PSet(
181     dataType = cms.untracked.string("PAT"),
182     allowMissingCollection = cms.untracked.bool(True),
183     patEncapsulation = cms.untracked.bool(False),
184 lethuill 1.4 hltProducer = cms.InputTag("TriggerResults","","HLT"),
185     genParticlesProducer = cms.InputTag("genParticles"),
186 lethuill 1.13 genJetsProducer = cms.InputTag("iterativeCone5GenJets"),
187     genMETsProducer = cms.InputTag("genMet"),
188 lethuill 1.16 beamSpotProducer = cms.InputTag("offlineBeamSpot"),
189 lethuill 1.4 primaryVertexProducer = cms.InputTag("offlinePrimaryVerticesWithBS"),
190     trackProducer = cms.InputTag("generalTracks"),
191     jetProducer = cms.InputTag("selectedLayer1Jets"),
192     muonProducer = cms.InputTag("selectedLayer1Muons"),
193     electronProducer = cms.InputTag("selectedLayer1Electrons"),
194 lethuill 1.12 photonProducer = cms.InputTag("selectedLayer1Photons"),
195     photonIDProducer = cms.InputTag("PhotonIDProd","PhotonAssociatedID"),
196 lethuill 1.4 metProducer = cms.InputTag("selectedLayer1METs"),
197     barrelEcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
198     endcapEcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
199     reducedBarrelEcalRecHitCollection = cms.InputTag("reducedEcalRecHitsEB"),
200     reducedEndcapEcalRecHitCollection = cms.InputTag("reducedEcalRecHitsEE"),
201     hbheRecHitProducer = cms.InputTag("hbhereco"),
202     hoRecHitProducer = cms.InputTag("horeco"),
203 lethuill 1.12 hfRecHitProducer = cms.InputTag("hfreco")
204 lethuill 1.3 )
205 lethuill 1.1 )
206    
207 lethuill 1.4
208 lethuill 1.6 ##process.hltHighLevel = cms.EDFilter("HLTHighLevel",
209     ## HLTPaths = cms.vstring('HLT2PhotonRelaxed'),
210     ## andOr = cms.bool(True),
211     ## TriggerResultsTag = cms.InputTag("TriggerResults","","HLT")
212     ##)
213 lethuill 1.4
214 lethuill 1.1 #process.p = cms.Path(process.preshowerClusterShape*process.piZeroDiscriminators*process.analysis)
215 lethuill 1.18 #process.p = cms.Path(process.photonIDSequence*process.analysis)
216 lethuill 1.1 process.p = cms.Path(process.analysis)
217