26 |
|
|
27 |
|
from FWCore.ParameterSet.VarParsing import VarParsing |
28 |
|
options = VarParsing ('analysis') |
29 |
< |
options.register('Run','data_MuonA',VarParsing.multiplicity.singleton, VarParsing.varType.string,"Option to Run: data or MC.") |
29 |
> |
options.register('Run','data_MuonP1',VarParsing.multiplicity.singleton, VarParsing.varType.string,"Option to Run: data or MC.") |
30 |
|
options.parseArguments() |
31 |
|
|
32 |
|
process = cms.Process("Analysis") |
39 |
|
config.comEnergy = 7000.0 |
40 |
|
config.trackAnalyzerName = 'trackHistoAnalyzer' |
41 |
|
config.trackTagName = 'analysisTracks' |
42 |
< |
config.NumberOfEvents = 100 |
42 |
> |
config.NumberOfEvents = -1 |
43 |
> |
config.sys = False |
44 |
|
|
45 |
|
# |
46 |
|
# Define Options to Run |
47 |
|
# |
48 |
|
###################################################################################### |
49 |
|
|
50 |
< |
if options.Run == "data_MuonA": |
50 |
> |
if options.Run == "data_MuonP1": |
51 |
|
print("") |
52 |
|
print("###################") |
53 |
< |
print("Data Muon 2010 RunA") |
53 |
> |
print("Data Muon 2010 P1") |
54 |
|
print("###################") |
55 |
|
print("") |
56 |
|
config.globalTagNameData = 'GR_R_42_V23::All' |
57 |
|
config.TriggerOn = True |
58 |
< |
triggerlist = 'HLT_Mu9','HLT_L1Mu20' |
58 |
> |
triggerlist = 'HLT_Mu9','HLT_DoubleMu3' |
59 |
|
l1list = 'L1_ZeroBias','L1_SingleEG5' |
60 |
|
config.runOnMC = False |
61 |
|
config.runPUMC = False |
62 |
|
config.runGen = False |
63 |
|
|
64 |
< |
elif options.Run == "data_MuonB": |
64 |
> |
elif options.Run == "data_MuonP2": |
65 |
|
print("") |
66 |
|
print("###################") |
67 |
< |
print("Data Muon 2010 RunB") |
67 |
> |
print("Data Muon 2010 P2") |
68 |
|
print("###################") |
69 |
|
print("") |
70 |
|
config.globalTagNameData = 'GR_R_42_V23::All' |
71 |
|
config.TriggerOn = True |
72 |
< |
triggerlist = 'HLT_Mu9','HLT_L1Mu20' |
72 |
> |
triggerlist = 'HLT_Mu15','HLT_DoubleMu5_v*' |
73 |
|
l1list = 'L1_ZeroBias','L1_SingleEG5' |
74 |
|
config.runOnMC = False |
75 |
|
config.runPUMC = False |
76 |
|
config.runGen = False |
77 |
|
|
78 |
< |
elif options.Run == "data_ElectronA": |
78 |
> |
elif options.Run == "data_ElectronP1": |
79 |
|
print("") |
80 |
|
print("#######################") |
81 |
< |
print("Data Electron 2010 RunA") |
81 |
> |
print("Data Electron 2010 P1") |
82 |
|
print("#######################") |
83 |
|
print("") |
84 |
|
config.globalTagNameData = 'GR_R_42_V23::All' |
85 |
|
config.TriggerOn = True |
86 |
< |
triggerlist = 'HLT_Photon10_L1R','HLT_Photon15_Cleaned_l1R' |
86 |
> |
triggerlist = 'HLT_Photon10_L1R','HLT_Photon15_Cleaned_L1R','HLT_Ele15_SW_CaloEleId_L1R','HLT_Ele17_SW_CaloEleId_L1R','HLT_Ele17_SW_TightEleId_L1R','HLT_Ele22_SW_TighterCaloIdIsol_L1R_v1','HLT_Ele22_SW_TighterCaloIdIsol_L1R_v2' |
87 |
|
l1list = 'L1_ZeroBias','L1_SingleEG5' |
88 |
|
config.runOnMC = False |
89 |
|
config.runPUMC = False |
90 |
|
config.runGen = False |
91 |
|
|
92 |
< |
elif options.Run == "data_ElectronB": |
92 |
> |
elif options.Run == "data_ElectronP2": |
93 |
|
print("") |
94 |
|
print("#######################") |
95 |
< |
print("Data Electron 2010 RunB") |
95 |
> |
print("Data Electron 2010 P2") |
96 |
|
print("#######################") |
97 |
|
print("") |
98 |
|
config.globalTagNameData = 'GR_R_42_V23::All' |
99 |
|
config.TriggerOn = True |
100 |
< |
triggerlist = 'HLT_Ele15_SW_CaloEleId_L1R','HLT_Ele17_SW_CaloEleId_L1R','HLT_Ele17_SW_TightEleId_L1R' |
100 |
> |
triggerlist = 'HLT_Photon10_L1R','HLT_Photon15_Cleaned_L1R','HLT_Ele15_SW_CaloEleId_L1R','HLT_Ele17_SW_CaloEleId_L1R','HLT_Ele17_SW_TightEleId_L1R','HLT_Ele22_SW_TighterCaloIdIsol_L1R_v1','HLT_Ele22_SW_TighterCaloIdIsol_L1R_v2' |
101 |
|
l1list = 'L1_ZeroBias','L1_SingleEG5' |
102 |
|
config.runOnMC = False |
103 |
|
config.runPUMC = False |
330 |
|
# |
331 |
|
###################################################################################### |
332 |
|
|
333 |
< |
process.load("ForwardAnalysis.AnalysisSequences.CommonModulesSequences_cff") |
333 |
> |
process.load("ForwardAnalysis.DiffractiveZAnalysis.diffractiveZAnalysisSequences_cff") |
334 |
|
process.pfCandidateNoiseThresholds.src = "pfNoPileUpPFlow" |
335 |
|
process.tracksTransverseRegion.JetTag = "selectedPatJetsPFlow" |
336 |
|
|
341 |
|
|
342 |
|
from ForwardAnalysis.ForwardTTreeAnalysis.DiffractiveAnalysis_cfi import DiffractiveAnalysis |
343 |
|
from ForwardAnalysis.DiffractiveZAnalysis.DiffractiveZAnalysis_cfi import DiffractiveZAnalysis |
344 |
< |
from ForwardAnalysis.ForwardTTreeAnalysis.PATTriggerInfo_cfi import PATTriggerInfo |
344 |
> |
#from ForwardAnalysis.ForwardTTreeAnalysis.PATTriggerInfo_cfi import PATTriggerInfo |
345 |
|
|
346 |
|
#PATTriggerInfo.L1AlgoBitName = config.l1Paths |
347 |
< |
PATTriggerInfo.HLTAlgoBitName = config.hltPaths |
348 |
< |
PATTriggerInfo.runALLTriggerPath = True |
347 |
> |
#PATTriggerInfo.HLTAlgoBitName = config.hltPaths |
348 |
> |
#PATTriggerInfo.runALLTriggerPath = True |
349 |
|
|
350 |
|
# |
351 |
|
# Define Analyzers |
352 |
|
# |
353 |
|
###################################################################################### |
354 |
|
|
355 |
+ |
process.diffractiveZHLTFilter.HLTPaths = config.hltPaths |
356 |
+ |
|
357 |
|
process.diffractiveZAnalysisTTree = cms.EDAnalyzer("EventInfoDiffractiveDiffractiveZAnalysisTTree", |
358 |
|
EventInfo = cms.PSet( |
359 |
|
RunOnData = cms.untracked.bool(not config.runOnMC), |
364 |
|
DiffractiveZAnalysis = DiffractiveZAnalysis |
365 |
|
) |
366 |
|
|
367 |
< |
process.CommonHLTFilter.HLTPaths = config.hltPaths |
367 |
> |
process.diffractiveZAnalysisTTree.DiffractiveZAnalysis.hltPaths = config.hltPaths |
368 |
|
|
369 |
|
process.diffractiveZAnalysisTTree.DiffractiveAnalysis.hltPath = '' |
370 |
|
process.diffractiveZAnalysisTTree.DiffractiveAnalysis.trackTag = 'analysisTracks' |
374 |
|
process.diffractiveZAnalysisTTree.DiffractiveAnalysis.accessCastorInfo = False |
375 |
|
process.diffractiveZAnalysisTTree.DiffractiveAnalysis.accessZDCInfo = False |
376 |
|
|
377 |
< |
process.diffractiveZAnalysisTTree.DiffractiveZAnalysis.hltPaths = config.hltPaths |
377 |
> |
process.diffractiveZAnalysisTTreePFShiftedUp = process.diffractiveZAnalysisTTree.clone() |
378 |
> |
process.diffractiveZAnalysisTTreePFShiftedUp.DiffractiveAnalysis.particleFlowTag = "pfCandidateNoiseThresholdsShiftedUp" |
379 |
> |
process.diffractiveZAnalysisTTreePFShiftedUp.DiffractiveAnalysis.edmNtupleEtaMaxTag = "edmNtupleEtaMaxShiftedUp" |
380 |
> |
process.diffractiveZAnalysisTTreePFShiftedUp.DiffractiveAnalysis.edmNtupleEtaMinTag = "edmNtupleEtaMinShiftedUp" |
381 |
> |
process.diffractiveZAnalysisTTreePFShiftedUp.DiffractiveZAnalysis.pfTag = "pfCandidateNoiseThresholdsShiftedUp" |
382 |
> |
|
383 |
> |
process.diffractiveZAnalysisTTreePFShiftedDown = process.diffractiveZAnalysisTTree.clone() |
384 |
> |
process.diffractiveZAnalysisTTreePFShiftedDown.DiffractiveAnalysis.particleFlowTag = "pfCandidateNoiseThresholdsShiftedDown" |
385 |
> |
process.diffractiveZAnalysisTTreePFShiftedDown.DiffractiveAnalysis.edmNtupleEtaMaxTag = "edmNtupleEtaMaxShiftedDown" |
386 |
> |
process.diffractiveZAnalysisTTreePFShiftedDown.DiffractiveAnalysis.edmNtupleEtaMinTag = "edmNtupleEtaMinShiftedDown" |
387 |
> |
process.diffractiveZAnalysisTTreePFShiftedDown.DiffractiveZAnalysis.pfTag = "pfCandidateNoiseThresholdsShiftedDown" |
388 |
> |
|
389 |
|
if config.runOnMC: |
390 |
|
process.diffractiveZAnalysisTTree.DiffractiveZAnalysis.RunMC = True |
391 |
|
process.diffractiveZAnalysisTTree.DiffractiveZAnalysis.fCGeVCastor = 0.9375 |
416 |
|
###################################################################################### |
417 |
|
|
418 |
|
process.pat_Producer = cms.Path(process.makePatElectrons + process.makePatMuons) |
405 |
– |
process.analysis_reco_step = cms.Path(process.analysisSequences) |
419 |
|
process.castor_step = cms.Path(process.castorSequence) |
420 |
|
|
421 |
+ |
if config.sys: |
422 |
|
|
423 |
< |
if config.TriggerOn: |
424 |
< |
process.analysis_diffractiveDiffractiveZAnalysisPATTriggerInfoTTree_step = cms.Path( |
425 |
< |
process.eventSelectionHLT + process.diffractiveZAnalysisTTree) |
423 |
> |
print(">> With Energy Scale.") |
424 |
> |
if config.TriggerOn: |
425 |
> |
print(">> With Trigger.") |
426 |
> |
process.analysis_diffractiveDiffractiveZAnalysisPATTriggerInfoTTree_step = cms.Path( |
427 |
> |
process.analysisSequencesShiftedUp + process.analysisSequencesShiftedDown + process.analysisSequences + process.eventSelectionHLT + |
428 |
> |
process.diffractiveZAnalysisTTreePFShiftedUp + process.diffractiveZAnalysisTTreePFShiftedDown + process.diffractiveZAnalysisTTree) |
429 |
> |
|
430 |
> |
else: |
431 |
> |
print(">> No Trigger.") |
432 |
> |
process.analysis_diffractiveDiffractiveZAnalysisPATTriggerInfoTTree_step = cms.Path( |
433 |
> |
process.analysisSequencesShiftedUp + process.analysisSequencesShiftedDown + process.analysisSequences + process.eventSelection + |
434 |
> |
process.diffractiveZAnalysisTTreePFShiftedUp + process.diffractiveZAnalysisTTreePFShiftedDown + process.diffractiveZAnalysisTTree) |
435 |
|
|
436 |
|
else: |
437 |
< |
process.analysis_diffractiveDiffractiveZAnalysisPATTriggerInfoTTree_step = cms.Path( |
438 |
< |
process.eventSelection + process.diffractiveZAnalysisTTree) |
437 |
> |
|
438 |
> |
print(">> No Energy Scale.") |
439 |
> |
if config.TriggerOn: |
440 |
> |
print(">> With Trigger.") |
441 |
> |
process.analysis_diffractiveDiffractiveZAnalysisPATTriggerInfoTTree_step = cms.Path( |
442 |
> |
process.analysisSequences + process.eventSelectionHLT + process.diffractiveZAnalysisTTree) |
443 |
> |
|
444 |
> |
else: |
445 |
> |
print(">> No Trigger.") |
446 |
> |
process.analysis_diffractiveDiffractiveZAnalysisPATTriggerInfoTTree_step = cms.Path( |
447 |
> |
process.analysisSequences + process.eventSelection + process.diffractiveZAnalysisTTree) |
448 |
> |
|
449 |
|
|