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
HCAL: slimmed collections with non-0 noise flags RecHits for miniAOD #31375
Changes from 3 commits
dda2c0e
30c707b
c17a680
10d75d3
cb6479c
0d2f166
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 | ||
---|---|---|---|---|
|
@@ -169,7 +169,6 @@ void HcalHitSelection::produce(edm::Event& iEvent, const edm::EventSetup& iSetup | |||
|
||||
iEvent.getByToken(tok_hbhe_, hbhe); | ||||
iEvent.getByToken(tok_hf_, hf); | ||||
iEvent.getByToken(tok_ho_, ho); | ||||
|
||||
toBeKept.clear(); | ||||
edm::Handle<DetIdCollection> detId; | ||||
|
@@ -191,6 +190,9 @@ void HcalHitSelection::produce(edm::Event& iEvent, const edm::EventSetup& iSetup | |||
skim(hf, *hf_out); | ||||
iEvent.put(std::move(hf_out), hfTag.label()); | ||||
|
||||
if (!iEvent.getByToken(tok_ho_, ho)) | ||||
return; | ||||
iEvent.getByToken(tok_ho_, ho); | ||||
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 wonder about these lines, as I have not seen such a pattern before. Is it necessary to call |
||||
auto ho_out = std::make_unique<HORecHitCollection>(); | ||||
skim(ho, *ho_out, hoSeverityLevel); | ||||
iEvent.put(std::move(ho_out), hoTag.label()); | ||||
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. in reco we should still put a declared product into the event (it can be empty) instead of returning. 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. This new (cloned) mini-AOD slimmedHcalRecHits producer uses an input from reducedHcalRecHits (in AOD), which exists only for HBHE and HF. 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.
configure properly, so that the code does not try to read a collection that is known at configuration step to not exist 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. Slava
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. a check for an empty InputTag or a separate flag should be fine. 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. Sorry for confusion... :( |
||||
|
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.
If you're overriding existing PSet items, it would be good to use the type-free syntax: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideAboutPythonConfigFile#Modifying_Parameters