-
Notifications
You must be signed in to change notification settings - Fork 4.6k
EXOnanoAODv1 producers and setup #48502
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
Open
kerstinlovisa
wants to merge
3
commits into
cms-sw:master
Choose a base branch
from
kerstinlovisa:EXOnanoAODv1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,732
−0
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,191 @@ | ||
| namespace Scaling { | ||
| struct PfCand { | ||
| inline static const std::vector<std::vector<float>> mean = {{0, 0}, | ||
| {50.0, 50.0}, | ||
| {0.0, 0.0}, | ||
| {0.0, 0.0}, | ||
| {0.09469, 0.09469}, | ||
| {0, 0}, | ||
| {0, 0}, | ||
| {0, 0}, | ||
| {5.0, 5.0}, | ||
| {5.0, 5.0}, | ||
| {6.442, 6.442}, | ||
| {0, 0}, | ||
| {-0.01635, -0.01635}, | ||
| {0.02704, 0.02704}, | ||
| {-0.01443, -0.01443}, | ||
| {0.05551, 0.05551}, | ||
| {11.16, 11.16}, | ||
| {13.53, 13.53}, | ||
| {0.5, 0.5}, | ||
| {0.5, 0.5}, | ||
| {1.3, 1.3}, | ||
| {0.5, 0.5}, | ||
| {0, 0}, | ||
| {0, 0}}; | ||
| inline static const std::vector<std::vector<float>> std = {{1, 1}, {50.0, 50.0}, | ||
| {3.0, 3.0}, {3.141592653589793, 3.141592653589793}, | ||
| {0.0651, 0.0651}, {1, 1}, | ||
| {1, 1}, {1, 1}, | ||
| {5.0, 5.0}, {5.0, 5.0}, | ||
| {8.344, 8.344}, {1, 1}, | ||
| {2.4, 2.4}, {0.08913, 0.08913}, | ||
| {7.444, 7.444}, {0.5998, 0.5998}, | ||
| {60.39, 60.39}, {6.44, 6.44}, | ||
| {0.5, 0.5}, {0.5, 0.5}, | ||
| {1.3, 1.3}, {0.5, 0.5}, | ||
| {1, 1}, {1, 1}}; | ||
| inline static const std::vector<std::vector<float>> lim_min = { | ||
| {-std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()}, | ||
| {-1.0, -1.0}, | ||
| {-1.0, -1.0}, | ||
| {-1.0, -1.0}, | ||
| {-5, -5}, | ||
| {-std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()}, | ||
| {-std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()}, | ||
| {-std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()}, | ||
| {-1.0, -1.0}, | ||
| {-1.0, -1.0}, | ||
| {-5, -5}, | ||
| {-std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()}, | ||
| {-5, -5}, | ||
| {-5, -5}, | ||
| {-5, -5}, | ||
| {-5, -5}, | ||
| {-5, -5}, | ||
| {-5, -5}, | ||
| {-1.0, -1.0}, | ||
| {-1.0, -1.0}, | ||
| {-1.0, -1.0}, | ||
| {-1.0, -1.0}, | ||
| {-std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()}, | ||
| {-std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()}}; | ||
| inline static const std::vector<std::vector<float>> lim_max = { | ||
| {std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()}, | ||
| {1.0, 1.0}, | ||
| {1.0, 1.0}, | ||
| {1.0, 1.0}, | ||
| {5, 5}, | ||
| {std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()}, | ||
| {std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()}, | ||
| {std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()}, | ||
| {1.0, 1.0}, | ||
| {1.0, 1.0}, | ||
| {5, 5}, | ||
| {std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()}, | ||
| {5, 5}, | ||
| {5, 5}, | ||
| {5, 5}, | ||
| {5, 5}, | ||
| {5, 5}, | ||
| {5, 5}, | ||
| {1.0, 1.0}, | ||
| {1.0, 1.0}, | ||
| {1.0, 1.0}, | ||
| {1.0, 1.0}, | ||
| {std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()}, | ||
| {std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()}}; | ||
| }; | ||
| struct PfCandCategorical { | ||
| inline static const std::vector<std::vector<float>> mean = {{0, 0}, {0, 0}, {0, 0}}; | ||
| inline static const std::vector<std::vector<float>> std = {{1, 1}, {1, 1}, {1, 1}}; | ||
| inline static const std::vector<std::vector<float>> lim_min = { | ||
| {-std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()}, | ||
| {-std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()}, | ||
| {-std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()}}; | ||
| inline static const std::vector<std::vector<float>> lim_max = { | ||
| {std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()}, | ||
| {std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()}, | ||
| {std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()}}; | ||
| }; | ||
| }; // namespace Scaling | ||
|
|
||
| namespace Setup { | ||
|
Contributor
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.
|
||
| const inline long int output_classes = 2; | ||
| const inline size_t n_Global = 5; | ||
| const inline size_t n_PfCand = 24; | ||
| const inline size_t nSeq_PfCand = 50; | ||
| const inline size_t n_PfCandCategorical = 3; | ||
| const inline size_t nSeq_PfCandCategorical = 50; | ||
| const inline std::vector<std::string> CellObjectTypes{"PfCand", "PfCandCategorical"}; | ||
| }; // namespace Setup | ||
|
|
||
| enum class Global_Features { jet_pt = 0, jet_eta = 1, Lxy = 2, Lz = 3, Lrel = 4 }; | ||
|
|
||
| enum class PfCand_Features { | ||
| pfCand_valid = 0, | ||
| pfCand_pt = 1, | ||
| pfCand_eta = 2, | ||
| pfCand_phi = 3, | ||
| pfCand_mass = 4, | ||
| pfCand_charge = 5, | ||
| pfCand_puppiWeight = 6, | ||
| pfCand_puppiWeightNoLep = 7, | ||
| pfCand_lostInnerHits = 8, | ||
| pfCand_nPixelHits = 9, | ||
| pfCand_nHits = 10, | ||
| pfCand_hasTrackDetails = 11, | ||
| pfCand_dxy = 12, | ||
| pfCand_dxy_error = 13, | ||
| pfCand_dz = 14, | ||
| pfCand_dz_error = 15, | ||
| pfCand_track_chi2 = 16, | ||
| pfCand_track_ndof = 17, | ||
| pfCand_caloFraction = 18, | ||
| pfCand_hcalFraction = 19, | ||
| pfCand_rawCaloFraction = 20, | ||
| pfCand_rawHcalFraction = 21, | ||
| pfCand_deta = 22, | ||
| pfCand_dphi = 23 | ||
| }; | ||
|
|
||
| enum class PfCandCategorical_Features { pfCand_particleType = 0, pfCand_pvAssociationQuality = 1, pfCand_fromPV = 2 }; | ||
|
|
||
| enum class CellObjectType { PfCand, PfCandCategorical }; | ||
|
|
||
| template <typename T> | ||
| struct FeaturesHelper; | ||
|
|
||
| template <> | ||
| struct FeaturesHelper<PfCand_Features> { | ||
| static constexpr CellObjectType object_type = CellObjectType::PfCand; | ||
| static constexpr size_t size = 24; | ||
| static constexpr size_t length = 50; | ||
| using scaler_type = Scaling::PfCand; | ||
| }; | ||
|
|
||
| template <> | ||
| struct FeaturesHelper<PfCandCategorical_Features> { | ||
| static constexpr CellObjectType object_type = CellObjectType::PfCandCategorical; | ||
| static constexpr size_t size = 3; | ||
| static constexpr size_t length = 50; | ||
| using scaler_type = Scaling::PfCandCategorical; | ||
| }; | ||
|
|
||
| using FeatureTuple = std::tuple<PfCand_Features, PfCandCategorical_Features>; | ||
|
|
||
| enum class PFParticleType { | ||
| Undefined = 0, // undefined | ||
| h = 1, // charged hadron | ||
| e = 2, // electron | ||
| mu = 3, // muon | ||
| gamma = 4, // photon | ||
| h0 = 5, // neutral hadron | ||
| h_HF = 6, // HF tower identified as a hadron | ||
| egamma_HF = 7, // HF tower identified as an EM particle | ||
| }; | ||
|
|
||
| inline PFParticleType TranslatePdgIdToPFParticleType(int pdgId) { | ||
| static const std::map<int, PFParticleType> type_map = { | ||
| {11, PFParticleType::e}, | ||
| {13, PFParticleType::mu}, | ||
| {22, PFParticleType::gamma}, | ||
| {211, PFParticleType::h}, | ||
| {130, PFParticleType::h0}, | ||
| {1, PFParticleType::h_HF}, | ||
| {2, PFParticleType::egamma_HF}, | ||
| }; | ||
| auto iter = type_map.find(std::abs(pdgId)); | ||
| return iter == type_map.end() ? PFParticleType::Undefined : iter->second; | ||
| } | ||
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
Oops, something went wrong.
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.
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.
Namespaces should start with lower case letter (see 2.7 in https://cms-sw.github.io/cms_coding_rules.html)
Also the include guard is missing (4.1 in https://cms-sw.github.io/cms_coding_rules.html)