CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Enumerations | Functions
MuonMVAEstimator.cc File Reference
#include <TFile.h>
#include <cmath>
#include <vector>
#include "DQM/PhysicsHWW/interface/MuonMVAEstimator.h"
#include "DQM/PhysicsHWW/interface/trackSelections.h"

Go to the source code of this file.

Enumerations

enum  ParticleType {
  kX =0, kh, ke, kmu,
  kgamma, kh0, kh_HF, kegamma_HF
}
 

Functions

double dzPVmu (const LorentzVector &vtx, const LorentzVector &p4, const LorentzVector &pv)
 
int translatePdgIdToType (int pdgid)
 

Enumeration Type Documentation

Enumerator
kX 
kh 
ke 
kmu 
kgamma 
kh0 
kh_HF 
kegamma_HF 

Definition at line 21 of file MuonMVAEstimator.cc.

21  {
22  kX=0, // undefined
23  kh, // charged hadron
24  ke, // electron
25  kmu, // muon
26  kgamma, // photon
27  kh0, // neutral hadron
28  kh_HF, // HF tower identified as a hadron
29  kegamma_HF // HF tower identified as an EM particle
30 };

Function Documentation

double dzPVmu ( const LorentzVector vtx,
const LorentzVector p4,
const LorentzVector pv 
)

Definition at line 14 of file MuonMVAEstimator.cc.

Referenced by MuonMVAEstimator::mvaValueIso().

14  {
15  return (vtx.z()-pv.z()) - ((vtx.x()-pv.x())*p4.x()+(vtx.y()-pv.y())*p4.y())/p4.pt() * p4.z()/p4.pt();
16 }
double p4[4]
Definition: TauolaWrapper.h:92
int translatePdgIdToType ( int  pdgid)

Definition at line 35 of file MuonMVAEstimator.cc.

References funct::abs(), ke, kegamma_HF, kgamma, kh, kh0, kh_HF, kmu, and kX.

Referenced by MuonMVAEstimator::mvaValueIso(), and DeltaBetaWeights::produce().

36 {
37  switch ( std::abs(pdgid) )
38  {
39  case 211: return kh;
40  case 11: return ke;
41  case 13: return kmu;
42  case 22: return kgamma;
43  case 130: return kh0;
44  case 1: return kh_HF;
45  case 2: return kegamma_HF;
46  case 0: return kX;
47  default: return kX;
48  }
49 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22