New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding puppi to miniAODs #8122
adding puppi to miniAODs #8122
Changes from all commits
488ecf6
52ad4fa
c738401
479ba23
b89b1c5
8325cfa
66b98c9
7449cd8
7a2cf20
dc6bad9
6dc67d0
eb02cf2
8177210
58e7374
6eaa878
6ff1521
ad33789
2b4c655
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,6 +174,57 @@ def miniAOD_customizeCommon(process): | |
for idmod in electron_ids: | ||
setupAllVIDIdsInModule(process,idmod,setupVIDElectronSelection) | ||
|
||
# Adding puppi jets | ||
process.load('CommonTools.PileupAlgos.Puppi_cff') | ||
process.load('RecoJets.JetProducers.ak4PFJetsPuppi_cfi') | ||
#process.puppi.candName = cms.InputTag('packedPFCandidates') | ||
#process.puppi.vertexName = cms.InputTag('offlineSlimmedPrimaryVertices') | ||
|
||
from RecoJets.JetAssociationProducers.j2tParametersVX_cfi import j2tParametersVX | ||
process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer("JetTracksAssociatorAtVertex", | ||
j2tParametersVX, | ||
jets = cms.InputTag("ak4PFJetsPuppi") | ||
) | ||
process.patJetPuppiCharge = cms.EDProducer("JetChargeProducer", | ||
src = cms.InputTag("ak4PFJetsPuppiTracksAssociatorAtVertex"), | ||
var = cms.string('Pt'), | ||
exp = cms.double(1.0) | ||
) | ||
|
||
addJetCollection(process, postfix = "", labelName = 'Puppi', jetSource = cms.InputTag('ak4PFJetsPuppi'), | ||
jetCorrections = ('AK4PF', ['L1FastJet', 'L2Relative', 'L3Absolute'], ''), | ||
algo= 'AK', rParam = 0.4, btagDiscriminators = map(lambda x: x.value() ,process.patJets.discriminatorSources) | ||
) | ||
|
||
process.patJetGenJetMatchPuppi.matched = 'slimmedGenJets' | ||
|
||
process.patJetsPuppi.userData.userFloats.src = cms.VInputTag(cms.InputTag("")) | ||
process.patJetsPuppi.jetChargeSource = cms.InputTag("patJetPuppiCharge") | ||
process.patJetsPuppi.tagInfoSources = cms.VInputTag(cms.InputTag("pfSecondaryVertexTagInfosPuppi")) | ||
process.patJetsPuppi.addTagInfos = cms.bool(True) | ||
|
||
process.selectedPatJetsPuppi.cut = cms.string("pt > 20") | ||
|
||
process.load('PhysicsTools.PatAlgos.slimming.slimmedJets_cfi') | ||
process.slimmedJetsPuppi = process.slimmedJets.clone() | ||
process.slimmedJetsPuppi.src = cms.InputTag("selectedPatJetsPuppi") | ||
process.slimmedJetsPuppi.packedPFCandidates = cms.InputTag("packedPFCandidates") | ||
|
||
## puppi met | ||
process.load('RecoMET.METProducers.PFMET_cfi') | ||
process.pfMetPuppi = process.pfMet.clone() | ||
process.pfMetPuppi.src = cms.InputTag("puppi") | ||
process.pfMetPuppi.alias = cms.string('pfMetPuppi') | ||
|
||
from PhysicsTools.PatAlgos.tools.metTools import addMETCollection | ||
addMETCollection(process, labelName='patMETPuppi', metSource='pfMetPuppi') | ||
|
||
process.load('PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi') | ||
process.slimmedMETsPuppi = process.slimmedMETs.clone() | ||
process.slimmedMETsPuppi.src = cms.InputTag("patMETPuppi") | ||
process.slimmedMETsPuppi.rawUncertainties = cms.InputTag("patPFMet%s") | ||
process.slimmedMETsPuppi.type1Uncertainties = cms.InputTag("patPFMetT1%s") | ||
process.slimmedMETsPuppi.type1p2Uncertainties = cms.InputTag("patPFMetT1T2%s") | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could most of this go into proper cfis and cffs instead of something miniAOD specific? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess only this is not MINIAOD specific On the other hand also the miniaod part could go in some cfi/cff ... the toplevel miniaod.py should be used only for direct access to process instance. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds good - minimizing what is miniAODTools is best |
||
|
||
def miniAOD_customizeMC(process): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this should be 18 instead of 17 (interfering PRs again...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, does it matter? I mean if no release exists with "17" why should we care about increasing the version number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your question assumes a particular future path of the release builds. While likely true, lets try not to repeat mistakes of the past…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mhh in any case I expect the checksum to be neither of the two if both PRs
are changing something... so is not just a matter of increasing 17 to 18,
right?
On Sun, Mar 15, 2015 at 6:49 PM, David Lange notifications@github.com
wrote:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidlange6 and @arizzi I'll test and update this as required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi David, I've tried rebuilding and "scram b updateclassversion" and didn't see any changes. How can I get the checksum for 18?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mhh then you did already update in the last rebase the checksum including
the changed that lead to current "17" ?
if so just increase the ClassVersion to 18 keeping 1257500115 as checksum
On Sun, Mar 15, 2015 at 7:39 PM, Jason Lee notifications@github.com wrote: