Skip to content

Commit

Permalink
updating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alefisico committed Jul 17, 2019
1 parent 2c3542b commit 84d61e1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 93 deletions.
10 changes: 4 additions & 6 deletions test/ClusterWithToolboxAndMakeHistos.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@
process.GlobalTag.globaltag = '94X_mc2017_realistic_v12'
process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
process.options.allowUnscheduled = cms.untracked.bool(True)
process.MessageLogger.cerr.FwkReport.reportEvery = 100
process.MessageLogger.cerr.FwkReport.reportEvery = 1000

### INPUT
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )

process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring(
'/store/mc/RunIISummer17MiniAOD/ZprimeToTT_M-3000_W-300_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/MINIAODSIM/NZSFlatPU28to62_92X_upgrade2017_realistic_v10-v1/150000/E45A17E6-AAAC-E711-A423-00266CFFC80C.root'
)
fileNames = cms.untracked.vstring('/store/mc/RunIIAutumn18MiniAOD/TTJets_TuneCP5_13TeV-amcatnloFXFX-pythia8/MINIAODSIM/102X_upgrade2018_realistic_v15_ext1-v2/20000/7E65457A-87E5-C146-8321-9A48B4F56ED1.root'),
)

from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValTTbarPileUpMINIAODSIM
process.source.fileNames = filesRelValTTbarPileUpMINIAODSIM
#from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValTTbarPileUpMINIAODSIM
#process.source.fileNames = filesRelValTTbarPileUpMINIAODSIM

btagDiscAK4 = [
'pfCombinedInclusiveSecondaryVertexV2BJetTags',
Expand Down
3 changes: 2 additions & 1 deletion test/jetToolbox_nanoAODv5_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')

process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1000)
input = cms.untracked.int32(-1)
)

# Input source
Expand All @@ -32,6 +32,7 @@
)
#from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValTTbarPileUpMINIAODSIM
#process.source.fileNames = filesRelValTTbarPileUpMINIAODSIM
process.MessageLogger.cerr.FwkReport.reportEvery = 1000


process.options = cms.untracked.PSet(
Expand Down
137 changes: 51 additions & 86 deletions test/jettoolbox_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,68 +25,8 @@

from JMEAnalysis.JetToolbox.jetToolbox_cff import jetToolbox

'''
jetToolbox( process, 'ak8', 'jetSequence', 'out', PUMethod='CHS', miniAOD=True,
#Cut='pt > 200 && abs(eta) < 2.5', # Tight
runOnMC=False,
addPruning = True, addSoftDrop = True,
addNsub = True,
#addPrunedSubjets=True, addSoftDropSubjets=True,
#addNsubSubjets =True
)
jetToolbox( process, 'ak8', 'jetSequence', 'out', PUMethod='CHS', addPruning=False, dataTier="AOD", runOnMC=False) ### For example

#jetToolbox( process, 'ak4', 'jetSequence', 'out', PUMethod='Puppi', miniAOD=True, runOnMC=True )
#process.load('CommonTools.PileupAlgos.Puppi_cff')
#process.PuppiOnTheFly = process.puppi.clone( candName = cms.InputTag( 'packedPFCandidates' ), vertexName = cms.InputTag( 'offlineSlimmedPrimaryVertices' ), clonePackedCands = cms.bool(True) )
#process.PuppiOnTheFly.useExistingWeights = True
#jetToolbox(process, 'ak4', 'dummy', 'out', PUMethod = 'Puppi', JETCorrPayload = 'AK4PFchs', JETCorrLevels = ['L2Relative', 'L3Absolute'], miniAOD = True, newPFCollection=True, nameNewPFCollection='puppi')
#jetToolbox( process, 'ak8', 'ak8JetSubs', 'out', PUMethod='Puppi', addPruning=True, addSoftDrop=True , addPrunedSubjets=True, addSoftDropSubjets=True, addNsub=True, maxTau=6, addTrimming=True, addFiltering=True , JETCorrPayload='AK8PFchs', subJETCorrPayload='AK4PFchs', subJETCorrLevels=['L2Relative', 'L3Absoulte'] ) #, Cut='pt > 100 && abs(eta) < 2.4' )
#jetToolbox( process, 'ak8', 'ak8JetSubs', 'out', PUMethod='Puppi', addPruning=True, addSoftDrop=True , addPrunedSubjets=True, addSoftDropSubjets=True, addNsub=True, maxTau=6, addTrimming=True, addFiltering=True, JETCorrLevels=['L1FastJet', 'L2Relative'], newPFCollection=True, nameNewPFCollection='PuppiOnTheFly' )
#jetToolbox( process, 'ak8', 'ak8JetSubs', 'out', PUMethod='SK', addPruning=True, addSoftDrop=True , addPrunedSubjets=True, addSoftDropSubjets=True, addNsub=True, maxTau=6, addTrimming=True, addFiltering=True, JETCorrLevels=['L1FastJet', 'L2Relative'] )
#jetToolbox( process, 'ak8', 'ak8JetSubs', 'out', PUMethod='CS', addPruning=True, addSoftDrop=True , addPrunedSubjets=True, addSoftDropSubjets=True, addNsub=True, maxTau=6, addTrimming=True, addFiltering=True )
#jetToolbox( process, 'ak8', 'ak8JetSubs', 'out', PUMethod='CHS', addPruning=True, addSoftDrop=True , addPrunedSubjets=True, addSoftDropSubjets=True, addNsub=True, maxTau=6, addTrimming=True, addFiltering=True, addNsubSubjets=True )
#jetToolbox( process, 'ak8', 'ak8JetSubs', 'out', PUMethod='CHS', addPruning=True, addSoftDrop=True , addSoftDropSubjets=True, addNsub=True, maxTau=6, addTrimming=True, addFiltering=True, addNsubSubjets=True )
jetToolbox( process, 'ak8', 'ak8JetSubs', 'out',
PUMethod='CHS',
#updateCollection='slimmedJetsAK8',
JETCorrPayload='AK8PFchs',
#addEnergyCorrFunc=True,
#updateCollectionSubjets='slimmedJetsAK8PFCHSSoftDropPacked:SubJets',
#subJETCorrPayload='AK4PFchs',
bTagDiscriminators=listBtagDiscriminatorsAK4,
#addNsubSubjets=True,
#addPrunedSubjets=True,
postFix= 'CollectionTests',
#addTrimming=True,
#addPruning=True
) #, addPrunedSubjets=True, subJETCorrPayload='AK4PFchs' )
listBtagDiscriminatorsAK4 = [
#'pfJetProbabilityBJetTags',
#'pfCombinedInclusiveSecondaryVertexV2BJetTags',
'pfCombinedMVAV2BJetTags',
#'pfCombinedCvsLJetTags',
#'pfCombinedCvsBJetTags',
]
jetToolbox( process, 'ak8', 'ak8JetSubs', 'out',
PUMethod='Puppi',
#updateCollection='slimmedJetsAK8',
JETCorrPayload='AK8PFPuppi',
#addEnergyCorrFunc=True,
#updateCollectionSubjets='slimmedJetsAK8PFCHSSoftDropPacked:SubJets',
subJETCorrPayload='AK4PFPuppi',
bTagDiscriminators=listBtagDiscriminatorsAK4,
addNsub = True,
#addNsubSubjets=True,
#addPrunedSubjets=True,
#postFix= 'NEWCOLLECTIONOFJETS',
#addTrimming=True,
#addFiltering=True,
#addPruning=True,
addSoftDrop=True
) #, addPrunedSubjets=True, subJETCorrPayload='AK4PFchs' )
'''
#from JMEAnalysis.JetToolbox.jetToolbox_cff import jetToolbox
#listBTagInfos = ['pfInclusiveSecondaryVertexFinderTagInfos','pfImpactParameterTagInfos']
#listBtagDiscriminatorsAK8 = [
# 'pfBoostedDoubleSecondaryVertexAK8BJetTags',
Expand Down Expand Up @@ -165,36 +105,61 @@
# )
#

jetToolbox( process, 'ak15', 'ak15JetSubs', 'noOutput',
PUMethod='Puppi',
addPruning=True, addSoftDrop=True , # add basic grooming
addTrimming=True, addFiltering=True,
addSoftDropSubjets=True,
addPrunedSubjets=True,
addNsub=True, maxTau=4, # add Nsubjettiness tau1, tau2, tau3, tau4
JETCorrPayload = 'AK8PFPuppi', #JETCorrLevels = ['L2Relative', 'L3Absolute'],
runOnMC=False,
miniAOD=True,
Cut='pt > 100 && abs(eta) < 2.5',
GetJetMCFlavour=False,
#GetSubJetMCFlavour=True,
addHEPTopTagger=True
)


process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )
#jetToolbox( process, 'ak15', 'ak15JetSubs', 'noOutput',
# PUMethod='Puppi',
# addPruning=True, addSoftDrop=True , # add basic grooming
# addTrimming=True, addFiltering=True,
# addSoftDropSubjets=True,
# addPrunedSubjets=True,
# addNsub=True, maxTau=4, # add Nsubjettiness tau1, tau2, tau3, tau4
# JETCorrPayload = 'AK8PFPuppi', #JETCorrLevels = ['L2Relative', 'L3Absolute'],
# runOnMC=False,
# miniAOD=True,
# Cut='pt > 100 && abs(eta) < 2.5',
# GetJetMCFlavour=False,
# #GetSubJetMCFlavour=True,
# addHEPTopTagger=True
# )

#bTagDiscriminators = [
# #'pfCombinedInclusiveSecondaryVertexV2BJetTags',
# #'pfBoostedDoubleSecondaryVertexAK8BJetTags',
# 'pfMassIndependentDeepDoubleBvLJetTags:probQCD',
# 'pfMassIndependentDeepDoubleBvLJetTags:probHbb',
# #'pfDeepCSVJetTags:probb',
# #'pfDeepCSVJetTags:probbb',
#]
#subjetBTagDiscriminators = [
# 'pfCombinedInclusiveSecondaryVertexV2BJetTags',
# 'pfDeepCSVJetTags:probb',
# 'pfDeepCSVJetTags:probbb',
#]
#JETCorrLevels = ['L2Relative', 'L3Absolute', 'L2L3Residual']
#
#jetToolbox(process, 'ak8', 'dummyseq', 'out',
# dataTier='miniAOD',
# PUMethod='Puppi', JETCorrPayload='AK4PFPuppi', JETCorrLevels=JETCorrLevels,
# #addQGTagger=True,
# Cut='pt > 170.0 && abs(rapidity()) < 2.4',
# runOnMC=True,
# addNsub=True, maxTau=3, addEnergyCorrFunc=True,
# addSoftDrop=True, addSoftDropSubjets=True, subJETCorrPayload='AK4PFPuppi', subJETCorrLevels=JETCorrLevels,
# #bTagDiscriminators=bTagDiscriminators,
# #subjetBTagDiscriminators=subjetBTagDiscriminators
# )


process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000) )
process.source = cms.Source("PoolSource",
# fileNames = cms.untracked.vstring(#'file:example.root'
fileNames = cms.untracked.vstring(
'/store/data/Run2016G/JetHT/MINIAOD/PromptReco-v1/000/280/002/00000/E82E26C7-4375-E611-AE7F-FA163E48F736.root'
#'/store/mc/RunIIFall17MiniAOD/QCD_HT1000to1500_TuneCP5_13TeV-madgraph-pythia8/MINIAODSIM/94X_mc2017_realistic_v10-v1/00000/02961665-F9F9-E711-87B5-0026B93F49B0.root'
#'/store/mc/RunIIFall17MiniAODv2/Res1ToRes2GluTo3Glu_M1-2000_R-0p1_TuneCP5_13TeV-madgraph-pythia8/MINIAODSIM/PU2017_12Apr2018_94X_mc2017_realistic_v14-v2/00000/44F72487-F763-E811-9E6C-6C3BE5B5E4C0.root'
#'/store/relval/CMSSW_9_4_5_cand1/JetHT/MINIAOD/94X_dataRun2_relval_v11_RelVal_rmaod_jetHT2017B-v1/10000/18B5E95F-992E-E811-9422-0CC47A78A418.root'
fileNames = cms.untracked.vstring(
#'/store/mc/RunIIAutumn18MiniAOD/TTJets_TuneCP5_13TeV-amcatnloFXFX-pythia8/MINIAODSIM/102X_upgrade2018_realistic_v15_ext1-v2/20000/7E65457A-87E5-C146-8321-9A48B4F56ED1.root'
'/store/data/Run2017C/DoubleMuon/AOD/17Nov2017-v1/50001/2005DA54-85D3-E711-BF10-02163E011E35.root'
),
)

from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValTTbarPileUpMINIAODSIM
process.source.fileNames = filesRelValTTbarPileUpMINIAODSIM
#from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValTTbarPileUpMINIAODSIM
#process.source.fileNames = filesRelValTTbarPileUpMINIAODSIM

#from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValProdTTbarAODSIM
#process.source.fileNames = filesRelValProdTTbarAODSIM

0 comments on commit 84d61e1

Please sign in to comment.