Skip to content

Commit

Permalink
Photon Gradient Boosted Tree Filter (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregtom3 authored May 28, 2024
1 parent c93f421 commit bb81fe9
Show file tree
Hide file tree
Showing 15 changed files with 21,992 additions and 16 deletions.
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# @c-dilks Christopher Dilks
# @RichCap Richard Capobianco
# @rtysonCLAS12 Richard Tyson
# @Gregtom3 Gregory Matousek
#################################################################################

* @c-dilks
Expand All @@ -13,3 +14,4 @@ src/iguana/algorithms/clas12/ZVertexFilter/* @rtysonCLAS12
src/iguana/algorithms/clas12/SectorFinder/* @rtysonCLAS12
src/iguana/algorithms/clas12/FTEnergyCorrection/* @asligonulacar
src/iguana/services/YAMLReader.* @rtysonCLAS12 @c-dilks
src/iguana/algorithms/clas12/PhotonGBTFilter/* @Gregtom3
1 change: 1 addition & 0 deletions src/iguana/algorithms/Algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <hipo4/bank.h>


#include "iguana/algorithms/AlgorithmBoilerplate.h"
#include "iguana/services/Object.h"
#include "iguana/services/YAMLReader.h"
Expand Down
52 changes: 38 additions & 14 deletions src/iguana/algorithms/TypeDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,66 @@ namespace iguana {
/// 3-vector container type
using vector3_t = std::tuple<vector_element_t, vector_element_t, vector_element_t>;
/// 4-vector container type
using vector4_t = std::tuple<vector_element_t, vector_element_t, vector_element_t, vector_element_t>;
using vector4_t = std::tuple<vector_element_t, vector_element_t, vector_element_t, vector_element_t>;

/// Light-weight namespace for particle constants
namespace particle {
// clang-format off

/// PDG codes
enum PDG {
electron = 11,
pi_plus = 211,
pi_minus = -211,
proton = 2212
electron = 11,
photon = 22,
proton = 2212,
antiproton = -2212,
neutron = 2112,
antineutron = -2112,
pi_plus = 211,
pi_minus = -211,
kaon_plus = 321,
kaon_minus = -321
};

/// Particle names
const std::unordered_map<PDG, std::string> name{
{ electron, "electron" },
{ pi_plus, "pi_plus" },
{ photon, "photon" },
{ proton, "proton" },
{ antiproton, "antiproton" },
{ neutron, "neutron" },
{ antineutron, "antineutron" },
{ pi_plus, "pi_plus" },
{ pi_minus, "pi_minus" },
{ proton, "proton" }
{ kaon_plus, "kaon_plus" },
{ kaon_minus, "kaon_minus" }
};

/// Particle titles
const std::unordered_map<PDG, std::string> title{
{ electron, "e^{-}" },
{ pi_plus, "#pi^{+}" },
{ electron, "e^{-}" },
{ photon, "#gamma" },
{ proton, "p" },
{ antiproton, "#bar{p}" },
{ neutron, "n" },
{ antineutron, "#bar{n}" },
{ pi_plus, "#pi^{+}" },
{ pi_minus, "#pi^{-}" },
{ proton, "p" }
{ kaon_plus, "K^{+}" },
{ kaon_minus, "K^{-}" }
};

/// Particle mass in GeV
const std::unordered_map<PDG, double> mass{
{ electron, 0.00051099895000 },
{ pi_plus, 0.13957039 },
{ pi_minus, 0.13957039 },
{ proton, 0.93827208816 }
{ electron, 0.000511 },
{ photon, 0.0 },
{ proton, 0.938272 },
{ antiproton, 0.938272 },
{ neutron, 0.939565 },
{ antineutron, 0.939565 },
{ pi_plus, 0.139570 },
{ pi_minus, 0.139570 },
{ kaon_plus, 0.493677 },
{ kaon_minus, 0.493677 }
};

// clang-format on
Expand Down
Loading

0 comments on commit bb81fe9

Please sign in to comment.