CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ElectronEPcombinator Class Reference

#include <ElectronEPcombinator.h>

Public Member Functions

void combine (SimpleElectron &electron)
 
 ElectronEPcombinator ()
 
void setCombinationMode (int mode)
 

Private Member Functions

void computeEPcombination ()
 

Private Attributes

double combinedMomentum_
 
double combinedMomentumError_
 
int elClass_
 
SimpleElectron electron_
 
int mode_
 
double scEnergy_
 
double scEnergyError_
 
double trackerMomentum_
 
double trackerMomentumError_
 

Detailed Description

Definition at line 8 of file ElectronEPcombinator.h.

Constructor & Destructor Documentation

◆ ElectronEPcombinator()

ElectronEPcombinator::ElectronEPcombinator ( )
inline

Definition at line 10 of file ElectronEPcombinator.h.

10 {}

Member Function Documentation

◆ combine()

void ElectronEPcombinator::combine ( SimpleElectron electron)

◆ computeEPcombination()

void ElectronEPcombinator::computeEPcombination ( )
private

Definition at line 13 of file ElectronEPcombinator.cc.

13  {
14  if (mode_ == 1) {
17  }
18  if (mode_ == 2) {
21  }
25 
26  combinedMomentum_ = scEnergy_; // initial
28 
29  // first check for large errors
30 
34  } else if (trackerMomentumError_ / trackerMomentum_ <= 0.5 && scEnergyError_ / scEnergy_ > 0.5) {
37  } else if (trackerMomentumError_ / trackerMomentum_ > 0.5 && scEnergyError_ / scEnergy_ > 0.5) {
41  } else {
44  }
45  }
46 
47  // then apply the combination algorithm
48  else {
49  // calculate E/p and corresponding error
54 
55  bool eleIsNotInCombination = false;
56  if ((eOverP > 1 + 2.5 * errorEOverP) || (eOverP < 1 - 2.5 * errorEOverP) || (eOverP < 0.8) || (eOverP > 1.3)) {
57  eleIsNotInCombination = true;
58  }
59 
60  if (eleIsNotInCombination) {
61  if (eOverP > 1) {
64  } else {
65  if (elClass_ == 0) // == reco::GsfElectron::GOLDEN)
66  {
69  }
70  if (elClass_ == 1) //reco::GsfElectron::BIGBREM)
71  {
72  if (scEnergy_ < 36) {
75  } else {
78  }
79  }
80  if (elClass_ == 2) // == reco::GsfElectron::BADTRACK)
81  {
84  }
85  if (elClass_ == 3) //reco::GsfElectron::SHOWERING)
86  {
87  if (scEnergy_ < 30) {
90  } else {
93  }
94  }
95  if (elClass_ == 4) //reco::GsfElectron::GAP)
96  {
97  if (scEnergy_ < 60) {
100  } else {
103  }
104  }
105  }
106  } else {
107  // combination
111  float combinedMomentum_Variance =
113  combinedMomentumError_ = sqrt(combinedMomentum_Variance);
114  }
115  }
116 }

References combinedMomentum_, combinedMomentumError_, elClass_, electron_, EgHLTOffHistBins_cfi::eOverP, SimpleElectron::getElClass(), SimpleElectron::getNewEnergy(), SimpleElectron::getNewEnergyError(), SimpleElectron::getRegEnergy(), SimpleElectron::getRegEnergyError(), SimpleElectron::getTrackerMomentum(), SimpleElectron::getTrackerMomentumError(), mode_, scEnergy_, scEnergyError_, mathSSE::sqrt(), trackerMomentum_, and trackerMomentumError_.

Referenced by combine().

◆ setCombinationMode()

void ElectronEPcombinator::setCombinationMode ( int  mode)
inline

Definition at line 12 of file ElectronEPcombinator.h.

12 { mode_ = mode; }

References ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, and mode_.

Member Data Documentation

◆ combinedMomentum_

double ElectronEPcombinator::combinedMomentum_
private

Definition at line 17 of file ElectronEPcombinator.h.

Referenced by combine(), and computeEPcombination().

◆ combinedMomentumError_

double ElectronEPcombinator::combinedMomentumError_
private

Definition at line 18 of file ElectronEPcombinator.h.

Referenced by combine(), and computeEPcombination().

◆ elClass_

int ElectronEPcombinator::elClass_
private

Definition at line 23 of file ElectronEPcombinator.h.

Referenced by computeEPcombination().

◆ electron_

SimpleElectron ElectronEPcombinator::electron_
private

Definition at line 15 of file ElectronEPcombinator.h.

Referenced by combine(), and computeEPcombination().

◆ mode_

int ElectronEPcombinator::mode_
private

Definition at line 24 of file ElectronEPcombinator.h.

Referenced by computeEPcombination(), and setCombinationMode().

◆ scEnergy_

double ElectronEPcombinator::scEnergy_
private

Definition at line 19 of file ElectronEPcombinator.h.

Referenced by computeEPcombination().

◆ scEnergyError_

double ElectronEPcombinator::scEnergyError_
private

Definition at line 20 of file ElectronEPcombinator.h.

Referenced by computeEPcombination().

◆ trackerMomentum_

double ElectronEPcombinator::trackerMomentum_
private

Definition at line 21 of file ElectronEPcombinator.h.

Referenced by computeEPcombination().

◆ trackerMomentumError_

double ElectronEPcombinator::trackerMomentumError_
private

Definition at line 22 of file ElectronEPcombinator.h.

Referenced by computeEPcombination().

EgHLTOffHistBins_cfi.eOverP
eOverP
Definition: EgHLTOffHistBins_cfi.py:37
SimpleElectron::getTrackerMomentumError
double getTrackerMomentumError() const
Definition: SimpleElectron.h:66
SimpleElectron::getTrackerMomentum
double getTrackerMomentum() const
Definition: SimpleElectron.h:65
ElectronEPcombinator::mode_
int mode_
Definition: ElectronEPcombinator.h:24
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
ElectronEPcombinator::trackerMomentum_
double trackerMomentum_
Definition: ElectronEPcombinator.h:21
ElectronEPcombinator::scEnergyError_
double scEnergyError_
Definition: ElectronEPcombinator.h:20
SimpleElectron::getRegEnergyError
double getRegEnergyError() const
Definition: SimpleElectron.h:64
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
ElectronEPcombinator::combinedMomentum_
double combinedMomentum_
Definition: ElectronEPcombinator.h:17
ElectronEPcombinator::scEnergy_
double scEnergy_
Definition: ElectronEPcombinator.h:19
ElectronEPcombinator::trackerMomentumError_
double trackerMomentumError_
Definition: ElectronEPcombinator.h:22
SimpleElectron::getRegEnergy
double getRegEnergy() const
Definition: SimpleElectron.h:63
SimpleElectron::getNewEnergyError
double getNewEnergyError() const
Definition: SimpleElectron.h:56
HPSPFTauProducerPuppi_cfi.electron
electron
Definition: HPSPFTauProducerPuppi_cfi.py:13
ElectronEPcombinator::electron_
SimpleElectron electron_
Definition: ElectronEPcombinator.h:15
SimpleElectron::getNewEnergy
double getNewEnergy() const
Definition: SimpleElectron.h:55
ElectronEPcombinator::computeEPcombination
void computeEPcombination()
Definition: ElectronEPcombinator.cc:13
SimpleElectron::getElClass
int getElClass() const
Definition: SimpleElectron.h:69
ElectronEPcombinator::combinedMomentumError_
double combinedMomentumError_
Definition: ElectronEPcombinator.h:18
ElectronEPcombinator::elClass_
int elClass_
Definition: ElectronEPcombinator.h:23