ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/test/analyzeTowers.py
Revision: 1.13
Committed: Mon Aug 16 20:51:21 2010 UTC (14 years, 8 months ago) by nart
Content type: text/x-python
Branch: MAIN
CVS Tags: HiForest_V02_79, HiForest_V02_78, HiForest_V02_77, HiForest_V02_76, HiForest_V02_75, HiForest_V02_74, HiForest_V02_73, HiForest_V02_72, HiForest_V02_71, HiForest_V02_70, HiForest_V02_69, HiForest_V02_68, HiForest_V02_67, HiForest_V02_66, HiForest_V02_65, HiForest_V02_64, HiForest_V02_63, HiForest_V02_62, HiForest_V02_61, HiForest_V02_60, HiForest_V02_59, HiForest_V02_58, HiForest_V02_57, HiForest_V02_56, HiForest_V02_55, HiForest_V02_54, HiForest_V02_53, HiForest_V02_52, HiForest_V02_51, HiForest_V02_50, HiForest_V02_49, HiForest_V02_48, HiForest_V02_47, HiForest_V02_46, HiForest_V02_45, HiForest_V02_44, HiForest_V02_43, HiForest_V02_42, HiForest_V02_41, HiForest_V02_40, HiForest_V02_39, HiForest_V02_38, HiForest_V02_37, HiForest_V02_36, HiForest_V02_35, HiForest_V02_34, HiForest_V02_33, HiForest_V02_32, HiForest_V02_31, HiForest_V02_30, HiForest_V02_27, HiForest_V02_26, QM_2012, HiForest_V02_25, HiForest_V02_24, HiForest_V02_23, HiForest_V02_22, HiForest_V02_21, HiForest_V02_20, HiForest_V02_19, HiForest_V02_18, HiForest_V02_17, HiForest_V02_16, HiForest_V02_15, HiForest_V02_14, HiForest_V02_13, HiForest_V02_12, HiForest_V02_11, HiForest_V02_10, HiForest_V02_09, HiForest_V02_08, HiForest_V02_07, HiForest_V02_06, HiForest_V02_05, HiForest_V02_04, HiForest_V02_03, HiForest_V02_02, HiForest_V02_01, HiForest_V02_00, hi44X_02, hi413_03, hi441_1, hi441_0, hi413_11, hi413_10, hi413_09, hi413_08, hi413_07, hi413_06, hi413_05, hi413_04, hi413_02, hi39X_01, tag_d20110915, cmssw39x_base, cmssw39X_base
Branch point for: branch_44x, cmssw39x_branch, V01-01-13
Changes since 1.12: +14 -5 lines
Log Message:
CaloRecHits included

File Contents

# User Rev Content
1 nart 1.10
2 nart 1.3 import FWCore.ParameterSet.VarParsing as VarParsing
3     ivars = VarParsing.VarParsing('standard')
4 nart 1.11 '''
5 yilmaz 1.7 ivars.files = [
6 nart 1.10 'file:/net/hisrv0001/home/yetkin/hibat0007/analysis/jets/SignalUnquenchedDijet80to120_runs101to150.root',
7     'file:/net/hisrv0001/home/yetkin/hibat0007/analysis/jets/SignalUnquenchedDijet80to120_runs151to200.root',
8     'file:/net/hisrv0001/home/yetkin/hibat0007/analysis/jets/SignalUnquenchedDijet80to120_runs1to50.root',
9     'file:/net/hisrv0001/home/yetkin/hibat0007/analysis/jets/SignalUnquenchedDijet80to120_runs51to100.root'
10     ]
11 nart 1.11 '''
12 nart 1.13 '''
13 nart 1.11 ivars.files = [
14     'file:/net/hisrv0001/home/yetkin/pstore02/reco/NoZSP/local2/Hydjet_MinBias_2760GeV_d20100713/Hydjet_MinBias_2760GeV_runs11to20.root',
15     'file:/net/hisrv0001/home/yetkin/pstore02/reco/NoZSP/local2/Hydjet_MinBias_2760GeV_d20100713/Hydjet_MinBias_2760GeV_runs21to40.root',
16     'file:/net/hisrv0001/home/yetkin/pstore02/reco/NoZSP/local2/Hydjet_MinBias_2760GeV_d20100713/Hydjet_MinBias_2760GeV_runs61to80.root'
17     ]
18 nart 1.13 '''
19    
20     ivars.files = [
21     'dcache:/pnfs/cmsaf.mit.edu/t2bat/cms/store/user/yetkin/reco/CMSSW_3_8_1_patch1/MC_38Y_V8/Hydjet_MinBias_2760GeV_d20100812/Hydjet_Quenched_MinBias_2760GeV_cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW_HLT_1.root',
22     'dcache:/pnfs/cmsaf.mit.edu/t2bat/cms/store/user/yetkin/reco/CMSSW_3_8_1_patch1/MC_38Y_V8/Hydjet_MinBias_2760GeV_d20100812/Hydjet_Quenched_MinBias_2760GeV_cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW_HLT_10.root',
23     'dcache:/pnfs/cmsaf.mit.edu/t2bat/cms/store/user/yetkin/reco/CMSSW_3_8_1_patch1/MC_38Y_V8/Hydjet_MinBias_2760GeV_d20100812/Hydjet_Quenched_MinBias_2760GeV_cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW_HLT_100.root'
24     ]
25    
26 nart 1.10 '''
27     ivars.files = [
28 yilmaz 1.7 'file:/net/hisrv0001/home/yetkin/hibat0007/aod/JulyExercise/MinBias0709/MinBias0709_runs11to20.root',
29     'file:/net/hisrv0001/home/yetkin/hibat0007/aod/JulyExercise/MinBias0709/MinBias0709_runs1to10.root',
30     'file:/net/hisrv0001/home/yetkin/hibat0007/aod/JulyExercise/MinBias0709/MinBias0709_runs1to5.root',
31     'file:/net/hisrv0001/home/yetkin/hibat0007/aod/JulyExercise/MinBias0709/MinBias0709_runs21to30.root',
32     'file:/net/hisrv0001/home/yetkin/hibat0007/aod/JulyExercise/MinBias0709/MinBias0709_runs31to40.root',
33     'file:/net/hisrv0001/home/yetkin/hibat0007/aod/JulyExercise/MinBias0709/MinBias0709_runs41to50.root',
34     'file:/net/hisrv0001/home/yetkin/hibat0007/aod/JulyExercise/MinBias0709/MinBias0709_runs51to100.root'
35     ]
36 nart 1.10 '''
37 yilmaz 1.7
38 nart 1.12 '''
39 nart 1.3 ivars.files = [
40 nart 1.11 'file:/net/hisrv0001/home/yetkin/pstore02/reco/NoZSP/local2/Hydjet_MinBias_2760GeV_d20100628/Hydjet_MinBias_2760GeV_runs101to200.root',
41     'file:/net/hisrv0001/home/yetkin/pstore02/reco/NoZSP/local2/Hydjet_MinBias_2760GeV_d20100628/Hydjet_MinBias_2760GeV_runs1to100.root',
42     'file:/net/hisrv0001/home/yetkin/pstore02/reco/NoZSP/local2/Hydjet_MinBias_2760GeV_d20100628/Hydjet_MinBias_2760GeV_runs201to300.root',
43     'file:/net/hisrv0001/home/yetkin/pstore02/reco/NoZSP/local2/Hydjet_MinBias_2760GeV_d20100628/Hydjet_MinBias_2760GeV_runs301to400.root'
44     ]
45 nart 1.12 '''
46 nart 1.3
47 nart 1.13 ivars.output = 'Hydjet_Quenched_2760GeV.root'
48 nart 1.4
49 yilmaz 1.7 ivars.maxEvents = -1
50 nart 1.4
51     ivars.register ('randomNumber',
52     mult=ivars.multiplicity.singleton,
53 nart 1.3 info="for testing")
54     ivars.randomNumber=5
55     ivars.parseArguments()
56    
57 nart 1.2 import FWCore.ParameterSet.Config as cms
58    
59    
60 yilmaz 1.1 process = cms.Process('ANALYSIS')
61    
62     process.maxEvents = cms.untracked.PSet(
63 nart 1.3 input = cms.untracked.int32(ivars.maxEvents)
64 nart 1.2 )
65    
66    
67 yilmaz 1.1 # Input source
68     process.source = cms.Source("PoolSource",
69 nart 1.3 fileNames = cms.untracked.vstring(ivars.files)
70 yilmaz 1.1
71 nart 1.2 )
72 yilmaz 1.1
73     process.TFileService = cms.Service('TFileService',
74 nart 1.3 fileName = cms.string('plots_' + ivars.output)
75 yilmaz 1.1 )
76    
77 nart 1.5
78     process.output = cms.OutputModule("PoolOutputModule",
79     outputCommands = cms.untracked.vstring("keep *_*_*_*"),
80     fileName = cms.untracked.string(ivars.output)
81     )
82    
83    
84 nart 1.2 process.load('Configuration/StandardSequences/GeometryExtended_cff')
85 nart 1.3 process.load('Configuration/StandardSequences/Services_cff')
86 yilmaz 1.9 process.load('Configuration/StandardSequences/ReconstructionHeavyIons_cff')
87 nart 1.3
88 nart 1.4 process.RandomNumberGeneratorService.bkg4Jets = cms.PSet(initialSeed = cms.untracked.uint32(ivars.randomNumber),
89     engineName = cms.untracked.string('HepJamesRandom') )
90 nart 1.3 process.RandomNumberGeneratorService.bkg5Jets = process.RandomNumberGeneratorService.bkg4Jets.clone()
91     process.RandomNumberGeneratorService.bkg6Jets = process.RandomNumberGeneratorService.bkg4Jets.clone()
92     process.RandomNumberGeneratorService.bkg7Jets = process.RandomNumberGeneratorService.bkg4Jets.clone()
93 nart 1.11 process.RandomNumberGeneratorService.bkgXJets = process.RandomNumberGeneratorService.bkg4Jets.clone()
94 nart 1.2
95     from RecoJets.JetProducers.CaloJetParameters_cfi import *
96     from RecoJets.JetProducers.AnomalousCellParameters_cfi import *
97    
98 nart 1.10 process.load('PhysicsTools.PatAlgos.patHeavyIonSequences_cff')
99     from PhysicsTools.PatAlgos.tools.heavyIonTools import *
100     configureHeavyIons(process)
101    
102     process.patJets.addJetCorrFactors = True
103     process.patJets.addGenPartonMatch = False
104     process.patJets.addJetID = False
105     process.patJets.addGenJetMatch = False
106     process.patJets.embedGenJetMatch = False
107    
108     process.icPu5corr = process.patJetCorrFactors.clone()
109 nart 1.11 process.icPu5corr.jetSource = cms.InputTag("iterativeConePu5CaloJets","")
110 nart 1.10 process.icPu5corr.corrLevels.L2Relative = cms.string('L2Relative_IC5Calo')
111     process.icPu5corr.corrLevels.L3Absolute = cms.string('L3Absolute_IC5Calo')
112    
113     process.icPu5patJets = process.patJets.clone()
114 nart 1.11 process.icPu5patJets.jetSource = cms.InputTag("iterativeConePu5CaloJets","")
115 nart 1.10 #process.icPu5patJets.genJetMatch = cms.InputTag("icPu5match")
116     process.icPu5patJets.jetCorrFactorsSource = cms.VInputTag(cms.InputTag("icPu5corr") )
117    
118 nart 1.11
119 nart 1.2 process.bkg4Jets = cms.EDProducer(
120 nart 1.11 "BackgroundJetProducer",
121     CaloJetParameters,
122     AnomalousCellParameters,
123     jetAlgorithm = cms.string("IterativeCone"),
124     rParam = cms.double(0.4),
125     avoidNegative = cms.bool(True),
126     subtractorName = cms.string("MultipleAlgoIterator")
127     # subtractorName = cms.string("ParametrizedSubtractor")
128     )
129    
130     process.bkgXJets = cms.EDProducer(
131     "JetAlgorithmAnalyzer",
132     CaloJetParameters,
133     AnomalousCellParameters,
134     jetAlgorithm = cms.string("IterativeCone"),
135     rParam = cms.double(0.5),
136     avoidNegative = cms.bool(True),
137     #subtractorName = cms.string("ParametrizedSubtractor"),
138     subtractorName = cms.string("MultipleAlgoIterator"),
139     centralityTag =cms.InputTag("hiCentrality"),
140     evtPlaneTag = cms.InputTag("hiEvtPlane"),
141     doRecoEvtPlane = cms.untracked.bool(False),
142     interpolate = cms.untracked.bool(False),
143 nart 1.12 centrality = cms.untracked.int32(-1),
144     sumRecHits = cms.bool(False)
145 nart 1.11 )
146    
147     process.bkgXJets.doPUOffsetCorr = True
148     process.bkgXJets.doPVCorrection = False
149     process.bkgXJets.jetPtMin = 10
150     process.bkgXJets.inputEtMin = -10.
151     process.bkgXJets.radiusPU = 0.5
152     process.bkgXJets.nSigmaPU = 1.
153 nart 1.2
154     process.bkg4Jets.doPUOffsetCorr = True
155     process.bkg4Jets.doPVCorrection = False
156     process.bkg4Jets.jetPtMin = 10
157 nart 1.11 process.bkg4Jets.inputEtMin = -10.
158 nart 1.2 process.bkg4Jets.radiusPU = 0.4
159 nart 1.11 process.bkg4Jets.nSigmaPU = 1.
160 nart 1.2
161     process.bkg5Jets = process.bkg4Jets.clone()
162     process.bkg5Jets.rParam = 0.5
163     process.bkg5Jets.radiusPU = 0.5
164    
165     process.bkg6Jets = process.bkg4Jets.clone()
166     process.bkg6Jets.rParam = 0.6
167     process.bkg6Jets.radiusPU = 0.6
168    
169     process.bkg7Jets = process.bkg4Jets.clone()
170     process.bkg7Jets.rParam = 0.7
171     process.bkg7Jets.radiusPU = 0.7
172    
173 nart 1.11 process.bkgJets = cms.Sequence(process.bkg5Jets)
174    
175 nart 1.2
176 nart 1.5 process.ana = cms.EDAnalyzer('MinBiasTowerAnalyzer',
177 yilmaz 1.6 jetTowersMean = cms.untracked.vdouble(21,21.4,21.4,22,22.5,21.3,17.4,16.1,11.5,0),
178 yilmaz 1.7 jetTowersRMS = cms.untracked.vdouble(5.4,5.2,5.2,5.4,5.8,5.8,4.9,4.1,3.2,0),
179 nart 1.11 fakeJetSrc = cms.untracked.InputTag("bkg5Jets"),
180 nart 1.10 patJetSrc = cms.untracked.InputTag("icPu5patJets","","ANALYSIS"),
181     towersSrc = cms.untracked.InputTag("towerMaker","","RECO"),
182     nBins = cms.untracked.double(10),
183 nart 1.11 doRandomCone = cms.untracked.bool(True),
184     doEvtPlane = cms.untracked.bool(True),
185     centralitySrc = cms.untracked.InputTag("hiCentrality","","RECO"),
186 nart 1.13 excludeJets = cms.untracked.bool(False),
187     doRecHits = cms.untracked.bool(True),
188     ecalEBRecHitSrc = cms.untracked.InputTag("ecalRecHit","EcalRecHitsEB","RECO"),
189     ecalEERecHitSrc = cms.untracked.InputTag("ecalRecHit","EcalRecHitsEE","RECO")
190 nart 1.5 )
191 nart 1.2
192     process.load("CondCore.DBCommon.CondDBCommon_cfi")
193 nart 1.11 process.CondDBCommon.connect = "sqlite_file:/net/hisrv0001/home/nart/scratch/july/CMSSW_3_7_0_patch4/src/RecoHI/HiCentralityAlgos/data/CentralityTables.db"
194 nart 1.2 process.PoolDBESSource = cms.ESSource("PoolDBESSource",
195     process.CondDBCommon,
196     toGet = cms.VPSet(cms.PSet(record = cms.string('HeavyIonRcd'),
197 nart 1.10 tag = cms.string('HFhits10_MC_Hydjet2760GeV_MC_3XY_V24_NoZS_v0')
198 nart 1.2 )
199     )
200     )
201    
202 yilmaz 1.9 process.p = cms.Path(
203 nart 1.11 process.bkgXJets +
204     process.hiEvtPlane +
205     process.ak5CaloJets +
206     process.kt4CaloJets +
207     process.bkgJets +
208 nart 1.10 process.icPu5corr +
209     process.icPu5patJets +
210 yilmaz 1.9 process.ana
211     )
212 yilmaz 1.7 #process.out_step = cms.EndPath(process.output)
213 nart 1.5