-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Updating SONIC ParticleNet Producer and Config Files #43138
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
Changes from 1 commit
6855d27
ac56ba8
a9244c5
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 | ||
|---|---|---|---|---|
|
|
@@ -49,7 +49,14 @@ class ParticleNetSonicJetTagsProducer : public TritonEDProducer<> { | |||
| std::unordered_map<std::string, PreprocessParams> prep_info_map_; // preprocessing info for each input group | ||||
| bool debug_ = false; | ||||
| bool skippedInference_ = false; | ||||
| constexpr static unsigned numParticleGroups_ = 3; | ||||
| std::vector<bool> emptyJets_; | ||||
| unsigned numParticleGroups_ = 0; | ||||
| unsigned numVertexGroups_ = 0; | ||||
| unsigned numLostTrackGroups_ = 0; | ||||
| bool countedInputs = false; | ||||
| std::string particleNameExample_; | ||||
| std::string vertexNameExample_; | ||||
| std::string losttrackNameExample_; | ||||
| }; | ||||
|
|
||||
| ParticleNetSonicJetTagsProducer::ParticleNetSonicJetTagsProducer(const edm::ParameterSet &iConfig) | ||||
|
|
@@ -86,6 +93,8 @@ ParticleNetSonicJetTagsProducer::ParticleNetSonicJetTagsProducer(const edm::Para | |||
| for (const auto &flav_name : flav_names_) { | ||||
| produces<JetTagCollection>(flav_name); | ||||
| } | ||||
|
|
||||
| emptyJets_.clear(); | ||||
| } | ||||
|
|
||||
| ParticleNetSonicJetTagsProducer::~ParticleNetSonicJetTagsProducer() {} | ||||
|
|
@@ -131,26 +140,74 @@ void ParticleNetSonicJetTagsProducer::acquire(edm::Event const &iEvent, edm::Eve | |||
| iEvent.getByToken(src_, tag_infos); | ||||
| client_->setBatchSize(tag_infos->size()); | ||||
| skippedInference_ = false; | ||||
|
|
||||
| emptyJets_.clear(); | ||||
|
|
||||
| if (!countedInputs) { | ||||
|
||||
| void ParticleNetConstructor(const edm::ParameterSet &Config_, |
I need the emptyJets_ vector to be cleared for every event, which is why I added it here, instead of just the call at line 97, which you said was not needed
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.
This comment was about initializing the constants that happens in this if block. (Indeed the clear() call should happen in acquire().)
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.
Ahhh I see what you mean. Yes, moved that block into the constructor
rappoccio marked this conversation as resolved.
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,7 @@ | |
| ) | ||
| ) | ||
|
|
||
|
|
||
|
||
| pfMassDecorrelatedParticleNetJetTags = boostedJetONNXJetTagsProducer.clone( | ||
| src = 'pfParticleNetTagInfos', | ||
| preprocess_json = 'RecoBTag/Combined/data/ParticleNetAK8/MD-2prong/V01/preprocess.json', | ||
|
|
||
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.
should not be necessary; vectors are initialized to empty by default
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.
deleted