Gen weight restructure + nano (nanogen) integration#6
Open
Gen weight restructure + nano (nanogen) integration#6
Conversation
First step to moving towards edm::OwnVector and polymorphic storage
First tests with parsing of lhe file. Need to incorp EDM lhe reader
fixing readerhelper problems
…nto Gen_parsing
…nto Gen_parsing
Need to look into more flexible implimentation/more error detection
Fix customize call, remove unimplimented args
0c04be3 to
a2912ec
Compare
kpedro88
reviewed
Jan 24, 2020
| #include "SimDataFormats/GeneratorProducts/interface/GenLumiInfoProduct.h" | ||
| #include "GeneratorInterface/Core/interface/WeightHelper.h" | ||
|
|
||
| #include <tinyxml2.h> |
| GenWeightHelper(); | ||
|
|
||
| void parseWeightGroupsFromNames(std::vector<std::string> weightNames); | ||
| private: |
| #include "SimDataFormats/GeneratorProducts/interface/LHERunInfoProduct.h" | ||
| #include "GeneratorInterface/Core/interface/WeightHelper.h" | ||
|
|
||
| #include <tinyxml2.h> |
| #include "SimDataFormats/GeneratorProducts/interface/PdfWeightGroupInfo.h" | ||
| #include "SimDataFormats/GeneratorProducts/interface/ScaleWeightGroupInfo.h" | ||
| #include "SimDataFormats/GeneratorProducts/interface/MEParamWeightGroupInfo.h" | ||
| #include <boost/algorithm/string.hpp> |
| size_t index; | ||
| std::string groupname; | ||
| std::string content; | ||
| std::unordered_map<std::string, std::string> attributes; |
| } | ||
|
|
||
| #endif // SimDataFormats_GeneratorProducts_MEParamWeightGroupInfo_h | ||
|
|
|
|
||
| auto matchingPdfSet = std::find_if(pdfGroups.begin(), pdfGroups.end(), | ||
| [lhaid] (gen::WeightGroupData& data) { | ||
| auto pdfGroup = dynamic_cast<const gen::PdfWeightGroupInfo*>(data.group); |
Owner
Author
There was a problem hiding this comment.
Sorry for the huge delay... in principle the weightType should always guarantee the cast works properly, but somehow it still felt dangerous. Can change to static_cast if you prefer.
| for (auto lhaid : lhaids) { | ||
| auto matchingPdfSet = std::find_if(pdfGroups.begin(), pdfGroups.end(), | ||
| [lhaid] (gen::WeightGroupData& data) { | ||
| auto pdfGroup = dynamic_cast<const gen::PdfWeightGroupInfo*>(data.group); |
| } | ||
|
|
||
| WeightGroupInfo* WeightGroupInfo::clone() const { | ||
| throw cms::Exception("LogicError", "WeightGroupInfo is abstract, so it's clone() method can't be implemented.\n"); |
| void setHeaderLines(std::vector<std::string> headerLines); | ||
| void parseWeights(); | ||
| void buildGroups(); | ||
| std::unique_ptr<WeightGroupInfo> buildGroup(const ParsedWeight& weight); |
There was a problem hiding this comment.
I think this function could be const. Can you check the other member functions of the Helper classes to see if any of them should also be const?
kdlong
pushed a commit
that referenced
this pull request
Sep 29, 2020
[WIP] TrackingParticle and SimCluster associationMap producer
kdlong
pushed a commit
that referenced
this pull request
Jan 27, 2021
…WithExample updating with code checks
kdlong
pushed a commit
that referenced
this pull request
Nov 7, 2021
Separate sequences for MC and data
kdlong
pushed a commit
that referenced
this pull request
Jun 17, 2022
Code maintenance for Run III in the DQMOffline ZCounting
kdlong
pushed a commit
that referenced
this pull request
Sep 12, 2022
Update InputTag of hltL1TEGammaHGCFilteredCollectionProducer
kdlong
pushed a commit
that referenced
this pull request
Jun 21, 2023
* Modifications to JetTags for jet selections Modify the JetTags producer for skipping the non selected jets and processing the good ones only * Update ParT TagInfo for jet selection * Add the bool for jet selection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
General structure of the weight products is relatively well advanced. A few outstanding items, such as adding the option to further split WeightGroupInfos if they contain multiple PDF sets.
Parsing code is still very much a work in progress.
Some code is specific to a "NanoGen" workflow, running only the gen pieces of Nano, which is very helpful for testing (and is a place where more configuration of the weights selected would be valuable).