CMS 3D CMS Logo

Functions | Variables
deepmet_helper Namespace Reference

Functions

float rm_outlier (float val)
 
float scale_and_rm_outlier (float val, float scale)
 

Variables

static const std::unordered_map< int, int32_t > charge_embedding {{-1, 0}, {0, 1}, {1, 2}}
 
static const std::unordered_map< int, int32_t > pdg_id_embedding
 

Function Documentation

◆ rm_outlier()

float deepmet_helper::rm_outlier ( float  val)

Definition at line 12 of file DeepMETHelper.cc.

References CommonMethods::isnan(), and heppy_batch::val.

Referenced by DeepMETSonicProducer::acquire(), and DeepMETProducer::produce().

12  {
13  if (std::isnan(val) || val > 1e6 || val < -1e6)
14  return 0.;
15  return val;
16  }
def isnan(num)

◆ scale_and_rm_outlier()

float deepmet_helper::scale_and_rm_outlier ( float  val,
float  scale 
)

Definition at line 5 of file DeepMETHelper.cc.

References CommonMethods::isnan(), isotrackNtupler::scale, and heppy_batch::val.

Referenced by DeepMETSonicProducer::acquire(), and DeepMETProducer::produce().

5  {
6  float ret_val = val * scale;
7  if (std::isnan(ret_val) || ret_val > 1e6 || ret_val < -1e6)
8  return 0.;
9  return ret_val;
10  }
def isnan(num)

Variable Documentation

◆ charge_embedding

const std::unordered_map<int, int32_t> deepmet_helper::charge_embedding {{-1, 0}, {0, 1}, {1, 2}}
static

Definition at line 11 of file DeepMETHelp.h.

Referenced by DeepMETSonicProducer::acquire(), and DeepMETProducer::produce().

◆ pdg_id_embedding

const std::unordered_map<int, int32_t> deepmet_helper::pdg_id_embedding
static
Initial value:
{
{-211, 0}, {-13, 1}, {-11, 2}, {0, 3}, {1, 4}, {2, 5}, {11, 6}, {13, 7}, {22, 8}, {130, 9}, {211, 10}}

Definition at line 12 of file DeepMETHelp.h.

Referenced by DeepMETSonicProducer::acquire(), and DeepMETProducer::produce().