Skip to content
Snippets Groups Projects

Syncronize the MagicNumbers header in AtlasHepMC and in TruthUtils

Merged Andrii Verbytskyi requested to merge averbyts/athena:better_magic_numbers into 23.0
All threads resolved!
1 file
+ 6
2
Compare changes
  • Side-by-side
  • Inline
@@ -3,8 +3,8 @@
*/
/* Author: Andrii Verbytskyi andrii.verbytskyi@mpp.mpg.de */
#ifndef TRUTHUTILS_MAGICNUMBERS_H
#define TRUTHUTILS_MAGICNUMBERS_H
#ifndef ATLASHEPMC_MAGICNUMBERS_H
#define ATLASHEPMC_MAGICNUMBERS_H
#include <limits>
namespace HepMC {
@@ -28,6 +28,10 @@ constexpr int INVALID_PARTICLE_BARCODE = -1;
template <class T> inline bool is_simulation_particle(const T& p){ return (p->barcode()>SIM_BARCODE_THRESHOLD);}
template <> inline bool is_simulation_particle(const int& b){ return (b>SIM_BARCODE_THRESHOLD);}
template <class T> inline int generations(const T& p){ return (barcode(p)/SIM_REGENERATION_INCREMENT);}
template <> inline int generations(const int& b){ return (b/SIM_REGENERATION_INCREMENT);}
template <class T> inline bool is_simulation_vertex(const T& p){ return (p->barcode()<-SIM_BARCODE_THRESHOLD);}
template <> inline bool is_simulation_vertex(const int& b){ return (b<-SIM_BARCODE_THRESHOLD);}
Loading