-
Notifications
You must be signed in to change notification settings - Fork 1
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
Gen weight restructure + nano (nanogen) integration #6
base: master
Are you sure you want to change the base?
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
#include "SimDataFormats/GeneratorProducts/interface/GenLumiInfoProduct.h" | ||
#include "GeneratorInterface/Core/interface/WeightHelper.h" | ||
|
||
#include <tinyxml2.h> |
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 be in "" not <>
GenWeightHelper(); | ||
|
||
void parseWeightGroupsFromNames(std::vector<std::string> weightNames); | ||
private: |
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.
remove private if unused
#include "SimDataFormats/GeneratorProducts/interface/LHERunInfoProduct.h" | ||
#include "GeneratorInterface/Core/interface/WeightHelper.h" | ||
|
||
#include <tinyxml2.h> |
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.
"" not <>
#include "SimDataFormats/GeneratorProducts/interface/PdfWeightGroupInfo.h" | ||
#include "SimDataFormats/GeneratorProducts/interface/ScaleWeightGroupInfo.h" | ||
#include "SimDataFormats/GeneratorProducts/interface/MEParamWeightGroupInfo.h" | ||
#include <boost/algorithm/string.hpp> |
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.
is this include needed?
size_t index; | ||
std::string groupname; | ||
std::string content; | ||
std::unordered_map<std::string, std::string> attributes; |
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.
add #include <unordered_map>
} | ||
|
||
#endif // SimDataFormats_GeneratorProducts_MEParamWeightGroupInfo_h | ||
|
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.
remove extra spaces
|
||
auto matchingPdfSet = std::find_if(pdfGroups.begin(), pdfGroups.end(), | ||
[lhaid] (gen::WeightGroupData& data) { | ||
auto pdfGroup = dynamic_cast<const gen::PdfWeightGroupInfo*>(data.group); |
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.
does this need to be a dynamic cast?
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.
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.
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.
I would change it to static_cast.
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); |
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.
does this need to be a dynamic cast?
} | ||
|
||
WeightGroupInfo* WeightGroupInfo::clone() const { | ||
throw cms::Exception("LogicError", "WeightGroupInfo is abstract, so it's clone() method can't be implemented.\n"); |
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.
it's -> its
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
?
[WIP] TrackingParticle and SimCluster associationMap producer
…WithExample updating with code checks
Separate sequences for MC and data
Code maintenance for Run III in the DQMOffline ZCounting
Update InputTag of hltL1TEGammaHGCFilteredCollectionProducer
* 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
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).