Skip to content
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

Open
wants to merge 87 commits into
base: master
Choose a base branch
from

Conversation

kdlong
Copy link
Owner

@kdlong kdlong commented Jan 18, 2020

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).

kdlong and others added 30 commits May 27, 2019 20:33
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
Need to look into more flexible implimentation/more error detection
@kdlong kdlong force-pushed the NanoGenWithWeights branch from 0c04be3 to a2912ec Compare January 23, 2020 20:12
#include "SimDataFormats/GeneratorProducts/interface/GenLumiInfoProduct.h"
#include "GeneratorInterface/Core/interface/WeightHelper.h"

#include <tinyxml2.h>

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:

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>

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>

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;

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

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);

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?

Copy link
Owner Author

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.

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);

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");

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);

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?

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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants