ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/test/toto.py
Revision: 1.10
Committed: Mon Mar 9 13:44:38 2009 UTC (16 years, 1 month ago) by lethuill
Content type: text/x-python
Branch: MAIN
CVS Tags: pat_2_1_12_02
Changes since 1.9: +1 -0 lines
Log Message:
Add doPhotonVertexCorrection as configurable

File Contents

# User Rev Content
1 lethuill 1.1 import FWCore.ParameterSet.Config as cms
2    
3     process = cms.Process("NewProcess")
4    
5     #keep the logging output to a nice level
6     process.load("FWCore.MessageLogger.MessageLogger_cfi")
7    
8     process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
9    
10     # Global geometry
11     process.load("Configuration.StandardSequences.Geometry_cff")
12    
13     # geometry needed for clustering and calo shapes variables
14     process.load("RecoEcal.EgammaClusterProducers.geometryForClustering_cff")
15     # 3 folllowing config files included in RecoEcal.EgammaClusterProducers.geometryForClustering_cff
16     #process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
17     #process.load("Geometry.CaloEventSetup.CaloGeometry_cfi")
18     #process.load("Geometry.CaloEventSetup.CaloTopology_cfi")
19    
20     # ES cluster for pi0 discrimination variables
21     #process.load("RecoEcal.EgammaClusterProducers.preshowerClusterShape_cfi")
22    
23     # pi0 discrimination variables
24     #process.load("RecoEcal.EgammaClusterProducers.piZeroDiscriminators_cfi")
25    
26     process.maxEvents = cms.untracked.PSet(
27 lethuill 1.9 input = cms.untracked.int32(3)
28 lethuill 1.1 )
29    
30 lethuill 1.4
31 lethuill 1.1 process.source = cms.Source("PoolSource",
32 lethuill 1.4 # RECO
33 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')
34 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')
35     # fileNames = cms.untracked.vstring('file:/sps/cms/boumedie/data/0A249693-FC85-DD11-AE0A-000423D99896.root')
36     # fileNames = cms.untracked.vstring('file:/sps/cms/smgascon/MCatNLO_HiggsSM_H_2gamma_mH120_10TeV_cff_py_RAW2DIGI_RECO.root')
37 lethuill 1.4 # AOD
38 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')
39     # 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')
40 lethuill 1.4 # PATAOD
41 lethuill 1.8 fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_1_10__Summer08__TTJets-madgraph__IDEAL_V9__PATLayer1_OutputFromAOD_full_113.root')
42 lethuill 1.6 # PAT
43     # fileNames = cms.untracked.vstring('file:/sps/cms/morgan/data/CMSSW_2_1_10__TQAFLayer1_Output.fromAOD2110_IDEAL_full_0__PATOnly.root')
44 lethuill 1.1 )
45    
46    
47     process.analysis = cms.EDAnalyzer("TotoAnalyzer",
48     myConfig = cms.PSet(
49    
50 lethuill 1.4 # Data type of the PoolSource ( RECO / AOD / PAT / PATAOD )
51 lethuill 1.8 #dataType = cms.untracked.string("RECO"), # only RECO collections are present
52 lethuill 1.4 #dataType = cms.untracked.string("AOD"), # only AOD collections are present
53 lethuill 1.8 dataType = cms.untracked.string("PATAOD"), # mixture of PAT and AOD collections
54 lethuill 1.4 #dataType = cms.untracked.string("PAT"), # only PAT collections are present
55    
56 lethuill 1.1 # Verbosite
57     # 0 = muet
58     # 1 = No evts tous les 10 ou 100 evts
59     # 2 = Indique fonctions executees et nb d'objets reconstruits a chaque evt
60     # 3 = Liste objets de haut niveau (electrons, muons, photons...)
61     # 4 = Liste tous les objets (haut niveau, clusters....)
62     # 5 = Debug
63 lethuill 1.8 verbosity = cms.untracked.int32(3),
64 lethuill 1.1
65     # name of output root file
66     RootFileName = cms.untracked.string('TotoAna.root'),
67    
68 lethuill 1.8 # Is PoolSource coming from CSA07 Soup Production ? (needed to get CSA07 Process Id and weights)
69 lethuill 1.1 isCSA07Soup = cms.untracked.bool(False),
70    
71 lethuill 1.3 # What is written to rootuple
72 lethuill 1.4 doHLT = cms.untracked.bool(False),
73 lethuill 1.6 doMC = cms.untracked.bool(True),
74 lethuill 1.7 doPDFInfo = cms.untracked.bool(True),
75 lethuill 1.6 doSignalMuMuGamma = cms.untracked.bool(False), # not tested in 2.1.X...
76     doSignalTopTop = cms.untracked.bool(True),
77     # signalGenerator = cms.untracked.string('PYTHIA'),
78 lethuill 1.1 # signalGenerator = cms.untracked.string('COMPHEP'),
79     # signalGenerator = cms.untracked.string('ALPGEN'),
80 lethuill 1.6 signalGenerator = cms.untracked.string('MADGRAPH'),
81 lethuill 1.4 doPhotonConversionMC = cms.untracked.bool(False),
82 lethuill 1.6
83     doPhotonMC = cms.untracked.bool(True),
84     doElectronMC = cms.untracked.bool(True),
85     doMuonMC = cms.untracked.bool(True),
86     doJetMC = cms.untracked.bool(True),
87     doMETMC = cms.untracked.bool(True),
88     doUnstablePartsMC = cms.untracked.bool(True),
89 lethuill 1.5 doPrimaryVertex = cms.untracked.bool(True),
90 lethuill 1.4 doTrack = cms.untracked.bool(False),
91 lethuill 1.1 doJet = cms.untracked.bool(True),
92     doMuon = cms.untracked.bool(True),
93     doElectron = cms.untracked.bool(True),
94 lethuill 1.4 doPhoton = cms.untracked.bool(False),
95     doCluster = cms.untracked.bool(False),
96 lethuill 1.3 doMET = cms.untracked.bool(True),
97 lethuill 1.6
98 lethuill 1.4 doPhotonIsolation = cms.untracked.bool(False),
99     doPhotonConversion = cms.untracked.bool(False),
100 lethuill 1.10 doPhotonVertexCorrection = cms.untracked.bool(True),
101 lethuill 1.1 conversionLikelihoodWeightsFile = cms.untracked.string('RecoEgamma/EgammaTools/data/TMVAnalysis_Likelihood.weights.txt'),
102 lethuill 1.6
103 lethuill 1.1 # Draw MC particle tree
104 lethuill 1.8 drawMCTree = cms.untracked.bool(False),
105 lethuill 1.1 mcTreePrintP4 = cms.untracked.bool(True),
106     mcTreePrintPtEtaPhi = cms.untracked.bool(False),
107     mcTreePrintVertex = cms.untracked.bool(False),
108     mcTreePrintStatus = cms.untracked.bool(True),
109 lethuill 1.3 mcTreePrintIndex = cms.untracked.bool(True),
110     mcTreeStatus = cms.untracked.vint32( 3 ), # accepted status codes
111    
112 lethuill 1.6
113 lethuill 1.1 # MC particles acceptance cuts
114     photonMC_etaMax = cms.double(3.0),
115     photonMC_ptMin = cms.double(2.0),
116     electronMC_etaMax = cms.double(3.0),
117     electronMC_ptMin = cms.double(2.0),
118 lethuill 1.3 muonMC_etaMax = cms.double(3.0),
119 lethuill 1.2 muonMC_ptMin = cms.double(0.0),
120 lethuill 1.9 jetMC_etaMax = cms.double(6.0),
121     jetMC_ptMin = cms.double(5.0),
122 lethuill 1.6
123 lethuill 1.1 # Photon isolation
124     #ecalIsolation_BarrelBC_type = cms.int32(110), # Type of Clusters used for isolation in barrel (see TRootCluster.h for type definition)
125     #ecalIsolation_EndcapBC_type = cms.int32(120), # Type of Clusters used for isolation in endcap (see TRootCluster.h for type definition)
126     ecalIsolation_BarrelBC_type = cms.int32(210), # Type of Clusters used for isolation in barrel (see TRootCluster.h for type definition)
127     ecalIsolation_EndcapBC_type = cms.int32(320), # Type of Clusters used for isolation in endcap (see TRootCluster.h for type definition)
128     ecalIslandIsolation_DRmax = cms.double(0.3), # size of the DR cone around photon - Et of Island BC in this cone are added
129     ecalIslandIsolation_ClusterEt_threshold = cms.double(0.0), # Et threshold for BC added in DR cone
130     ecalDoubleConeIsolation_DRmin = cms.double(0.05), # size of the inner DR cone around photon - BC in this cone are rejected
131     ecalDoubleConeIsolation_DRmax = cms.double(0.3), # size of the outer DR cone around photon - Et of Island BC with DRmin < DR < DRmax are added
132     ecalDoubleConeIsolation_ClusterEt_threshold = cms.double(0.0), # Et threshold for BC added in DR cone
133     hcalRecHitIsolation_DRmax = cms.double(0.3), # size of the DR cone around photon - Et of HCAL rechits in this cone are added
134     hcalRecHitIsolation_HitEt_threshold = cms.double(0.0), # Et threshold for HCAL rechits in DR cone
135     trackerIsolation_DRmax = cms.double(0.3), # size of the DR cone around photon - pt of tracks in this cone are added
136     trackerIsolation_pt_threshold = cms.double(0.0), # pt threshold for tracks added in DR cone
137     trackerIsolation_pixelHits_threshold = cms.int32(0) # pt threshold for tracks added in DR cone
138 lethuill 1.3 ),
139 lethuill 1.1
140 lethuill 1.4 producersNamesRECO = cms.PSet(
141     dataType = cms.untracked.string("RECO"),
142 lethuill 1.3 hltProducer = cms.InputTag("TriggerResults","","HLT"),
143     genParticlesProducer = cms.InputTag("genParticles"),
144 lethuill 1.6 genJetsProducer = cms.InputTag("genJets"),
145 lethuill 1.3 primaryVertexProducer = cms.InputTag("offlinePrimaryVerticesWithBS"),
146     trackProducer = cms.InputTag("generalTracks"),
147 lethuill 1.6 #jetProducer = cms.InputTag("iterativeCone5CaloJets"),
148     jetProducer = cms.InputTag("iterativeCone5PFJets"),
149 lethuill 1.3 muonProducer = cms.InputTag("muons"),
150     electronProducer = cms.InputTag("pixelMatchGsfElectrons"),
151     photonProducer = cms.string("photons"),
152     metProducer = cms.InputTag("met"),
153     barrelEcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
154     endcapEcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
155 lethuill 1.6 reducedBarrelEcalRecHitCollection = cms.InputTag("reducedEcalRecHitsEB"),
156     reducedEndcapEcalRecHitCollection = cms.InputTag("reducedEcalRecHitsEE"),
157     #reducedBarrelEcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
158     #reducedEndcapEcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
159 lethuill 1.3 hbheRecHitProducer = cms.InputTag("hbhereco"),
160     hoRecHitProducer = cms.InputTag("horeco"),
161     hfRecHitProducer = cms.InputTag("hfreco"),
162     photonIDProducer = cms.InputTag("PhotonIDProd","PhotonAssociatedID")
163 lethuill 1.4 ),
164    
165     producersNamesAOD = cms.PSet(
166     dataType = cms.untracked.string("AOD"),
167     hltProducer = cms.InputTag("TriggerResults","","HLT"),
168     genParticlesProducer = cms.InputTag("genParticles"),
169 lethuill 1.6 genJetsProducer = cms.InputTag("genJets"),
170 lethuill 1.4 primaryVertexProducer = cms.InputTag("offlinePrimaryVerticesWithBS"),
171     trackProducer = cms.InputTag("generalTracks"),
172     jetProducer = cms.InputTag("iterativeCone5CaloJets"),
173     muonProducer = cms.InputTag("muons"),
174     electronProducer = cms.InputTag("pixelMatchGsfElectrons"),
175     photonProducer = cms.string("photons"),
176     metProducer = cms.InputTag("met"),
177     barrelEcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
178     endcapEcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
179     reducedBarrelEcalRecHitCollection = cms.InputTag("reducedEcalRecHitsEB"),
180     reducedEndcapEcalRecHitCollection = cms.InputTag("reducedEcalRecHitsEE"),
181     hbheRecHitProducer = cms.InputTag("hbhereco"),
182     hoRecHitProducer = cms.InputTag("horeco"),
183     hfRecHitProducer = cms.InputTag("hfreco"),
184     photonIDProducer = cms.InputTag("PhotonIDProd","PhotonAssociatedID")
185     ),
186    
187     producersNamesPATAOD = cms.PSet(
188     dataType = cms.untracked.string("PATAOD"),
189     hltProducer = cms.InputTag("TriggerResults","","HLT"),
190     genParticlesProducer = cms.InputTag("genParticles"),
191 lethuill 1.6 genJetsProducer = cms.InputTag("genJets"),
192 lethuill 1.4 primaryVertexProducer = cms.InputTag("offlinePrimaryVerticesWithBS"),
193     trackProducer = cms.InputTag("generalTracks"),
194     jetProducer = cms.InputTag("selectedLayer1Jets"),
195     muonProducer = cms.InputTag("selectedLayer1Muons"),
196     electronProducer = cms.InputTag("selectedLayer1Electrons"),
197 lethuill 1.6 photonProducer = cms.string("selectedLayer1Photons"),
198 lethuill 1.4 metProducer = cms.InputTag("selectedLayer1METs"),
199     barrelEcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
200     endcapEcalRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
201     reducedBarrelEcalRecHitCollection = cms.InputTag("reducedEcalRecHitsEB"),
202     reducedEndcapEcalRecHitCollection = cms.InputTag("reducedEcalRecHitsEE"),
203     hbheRecHitProducer = cms.InputTag("hbhereco"),
204     hoRecHitProducer = cms.InputTag("horeco"),
205     hfRecHitProducer = cms.InputTag("hfreco"),
206     photonIDProducer = cms.InputTag("PhotonIDProd","PhotonAssociatedID")
207     ),
208    
209     producersNamesPAT = cms.PSet(
210     dataType = cms.untracked.string("PAT"),
211     hltProducer = cms.InputTag("PATALACON"),
212     genParticlesProducer = cms.InputTag("PATALACON"),
213 lethuill 1.6 genJetsProducer = cms.InputTag("genJets"),
214 lethuill 1.4 primaryVertexProducer = cms.InputTag("offlinePrimaryVerticesWithBS"),
215     trackProducer = cms.InputTag("PATALACON"),
216     jetProducer = cms.InputTag("selectedLayer1Jets"),
217     muonProducer = cms.InputTag("selectedLayer1Muons"),
218     electronProducer = cms.InputTag("selectedLayer1Electrons"),
219 lethuill 1.6 photonProducer = cms.string("selectedLayer1Photons"),
220 lethuill 1.4 metProducer = cms.InputTag("selectedLayer1METs"),
221     barrelEcalRecHitCollection = cms.InputTag("PATALACON"),
222     endcapEcalRecHitCollection = cms.InputTag("PATALACON"),
223     reducedBarrelEcalRecHitCollection = cms.InputTag("PATALACON"),
224     reducedEndcapEcalRecHitCollection = cms.InputTag("PATALACON"),
225     hbheRecHitProducer = cms.InputTag("PATALACON"),
226     hoRecHitProducer = cms.InputTag("PATALACON"),
227     hfRecHitProducer = cms.InputTag("PATALACON"),
228     photonIDProducer = cms.InputTag("PATALACON")
229 lethuill 1.3 )
230 lethuill 1.1 )
231    
232 lethuill 1.4
233 lethuill 1.6 ##process.hltHighLevel = cms.EDFilter("HLTHighLevel",
234     ## HLTPaths = cms.vstring('HLT2PhotonRelaxed'),
235     ## andOr = cms.bool(True),
236     ## TriggerResultsTag = cms.InputTag("TriggerResults","","HLT")
237     ##)
238 lethuill 1.4
239 lethuill 1.1 #process.egammIsolation = cms.Sequence(process.egammaHcalIsolation+process.egammaHOE+process.egammaTowerIsolation+process.egammaHOETower+process.egammaElectronTkIsolation+process.egammaElectronTkRelIsolation+process.egammaElectronTkNumIsolation+process.egammaPhotonTkIsolation+process.egammaPhotonTkRelIsolation+process.egammaEcalRelIsolationSequence+process.egammaEcalIsolationSequence)
240     #process.p = cms.Path(process.preshowerClusterShape*process.piZeroDiscriminators*process.analysis)
241     process.p = cms.Path(process.analysis)
242