CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
AntiElectronIDMVA6< TauType, ElectronType > Class Template Reference

#include <AntiElectronIDMVA6.h>

Public Types

typedef std::vector< ElectronType > ElectronCollection
 
typedef edm::Ref< ElectronCollectionElectronRef
 

Public Member Functions

 AntiElectronIDMVA6 (const edm::ParameterSet &, edm::ConsumesCollector &&)
 
void beginEvent (const edm::Event &, const edm::EventSetup &)
 
antiElecIDMVA6_blocks::ElecVars getElecVars (const ElectronRef &theEleRef)
 
void getElecVarsHGCalTypeSpecific (const pat::ElectronRef &theEleRef, antiElecIDMVA6_blocks::ElecVars &elecVars)
 
void getElecVarsHGCalTypeSpecific (const reco::GsfElectronRef &theEleRef, antiElecIDMVA6_blocks::ElecVars &elecVars)
 
antiElecIDMVA6_blocks::TauGammaVecs getTauGammaVecs (const TauType &theTau)
 
antiElecIDMVA6_blocks::TauVars getTauVars (const TauType &theTau)
 
antiElecIDMVA6_blocks::TauVars getTauVarsTypeSpecific (const pat::Tau &theTau)
 
antiElecIDMVA6_blocks::TauVars getTauVarsTypeSpecific (const reco::PFTau &theTau)
 
double mvaValue (const antiElecIDMVA6_blocks::TauVars &tauVars, const antiElecIDMVA6_blocks::TauGammaMoms &tauGammaMoms, const antiElecIDMVA6_blocks::ElecVars &elecVars)
 
double mvaValue (const antiElecIDMVA6_blocks::TauVars &tauVars, const antiElecIDMVA6_blocks::TauGammaVecs &tauGammaVecs, const antiElecIDMVA6_blocks::ElecVars &elecVars)
 
double mvaValue (const TauType &theTau)
 
double mvaValue (const TauType &theTau, const ElectronRef &theEleRef)
 
double mvaValuePhase2 (const antiElecIDMVA6_blocks::TauVars &tauVars, const antiElecIDMVA6_blocks::TauGammaMoms &tauGammaMoms, const antiElecIDMVA6_blocks::ElecVars &elecVars)
 
 ~AntiElectronIDMVA6 ()
 

Private Member Functions

double dCrackEta (double eta)
 
double dCrackPhi (double phi, double eta)
 
bool energyWeightedEtaAndPhiAtECal (const pat::Tau &theTau, float &eta, float &phi)
 
double minimum (double a, double b)
 

Private Attributes

std::map< std::string, edm::Handle< edm::ValueMap< float > > > electronIds_
 
std::map< std::string, edm::EDGetTokenT< edm::ValueMap< float > > > electronIds_tokens_
 
edm::FileInPath inputFileName_
 
std::vector< TFile * > inputFilesToDelete_
 
bool isInitialized_
 
const bool isPhase2_
 
bool loadMVAfromDB_
 
const GBRForestmva_NoEleMatch_wGwoGSF_BL_
 
const GBRForestmva_NoEleMatch_wGwoGSF_EC_
 
const GBRForestmva_NoEleMatch_wGwoGSF_VFEC_
 
const GBRForestmva_NoEleMatch_woGwoGSF_BL_
 
const GBRForestmva_NoEleMatch_woGwoGSF_EC_
 
const GBRForestmva_NoEleMatch_woGwoGSF_VFEC_
 
const GBRForestmva_wGwGSF_BL_
 
const GBRForestmva_wGwGSF_EC_
 
const GBRForestmva_wGwGSF_VFEC_
 
const GBRForestmva_woGwGSF_BL_
 
const GBRForestmva_woGwGSF_EC_
 
const GBRForestmva_woGwGSF_VFEC_
 
std::string mvaName_NoEleMatch_wGwoGSF_BL_
 
std::string mvaName_NoEleMatch_wGwoGSF_EC_
 
std::string mvaName_NoEleMatch_wGwoGSF_VFEC_
 
std::string mvaName_NoEleMatch_woGwoGSF_BL_
 
std::string mvaName_NoEleMatch_woGwoGSF_EC_
 
std::string mvaName_NoEleMatch_woGwoGSF_VFEC_
 
std::string mvaName_wGwGSF_BL_
 
std::string mvaName_wGwGSF_EC_
 
std::string mvaName_wGwGSF_VFEC_
 
std::string mvaName_woGwGSF_BL_
 
std::string mvaName_woGwGSF_EC_
 
std::string mvaName_woGwGSF_VFEC_
 
PositionAtECalEntranceComputer positionAtECalEntrance_
 
bool usePhiAtEcalEntranceExtrapolation_
 
std::vector< float > var_NoEleMatch_wGwoGSF_Barrel_
 
std::vector< float > var_NoEleMatch_wGwoGSF_Endcap_
 
std::vector< float > var_NoEleMatch_wGwoGSF_VFEndcap_
 
std::vector< float > var_NoEleMatch_woGwoGSF_Barrel_
 
std::vector< float > var_NoEleMatch_woGwoGSF_Endcap_
 
std::vector< float > var_NoEleMatch_woGwoGSF_VFEndcap_
 
std::vector< float > var_wGwGSF_Barrel_
 
std::vector< float > var_wGwGSF_Endcap_
 
std::vector< float > var_wGwGSF_VFEndcap_
 
std::vector< float > var_woGwGSF_Barrel_
 
std::vector< float > var_woGwGSF_Endcap_
 
std::vector< float > var_woGwGSF_VFEndcap_
 
const int verbosity_
 

Static Private Attributes

static constexpr float ecalBarrelEndcapEtaBorder_ = 1.479
 
static constexpr float ecalEndcapVFEndcapEtaBorder_ = 2.4
 

Detailed Description

template<class TauType, class ElectronType>
class AntiElectronIDMVA6< TauType, ElectronType >

Definition at line 114 of file AntiElectronIDMVA6.h.

Member Typedef Documentation

◆ ElectronCollection

template<class TauType , class ElectronType >
typedef std::vector<ElectronType> AntiElectronIDMVA6< TauType, ElectronType >::ElectronCollection

Definition at line 116 of file AntiElectronIDMVA6.h.

◆ ElectronRef

template<class TauType , class ElectronType >
typedef edm::Ref<ElectronCollection> AntiElectronIDMVA6< TauType, ElectronType >::ElectronRef

Definition at line 117 of file AntiElectronIDMVA6.h.

Constructor & Destructor Documentation

◆ AntiElectronIDMVA6()

template<class TauType , class ElectronType >
AntiElectronIDMVA6< TauType, ElectronType >::AntiElectronIDMVA6 ( const edm::ParameterSet cfg,
edm::ConsumesCollector &&  cc 
)

Definition at line 37 of file AntiElectronIDMVA6.cc.

38  : isInitialized_(false),
41  mva_woGwGSF_BL_(nullptr),
42  mva_wGwGSF_BL_(nullptr),
45  mva_woGwGSF_EC_(nullptr),
46  mva_wGwGSF_EC_(nullptr),
49  mva_woGwGSF_VFEC_(nullptr),
50  mva_wGwGSF_VFEC_(nullptr),
51  isPhase2_(cfg.getParameter<bool>("isPhase2")),
53  verbosity_(cfg.getParameter<int>("verbosity")) {
54  loadMVAfromDB_ = cfg.exists("loadMVAfromDB") ? cfg.getParameter<bool>("loadMVAfromDB") : false;
55  if (!loadMVAfromDB_) {
56  if (cfg.exists("inputFileName")) {
57  inputFileName_ = cfg.getParameter<edm::FileInPath>("inputFileName");
58  } else
59  throw cms::Exception("MVA input not defined")
60  << "Requested to load tau MVA input from ROOT file but no file provided in cfg file";
61  }
62 
63  mvaName_NoEleMatch_woGwoGSF_BL_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_woGwoGSF_BL");
64  mvaName_NoEleMatch_wGwoGSF_BL_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_wGwoGSF_BL");
65  mvaName_woGwGSF_BL_ = cfg.getParameter<std::string>("mvaName_woGwGSF_BL");
66  mvaName_wGwGSF_BL_ = cfg.getParameter<std::string>("mvaName_wGwGSF_BL");
67  mvaName_NoEleMatch_woGwoGSF_EC_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_woGwoGSF_EC");
68  mvaName_NoEleMatch_wGwoGSF_EC_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_wGwoGSF_EC");
69  mvaName_woGwGSF_EC_ = cfg.getParameter<std::string>("mvaName_woGwGSF_EC");
70  mvaName_wGwGSF_EC_ = cfg.getParameter<std::string>("mvaName_wGwGSF_EC");
71  if (isPhase2_) {
72  mvaName_NoEleMatch_woGwoGSF_VFEC_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_woGwoGSF_VFEC");
73  mvaName_NoEleMatch_wGwoGSF_VFEC_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_wGwoGSF_VFEC");
74  mvaName_woGwGSF_VFEC_ = cfg.getParameter<std::string>("mvaName_woGwGSF_VFEC");
75  mvaName_wGwGSF_VFEC_ = cfg.getParameter<std::string>("mvaName_wGwGSF_VFEC");
76  }
77  usePhiAtEcalEntranceExtrapolation_ = cfg.getParameter<bool>("usePhiAtEcalEntranceExtrapolation");
78 
79  if (!isPhase2_) {
80  var_NoEleMatch_woGwoGSF_Barrel_ = std::vector<float>(10);
81  var_NoEleMatch_wGwoGSF_Barrel_ = std::vector<float>(18);
82  var_woGwGSF_Barrel_ = std::vector<float>(24);
83  var_wGwGSF_Barrel_ = std::vector<float>(32);
84  var_NoEleMatch_woGwoGSF_Endcap_ = std::vector<float>(9);
85  var_NoEleMatch_wGwoGSF_Endcap_ = std::vector<float>(17);
86  var_woGwGSF_Endcap_ = std::vector<float>(23);
87  var_wGwGSF_Endcap_ = std::vector<float>(31);
88  } else {
89  var_NoEleMatch_woGwoGSF_Barrel_ = std::vector<float>(9);
90  var_NoEleMatch_wGwoGSF_Barrel_ = std::vector<float>(17);
91  var_woGwGSF_Barrel_ = std::vector<float>(27);
92  var_wGwGSF_Barrel_ = std::vector<float>(36);
93  var_NoEleMatch_woGwoGSF_Endcap_ = std::vector<float>(6);
94  var_NoEleMatch_wGwoGSF_Endcap_ = std::vector<float>(14);
95  var_woGwGSF_Endcap_ = std::vector<float>(31);
96  var_wGwGSF_Endcap_ = std::vector<float>(38);
97  var_NoEleMatch_woGwoGSF_VFEndcap_ = std::vector<float>(6);
98  var_NoEleMatch_wGwoGSF_VFEndcap_ = std::vector<float>(14);
99  var_woGwGSF_VFEndcap_ = std::vector<float>(32);
100  var_wGwGSF_VFEndcap_ = std::vector<float>(40);
101 
102  //MB: Tokens for additional inputs (HGCal EleID variables) only for Phase2 and reco::GsfElectrons
104  for (const auto& inputTag : cfg.getParameter<std::vector<edm::InputTag>>("hgcalElectronIDs")) {
105  std::string elecIdLabel = "hgcElectronID:" + inputTag.instance();
106  electronIds_tokens_[elecIdLabel] = cc.consumes<edm::ValueMap<float>>(
107  inputTag); //MB: It assumes that instances are not empty and meaningful (as for userData in patElectrons)
109  }
110  }
111  }
112 }

References looper::cfg, AntiElectronIDMVA6< TauType, ElectronType >::electronIds_, AntiElectronIDMVA6< TauType, ElectronType >::electronIds_tokens_, Exception, AntiElectronIDMVA6< TauType, ElectronType >::inputFileName_, SimL1EmulatorRepack_Full_cff::inputTag, AntiElectronIDMVA6< TauType, ElectronType >::isPhase2_, AntiElectronIDMVA6< TauType, ElectronType >::loadMVAfromDB_, AntiElectronIDMVA6< TauType, ElectronType >::mvaName_NoEleMatch_wGwoGSF_BL_, AntiElectronIDMVA6< TauType, ElectronType >::mvaName_NoEleMatch_wGwoGSF_EC_, AntiElectronIDMVA6< TauType, ElectronType >::mvaName_NoEleMatch_wGwoGSF_VFEC_, AntiElectronIDMVA6< TauType, ElectronType >::mvaName_NoEleMatch_woGwoGSF_BL_, AntiElectronIDMVA6< TauType, ElectronType >::mvaName_NoEleMatch_woGwoGSF_EC_, AntiElectronIDMVA6< TauType, ElectronType >::mvaName_NoEleMatch_woGwoGSF_VFEC_, AntiElectronIDMVA6< TauType, ElectronType >::mvaName_wGwGSF_BL_, AntiElectronIDMVA6< TauType, ElectronType >::mvaName_wGwGSF_EC_, AntiElectronIDMVA6< TauType, ElectronType >::mvaName_wGwGSF_VFEC_, AntiElectronIDMVA6< TauType, ElectronType >::mvaName_woGwGSF_BL_, AntiElectronIDMVA6< TauType, ElectronType >::mvaName_woGwGSF_EC_, AntiElectronIDMVA6< TauType, ElectronType >::mvaName_woGwGSF_VFEC_, AlCaHLTBitMon_QueryRunRegistry::string, AntiElectronIDMVA6< TauType, ElectronType >::usePhiAtEcalEntranceExtrapolation_, relativeConstraints::value, AntiElectronIDMVA6< TauType, ElectronType >::var_NoEleMatch_wGwoGSF_Barrel_, AntiElectronIDMVA6< TauType, ElectronType >::var_NoEleMatch_wGwoGSF_Endcap_, AntiElectronIDMVA6< TauType, ElectronType >::var_NoEleMatch_wGwoGSF_VFEndcap_, AntiElectronIDMVA6< TauType, ElectronType >::var_NoEleMatch_woGwoGSF_Barrel_, AntiElectronIDMVA6< TauType, ElectronType >::var_NoEleMatch_woGwoGSF_Endcap_, AntiElectronIDMVA6< TauType, ElectronType >::var_NoEleMatch_woGwoGSF_VFEndcap_, AntiElectronIDMVA6< TauType, ElectronType >::var_wGwGSF_Barrel_, AntiElectronIDMVA6< TauType, ElectronType >::var_wGwGSF_Endcap_, AntiElectronIDMVA6< TauType, ElectronType >::var_wGwGSF_VFEndcap_, AntiElectronIDMVA6< TauType, ElectronType >::var_woGwGSF_Barrel_, AntiElectronIDMVA6< TauType, ElectronType >::var_woGwGSF_Endcap_, and AntiElectronIDMVA6< TauType, ElectronType >::var_woGwGSF_VFEndcap_.

◆ ~AntiElectronIDMVA6()

template<class TauType , class ElectronType >
AntiElectronIDMVA6< TauType, ElectronType >::~AntiElectronIDMVA6 ( )

Definition at line 115 of file AntiElectronIDMVA6.cc.

115  {
116  if (!loadMVAfromDB_) {
119  delete mva_woGwGSF_BL_;
120  delete mva_wGwGSF_BL_;
123  delete mva_woGwGSF_EC_;
124  delete mva_wGwGSF_EC_;
125  if (isPhase2_) {
128  delete mva_woGwGSF_VFEC_;
129  delete mva_wGwGSF_VFEC_;
130  }
131  }
132 
133  for (std::vector<TFile*>::iterator it = inputFilesToDelete_.begin(); it != inputFilesToDelete_.end(); ++it) {
134  delete (*it);
135  }
136 }

Member Function Documentation

◆ beginEvent()

template<class TauType , class ElectronType >
void AntiElectronIDMVA6< TauType, ElectronType >::beginEvent ( const edm::Event evt,
const edm::EventSetup es 
)

Definition at line 157 of file AntiElectronIDMVA6.cc.

157  {
158  if (!isInitialized_) {
159  if (loadMVAfromDB_) {
168  if (isPhase2_) {
173  }
174  } else {
176  throw cms::Exception("PFRecoTauDiscriminationAgainstElectronMVA6::loadMVA")
177  << " Failed to find File = " << inputFileName_ << " !!\n";
178  TFile* inputFile = new TFile(inputFileName_.fullPath().data());
179 
182  mva_woGwGSF_BL_ = loadMVAfromFile(inputFile, mvaName_woGwGSF_BL_);
183  mva_wGwGSF_BL_ = loadMVAfromFile(inputFile, mvaName_wGwGSF_BL_);
186  mva_woGwGSF_EC_ = loadMVAfromFile(inputFile, mvaName_woGwGSF_EC_);
187  mva_wGwGSF_EC_ = loadMVAfromFile(inputFile, mvaName_wGwGSF_EC_);
188  if (isPhase2_) {
192  mva_wGwGSF_VFEC_ = loadMVAfromFile(inputFile, mvaName_wGwGSF_VFEC_);
193  }
194  inputFilesToDelete_.push_back(inputFile);
195  }
196  isInitialized_ = true;
197  }
199  //MB: Handle additional inputs (HGCal EleID variables) only for Phase2 and reco::GsfElectrons
201  for (const auto& eId_token : electronIds_tokens_) {
202  electronIds_[eId_token.first] = evt.getHandle(eId_token.second);
203  }
204  }
205 }

References edm::Event::getHandle(), dtResolutionTest_cfi::inputFile, taus_updatedMVAIds_cff::loadMVAfromDB, edm::FileInPath::Unknown, and relativeConstraints::value.

◆ dCrackEta()

template<class TauType , class ElectronType >
double AntiElectronIDMVA6< TauType, ElectronType >::dCrackEta ( double  eta)
private

Definition at line 1073 of file AntiElectronIDMVA6.cc.

1073  {
1074  //--- compute the (unsigned) distance to the closest eta-crack in the ECAL barrel
1075 
1076  // IN: define locations of the eta-cracks
1077  double cracks[5] = {0., 4.44747e-01, 7.92824e-01, 1.14090e+00, 1.47464e+00};
1078 
1079  double retVal = 99.;
1080 
1081  for (int iCrack = 0; iCrack < 5; ++iCrack) {
1082  double d = minimum(eta - cracks[iCrack], eta + cracks[iCrack]);
1083  if (std::abs(d) < std::abs(retVal)) {
1084  retVal = d;
1085  }
1086  }
1087 
1088  return std::abs(retVal);
1089 }

References funct::abs(), ztail::d, and PVValHelper::eta.

◆ dCrackPhi()

template<class TauType , class ElectronType >
double AntiElectronIDMVA6< TauType, ElectronType >::dCrackPhi ( double  phi,
double  eta 
)
private

Definition at line 1022 of file AntiElectronIDMVA6.cc.

1022  {
1023  //--- compute the (unsigned) distance to the closest phi-crack in the ECAL barrel
1024 
1025  constexpr double pi = M_PI; // 3.14159265358979323846;
1026 
1027  // IN: shift of this location if eta < 0
1028  constexpr double delta_cPhi = 0.00638;
1029 
1030  double retVal = 99.;
1031 
1032  if (eta >= -1.47464 && eta <= 1.47464) {
1033  // the location is shifted
1034  if (eta < 0.)
1035  phi += delta_cPhi;
1036 
1037  // CV: need to bring-back phi into interval [-pi,+pi]
1038  if (phi > pi)
1039  phi -= 2. * pi;
1040  if (phi < -pi)
1041  phi += 2. * pi;
1042 
1043  if (phi >= -pi && phi <= pi) {
1044  // the problem of the extrema:
1045  if (phi < cPhi[17] || phi >= cPhi[0]) {
1046  if (phi < 0.)
1047  phi += 2. * pi;
1048  retVal = minimum(phi - cPhi[0], phi - cPhi[17] - 2. * pi);
1049  } else {
1050  // between these extrema...
1051  bool OK = false;
1052  unsigned iCrack = 16;
1053  while (!OK) {
1054  if (phi < cPhi[iCrack]) {
1055  retVal = minimum(phi - cPhi[iCrack + 1], phi - cPhi[iCrack]);
1056  OK = true;
1057  } else {
1058  iCrack -= 1;
1059  }
1060  }
1061  }
1062  } else {
1063  retVal = 0.; // IN: if there is a problem, we assume that we are in a crack
1064  }
1065  } else {
1066  return -99.;
1067  }
1068 
1069  return std::abs(retVal);
1070 }

References funct::abs(), PVValHelper::eta, M_PI, PVValHelper::phi, and pi.

◆ energyWeightedEtaAndPhiAtECal()

template<class TauType , class ElectronType >
bool AntiElectronIDMVA6< TauType, ElectronType >::energyWeightedEtaAndPhiAtECal ( const pat::Tau theTau,
float &  eta,
float &  phi 
)
private

Definition at line 1320 of file AntiElectronIDMVA6.cc.

1322  {
1323  eta = 0.;
1324  phi = 0.;
1325  float sumEnergy = 0.;
1326  for (const auto& candidate : theTau.signalCands()) {
1327  float etaAtECalEntrance = candidate->eta();
1328  float phiAtECalEntrance = candidate->phi();
1329  bool success = false;
1330  reco::Candidate::Point posAtECal = positionAtECalEntrance_(candidate.get(), success);
1331  if (success) {
1332  etaAtECalEntrance = posAtECal.eta();
1333  phiAtECalEntrance = posAtECal.phi();
1334  }
1335  eta += etaAtECalEntrance * candidate->energy();
1336  phi += phiAtECalEntrance * candidate->energy();
1337  sumEnergy += candidate->energy();
1338  }
1339  if (sumEnergy > 0.) {
1340  eta = eta / sumEnergy;
1341  phi = phi / sumEnergy;
1342  } else {
1343  eta = -99.;
1344  phi = -99.;
1345  }
1346  return (sumEnergy > 0.);
1347 }

References PVValHelper::eta, PVValHelper::phi, pat::Tau::signalCands(), and summarizeEdmComparisonLogfiles::success.

◆ getElecVars()

template<class TauType , class ElectronType >
ElecVars AntiElectronIDMVA6< TauType, ElectronType >::getElecVars ( const ElectronRef theEleRef)

Definition at line 915 of file AntiElectronIDMVA6.cc.

915  {
916  ElecVars elecVars;
917 
918  elecVars.eta = theEleRef->eta();
919  elecVars.phi = theEleRef->phi();
920 
921  // Variables related to the electron Cluster
922  float elecEe = 0.;
923  float elecEgamma = 0.;
924  reco::SuperClusterRef pfSuperCluster = theEleRef->superCluster();
925  if (pfSuperCluster.isNonnull() && pfSuperCluster.isAvailable()) {
926  if (!isPhase2_) {
927  for (reco::CaloCluster_iterator pfCluster = pfSuperCluster->clustersBegin();
928  pfCluster != pfSuperCluster->clustersEnd();
929  ++pfCluster) {
930  double pfClusterEn = (*pfCluster)->energy();
931  if (pfCluster == pfSuperCluster->clustersBegin())
932  elecEe += pfClusterEn;
933  else
934  elecEgamma += pfClusterEn;
935  }
936  }
937  elecVars.superClusterEtaWidth = pfSuperCluster->etaWidth();
938  elecVars.superClusterPhiWidth = pfSuperCluster->phiWidth();
939  }
940  elecVars.eSeedClusterOverPout = theEleRef->eSeedClusterOverPout();
941  elecVars.showerCircularity = 1. - theEleRef->e1x5() / theEleRef->e5x5();
942  elecVars.r9 = theEleRef->r9();
943  elecVars.sigmaIEtaIEta5x5 = theEleRef->full5x5_sigmaIetaIeta();
944  elecVars.sigmaIPhiIPhi5x5 = theEleRef->full5x5_sigmaIphiIphi();
945 
946  elecVars.pIn = std::sqrt(theEleRef->trackMomentumAtVtx().Mag2());
947  elecVars.pOut = std::sqrt(theEleRef->trackMomentumOut().Mag2());
948  elecVars.eTotOverPin = (elecVars.pIn > 0.0) ? ((elecEe + elecEgamma) / elecVars.pIn) : -0.1;
949  elecVars.eEcal = theEleRef->ecalEnergy();
950  if (!isPhase2_) {
951  elecVars.deltaEta = theEleRef->deltaEtaSeedClusterTrackAtCalo();
952  elecVars.deltaPhi = theEleRef->deltaPhiSeedClusterTrackAtCalo();
953  } else {
954  elecVars.deltaEta = theEleRef->deltaEtaEleClusterTrackAtCalo();
955  elecVars.deltaPhi = theEleRef->deltaPhiEleClusterTrackAtCalo();
956  }
957  elecVars.mvaInSigmaEtaEta = theEleRef->mvaInput().sigmaEtaEta;
958  elecVars.mvaInHadEnergy = theEleRef->mvaInput().hadEnergy;
959  elecVars.mvaInDeltaEta = theEleRef->mvaInput().deltaEta;
960 
961  // Variables related to the GsfTrack
962  elecVars.chi2NormGSF = -99.;
963  elecVars.gsfNumHits = -99.;
964  elecVars.gsfTrackResol = -99.;
965  elecVars.gsfTracklnPt = -99.;
966  if (theEleRef->gsfTrack().isNonnull()) {
967  elecVars.chi2NormGSF = theEleRef->gsfTrack()->normalizedChi2();
968  elecVars.gsfNumHits = theEleRef->gsfTrack()->numberOfValidHits();
969  if (theEleRef->gsfTrack()->pt() > 0.) {
970  elecVars.gsfTrackResol = theEleRef->gsfTrack()->ptError() / theEleRef->gsfTrack()->pt();
971  elecVars.gsfTracklnPt = log(theEleRef->gsfTrack()->pt()) * M_LN10;
972  }
973  }
974 
975  // Variables related to the CtfTrack
976  elecVars.chi2NormKF = -99.;
977  elecVars.kfNumHits = -99.;
978  if (theEleRef->closestCtfTrackRef().isNonnull()) {
979  elecVars.chi2NormKF = theEleRef->closestCtfTrackRef()->normalizedChi2();
980  elecVars.kfNumHits = theEleRef->closestCtfTrackRef()->numberOfValidHits();
981  }
982 
983  // Variables related to HGCal
984  if (isPhase2_ && !theEleRef->isEB()) {
986  getElecVarsHGCalTypeSpecific(theEleRef, elecVars);
987  else
988  throw cms::Exception("AntiElectronIDMVA6")
989  << "Unsupported ElectronType used. You must use either reco::GsfElectron or pat::Electron.";
990  }
991 
992  return elecVars;
993 }

References antiElecIDMVA6_blocks::ElecVars::chi2NormGSF, antiElecIDMVA6_blocks::ElecVars::chi2NormKF, antiElecIDMVA6_blocks::ElecVars::deltaEta, antiElecIDMVA6_blocks::ElecVars::deltaPhi, antiElecIDMVA6_blocks::ElecVars::eEcal, antiElecIDMVA6_blocks::ElecVars::eSeedClusterOverPout, antiElecIDMVA6_blocks::ElecVars::eta, antiElecIDMVA6_blocks::ElecVars::eTotOverPin, Exception, antiElecIDMVA6_blocks::ElecVars::gsfNumHits, antiElecIDMVA6_blocks::ElecVars::gsfTracklnPt, antiElecIDMVA6_blocks::ElecVars::gsfTrackResol, edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), antiElecIDMVA6_blocks::ElecVars::kfNumHits, dqm-mbProfile::log, antiElecIDMVA6_blocks::ElecVars::mvaInDeltaEta, antiElecIDMVA6_blocks::ElecVars::mvaInHadEnergy, antiElecIDMVA6_blocks::ElecVars::mvaInSigmaEtaEta, antiElecIDMVA6_blocks::ElecVars::phi, antiElecIDMVA6_blocks::ElecVars::pIn, antiElecIDMVA6_blocks::ElecVars::pOut, antiElecIDMVA6_blocks::ElecVars::r9, antiElecIDMVA6_blocks::ElecVars::showerCircularity, antiElecIDMVA6_blocks::ElecVars::sigmaIEtaIEta5x5, antiElecIDMVA6_blocks::ElecVars::sigmaIPhiIPhi5x5, mathSSE::sqrt(), antiElecIDMVA6_blocks::ElecVars::superClusterEtaWidth, antiElecIDMVA6_blocks::ElecVars::superClusterPhiWidth, and relativeConstraints::value.

Referenced by AntiElectronIDMVA6< TauType, ElectronType >::mvaValue().

◆ getElecVarsHGCalTypeSpecific() [1/2]

template<class TauType , class ElectronType >
void AntiElectronIDMVA6< TauType, ElectronType >::getElecVarsHGCalTypeSpecific ( const pat::ElectronRef theEleRef,
antiElecIDMVA6_blocks::ElecVars elecVars 
)

Definition at line 1296 of file AntiElectronIDMVA6.cc.

1297  {
1298  //MB: Assumed that presence of one of the HGCal EleID variables guarantee presence of all
1299  if (!theEleRef->hasUserFloat("hgcElectronID:sigmaUU"))
1300  return;
1301 
1302  elecVars.hgcalSigmaUU = theEleRef->userFloat("hgcElectronID:sigmaUU");
1303  elecVars.hgcalSigmaVV = theEleRef->userFloat("hgcElectronID:sigmaVV");
1304  elecVars.hgcalSigmaEE = theEleRef->userFloat("hgcElectronID:sigmaEE");
1305  elecVars.hgcalSigmaPP = theEleRef->userFloat("hgcElectronID:sigmaPP");
1306  elecVars.hgcalNLayers = theEleRef->userFloat("hgcElectronID:nLayers");
1307  elecVars.hgcalFirstLayer = theEleRef->userFloat("hgcElectronID:firstLayer");
1308  elecVars.hgcalLastLayer = theEleRef->userFloat("hgcElectronID:lastLayer");
1309  elecVars.hgcalLayerEfrac10 = theEleRef->userFloat("hgcElectronID:layerEfrac10");
1310  elecVars.hgcalLayerEfrac90 = theEleRef->userFloat("hgcElectronID:layerEfrac90");
1311  elecVars.hgcalEcEnergyEE = theEleRef->userFloat("hgcElectronID:ecEnergyEE");
1312  elecVars.hgcalEcEnergyFH = theEleRef->userFloat("hgcElectronID:ecEnergyFH");
1313  elecVars.hgcalMeasuredDepth = theEleRef->userFloat("hgcElectronID:measuredDepth");
1314  elecVars.hgcalExpectedDepth = theEleRef->userFloat("hgcElectronID:expectedDepth");
1315  elecVars.hgcalExpectedSigma = theEleRef->userFloat("hgcElectronID:expectedSigma");
1316  elecVars.hgcalDepthCompatibility = theEleRef->userFloat("hgcElectronID:depthCompatibility");
1317 }

References antiElecIDMVA6_blocks::ElecVars::hgcalDepthCompatibility, antiElecIDMVA6_blocks::ElecVars::hgcalEcEnergyEE, antiElecIDMVA6_blocks::ElecVars::hgcalEcEnergyFH, antiElecIDMVA6_blocks::ElecVars::hgcalExpectedDepth, antiElecIDMVA6_blocks::ElecVars::hgcalExpectedSigma, antiElecIDMVA6_blocks::ElecVars::hgcalFirstLayer, antiElecIDMVA6_blocks::ElecVars::hgcalLastLayer, antiElecIDMVA6_blocks::ElecVars::hgcalLayerEfrac10, antiElecIDMVA6_blocks::ElecVars::hgcalLayerEfrac90, antiElecIDMVA6_blocks::ElecVars::hgcalMeasuredDepth, antiElecIDMVA6_blocks::ElecVars::hgcalNLayers, antiElecIDMVA6_blocks::ElecVars::hgcalSigmaEE, antiElecIDMVA6_blocks::ElecVars::hgcalSigmaPP, antiElecIDMVA6_blocks::ElecVars::hgcalSigmaUU, and antiElecIDMVA6_blocks::ElecVars::hgcalSigmaVV.

◆ getElecVarsHGCalTypeSpecific() [2/2]

template<class TauType , class ElectronType >
void AntiElectronIDMVA6< TauType, ElectronType >::getElecVarsHGCalTypeSpecific ( const reco::GsfElectronRef theEleRef,
antiElecIDMVA6_blocks::ElecVars elecVars 
)

Definition at line 1270 of file AntiElectronIDMVA6.cc.

1271  {
1272  //MB: Assumed that presence of one of the HGCal EleID variables guarantee presence of all
1273  if (!(electronIds_.find("hgcElectronID:sigmaUU") != electronIds_.end() &&
1274  electronIds_.at("hgcElectronID:sigmaUU").isValid()))
1275  return;
1276 
1277  elecVars.hgcalSigmaUU = (*electronIds_.at("hgcElectronID:sigmaUU"))[theEleRef];
1278  elecVars.hgcalSigmaVV = (*electronIds_.at("hgcElectronID:sigmaVV"))[theEleRef];
1279  elecVars.hgcalSigmaEE = (*electronIds_.at("hgcElectronID:sigmaEE"))[theEleRef];
1280  elecVars.hgcalSigmaPP = (*electronIds_.at("hgcElectronID:sigmaPP"))[theEleRef];
1281  elecVars.hgcalNLayers = (*electronIds_.at("hgcElectronID:nLayers"))[theEleRef];
1282  elecVars.hgcalFirstLayer = (*electronIds_.at("hgcElectronID:firstLayer"))[theEleRef];
1283  elecVars.hgcalLastLayer = (*electronIds_.at("hgcElectronID:lastLayer"))[theEleRef];
1284  elecVars.hgcalLayerEfrac10 = (*electronIds_.at("hgcElectronID:layerEfrac10"))[theEleRef];
1285  elecVars.hgcalLayerEfrac90 = (*electronIds_.at("hgcElectronID:layerEfrac90"))[theEleRef];
1286  elecVars.hgcalEcEnergyEE = (*electronIds_.at("hgcElectronID:ecEnergyEE"))[theEleRef];
1287  elecVars.hgcalEcEnergyFH = (*electronIds_.at("hgcElectronID:ecEnergyFH"))[theEleRef];
1288  elecVars.hgcalMeasuredDepth = (*electronIds_.at("hgcElectronID:measuredDepth"))[theEleRef];
1289  elecVars.hgcalExpectedDepth = (*electronIds_.at("hgcElectronID:expectedDepth"))[theEleRef];
1290  elecVars.hgcalExpectedSigma = (*electronIds_.at("hgcElectronID:expectedSigma"))[theEleRef];
1291  elecVars.hgcalDepthCompatibility = (*electronIds_.at("hgcElectronID:depthCompatibility"))[theEleRef];
1292 }

References antiElecIDMVA6_blocks::ElecVars::hgcalDepthCompatibility, antiElecIDMVA6_blocks::ElecVars::hgcalEcEnergyEE, antiElecIDMVA6_blocks::ElecVars::hgcalEcEnergyFH, antiElecIDMVA6_blocks::ElecVars::hgcalExpectedDepth, antiElecIDMVA6_blocks::ElecVars::hgcalExpectedSigma, antiElecIDMVA6_blocks::ElecVars::hgcalFirstLayer, antiElecIDMVA6_blocks::ElecVars::hgcalLastLayer, antiElecIDMVA6_blocks::ElecVars::hgcalLayerEfrac10, antiElecIDMVA6_blocks::ElecVars::hgcalLayerEfrac90, antiElecIDMVA6_blocks::ElecVars::hgcalMeasuredDepth, antiElecIDMVA6_blocks::ElecVars::hgcalNLayers, antiElecIDMVA6_blocks::ElecVars::hgcalSigmaEE, antiElecIDMVA6_blocks::ElecVars::hgcalSigmaPP, antiElecIDMVA6_blocks::ElecVars::hgcalSigmaUU, and antiElecIDMVA6_blocks::ElecVars::hgcalSigmaVV.

◆ getTauGammaVecs()

template<class TauType , class ElectronType >
TauGammaVecs AntiElectronIDMVA6< TauType, ElectronType >::getTauGammaVecs ( const TauType &  theTau)

Definition at line 892 of file AntiElectronIDMVA6.cc.

892  {
893  TauGammaVecs tauGammaVecs;
894 
895  float signalrad = std::clamp(3.0 / std::max(1.0, theTau.pt()), 0.05, 0.10);
896  for (const auto& gamma : theTau.signalGammaCands()) {
897  float dR = deltaR(gamma->p4(), theTau.leadChargedHadrCand()->p4());
898  // pfGammas inside the tau signal cone
899  if (dR < signalrad) {
900  tauGammaVecs.gammasdEtaInSigCone.push_back(gamma->eta() - theTau.leadChargedHadrCand()->eta());
901  tauGammaVecs.gammasdPhiInSigCone.push_back(gamma->phi() - theTau.leadChargedHadrCand()->phi());
902  tauGammaVecs.gammasPtInSigCone.push_back(gamma->pt());
903  }
904  // pfGammas outside the tau signal cone
905  else {
906  tauGammaVecs.gammasdEtaOutSigCone.push_back(gamma->eta() - theTau.leadChargedHadrCand()->eta());
907  tauGammaVecs.gammasdPhiOutSigCone.push_back(gamma->phi() - theTau.leadChargedHadrCand()->phi());
908  tauGammaVecs.gammasPtOutSigCone.push_back(gamma->pt());
909  }
910  }
911  return tauGammaVecs;
912 }

References PbPb_ZMuSkimMuonDPG_cff::deltaR, HGC3DClusterGenMatchSelector_cfi::dR, CustomPhysics_cfi::gamma, antiElecIDMVA6_blocks::TauGammaVecs::gammasdEtaInSigCone, antiElecIDMVA6_blocks::TauGammaVecs::gammasdEtaOutSigCone, antiElecIDMVA6_blocks::TauGammaVecs::gammasdPhiInSigCone, antiElecIDMVA6_blocks::TauGammaVecs::gammasdPhiOutSigCone, antiElecIDMVA6_blocks::TauGammaVecs::gammasPtInSigCone, antiElecIDMVA6_blocks::TauGammaVecs::gammasPtOutSigCone, and SiStripPI::max.

Referenced by AntiElectronIDMVA6< TauType, ElectronType >::mvaValue().

◆ getTauVars()

template<class TauType , class ElectronType >
TauVars AntiElectronIDMVA6< TauType, ElectronType >::getTauVars ( const TauType &  theTau)

Definition at line 842 of file AntiElectronIDMVA6.cc.

842  {
843  TauVars tauVars;
845  tauVars = getTauVarsTypeSpecific(theTau);
846  else
847  throw cms::Exception("AntiElectronIDMVA6")
848  << "Unsupported TauType used. You must use either reco::PFTau or pat::Tau.";
849 
850  tauVars.pt = theTau.pt();
851 
852  reco::Candidate::LorentzVector pfGammaSum(0, 0, 0, 0);
853  reco::Candidate::LorentzVector pfChargedSum(0, 0, 0, 0);
854  float signalrad = std::clamp(3.0 / std::max(1.0, theTau.pt()), 0.05, 0.10);
855  for (const auto& gamma : theTau.signalGammaCands()) {
856  float dR = deltaR(gamma->p4(), theTau.leadChargedHadrCand()->p4());
857  // pfGammas inside the tau signal cone
858  if (dR < signalrad) {
859  pfGammaSum += gamma->p4();
860  }
861  }
862  for (const auto& charged : theTau.signalChargedHadrCands()) {
863  float dR = deltaR(charged->p4(), theTau.leadChargedHadrCand()->p4());
864  // charged particles inside the tau signal cone
865  if (dR < signalrad) {
866  pfChargedSum += charged->p4();
867  }
868  }
869  tauVars.visMassIn = (pfGammaSum + pfChargedSum).mass();
870 
871  tauVars.hasGsf = 0;
872  if (theTau.leadChargedHadrCand().isNonnull()) {
873  const pat::PackedCandidate* packedLeadChCand =
874  dynamic_cast<const pat::PackedCandidate*>(theTau.leadChargedHadrCand().get());
875  if (packedLeadChCand != nullptr) {
876  if (std::abs(packedLeadChCand->pdgId()) == 11)
877  tauVars.hasGsf = 1;
878  } else {
879  const reco::PFCandidate* pfLeadChCand =
880  dynamic_cast<const reco::PFCandidate*>(theTau.leadChargedHadrCand().get());
881  if (pfLeadChCand != nullptr && pfLeadChCand->gsfTrackRef().isNonnull())
882  tauVars.hasGsf = 1;
883  }
884  }
885  tauVars.dCrackPhi = dCrackPhi(tauVars.phi, tauVars.etaAtEcalEntrance);
886  tauVars.dCrackEta = dCrackEta(tauVars.etaAtEcalEntrance);
887 
888  return tauVars;
889 }

References funct::abs(), antiElecIDMVA6_blocks::TauVars::dCrackEta, antiElecIDMVA6_blocks::TauVars::dCrackPhi, PbPb_ZMuSkimMuonDPG_cff::deltaR, HGC3DClusterGenMatchSelector_cfi::dR, antiElecIDMVA6_blocks::TauVars::etaAtEcalEntrance, Exception, CustomPhysics_cfi::gamma, reco::PFCandidate::gsfTrackRef(), antiElecIDMVA6_blocks::TauVars::hasGsf, edm::Ref< C, T, F >::isNonnull(), EgHLTOffHistBins_cfi::mass, SiStripPI::max, pat::PackedCandidate::pdgId(), antiElecIDMVA6_blocks::TauVars::phi, antiElecIDMVA6_blocks::TauVars::pt, relativeConstraints::value, and antiElecIDMVA6_blocks::TauVars::visMassIn.

Referenced by AntiElectronIDMVA6< TauType, ElectronType >::mvaValue().

◆ getTauVarsTypeSpecific() [1/2]

template<class TauType , class ElectronType >
TauVars AntiElectronIDMVA6< TauType, ElectronType >::getTauVarsTypeSpecific ( const pat::Tau theTau)

Definition at line 1093 of file AntiElectronIDMVA6.cc.

1093  {
1094  TauVars tauVars;
1095  tauVars.etaAtEcalEntrance = theTau.etaAtEcalEntrance();
1097  tauVars.leadChargedPFCandPt = theTau.ptLeadChargedCand();
1098  tauVars.phi = theTau.phi();
1099  if (!isPhase2_) {
1101  tauVars.phi = theTau.phiAtEcalEntrance();
1102  } else {
1103  float etaAtECal = 0.;
1104  float phiAtECal = 0.;
1105  bool success = energyWeightedEtaAndPhiAtECal(theTau, etaAtECal, phiAtECal);
1106  if (success) {
1107  tauVars.phi = phiAtECal;
1108  }
1109  }
1110  tauVars.emFraction = std::max(theTau.emFraction_MVA(), 0.f);
1111  } else {
1112  if (std::abs(theTau.eta()) >= ecalBarrelEndcapEtaBorder_) { //HGCal
1113  tauVars.etaAtEcalEntrance = -99.;
1114  tauVars.leadChargedPFCandEtaAtEcalEntrance = -99.;
1115  bool success = false;
1117  if (success) {
1118  tauVars.leadChargedPFCandEtaAtEcalEntrance = posAtECal.eta();
1119  }
1120  float phiAtECal = 0.;
1121  float etaAtECal = 0.;
1122  success = energyWeightedEtaAndPhiAtECal(theTau, etaAtECal, phiAtECal);
1123  if (success) {
1124  tauVars.etaAtEcalEntrance = etaAtECal;
1125  }
1126  }
1129  0.f);
1130  }
1131  tauVars.leadPFChargedHadrHoP = 0.;
1132  tauVars.leadPFChargedHadrEoP = 0.;
1133  if (theTau.leadChargedHadrCand()->p() > 0.) {
1134  tauVars.leadPFChargedHadrHoP = theTau.hcalEnergyLeadChargedHadrCand() / theTau.leadChargedHadrCand()->p();
1135  tauVars.leadPFChargedHadrEoP = theTau.ecalEnergyLeadChargedHadrCand() / theTau.leadChargedHadrCand()->p();
1136  }
1137 
1138  return tauVars;
1139 }

References funct::abs(), pat::Tau::ecalEnergyLeadChargedHadrCand(), antiElecIDMVA6_blocks::TauVars::emFraction, pat::Tau::emFraction_MVA(), reco::LeafCandidate::eta(), antiElecIDMVA6_blocks::TauVars::etaAtEcalEntrance, pat::Tau::etaAtEcalEntrance(), pat::Tau::etaAtEcalEntranceLeadChargedCand(), f, edm::Ptr< T >::get(), pat::Tau::hcalEnergyLeadChargedHadrCand(), pat::Tau::leadChargedHadrCand(), antiElecIDMVA6_blocks::TauVars::leadChargedPFCandEtaAtEcalEntrance, antiElecIDMVA6_blocks::TauVars::leadChargedPFCandPt, antiElecIDMVA6_blocks::TauVars::leadPFChargedHadrEoP, antiElecIDMVA6_blocks::TauVars::leadPFChargedHadrHoP, SiStripPI::max, antiElecIDMVA6_blocks::TauVars::phi, reco::LeafCandidate::phi(), pat::Tau::phiAtEcalEntrance(), pat::Tau::ptLeadChargedCand(), and summarizeEdmComparisonLogfiles::success.

◆ getTauVarsTypeSpecific() [2/2]

template<class TauType , class ElectronType >
TauVars AntiElectronIDMVA6< TauType, ElectronType >::getTauVarsTypeSpecific ( const reco::PFTau theTau)

Definition at line 1143 of file AntiElectronIDMVA6.cc.

1143  {
1144  TauVars tauVars;
1145  tauVars.etaAtEcalEntrance = -99.;
1146  tauVars.leadChargedPFCandEtaAtEcalEntrance = -99.;
1147  tauVars.leadChargedPFCandPt = -99.;
1148  float sumEtaTimesEnergy = 0.;
1149  float sumPhiTimesEnergy = 0.;
1150  float sumEnergy = 0.;
1151  tauVars.phi = theTau.phi();
1152  // Check type of candidates building tau to avoid dynamic casts further
1153  bool isFromPFCands =
1154  (theTau.leadCand().isNonnull() && dynamic_cast<const reco::PFCandidate*>(theTau.leadCand().get()) != nullptr);
1155  if (!isPhase2_) {
1156  for (const auto& candidate : theTau.signalCands()) {
1157  float etaAtECalEntrance = candidate->eta();
1158  float phiAtECalEntrance = candidate->phi();
1159  const reco::Track* track = nullptr;
1160  if (isFromPFCands) {
1161  const reco::PFCandidate* pfCandidate = static_cast<const reco::PFCandidate*>(candidate.get());
1162  etaAtECalEntrance = pfCandidate->positionAtECALEntrance().eta();
1164  phiAtECalEntrance = pfCandidate->positionAtECALEntrance().phi();
1165  } else {
1166  bool success = false;
1167  reco::Candidate::Point posAtECal = positionAtECalEntrance_(candidate.get(), success);
1168  if (success) {
1169  phiAtECalEntrance = posAtECal.phi();
1170  }
1171  }
1172  track = getTrackFromPFCand(pfCandidate);
1173  } else {
1174  bool success = false;
1175  reco::Candidate::Point posAtECal = positionAtECalEntrance_(candidate.get(), success);
1176  if (success) {
1177  etaAtECalEntrance = posAtECal.eta();
1178  phiAtECalEntrance = posAtECal.phi();
1179  }
1180  track = candidate->bestTrack();
1181  }
1182  if (track != nullptr) {
1183  if (track->pt() > tauVars.leadChargedPFCandPt) {
1184  tauVars.leadChargedPFCandEtaAtEcalEntrance = etaAtECalEntrance;
1185  tauVars.leadChargedPFCandPt = track->pt();
1186  }
1187  }
1188  sumEtaTimesEnergy += etaAtECalEntrance * candidate->energy();
1189  sumPhiTimesEnergy += phiAtECalEntrance * candidate->energy();
1190  sumEnergy += candidate->energy();
1191  }
1192  if (sumEnergy > 0.) {
1193  tauVars.etaAtEcalEntrance = sumEtaTimesEnergy / sumEnergy;
1194  tauVars.phi = sumPhiTimesEnergy / sumEnergy;
1195  }
1196  tauVars.emFraction = std::max(theTau.emFraction(), 0.f);
1197  } else { // Phase2
1198  for (const auto& candidate : theTau.signalCands()) {
1199  float etaAtECalEntrance = candidate->eta();
1200  const reco::Track* track = nullptr;
1201  if (isFromPFCands) {
1202  const reco::PFCandidate* pfCandidate = static_cast<const reco::PFCandidate*>(candidate.get());
1203  etaAtECalEntrance = pfCandidate->positionAtECALEntrance().eta();
1204  if (std::abs(theTau.eta()) >= ecalBarrelEndcapEtaBorder_) { //HGCal
1205  bool success = false;
1206  reco::Candidate::Point posAtECal = positionAtECalEntrance_(candidate.get(), success);
1207  if (success) {
1208  etaAtECalEntrance = posAtECal.eta();
1209  }
1210  }
1211  track = getTrackFromPFCand(pfCandidate);
1212  } else {
1213  bool success = false;
1214  reco::Candidate::Point posAtECal = positionAtECalEntrance_(candidate.get(), success);
1215  if (success) {
1216  etaAtECalEntrance = posAtECal.eta();
1217  }
1218  track = candidate->bestTrack();
1219  }
1220  if (track != nullptr) {
1221  if (track->pt() > tauVars.leadChargedPFCandPt) {
1222  tauVars.leadChargedPFCandEtaAtEcalEntrance = etaAtECalEntrance;
1223  tauVars.leadChargedPFCandPt = track->pt();
1224  }
1225  }
1226  sumEtaTimesEnergy += etaAtECalEntrance * candidate->energy();
1227  sumEnergy += candidate->energy();
1228  }
1229  if (sumEnergy > 0.) {
1230  tauVars.etaAtEcalEntrance = sumEtaTimesEnergy / sumEnergy;
1231  }
1232  if (isFromPFCands) {
1233  const reco::PFCandidate* pfLeadCandidte =
1234  static_cast<const reco::PFCandidate*>(theTau.leadChargedHadrCand().get());
1235  tauVars.emFraction =
1236  std::max(pfLeadCandidte->ecalEnergy() / (pfLeadCandidte->ecalEnergy() + pfLeadCandidte->hcalEnergy()), 0.);
1237  } else {
1238  const pat::PackedCandidate* patLeadCandiate =
1239  dynamic_cast<const pat::PackedCandidate*>(theTau.leadChargedHadrCand().get());
1240  if (patLeadCandiate != nullptr) {
1241  tauVars.emFraction = std::max(1. - patLeadCandiate->hcalFraction(), 0.);
1242  }
1243  }
1244  }
1245  tauVars.leadPFChargedHadrHoP = 0.;
1246  tauVars.leadPFChargedHadrEoP = 0.;
1247  if (theTau.leadChargedHadrCand()->p() > 0.) {
1248  if (isFromPFCands) {
1249  const reco::PFCandidate* pfLeadCandiate =
1250  static_cast<const reco::PFCandidate*>(theTau.leadChargedHadrCand().get());
1251  tauVars.leadPFChargedHadrHoP = pfLeadCandiate->hcalEnergy() / pfLeadCandiate->p();
1252  tauVars.leadPFChargedHadrEoP = pfLeadCandiate->ecalEnergy() / pfLeadCandiate->p();
1253  } else {
1254  const pat::PackedCandidate* patLeadCandiate =
1255  dynamic_cast<const pat::PackedCandidate*>(theTau.leadChargedHadrCand().get());
1256  if (patLeadCandiate != nullptr) {
1257  tauVars.leadPFChargedHadrHoP = patLeadCandiate->caloFraction() * patLeadCandiate->energy() *
1258  patLeadCandiate->hcalFraction() / patLeadCandiate->p();
1259  tauVars.leadPFChargedHadrEoP = patLeadCandiate->caloFraction() * patLeadCandiate->energy() *
1260  (1. - patLeadCandiate->hcalFraction()) / patLeadCandiate->p();
1261  }
1262  }
1263  }
1264 
1265  return tauVars;
1266 }

References funct::abs(), pat::PackedCandidate::caloFraction(), reco::PFCandidate::ecalEnergy(), antiElecIDMVA6_blocks::TauVars::emFraction, reco::PFTau::emFraction(), pat::PackedCandidate::energy(), reco::LeafCandidate::eta(), antiElecIDMVA6_blocks::TauVars::etaAtEcalEntrance, edm::Ptr< T >::get(), reco::PFCandidate::hcalEnergy(), pat::PackedCandidate::hcalFraction(), edm::Ptr< T >::isNonnull(), reco::PFTau::leadCand(), reco::PFTau::leadChargedHadrCand(), antiElecIDMVA6_blocks::TauVars::leadChargedPFCandEtaAtEcalEntrance, antiElecIDMVA6_blocks::TauVars::leadChargedPFCandPt, antiElecIDMVA6_blocks::TauVars::leadPFChargedHadrEoP, antiElecIDMVA6_blocks::TauVars::leadPFChargedHadrHoP, SiStripPI::max, reco::LeafCandidate::p(), pat::PackedCandidate::p(), antiElecIDMVA6_blocks::TauVars::phi, reco::LeafCandidate::phi(), reco::PFCandidate::positionAtECALEntrance(), reco::PFTau::signalCands(), summarizeEdmComparisonLogfiles::success, and HLT_FULL_cff::track.

◆ minimum()

template<class TauType , class ElectronType >
double AntiElectronIDMVA6< TauType, ElectronType >::minimum ( double  a,
double  b 
)
private

Definition at line 996 of file AntiElectronIDMVA6.cc.

996  {
997  if (std::abs(b) < std::abs(a))
998  return b;
999  else
1000  return a;
1001 }

References a, funct::abs(), and b.

◆ mvaValue() [1/4]

template<class TauType , class ElectronType >
double AntiElectronIDMVA6< TauType, ElectronType >::mvaValue ( const antiElecIDMVA6_blocks::TauVars tauVars,
const antiElecIDMVA6_blocks::TauGammaMoms tauGammaMoms,
const antiElecIDMVA6_blocks::ElecVars elecVars 
)

Definition at line 276 of file AntiElectronIDMVA6.cc.

278  {
279  if (!isInitialized_) {
280  throw cms::Exception("ClassNotInitialized") << " AntiElectronMVA6 not properly initialized !!\n";
281  }
282 
283  double mvaValue = -99.;
284 
285  float elecDeltaPinPoutOverPin = (elecVars.pIn > 0.0) ? (std::abs(elecVars.pIn - elecVars.pOut) / elecVars.pIn) : 1.0;
286  float elecEecalOverPout = (elecVars.pOut > 0.0) ? (elecVars.eEcal / elecVars.pOut) : 20.0;
287  float elecNumHitsDiffOverSum =
288  ((elecVars.gsfNumHits + elecVars.kfNumHits) > 0.0)
289  ? ((elecVars.gsfNumHits - elecVars.kfNumHits) / (elecVars.gsfNumHits + elecVars.kfNumHits))
290  : 1.0;
291 
292  if (deltaR(tauVars.etaAtEcalEntrance, tauVars.phi, elecVars.eta, elecVars.phi) > 0.3 &&
293  tauGammaMoms.signalPFGammaCandsIn == 0 && tauVars.hasGsf < 0.5) {
297  var_NoEleMatch_woGwoGSF_Barrel_[2] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
306  } else {
309  var_NoEleMatch_woGwoGSF_Endcap_[2] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
317  }
318  } else if (deltaR(tauVars.etaAtEcalEntrance, tauVars.phi, elecVars.eta, elecVars.phi) > 0.3 &&
319  tauGammaMoms.signalPFGammaCandsIn > 0 && tauVars.hasGsf < 0.5) {
323  var_NoEleMatch_wGwoGSF_Barrel_[2] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
340  } else {
343  var_NoEleMatch_wGwoGSF_Endcap_[2] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
359  }
360  } else if (tauGammaMoms.signalPFGammaCandsIn == 0 && tauVars.hasGsf > 0.5) {
362  var_woGwGSF_Barrel_[0] = std::max(-0.1f, elecVars.eTotOverPin);
363  var_woGwGSF_Barrel_[1] = std::log(std::max(0.01f, elecVars.chi2NormGSF));
364  var_woGwGSF_Barrel_[2] = elecVars.gsfNumHits;
365  var_woGwGSF_Barrel_[3] = std::log(std::max(0.01f, elecVars.gsfTrackResol));
366  var_woGwGSF_Barrel_[4] = elecVars.gsfTracklnPt;
367  var_woGwGSF_Barrel_[5] = elecNumHitsDiffOverSum;
368  var_woGwGSF_Barrel_[6] = std::log(std::max(0.01f, elecVars.chi2NormKF));
369  var_woGwGSF_Barrel_[7] = std::min(elecDeltaPinPoutOverPin, 1.f);
370  var_woGwGSF_Barrel_[8] = std::min(elecEecalOverPout, 20.f);
371  var_woGwGSF_Barrel_[9] = elecVars.deltaEta;
372  var_woGwGSF_Barrel_[10] = elecVars.deltaPhi;
373  var_woGwGSF_Barrel_[11] = std::min(elecVars.mvaInSigmaEtaEta, 0.01f);
374  var_woGwGSF_Barrel_[12] = std::min(elecVars.mvaInHadEnergy, 20.f);
375  var_woGwGSF_Barrel_[13] = std::min(elecVars.mvaInDeltaEta, 0.1f);
378  var_woGwGSF_Barrel_[16] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
379  var_woGwGSF_Barrel_[17] = std::log(std::max(1.f, tauVars.pt));
380  var_woGwGSF_Barrel_[18] = tauVars.emFraction;
383  var_woGwGSF_Barrel_[21] = tauVars.visMassIn;
384  var_woGwGSF_Barrel_[22] = tauVars.dCrackEta;
385  var_woGwGSF_Barrel_[23] = tauVars.dCrackPhi;
387  } else {
388  var_woGwGSF_Endcap_[0] = std::max(-0.1f, elecVars.eTotOverPin);
389  var_woGwGSF_Endcap_[1] = std::log(std::max(0.01f, elecVars.chi2NormGSF));
390  var_woGwGSF_Endcap_[2] = elecVars.gsfNumHits;
391  var_woGwGSF_Endcap_[3] = std::log(std::max(0.01f, elecVars.gsfTrackResol));
392  var_woGwGSF_Endcap_[4] = elecVars.gsfTracklnPt;
393  var_woGwGSF_Endcap_[5] = elecNumHitsDiffOverSum;
394  var_woGwGSF_Endcap_[6] = std::log(std::max(0.01f, elecVars.chi2NormKF));
395  var_woGwGSF_Endcap_[7] = std::min(elecDeltaPinPoutOverPin, 1.f);
396  var_woGwGSF_Endcap_[8] = std::min(elecEecalOverPout, 20.f);
397  var_woGwGSF_Endcap_[9] = elecVars.deltaEta;
398  var_woGwGSF_Endcap_[10] = elecVars.deltaPhi;
399  var_woGwGSF_Endcap_[11] = std::min(elecVars.mvaInSigmaEtaEta, 0.01f);
400  var_woGwGSF_Endcap_[12] = std::min(elecVars.mvaInHadEnergy, 20.f);
401  var_woGwGSF_Endcap_[13] = std::min(elecVars.mvaInDeltaEta, 0.1f);
404  var_woGwGSF_Endcap_[16] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
405  var_woGwGSF_Endcap_[17] = std::log(std::max(1.f, tauVars.pt));
406  var_woGwGSF_Endcap_[18] = tauVars.emFraction;
409  var_woGwGSF_Endcap_[21] = tauVars.visMassIn;
410  var_woGwGSF_Endcap_[22] = tauVars.dCrackEta;
412  }
413  } else if (tauGammaMoms.signalPFGammaCandsIn > 0 && tauVars.hasGsf > 0.5) {
415  var_wGwGSF_Barrel_[0] = std::max(-0.1f, elecVars.eTotOverPin);
416  var_wGwGSF_Barrel_[1] = std::log(std::max(0.01f, elecVars.chi2NormGSF));
417  var_wGwGSF_Barrel_[2] = elecVars.gsfNumHits;
418  var_wGwGSF_Barrel_[3] = std::log(std::max(0.01f, elecVars.gsfTrackResol));
419  var_wGwGSF_Barrel_[4] = elecVars.gsfTracklnPt;
420  var_wGwGSF_Barrel_[5] = elecNumHitsDiffOverSum;
421  var_wGwGSF_Barrel_[6] = std::log(std::max(0.01f, elecVars.chi2NormKF));
422  var_wGwGSF_Barrel_[7] = std::min(elecDeltaPinPoutOverPin, 1.f);
423  var_wGwGSF_Barrel_[8] = std::min(elecEecalOverPout, 20.f);
424  var_wGwGSF_Barrel_[9] = elecVars.deltaEta;
425  var_wGwGSF_Barrel_[10] = elecVars.deltaPhi;
426  var_wGwGSF_Barrel_[11] = std::min(elecVars.mvaInSigmaEtaEta, 0.01f);
427  var_wGwGSF_Barrel_[12] = std::min(elecVars.mvaInHadEnergy, 20.f);
428  var_wGwGSF_Barrel_[13] = std::min(elecVars.mvaInDeltaEta, 0.1f);
431  var_wGwGSF_Barrel_[16] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
432  var_wGwGSF_Barrel_[17] = std::log(std::max(1.f, tauVars.pt));
433  var_wGwGSF_Barrel_[18] = tauVars.emFraction;
434  var_wGwGSF_Barrel_[19] = tauGammaMoms.signalPFGammaCandsIn;
435  var_wGwGSF_Barrel_[20] = tauGammaMoms.signalPFGammaCandsOut;
438  var_wGwGSF_Barrel_[23] = tauVars.visMassIn;
439  var_wGwGSF_Barrel_[24] = tauGammaMoms.gammaEtaMomIn;
440  var_wGwGSF_Barrel_[25] = tauGammaMoms.gammaEtaMomOut;
441  var_wGwGSF_Barrel_[26] = tauGammaMoms.gammaPhiMomIn;
442  var_wGwGSF_Barrel_[27] = tauGammaMoms.gammaPhiMomOut;
443  var_wGwGSF_Barrel_[28] = tauGammaMoms.gammaEnFracIn;
444  var_wGwGSF_Barrel_[29] = tauGammaMoms.gammaEnFracOut;
445  var_wGwGSF_Barrel_[30] = tauVars.dCrackEta;
446  var_wGwGSF_Barrel_[31] = tauVars.dCrackPhi;
448  } else {
449  var_wGwGSF_Endcap_[0] = std::max(-0.1f, elecVars.eTotOverPin);
450  var_wGwGSF_Endcap_[1] = std::log(std::max(0.01f, elecVars.chi2NormGSF));
451  var_wGwGSF_Endcap_[2] = elecVars.gsfNumHits;
452  var_wGwGSF_Endcap_[3] = std::log(std::max(0.01f, elecVars.gsfTrackResol));
453  var_wGwGSF_Endcap_[4] = elecVars.gsfTracklnPt;
454  var_wGwGSF_Endcap_[5] = elecNumHitsDiffOverSum;
455  var_wGwGSF_Endcap_[6] = std::log(std::max(0.01f, elecVars.chi2NormKF));
456  var_wGwGSF_Endcap_[7] = std::min(elecDeltaPinPoutOverPin, 1.f);
457  var_wGwGSF_Endcap_[8] = std::min(elecEecalOverPout, 20.f);
458  var_wGwGSF_Endcap_[9] = elecVars.deltaEta;
459  var_wGwGSF_Endcap_[10] = elecVars.deltaPhi;
460  var_wGwGSF_Endcap_[11] = std::min(elecVars.mvaInSigmaEtaEta, 0.01f);
461  var_wGwGSF_Endcap_[12] = std::min(elecVars.mvaInHadEnergy, 20.f);
462  var_wGwGSF_Endcap_[13] = std::min(elecVars.mvaInDeltaEta, 0.1f);
465  var_wGwGSF_Endcap_[16] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
466  var_wGwGSF_Endcap_[17] = std::log(std::max(1.f, tauVars.pt));
467  var_wGwGSF_Endcap_[18] = tauVars.emFraction;
468  var_wGwGSF_Endcap_[19] = tauGammaMoms.signalPFGammaCandsIn;
469  var_wGwGSF_Endcap_[20] = tauGammaMoms.signalPFGammaCandsOut;
472  var_wGwGSF_Endcap_[23] = tauVars.visMassIn;
473  var_wGwGSF_Endcap_[24] = tauGammaMoms.gammaEtaMomIn;
474  var_wGwGSF_Endcap_[25] = tauGammaMoms.gammaEtaMomOut;
475  var_wGwGSF_Endcap_[26] = tauGammaMoms.gammaPhiMomIn;
476  var_wGwGSF_Endcap_[27] = tauGammaMoms.gammaPhiMomOut;
477  var_wGwGSF_Endcap_[28] = tauGammaMoms.gammaEnFracIn;
478  var_wGwGSF_Endcap_[29] = tauGammaMoms.gammaEnFracOut;
479  var_wGwGSF_Endcap_[30] = tauVars.dCrackEta;
481  }
482  }
483  return mvaValue;
484 }

References funct::abs(), antiElecIDMVA6_blocks::ElecVars::chi2NormGSF, antiElecIDMVA6_blocks::ElecVars::chi2NormKF, antiElecIDMVA6_blocks::TauVars::dCrackEta, antiElecIDMVA6_blocks::TauVars::dCrackPhi, antiElecIDMVA6_blocks::ElecVars::deltaEta, antiElecIDMVA6_blocks::ElecVars::deltaPhi, PbPb_ZMuSkimMuonDPG_cff::deltaR, antiElecIDMVA6_blocks::ElecVars::eEcal, antiElecIDMVA6_blocks::TauVars::emFraction, antiElecIDMVA6_blocks::ElecVars::eta, antiElecIDMVA6_blocks::TauVars::etaAtEcalEntrance, antiElecIDMVA6_blocks::ElecVars::eTotOverPin, Exception, f, antiElecIDMVA6_blocks::TauGammaMoms::gammaEnFracIn, antiElecIDMVA6_blocks::TauGammaMoms::gammaEnFracOut, antiElecIDMVA6_blocks::TauGammaMoms::gammaEtaMomIn, antiElecIDMVA6_blocks::TauGammaMoms::gammaEtaMomOut, antiElecIDMVA6_blocks::TauGammaMoms::gammaPhiMomIn, antiElecIDMVA6_blocks::TauGammaMoms::gammaPhiMomOut, antiElecIDMVA6_blocks::ElecVars::gsfNumHits, antiElecIDMVA6_blocks::ElecVars::gsfTracklnPt, antiElecIDMVA6_blocks::ElecVars::gsfTrackResol, antiElecIDMVA6_blocks::TauVars::hasGsf, antiElecIDMVA6_blocks::ElecVars::kfNumHits, antiElecIDMVA6_blocks::TauVars::leadChargedPFCandEtaAtEcalEntrance, antiElecIDMVA6_blocks::TauVars::leadChargedPFCandPt, antiElecIDMVA6_blocks::TauVars::leadPFChargedHadrEoP, antiElecIDMVA6_blocks::TauVars::leadPFChargedHadrHoP, dqm-mbProfile::log, SiStripPI::max, min(), antiElecIDMVA6_blocks::ElecVars::mvaInDeltaEta, antiElecIDMVA6_blocks::ElecVars::mvaInHadEnergy, antiElecIDMVA6_blocks::ElecVars::mvaInSigmaEtaEta, antiElecIDMVA6_blocks::TauVars::phi, antiElecIDMVA6_blocks::ElecVars::phi, antiElecIDMVA6_blocks::ElecVars::pIn, antiElecIDMVA6_blocks::ElecVars::pOut, antiElecIDMVA6_blocks::TauVars::pt, antiElecIDMVA6_blocks::TauGammaMoms::signalPFGammaCandsIn, antiElecIDMVA6_blocks::TauGammaMoms::signalPFGammaCandsOut, and antiElecIDMVA6_blocks::TauVars::visMassIn.

◆ mvaValue() [2/4]

template<class TauType , class ElectronType >
double AntiElectronIDMVA6< TauType, ElectronType >::mvaValue ( const antiElecIDMVA6_blocks::TauVars tauVars,
const antiElecIDMVA6_blocks::TauGammaVecs tauGammaVecs,
const antiElecIDMVA6_blocks::ElecVars elecVars 
)

Definition at line 208 of file AntiElectronIDMVA6.cc.

210  {
211  TauGammaMoms tauGammaMoms;
212  double sumPt = 0.;
213  double dEta2 = 0.;
214  double dPhi2 = 0.;
215  tauGammaMoms.signalPFGammaCandsIn = tauGammaVecs.gammasPtInSigCone.size();
216  for (size_t i = 0; i < tauGammaVecs.gammasPtInSigCone.size(); ++i) {
217  double pt_i = tauGammaVecs.gammasPtInSigCone[i];
218  double phi_i = tauGammaVecs.gammasdPhiInSigCone[i];
219  if (tauGammaVecs.gammasdPhiInSigCone[i] > M_PI)
220  phi_i = tauGammaVecs.gammasdPhiInSigCone[i] - 2 * M_PI;
221  else if (tauGammaVecs.gammasdPhiInSigCone[i] < -M_PI)
222  phi_i = tauGammaVecs.gammasdPhiInSigCone[i] + 2 * M_PI;
223  double eta_i = tauGammaVecs.gammasdEtaInSigCone[i];
224  sumPt += pt_i;
225  dEta2 += (pt_i * eta_i * eta_i);
226  dPhi2 += (pt_i * phi_i * phi_i);
227  }
228 
229  tauGammaMoms.gammaEnFracIn = -99.;
230  if (tauVars.pt > 0.) {
231  tauGammaMoms.gammaEnFracIn = sumPt / tauVars.pt;
232  }
233  if (sumPt > 0.) {
234  dEta2 /= sumPt;
235  dPhi2 /= sumPt;
236  }
237  tauGammaMoms.gammaEtaMomIn = std::sqrt(dEta2 * tauGammaMoms.gammaEnFracIn) * tauVars.pt;
238  tauGammaMoms.gammaPhiMomIn = std::sqrt(dPhi2 * tauGammaMoms.gammaEnFracIn) * tauVars.pt;
239 
240  sumPt = 0.;
241  dEta2 = 0.;
242  dPhi2 = 0.;
243  tauGammaMoms.signalPFGammaCandsOut = tauGammaVecs.gammasPtOutSigCone.size();
244  for (size_t i = 0; i < tauGammaVecs.gammasPtOutSigCone.size(); ++i) {
245  double pt_i = tauGammaVecs.gammasPtOutSigCone[i];
246  double phi_i = tauGammaVecs.gammasdPhiOutSigCone[i];
247  if (tauGammaVecs.gammasdPhiOutSigCone[i] > M_PI)
248  phi_i = tauGammaVecs.gammasdPhiOutSigCone[i] - 2 * M_PI;
249  else if (tauGammaVecs.gammasdPhiOutSigCone[i] < -M_PI)
250  phi_i = tauGammaVecs.gammasdPhiOutSigCone[i] + 2 * M_PI;
251  double eta_i = tauGammaVecs.gammasdEtaOutSigCone[i];
252  sumPt += pt_i;
253  dEta2 += (pt_i * eta_i * eta_i);
254  dPhi2 += (pt_i * phi_i * phi_i);
255  }
256 
257  tauGammaMoms.gammaEnFracOut = -99.;
258  if (tauVars.pt > 0.) {
259  tauGammaMoms.gammaEnFracOut = sumPt / tauVars.pt;
260  }
261  if (sumPt > 0.) {
262  dEta2 /= sumPt;
263  dPhi2 /= sumPt;
264  }
265  tauGammaMoms.gammaEtaMomOut = std::sqrt(dEta2 * tauGammaMoms.gammaEnFracOut) * tauVars.pt;
266  tauGammaMoms.gammaPhiMomOut = std::sqrt(dPhi2 * tauGammaMoms.gammaEnFracOut) * tauVars.pt;
267 
268  if (!isPhase2_) {
269  return mvaValue(tauVars, tauGammaMoms, elecVars);
270  } else {
271  return mvaValuePhase2(tauVars, tauGammaMoms, elecVars);
272  }
273 }

References antiElecIDMVA6_blocks::TauGammaMoms::gammaEnFracIn, antiElecIDMVA6_blocks::TauGammaMoms::gammaEnFracOut, antiElecIDMVA6_blocks::TauGammaMoms::gammaEtaMomIn, antiElecIDMVA6_blocks::TauGammaMoms::gammaEtaMomOut, antiElecIDMVA6_blocks::TauGammaMoms::gammaPhiMomIn, antiElecIDMVA6_blocks::TauGammaMoms::gammaPhiMomOut, antiElecIDMVA6_blocks::TauGammaVecs::gammasdEtaInSigCone, antiElecIDMVA6_blocks::TauGammaVecs::gammasdEtaOutSigCone, antiElecIDMVA6_blocks::TauGammaVecs::gammasdPhiInSigCone, antiElecIDMVA6_blocks::TauGammaVecs::gammasdPhiOutSigCone, antiElecIDMVA6_blocks::TauGammaVecs::gammasPtInSigCone, antiElecIDMVA6_blocks::TauGammaVecs::gammasPtOutSigCone, mps_fire::i, M_PI, antiElecIDMVA6_blocks::TauVars::pt, antiElecIDMVA6_blocks::TauGammaMoms::signalPFGammaCandsIn, antiElecIDMVA6_blocks::TauGammaMoms::signalPFGammaCandsOut, mathSSE::sqrt(), and TtFullHadEvtBuilder_cfi::sumPt.

◆ mvaValue() [3/4]

template<class TauType , class ElectronType >
double AntiElectronIDMVA6< TauType, ElectronType >::mvaValue ( const TauType &  theTau)

Definition at line 829 of file AntiElectronIDMVA6.cc.

829  {
830  // === tau variables ===
833 
834  // === electron variables ===
835  ElecVars elecVars;
836  elecVars.eta = 9.9; // Dummy value used in MVA training
837 
838  return mvaValue(tauVars, tauGammaVecs, elecVars);
839 }

References antiElecIDMVA6_blocks::ElecVars::eta, AntiElectronIDMVA6< TauType, ElectronType >::getTauGammaVecs(), and AntiElectronIDMVA6< TauType, ElectronType >::getTauVars().

◆ mvaValue() [4/4]

template<class TauType , class ElectronType >
double AntiElectronIDMVA6< TauType, ElectronType >::mvaValue ( const TauType &  theTau,
const ElectronRef theEleRef 
)

Definition at line 815 of file AntiElectronIDMVA6.cc.

817 {
818  // === tau variables ===
821 
822  // === electron variables ===
824 
825  return mvaValue(tauVars, tauGammaVecs, elecVars);
826 }

References AntiElectronIDMVA6< TauType, ElectronType >::getElecVars(), AntiElectronIDMVA6< TauType, ElectronType >::getTauGammaVecs(), and AntiElectronIDMVA6< TauType, ElectronType >::getTauVars().

◆ mvaValuePhase2()

template<class TauType , class ElectronType >
double AntiElectronIDMVA6< TauType, ElectronType >::mvaValuePhase2 ( const antiElecIDMVA6_blocks::TauVars tauVars,
const antiElecIDMVA6_blocks::TauGammaMoms tauGammaMoms,
const antiElecIDMVA6_blocks::ElecVars elecVars 
)

Definition at line 487 of file AntiElectronIDMVA6.cc.

489  {
490  if (!isInitialized_) {
491  throw cms::Exception("ClassNotInitialized") << " AntiElectronMVA6 not properly initialized !!\n";
492  }
493 
494  double mvaValue = -99.;
495 
496  //do not consider tau candidates outside the HGCal border at |eta|=3
497  if (std::abs(tauVars.etaAtEcalEntrance) > 3.0) {
498  return mvaValue;
499  }
500 
501  float elecDeltaPinPoutOverPin = (elecVars.pIn > 0.0) ? (std::abs(elecVars.pIn - elecVars.pOut) / elecVars.pIn) : 1.0;
502  float elecEecalOverPout = (elecVars.pOut > 0.0) ? (elecVars.eEcal / elecVars.pOut) : 20.0;
503  float elecNumHitsDiffOverSum =
504  ((elecVars.gsfNumHits + elecVars.kfNumHits) > 0.0)
505  ? ((elecVars.gsfNumHits - elecVars.kfNumHits) / (elecVars.gsfNumHits + elecVars.kfNumHits))
506  : 1.0;
507 
508  if (tauGammaMoms.signalPFGammaCandsIn == 0 && tauVars.hasGsf < 0.5) {
510  var_NoEleMatch_woGwoGSF_Barrel_[0] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
521  var_NoEleMatch_woGwoGSF_Endcap_[0] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
528  } else {
536  }
537  } else if (tauGammaMoms.signalPFGammaCandsIn > 0 && tauVars.hasGsf < 0.5) {
539  var_NoEleMatch_wGwoGSF_Barrel_[0] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
558  var_NoEleMatch_wGwoGSF_Endcap_[0] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
573  } else {
589  }
590  } else if (tauGammaMoms.signalPFGammaCandsIn == 0 && tauVars.hasGsf > 0.5) {
592  var_woGwGSF_Barrel_[0] = std::log(std::max(0.1f, elecVars.chi2NormGSF));
593  var_woGwGSF_Barrel_[1] = elecVars.gsfNumHits;
595  var_woGwGSF_Barrel_[3] = elecVars.gsfTracklnPt;
596  var_woGwGSF_Barrel_[4] = elecNumHitsDiffOverSum;
597  var_woGwGSF_Barrel_[5] = std::log(std::max(0.1f, elecVars.chi2NormKF));
598  var_woGwGSF_Barrel_[6] = std::min(elecDeltaPinPoutOverPin, 1.f);
599  var_woGwGSF_Barrel_[7] = std::min(elecEecalOverPout, 20.f);
600  var_woGwGSF_Barrel_[8] = std::min(elecVars.mvaInSigmaEtaEta, 0.01f);
601  var_woGwGSF_Barrel_[9] = std::min(elecVars.mvaInHadEnergy, 20.f);
602  var_woGwGSF_Barrel_[10] = std::min(elecVars.mvaInDeltaEta, 0.1f);
603  var_woGwGSF_Barrel_[11] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
604  var_woGwGSF_Barrel_[12] = std::log(std::max(1.f, tauVars.pt));
605  var_woGwGSF_Barrel_[13] = tauVars.emFraction;
608  var_woGwGSF_Barrel_[16] = tauVars.visMassIn;
609  var_woGwGSF_Barrel_[17] = tauVars.dCrackEta;
612  var_woGwGSF_Barrel_[20] = elecVars.deltaEta;
613  var_woGwGSF_Barrel_[21] = elecVars.deltaPhi;
614  var_woGwGSF_Barrel_[22] = elecVars.sigmaIEtaIEta5x5;
615  var_woGwGSF_Barrel_[23] = elecVars.showerCircularity;
616  var_woGwGSF_Barrel_[24] = elecVars.r9;
621  var_woGwGSF_Endcap_[0] = std::log(std::max(0.1f, elecVars.chi2NormGSF));
622  var_woGwGSF_Endcap_[1] = elecVars.gsfNumHits;
624  var_woGwGSF_Endcap_[3] = elecVars.gsfTracklnPt;
625  var_woGwGSF_Endcap_[4] = elecNumHitsDiffOverSum;
626  var_woGwGSF_Endcap_[5] = std::log(std::max(0.1f, elecVars.chi2NormKF));
627  var_woGwGSF_Endcap_[6] = elecVars.eEcal;
628  var_woGwGSF_Endcap_[7] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
629  var_woGwGSF_Endcap_[8] = std::log(std::max(1.f, tauVars.pt));
630  var_woGwGSF_Endcap_[9] = tauVars.visMassIn;
631  var_woGwGSF_Endcap_[10] = tauVars.dCrackEta;
634  var_woGwGSF_Endcap_[13] = elecVars.hgcalSigmaUU;
635  var_woGwGSF_Endcap_[14] = elecVars.hgcalSigmaVV;
636  var_woGwGSF_Endcap_[15] = elecVars.hgcalSigmaEE;
637  var_woGwGSF_Endcap_[16] = elecVars.hgcalSigmaPP;
638  var_woGwGSF_Endcap_[17] = elecVars.hgcalNLayers;
639  var_woGwGSF_Endcap_[18] = elecVars.hgcalLastLayer;
640  var_woGwGSF_Endcap_[19] = elecVars.hgcalLayerEfrac10;
641  var_woGwGSF_Endcap_[20] = elecVars.hgcalLayerEfrac90;
642  var_woGwGSF_Endcap_[21] = elecVars.hgcalEcEnergyEE;
643  var_woGwGSF_Endcap_[22] = elecVars.hgcalEcEnergyFH;
647  var_woGwGSF_Endcap_[26] = elecVars.deltaEta;
648  var_woGwGSF_Endcap_[27] = elecVars.deltaPhi;
653  } else {
655  var_woGwGSF_VFEndcap_[1] = elecVars.gsfNumHits;
657  var_woGwGSF_VFEndcap_[3] = elecVars.gsfTracklnPt;
658  var_woGwGSF_VFEndcap_[4] = elecNumHitsDiffOverSum;
659  var_woGwGSF_VFEndcap_[5] = std::log(std::max(0.1f, elecVars.chi2NormKF));
660  var_woGwGSF_VFEndcap_[6] = elecVars.eEcal;
661  var_woGwGSF_VFEndcap_[7] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
662  var_woGwGSF_VFEndcap_[8] = std::log(std::max(1.f, tauVars.pt));
663  var_woGwGSF_VFEndcap_[9] = tauVars.visMassIn;
664  var_woGwGSF_VFEndcap_[10] = tauVars.dCrackEta;
667  var_woGwGSF_VFEndcap_[13] = elecVars.hgcalSigmaUU;
668  var_woGwGSF_VFEndcap_[14] = elecVars.hgcalSigmaVV;
669  var_woGwGSF_VFEndcap_[15] = elecVars.hgcalSigmaEE;
670  var_woGwGSF_VFEndcap_[16] = elecVars.hgcalSigmaPP;
671  var_woGwGSF_VFEndcap_[17] = elecVars.hgcalNLayers;
672  var_woGwGSF_VFEndcap_[18] = elecVars.hgcalLastLayer;
675  var_woGwGSF_VFEndcap_[21] = elecVars.hgcalEcEnergyEE;
676  var_woGwGSF_VFEndcap_[22] = elecVars.hgcalEcEnergyFH;
681  var_woGwGSF_VFEndcap_[27] = elecVars.deltaEta;
682  var_woGwGSF_VFEndcap_[28] = elecVars.deltaPhi;
687  }
688  } else if (tauGammaMoms.signalPFGammaCandsIn > 0 && tauVars.hasGsf > 0.5) {
690  var_wGwGSF_Barrel_[0] = std::log(std::max(0.1f, elecVars.chi2NormGSF));
691  var_wGwGSF_Barrel_[1] = elecVars.gsfNumHits;
692  var_wGwGSF_Barrel_[2] = std::log(std::max(0.1f, elecVars.gsfTrackResol));
693  var_wGwGSF_Barrel_[3] = elecVars.gsfTracklnPt;
694  var_wGwGSF_Barrel_[4] = elecNumHitsDiffOverSum;
695  var_wGwGSF_Barrel_[5] = std::log(std::max(0.1f, elecVars.chi2NormKF));
696  var_wGwGSF_Barrel_[6] = std::min(elecDeltaPinPoutOverPin, 1.f);
697  var_wGwGSF_Barrel_[7] = std::min(elecEecalOverPout, 20.f);
698  var_wGwGSF_Barrel_[8] = std::min(elecVars.mvaInSigmaEtaEta, 0.01f);
699  var_wGwGSF_Barrel_[9] = std::min(elecVars.mvaInHadEnergy, 20.f);
700  var_wGwGSF_Barrel_[10] = std::min(elecVars.mvaInDeltaEta, 0.1f);
701  var_wGwGSF_Barrel_[11] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
702  var_wGwGSF_Barrel_[12] = std::log(std::max(1.f, tauVars.pt));
703  var_wGwGSF_Barrel_[13] = tauVars.emFraction;
704  var_wGwGSF_Barrel_[14] = tauGammaMoms.signalPFGammaCandsIn;
705  var_wGwGSF_Barrel_[15] = tauGammaMoms.signalPFGammaCandsOut;
708  var_wGwGSF_Barrel_[18] = tauVars.visMassIn;
709  var_wGwGSF_Barrel_[19] = tauGammaMoms.gammaEtaMomIn;
710  var_wGwGSF_Barrel_[20] = tauGammaMoms.gammaEtaMomOut;
711  var_wGwGSF_Barrel_[21] = tauGammaMoms.gammaPhiMomIn;
712  var_wGwGSF_Barrel_[22] = tauGammaMoms.gammaPhiMomOut;
713  var_wGwGSF_Barrel_[23] = tauGammaMoms.gammaEnFracIn;
714  var_wGwGSF_Barrel_[24] = tauGammaMoms.gammaEnFracOut;
715  var_wGwGSF_Barrel_[25] = tauVars.dCrackEta;
718  var_wGwGSF_Barrel_[28] = elecVars.deltaEta;
719  var_wGwGSF_Barrel_[29] = elecVars.deltaPhi;
720  var_wGwGSF_Barrel_[30] = elecVars.sigmaIPhiIPhi5x5;
721  var_wGwGSF_Barrel_[31] = elecVars.sigmaIEtaIEta5x5;
722  var_wGwGSF_Barrel_[32] = elecVars.showerCircularity;
728  var_wGwGSF_Endcap_[0] = std::log(std::max(0.1f, elecVars.chi2NormGSF));
729  var_wGwGSF_Endcap_[1] = elecVars.gsfNumHits;
730  var_wGwGSF_Endcap_[2] = std::log(std::max(0.1f, elecVars.gsfTrackResol));
731  var_wGwGSF_Endcap_[3] = elecVars.gsfTracklnPt;
732  var_wGwGSF_Endcap_[4] = elecNumHitsDiffOverSum;
733  var_wGwGSF_Endcap_[5] = std::log(std::max(0.1f, elecVars.chi2NormKF));
734  var_wGwGSF_Endcap_[6] = elecVars.eEcal;
735  var_wGwGSF_Endcap_[7] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
736  var_wGwGSF_Endcap_[8] = std::log(std::max(1.f, tauVars.pt));
737  var_wGwGSF_Endcap_[9] = tauGammaMoms.signalPFGammaCandsIn;
738  var_wGwGSF_Endcap_[10] = tauGammaMoms.signalPFGammaCandsOut;
739  var_wGwGSF_Endcap_[11] = tauVars.visMassIn;
740  var_wGwGSF_Endcap_[12] = tauGammaMoms.gammaEtaMomIn;
741  var_wGwGSF_Endcap_[13] = tauGammaMoms.gammaEtaMomOut;
742  var_wGwGSF_Endcap_[14] = tauGammaMoms.gammaPhiMomIn;
743  var_wGwGSF_Endcap_[15] = tauGammaMoms.gammaPhiMomOut;
744  var_wGwGSF_Endcap_[16] = tauGammaMoms.gammaEnFracIn;
745  var_wGwGSF_Endcap_[17] = tauGammaMoms.gammaEnFracOut;
746  var_wGwGSF_Endcap_[18] = tauVars.dCrackEta;
749  var_wGwGSF_Endcap_[21] = elecVars.hgcalSigmaVV;
750  var_wGwGSF_Endcap_[22] = elecVars.hgcalSigmaEE;
751  var_wGwGSF_Endcap_[23] = elecVars.hgcalSigmaPP;
752  var_wGwGSF_Endcap_[24] = elecVars.hgcalNLayers;
753  var_wGwGSF_Endcap_[25] = elecVars.hgcalFirstLayer;
754  var_wGwGSF_Endcap_[26] = elecVars.hgcalLastLayer;
755  var_wGwGSF_Endcap_[27] = elecVars.hgcalLayerEfrac10;
756  var_wGwGSF_Endcap_[28] = elecVars.hgcalLayerEfrac90;
757  var_wGwGSF_Endcap_[29] = elecVars.hgcalEcEnergyEE;
758  var_wGwGSF_Endcap_[30] = elecVars.hgcalEcEnergyFH;
759  var_wGwGSF_Endcap_[31] = elecVars.hgcalMeasuredDepth;
760  var_wGwGSF_Endcap_[32] = elecVars.hgcalExpectedDepth;
761  var_wGwGSF_Endcap_[33] = elecVars.deltaEta;
762  var_wGwGSF_Endcap_[34] = elecVars.deltaPhi;
767  } else {
768  var_wGwGSF_VFEndcap_[0] = std::log(std::max(0.1f, elecVars.chi2NormGSF));
769  var_wGwGSF_VFEndcap_[1] = elecVars.gsfNumHits;
771  var_wGwGSF_VFEndcap_[3] = elecVars.gsfTracklnPt;
772  var_wGwGSF_VFEndcap_[4] = elecNumHitsDiffOverSum;
773  var_wGwGSF_VFEndcap_[5] = std::log(std::max(0.1f, elecVars.chi2NormKF));
774  var_wGwGSF_VFEndcap_[6] = elecVars.eEcal;
775  var_wGwGSF_VFEndcap_[7] = std::min(2.f, tauVars.leadChargedPFCandPt / std::max(1.f, tauVars.pt));
776  var_wGwGSF_VFEndcap_[8] = std::log(std::max(1.f, tauVars.pt));
777  var_wGwGSF_VFEndcap_[9] = tauGammaMoms.signalPFGammaCandsIn;
778  var_wGwGSF_VFEndcap_[10] = tauGammaMoms.signalPFGammaCandsOut;
779  var_wGwGSF_VFEndcap_[11] = tauVars.visMassIn;
780  var_wGwGSF_VFEndcap_[12] = tauGammaMoms.gammaEtaMomIn;
781  var_wGwGSF_VFEndcap_[13] = tauGammaMoms.gammaEtaMomOut;
782  var_wGwGSF_VFEndcap_[14] = tauGammaMoms.gammaPhiMomIn;
783  var_wGwGSF_VFEndcap_[15] = tauGammaMoms.gammaPhiMomOut;
784  var_wGwGSF_VFEndcap_[16] = tauGammaMoms.gammaEnFracIn;
785  var_wGwGSF_VFEndcap_[17] = tauGammaMoms.gammaEnFracOut;
786  var_wGwGSF_VFEndcap_[18] = tauVars.dCrackEta;
789  var_wGwGSF_VFEndcap_[21] = elecVars.hgcalSigmaUU;
790  var_wGwGSF_VFEndcap_[22] = elecVars.hgcalSigmaVV;
791  var_wGwGSF_VFEndcap_[23] = elecVars.hgcalSigmaEE;
792  var_wGwGSF_VFEndcap_[24] = elecVars.hgcalSigmaPP;
793  var_wGwGSF_VFEndcap_[25] = elecVars.hgcalNLayers;
794  var_wGwGSF_VFEndcap_[26] = elecVars.hgcalLastLayer;
797  var_wGwGSF_VFEndcap_[29] = elecVars.hgcalEcEnergyEE;
798  var_wGwGSF_VFEndcap_[30] = elecVars.hgcalEcEnergyFH;
803  var_wGwGSF_VFEndcap_[35] = elecVars.deltaEta;
804  var_wGwGSF_VFEndcap_[36] = elecVars.deltaPhi;
809  }
810  }
811  return mvaValue;
812 }

References funct::abs(), antiElecIDMVA6_blocks::ElecVars::chi2NormGSF, antiElecIDMVA6_blocks::ElecVars::chi2NormKF, antiElecIDMVA6_blocks::TauVars::dCrackEta, antiElecIDMVA6_blocks::ElecVars::deltaEta, antiElecIDMVA6_blocks::ElecVars::deltaPhi, antiElecIDMVA6_blocks::ElecVars::eEcal, antiElecIDMVA6_blocks::TauVars::emFraction, antiElecIDMVA6_blocks::ElecVars::eSeedClusterOverPout, antiElecIDMVA6_blocks::TauVars::etaAtEcalEntrance, Exception, f, antiElecIDMVA6_blocks::TauGammaMoms::gammaEnFracIn, antiElecIDMVA6_blocks::TauGammaMoms::gammaEnFracOut, antiElecIDMVA6_blocks::TauGammaMoms::gammaEtaMomIn, antiElecIDMVA6_blocks::TauGammaMoms::gammaEtaMomOut, antiElecIDMVA6_blocks::TauGammaMoms::gammaPhiMomIn, antiElecIDMVA6_blocks::TauGammaMoms::gammaPhiMomOut, antiElecIDMVA6_blocks::ElecVars::gsfNumHits, antiElecIDMVA6_blocks::ElecVars::gsfTracklnPt, antiElecIDMVA6_blocks::ElecVars::gsfTrackResol, antiElecIDMVA6_blocks::TauVars::hasGsf, antiElecIDMVA6_blocks::ElecVars::hgcalDepthCompatibility, antiElecIDMVA6_blocks::ElecVars::hgcalEcEnergyEE, antiElecIDMVA6_blocks::ElecVars::hgcalEcEnergyFH, antiElecIDMVA6_blocks::ElecVars::hgcalExpectedDepth, antiElecIDMVA6_blocks::ElecVars::hgcalExpectedSigma, antiElecIDMVA6_blocks::ElecVars::hgcalFirstLayer, antiElecIDMVA6_blocks::ElecVars::hgcalLastLayer, antiElecIDMVA6_blocks::ElecVars::hgcalLayerEfrac10, antiElecIDMVA6_blocks::ElecVars::hgcalLayerEfrac90, antiElecIDMVA6_blocks::ElecVars::hgcalMeasuredDepth, antiElecIDMVA6_blocks::ElecVars::hgcalNLayers, antiElecIDMVA6_blocks::ElecVars::hgcalSigmaEE, antiElecIDMVA6_blocks::ElecVars::hgcalSigmaPP, antiElecIDMVA6_blocks::ElecVars::hgcalSigmaUU, antiElecIDMVA6_blocks::ElecVars::hgcalSigmaVV, antiElecIDMVA6_blocks::ElecVars::kfNumHits, antiElecIDMVA6_blocks::TauVars::leadChargedPFCandEtaAtEcalEntrance, antiElecIDMVA6_blocks::TauVars::leadChargedPFCandPt, antiElecIDMVA6_blocks::TauVars::leadPFChargedHadrEoP, antiElecIDMVA6_blocks::TauVars::leadPFChargedHadrHoP, dqm-mbProfile::log, SiStripPI::max, min(), antiElecIDMVA6_blocks::ElecVars::mvaInDeltaEta, antiElecIDMVA6_blocks::ElecVars::mvaInHadEnergy, antiElecIDMVA6_blocks::ElecVars::mvaInSigmaEtaEta, antiElecIDMVA6_blocks::ElecVars::pIn, antiElecIDMVA6_blocks::ElecVars::pOut, antiElecIDMVA6_blocks::TauVars::pt, antiElecIDMVA6_blocks::ElecVars::r9, antiElecIDMVA6_blocks::ElecVars::showerCircularity, antiElecIDMVA6_blocks::ElecVars::sigmaIEtaIEta5x5, antiElecIDMVA6_blocks::ElecVars::sigmaIPhiIPhi5x5, antiElecIDMVA6_blocks::TauGammaMoms::signalPFGammaCandsIn, antiElecIDMVA6_blocks::TauGammaMoms::signalPFGammaCandsOut, antiElecIDMVA6_blocks::ElecVars::superClusterEtaWidth, antiElecIDMVA6_blocks::ElecVars::superClusterPhiWidth, and antiElecIDMVA6_blocks::TauVars::visMassIn.

Member Data Documentation

◆ ecalBarrelEndcapEtaBorder_

template<class TauType , class ElectronType >
constexpr float AntiElectronIDMVA6< TauType, ElectronType >::ecalBarrelEndcapEtaBorder_ = 1.479
staticconstexprprivate

Definition at line 160 of file AntiElectronIDMVA6.h.

◆ ecalEndcapVFEndcapEtaBorder_

template<class TauType , class ElectronType >
constexpr float AntiElectronIDMVA6< TauType, ElectronType >::ecalEndcapVFEndcapEtaBorder_ = 2.4
staticconstexprprivate

Definition at line 161 of file AntiElectronIDMVA6.h.

◆ electronIds_

template<class TauType , class ElectronType >
std::map<std::string, edm::Handle<edm::ValueMap<float> > > AntiElectronIDMVA6< TauType, ElectronType >::electronIds_
private

◆ electronIds_tokens_

template<class TauType , class ElectronType >
std::map<std::string, edm::EDGetTokenT<edm::ValueMap<float> > > AntiElectronIDMVA6< TauType, ElectronType >::electronIds_tokens_
private

◆ inputFileName_

template<class TauType , class ElectronType >
edm::FileInPath AntiElectronIDMVA6< TauType, ElectronType >::inputFileName_
private

◆ inputFilesToDelete_

template<class TauType , class ElectronType >
std::vector<TFile*> AntiElectronIDMVA6< TauType, ElectronType >::inputFilesToDelete_
private

Definition at line 208 of file AntiElectronIDMVA6.h.

◆ isInitialized_

template<class TauType , class ElectronType >
bool AntiElectronIDMVA6< TauType, ElectronType >::isInitialized_
private

Definition at line 163 of file AntiElectronIDMVA6.h.

◆ isPhase2_

template<class TauType , class ElectronType >
const bool AntiElectronIDMVA6< TauType, ElectronType >::isPhase2_
private

◆ loadMVAfromDB_

template<class TauType , class ElectronType >
bool AntiElectronIDMVA6< TauType, ElectronType >::loadMVAfromDB_
private

◆ mva_NoEleMatch_wGwoGSF_BL_

template<class TauType , class ElectronType >
const GBRForest* AntiElectronIDMVA6< TauType, ElectronType >::mva_NoEleMatch_wGwoGSF_BL_
private

Definition at line 196 of file AntiElectronIDMVA6.h.

◆ mva_NoEleMatch_wGwoGSF_EC_

template<class TauType , class ElectronType >
const GBRForest* AntiElectronIDMVA6< TauType, ElectronType >::mva_NoEleMatch_wGwoGSF_EC_
private

Definition at line 200 of file AntiElectronIDMVA6.h.

◆ mva_NoEleMatch_wGwoGSF_VFEC_

template<class TauType , class ElectronType >
const GBRForest* AntiElectronIDMVA6< TauType, ElectronType >::mva_NoEleMatch_wGwoGSF_VFEC_
private

Definition at line 204 of file AntiElectronIDMVA6.h.

◆ mva_NoEleMatch_woGwoGSF_BL_

template<class TauType , class ElectronType >
const GBRForest* AntiElectronIDMVA6< TauType, ElectronType >::mva_NoEleMatch_woGwoGSF_BL_
private

Definition at line 195 of file AntiElectronIDMVA6.h.

◆ mva_NoEleMatch_woGwoGSF_EC_

template<class TauType , class ElectronType >
const GBRForest* AntiElectronIDMVA6< TauType, ElectronType >::mva_NoEleMatch_woGwoGSF_EC_
private

Definition at line 199 of file AntiElectronIDMVA6.h.

◆ mva_NoEleMatch_woGwoGSF_VFEC_

template<class TauType , class ElectronType >
const GBRForest* AntiElectronIDMVA6< TauType, ElectronType >::mva_NoEleMatch_woGwoGSF_VFEC_
private

Definition at line 203 of file AntiElectronIDMVA6.h.

◆ mva_wGwGSF_BL_

template<class TauType , class ElectronType >
const GBRForest* AntiElectronIDMVA6< TauType, ElectronType >::mva_wGwGSF_BL_
private

Definition at line 198 of file AntiElectronIDMVA6.h.

◆ mva_wGwGSF_EC_

template<class TauType , class ElectronType >
const GBRForest* AntiElectronIDMVA6< TauType, ElectronType >::mva_wGwGSF_EC_
private

Definition at line 202 of file AntiElectronIDMVA6.h.

◆ mva_wGwGSF_VFEC_

template<class TauType , class ElectronType >
const GBRForest* AntiElectronIDMVA6< TauType, ElectronType >::mva_wGwGSF_VFEC_
private

Definition at line 206 of file AntiElectronIDMVA6.h.

◆ mva_woGwGSF_BL_

template<class TauType , class ElectronType >
const GBRForest* AntiElectronIDMVA6< TauType, ElectronType >::mva_woGwGSF_BL_
private

Definition at line 197 of file AntiElectronIDMVA6.h.

◆ mva_woGwGSF_EC_

template<class TauType , class ElectronType >
const GBRForest* AntiElectronIDMVA6< TauType, ElectronType >::mva_woGwGSF_EC_
private

Definition at line 201 of file AntiElectronIDMVA6.h.

◆ mva_woGwGSF_VFEC_

template<class TauType , class ElectronType >
const GBRForest* AntiElectronIDMVA6< TauType, ElectronType >::mva_woGwGSF_VFEC_
private

Definition at line 205 of file AntiElectronIDMVA6.h.

◆ mvaName_NoEleMatch_wGwoGSF_BL_

template<class TauType , class ElectronType >
std::string AntiElectronIDMVA6< TauType, ElectronType >::mvaName_NoEleMatch_wGwoGSF_BL_
private

◆ mvaName_NoEleMatch_wGwoGSF_EC_

template<class TauType , class ElectronType >
std::string AntiElectronIDMVA6< TauType, ElectronType >::mvaName_NoEleMatch_wGwoGSF_EC_
private

◆ mvaName_NoEleMatch_wGwoGSF_VFEC_

template<class TauType , class ElectronType >
std::string AntiElectronIDMVA6< TauType, ElectronType >::mvaName_NoEleMatch_wGwoGSF_VFEC_
private

◆ mvaName_NoEleMatch_woGwoGSF_BL_

template<class TauType , class ElectronType >
std::string AntiElectronIDMVA6< TauType, ElectronType >::mvaName_NoEleMatch_woGwoGSF_BL_
private

◆ mvaName_NoEleMatch_woGwoGSF_EC_

template<class TauType , class ElectronType >
std::string AntiElectronIDMVA6< TauType, ElectronType >::mvaName_NoEleMatch_woGwoGSF_EC_
private

◆ mvaName_NoEleMatch_woGwoGSF_VFEC_

template<class TauType , class ElectronType >
std::string AntiElectronIDMVA6< TauType, ElectronType >::mvaName_NoEleMatch_woGwoGSF_VFEC_
private

◆ mvaName_wGwGSF_BL_

template<class TauType , class ElectronType >
std::string AntiElectronIDMVA6< TauType, ElectronType >::mvaName_wGwGSF_BL_
private

◆ mvaName_wGwGSF_EC_

template<class TauType , class ElectronType >
std::string AntiElectronIDMVA6< TauType, ElectronType >::mvaName_wGwGSF_EC_
private

◆ mvaName_wGwGSF_VFEC_

template<class TauType , class ElectronType >
std::string AntiElectronIDMVA6< TauType, ElectronType >::mvaName_wGwGSF_VFEC_
private

◆ mvaName_woGwGSF_BL_

template<class TauType , class ElectronType >
std::string AntiElectronIDMVA6< TauType, ElectronType >::mvaName_woGwGSF_BL_
private

◆ mvaName_woGwGSF_EC_

template<class TauType , class ElectronType >
std::string AntiElectronIDMVA6< TauType, ElectronType >::mvaName_woGwGSF_EC_
private

◆ mvaName_woGwGSF_VFEC_

template<class TauType , class ElectronType >
std::string AntiElectronIDMVA6< TauType, ElectronType >::mvaName_woGwGSF_VFEC_
private

◆ positionAtECalEntrance_

template<class TauType , class ElectronType >
PositionAtECalEntranceComputer AntiElectronIDMVA6< TauType, ElectronType >::positionAtECalEntrance_
private

Definition at line 212 of file AntiElectronIDMVA6.h.

◆ usePhiAtEcalEntranceExtrapolation_

template<class TauType , class ElectronType >
bool AntiElectronIDMVA6< TauType, ElectronType >::usePhiAtEcalEntranceExtrapolation_
private

◆ var_NoEleMatch_wGwoGSF_Barrel_

template<class TauType , class ElectronType >
std::vector<float> AntiElectronIDMVA6< TauType, ElectronType >::var_NoEleMatch_wGwoGSF_Barrel_
private

◆ var_NoEleMatch_wGwoGSF_Endcap_

template<class TauType , class ElectronType >
std::vector<float> AntiElectronIDMVA6< TauType, ElectronType >::var_NoEleMatch_wGwoGSF_Endcap_
private

◆ var_NoEleMatch_wGwoGSF_VFEndcap_

template<class TauType , class ElectronType >
std::vector<float> AntiElectronIDMVA6< TauType, ElectronType >::var_NoEleMatch_wGwoGSF_VFEndcap_
private

◆ var_NoEleMatch_woGwoGSF_Barrel_

template<class TauType , class ElectronType >
std::vector<float> AntiElectronIDMVA6< TauType, ElectronType >::var_NoEleMatch_woGwoGSF_Barrel_
private

◆ var_NoEleMatch_woGwoGSF_Endcap_

template<class TauType , class ElectronType >
std::vector<float> AntiElectronIDMVA6< TauType, ElectronType >::var_NoEleMatch_woGwoGSF_Endcap_
private

◆ var_NoEleMatch_woGwoGSF_VFEndcap_

template<class TauType , class ElectronType >
std::vector<float> AntiElectronIDMVA6< TauType, ElectronType >::var_NoEleMatch_woGwoGSF_VFEndcap_
private

◆ var_wGwGSF_Barrel_

template<class TauType , class ElectronType >
std::vector<float> AntiElectronIDMVA6< TauType, ElectronType >::var_wGwGSF_Barrel_
private

◆ var_wGwGSF_Endcap_

template<class TauType , class ElectronType >
std::vector<float> AntiElectronIDMVA6< TauType, ElectronType >::var_wGwGSF_Endcap_
private

◆ var_wGwGSF_VFEndcap_

template<class TauType , class ElectronType >
std::vector<float> AntiElectronIDMVA6< TauType, ElectronType >::var_wGwGSF_VFEndcap_
private

◆ var_woGwGSF_Barrel_

template<class TauType , class ElectronType >
std::vector<float> AntiElectronIDMVA6< TauType, ElectronType >::var_woGwGSF_Barrel_
private

◆ var_woGwGSF_Endcap_

template<class TauType , class ElectronType >
std::vector<float> AntiElectronIDMVA6< TauType, ElectronType >::var_woGwGSF_Endcap_
private

◆ var_woGwGSF_VFEndcap_

template<class TauType , class ElectronType >
std::vector<float> AntiElectronIDMVA6< TauType, ElectronType >::var_woGwGSF_VFEndcap_
private

◆ verbosity_

template<class TauType , class ElectronType >
const int AntiElectronIDMVA6< TauType, ElectronType >::verbosity_
private

Definition at line 217 of file AntiElectronIDMVA6.h.

pat::Tau::leadChargedHadrCand
const reco::CandidatePtr leadChargedHadrCand() const
AntiElectronIDMVA6::getTauGammaVecs
antiElecIDMVA6_blocks::TauGammaVecs getTauGammaVecs(const TauType &theTau)
Definition: AntiElectronIDMVA6.cc:892
AntiElectronIDMVA6::mvaName_NoEleMatch_wGwoGSF_VFEC_
std::string mvaName_NoEleMatch_wGwoGSF_VFEC_
Definition: AntiElectronIDMVA6.h:176
antiElecIDMVA6_blocks::TauGammaMoms::gammaEnFracIn
float gammaEnFracIn
Definition: AntiElectronIDMVA6.h:67
AntiElectronIDMVA6::electronIds_tokens_
std::map< std::string, edm::EDGetTokenT< edm::ValueMap< float > > > electronIds_tokens_
Definition: AntiElectronIDMVA6.h:214
taus_updatedMVAIds_cff.loadMVAfromDB
loadMVAfromDB
Definition: taus_updatedMVAIds_cff.py:17
AntiElectronIDMVA6::getElecVarsHGCalTypeSpecific
void getElecVarsHGCalTypeSpecific(const reco::GsfElectronRef &theEleRef, antiElecIDMVA6_blocks::ElecVars &elecVars)
Definition: AntiElectronIDMVA6.cc:1270
antiElecIDMVA6_blocks::TauGammaVecs::gammasdEtaInSigCone
std::vector< float > gammasdEtaInSigCone
Definition: AntiElectronIDMVA6.h:53
antiElecIDMVA6_blocks::TauGammaMoms::gammaEtaMomIn
float gammaEtaMomIn
Definition: AntiElectronIDMVA6.h:63
antiElecIDMVA6_blocks::ElecVars::hgcalSigmaVV
float hgcalSigmaVV
Definition: AntiElectronIDMVA6.h:96
reco::PFTau::leadCand
const CandidatePtr & leadCand() const
Definition: PFTau.cc:66
antiElecIDMVA6_blocks::TauVars::leadPFChargedHadrEoP
float leadPFChargedHadrEoP
Definition: AntiElectronIDMVA6.h:46
AntiElectronIDMVA6::ecalBarrelEndcapEtaBorder_
static constexpr float ecalBarrelEndcapEtaBorder_
Definition: AntiElectronIDMVA6.h:160
antiElecIDMVA6_blocks::ElecVars::hgcalEcEnergyEE
float hgcalEcEnergyEE
Definition: AntiElectronIDMVA6.h:104
mps_fire.i
i
Definition: mps_fire.py:428
antiElecIDMVA6_blocks::ElecVars::eEcal
float eEcal
Definition: AntiElectronIDMVA6.h:82
AntiElectronIDMVA6::mvaName_wGwGSF_EC_
std::string mvaName_wGwGSF_EC_
Definition: AntiElectronIDMVA6.h:174
reco::PFTau::signalCands
const std::vector< reco::CandidatePtr > & signalCands() const
Candidates in signal region.
Definition: PFTau.cc:75
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
antiElecIDMVA6_blocks::ElecVars::sigmaIPhiIPhi5x5
float sigmaIPhiIPhi5x5
Definition: AntiElectronIDMVA6.h:92
antiElecIDMVA6_blocks::ElecVars::hgcalMeasuredDepth
float hgcalMeasuredDepth
Definition: AntiElectronIDMVA6.h:106
antiElecIDMVA6_blocks::ElecVars::hgcalFirstLayer
float hgcalFirstLayer
Definition: AntiElectronIDMVA6.h:100
antiElecIDMVA6_blocks::ElecVars::mvaInDeltaEta
float mvaInDeltaEta
Definition: AntiElectronIDMVA6.h:87
GBRForest::GetClassifier
double GetClassifier(const float *vector) const
Definition: GBRForest.h:34
antiElecIDMVA6_blocks::TauGammaVecs::gammasdPhiOutSigCone
std::vector< float > gammasdPhiOutSigCone
Definition: AntiElectronIDMVA6.h:57
AntiElectronIDMVA6::mvaName_NoEleMatch_woGwoGSF_EC_
std::string mvaName_NoEleMatch_woGwoGSF_EC_
Definition: AntiElectronIDMVA6.h:171
AntiElectronIDMVA6::mva_NoEleMatch_wGwoGSF_VFEC_
const GBRForest * mva_NoEleMatch_wGwoGSF_VFEC_
Definition: AntiElectronIDMVA6.h:204
AntiElectronIDMVA6::var_woGwGSF_VFEndcap_
std::vector< float > var_woGwGSF_VFEndcap_
Definition: AntiElectronIDMVA6.h:192
antiElecIDMVA6_blocks::TauVars::dCrackEta
float dCrackEta
Definition: AntiElectronIDMVA6.h:48
antiElecIDMVA6_blocks::TauVars::hasGsf
float hasGsf
Definition: AntiElectronIDMVA6.h:50
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
antiElecIDMVA6_blocks::ElecVars::chi2NormGSF
float chi2NormGSF
Definition: AntiElectronIDMVA6.h:74
AntiElectronIDMVA6::var_NoEleMatch_woGwoGSF_Endcap_
std::vector< float > var_NoEleMatch_woGwoGSF_Endcap_
Definition: AntiElectronIDMVA6.h:186
pat::PackedCandidate::p
double p() const override
magnitude of momentum vector
Definition: PackedCandidate.h:463
pat::Tau::ecalEnergyLeadChargedHadrCand
float ecalEnergyLeadChargedHadrCand() const
Definition: Tau.h:306
pat::PackedCandidate::pdgId
int pdgId() const override
PDG identifier.
Definition: PackedCandidate.h:832
AntiElectronIDMVA6::mva_woGwGSF_VFEC_
const GBRForest * mva_woGwGSF_VFEC_
Definition: AntiElectronIDMVA6.h:205
edm::Ref::isAvailable
bool isAvailable() const
Definition: Ref.h:537
min
T min(T a, T b)
Definition: MathUtil.h:58
antiElecIDMVA6_blocks::ElecVars::pIn
float pIn
Definition: AntiElectronIDMVA6.h:80
pat::PackedCandidate::caloFraction
float caloFraction() const
Set the fraction of ECAL+HCAL energy over candidate energy.
Definition: PackedCandidate.h:928
AntiElectronIDMVA6::mvaName_NoEleMatch_woGwoGSF_BL_
std::string mvaName_NoEleMatch_woGwoGSF_BL_
Definition: AntiElectronIDMVA6.h:167
AntiElectronIDMVA6::positionAtECalEntrance_
PositionAtECalEntranceComputer positionAtECalEntrance_
Definition: AntiElectronIDMVA6.h:212
AntiElectronIDMVA6::var_NoEleMatch_wGwoGSF_VFEndcap_
std::vector< float > var_NoEleMatch_wGwoGSF_VFEndcap_
Definition: AntiElectronIDMVA6.h:191
pat::Tau::emFraction_MVA
float emFraction_MVA() const
return emFraction_MVA
Definition: Tau.h:318
reco::PFCandidate::positionAtECALEntrance
const math::XYZPointF & positionAtECALEntrance() const
Definition: PFCandidate.h:363
antiElecIDMVA6_blocks::ElecVars::eSeedClusterOverPout
float eSeedClusterOverPout
Definition: AntiElectronIDMVA6.h:88
antiElecIDMVA6_blocks::ElecVars::deltaEta
float deltaEta
Definition: AntiElectronIDMVA6.h:83
AntiElectronIDMVA6::var_wGwGSF_Endcap_
std::vector< float > var_wGwGSF_Endcap_
Definition: AntiElectronIDMVA6.h:189
CustomPhysics_cfi.gamma
gamma
Definition: CustomPhysics_cfi.py:17
edm::PtrVectorItr
Definition: PtrVector.h:51
antiElecIDMVA6_blocks::ElecVars::kfNumHits
float kfNumHits
Definition: AntiElectronIDMVA6.h:77
antiElecIDMVA6_blocks::TauVars::pt
float pt
Definition: AntiElectronIDMVA6.h:39
edm::Ptr::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:139
antiElecIDMVA6_blocks::ElecVars::phi
float phi
Definition: AntiElectronIDMVA6.h:72
AntiElectronIDMVA6::electronIds_
std::map< std::string, edm::Handle< edm::ValueMap< float > > > electronIds_
Definition: AntiElectronIDMVA6.h:215
antiElecIDMVA6_blocks::ElecVars::mvaInSigmaEtaEta
float mvaInSigmaEtaEta
Definition: AntiElectronIDMVA6.h:85
antiElecIDMVA6_blocks::ElecVars::hgcalSigmaUU
float hgcalSigmaUU
Definition: AntiElectronIDMVA6.h:95
AntiElectronIDMVA6::energyWeightedEtaAndPhiAtECal
bool energyWeightedEtaAndPhiAtECal(const pat::Tau &theTau, float &eta, float &phi)
Definition: AntiElectronIDMVA6.cc:1320
antiElecIDMVA6_blocks::TauGammaMoms::signalPFGammaCandsOut
int signalPFGammaCandsOut
Definition: AntiElectronIDMVA6.h:62
edm::Handle
Definition: AssociativeIterator.h:50
antiElecIDMVA6_blocks::ElecVars::hgcalNLayers
float hgcalNLayers
Definition: AntiElectronIDMVA6.h:99
reco::PFTau::emFraction
float emFraction() const
Definition: PFTau.cc:341
reco::OK
std::pair< int, edm::FunctionWithDict > OK
Definition: findMethod.cc:126
PositionAtECalEntranceComputer
Definition: PositionAtECalEntranceComputer.h:25
antiElecIDMVA6_blocks::TauVars::emFraction
float emFraction
Definition: AntiElectronIDMVA6.h:44
antiElecIDMVA6_blocks::ElecVars::sigmaIEtaIEta5x5
float sigmaIEtaIEta5x5
Definition: AntiElectronIDMVA6.h:91
antiElecIDMVA6_blocks::ElecVars::eta
float eta
Definition: AntiElectronIDMVA6.h:71
edm::Ref< SuperClusterCollection >
TtFullHadEvtBuilder_cfi.sumPt
sumPt
Definition: TtFullHadEvtBuilder_cfi.py:38
cc
AntiElectronIDMVA6::mvaValuePhase2
double mvaValuePhase2(const antiElecIDMVA6_blocks::TauVars &tauVars, const antiElecIDMVA6_blocks::TauGammaMoms &tauGammaMoms, const antiElecIDMVA6_blocks::ElecVars &elecVars)
Definition: AntiElectronIDMVA6.cc:487
antiElecIDMVA6_blocks::TauVars::phi
float phi
Definition: AntiElectronIDMVA6.h:41
PositionAtECalEntranceComputer::beginEvent
void beginEvent(const edm::EventSetup &)
Definition: PositionAtECalEntranceComputer.cc:25
AntiElectronIDMVA6::var_woGwGSF_Barrel_
std::vector< float > var_woGwGSF_Barrel_
Definition: AntiElectronIDMVA6.h:184
pat::Tau::hcalEnergyLeadChargedHadrCand
float hcalEnergyLeadChargedHadrCand() const
return hcal energy from LeadChargedHadrCand
Definition: Tau.h:308
antiElecIDMVA6_blocks::ElecVars::chi2NormKF
float chi2NormKF
Definition: AntiElectronIDMVA6.h:75
pat::Tau::signalCands
reco::CandidatePtrVector signalCands() const
edm::FileInPath
Definition: FileInPath.h:64
antiElecIDMVA6_blocks::ElecVars::showerCircularity
float showerCircularity
Definition: AntiElectronIDMVA6.h:93
antiElecIDMVA6_blocks::ElecVars::mvaInHadEnergy
float mvaInHadEnergy
Definition: AntiElectronIDMVA6.h:86
antiElecIDMVA6_blocks::ElecVars::superClusterEtaWidth
float superClusterEtaWidth
Definition: AntiElectronIDMVA6.h:89
pat::PackedCandidate::energy
double energy() const override
energy
Definition: PackedCandidate.h:469
antiElecIDMVA6_blocks::TauVars
Definition: AntiElectronIDMVA6.h:38
antiElecIDMVA6_blocks::ElecVars::hgcalExpectedDepth
float hgcalExpectedDepth
Definition: AntiElectronIDMVA6.h:107
AntiElectronIDMVA6::inputFilesToDelete_
std::vector< TFile * > inputFilesToDelete_
Definition: AntiElectronIDMVA6.h:208
PVValHelper::eta
Definition: PVValidationHelpers.h:69
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
AntiElectronIDMVA6::dCrackPhi
double dCrackPhi(double phi, double eta)
Definition: AntiElectronIDMVA6.cc:1022
AntiElectronIDMVA6::var_NoEleMatch_wGwoGSF_Endcap_
std::vector< float > var_NoEleMatch_wGwoGSF_Endcap_
Definition: AntiElectronIDMVA6.h:187
AntiElectronIDMVA6::var_NoEleMatch_woGwoGSF_VFEndcap_
std::vector< float > var_NoEleMatch_woGwoGSF_VFEndcap_
Definition: AntiElectronIDMVA6.h:190
reco::Track
Definition: Track.h:27
antiElecIDMVA6_blocks::TauGammaMoms
Definition: AntiElectronIDMVA6.h:60
AntiElectronIDMVA6::mva_NoEleMatch_woGwoGSF_EC_
const GBRForest * mva_NoEleMatch_woGwoGSF_EC_
Definition: AntiElectronIDMVA6.h:199
summarizeEdmComparisonLogfiles.success
success
Definition: summarizeEdmComparisonLogfiles.py:115
AntiElectronIDMVA6::var_woGwGSF_Endcap_
std::vector< float > var_woGwGSF_Endcap_
Definition: AntiElectronIDMVA6.h:188
AntiElectronIDMVA6::mva_wGwGSF_BL_
const GBRForest * mva_wGwGSF_BL_
Definition: AntiElectronIDMVA6.h:198
antiElecIDMVA6_blocks::ElecVars::gsfTrackResol
float gsfTrackResol
Definition: AntiElectronIDMVA6.h:78
AntiElectronIDMVA6::mva_NoEleMatch_woGwoGSF_BL_
const GBRForest * mva_NoEleMatch_woGwoGSF_BL_
Definition: AntiElectronIDMVA6.h:195
antiElecIDMVA6_blocks::TauVars::leadPFChargedHadrHoP
float leadPFChargedHadrHoP
Definition: AntiElectronIDMVA6.h:45
antiElecIDMVA6_blocks::TauGammaVecs::gammasdPhiInSigCone
std::vector< float > gammasdPhiInSigCone
Definition: AntiElectronIDMVA6.h:54
b
double b
Definition: hdecay.h:118
antiElecIDMVA6_blocks::ElecVars::hgcalDepthCompatibility
float hgcalDepthCompatibility
Definition: AntiElectronIDMVA6.h:109
antiElecIDMVA6_blocks::ElecVars::hgcalEcEnergyFH
float hgcalEcEnergyFH
Definition: AntiElectronIDMVA6.h:105
AntiElectronIDMVA6::mva_NoEleMatch_wGwoGSF_EC_
const GBRForest * mva_NoEleMatch_wGwoGSF_EC_
Definition: AntiElectronIDMVA6.h:200
antiElecIDMVA6_blocks::TauGammaVecs::gammasdEtaOutSigCone
std::vector< float > gammasdEtaOutSigCone
Definition: AntiElectronIDMVA6.h:56
AntiElectronIDMVA6::mvaName_NoEleMatch_wGwoGSF_BL_
std::string mvaName_NoEleMatch_wGwoGSF_BL_
Definition: AntiElectronIDMVA6.h:168
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
reco::PFTau::leadChargedHadrCand
const CandidatePtr & leadChargedHadrCand() const
Definition: PFTau.cc:64
AntiElectronIDMVA6::mvaName_woGwGSF_VFEC_
std::string mvaName_woGwGSF_VFEC_
Definition: AntiElectronIDMVA6.h:177
antiElecIDMVA6_blocks::ElecVars::hgcalLayerEfrac10
float hgcalLayerEfrac10
Definition: AntiElectronIDMVA6.h:102
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::FileInPath::location
LocationCode location() const
Where was the file found?
Definition: FileInPath.cc:161
AntiElectronIDMVA6::usePhiAtEcalEntranceExtrapolation_
bool usePhiAtEcalEntranceExtrapolation_
Definition: AntiElectronIDMVA6.h:180
antiElecIDMVA6_blocks::TauVars::leadChargedPFCandEtaAtEcalEntrance
float leadChargedPFCandEtaAtEcalEntrance
Definition: AntiElectronIDMVA6.h:43
antiElecIDMVA6_blocks::ElecVars::hgcalExpectedSigma
float hgcalExpectedSigma
Definition: AntiElectronIDMVA6.h:108
AntiElectronIDMVA6::var_NoEleMatch_wGwoGSF_Barrel_
std::vector< float > var_NoEleMatch_wGwoGSF_Barrel_
Definition: AntiElectronIDMVA6.h:183
reco::PFCandidate::gsfTrackRef
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:440
antiElecIDMVA6_blocks::TauGammaMoms::gammaEnFracOut
float gammaEnFracOut
Definition: AntiElectronIDMVA6.h:68
a
double a
Definition: hdecay.h:119
AntiElectronIDMVA6::inputFileName_
edm::FileInPath inputFileName_
Definition: AntiElectronIDMVA6.h:165
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
antiElecIDMVA6_blocks::TauVars::visMassIn
float visMassIn
Definition: AntiElectronIDMVA6.h:47
antiElecIDMVA6_blocks::TauGammaVecs::gammasPtOutSigCone
std::vector< float > gammasPtOutSigCone
Definition: AntiElectronIDMVA6.h:58
antiElecIDMVA6_blocks::TauGammaMoms::gammaEtaMomOut
float gammaEtaMomOut
Definition: AntiElectronIDMVA6.h:64
pat::PackedCandidate
Definition: PackedCandidate.h:22
antiElecIDMVA6_blocks::ElecVars::gsfNumHits
float gsfNumHits
Definition: AntiElectronIDMVA6.h:76
pat::Tau::etaAtEcalEntrance
float etaAtEcalEntrance() const
return etaAtEcalEntrance
Definition: Tau.h:312
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
AntiElectronIDMVA6::var_wGwGSF_Barrel_
std::vector< float > var_wGwGSF_Barrel_
Definition: AntiElectronIDMVA6.h:185
antiElecIDMVA6_blocks::TauGammaVecs
Definition: AntiElectronIDMVA6.h:52
AntiElectronIDMVA6::mva_woGwGSF_EC_
const GBRForest * mva_woGwGSF_EC_
Definition: AntiElectronIDMVA6.h:201
dtResolutionTest_cfi.inputFile
inputFile
Definition: dtResolutionTest_cfi.py:14
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
antiElecIDMVA6_blocks::ElecVars::superClusterPhiWidth
float superClusterPhiWidth
Definition: AntiElectronIDMVA6.h:90
AntiElectronIDMVA6::getTauVars
antiElecIDMVA6_blocks::TauVars getTauVars(const TauType &theTau)
Definition: AntiElectronIDMVA6.cc:842
antiElecIDMVA6_blocks::ElecVars::hgcalLayerEfrac90
float hgcalLayerEfrac90
Definition: AntiElectronIDMVA6.h:103
AntiElectronIDMVA6::var_wGwGSF_VFEndcap_
std::vector< float > var_wGwGSF_VFEndcap_
Definition: AntiElectronIDMVA6.h:193
AntiElectronIDMVA6::getElecVars
antiElecIDMVA6_blocks::ElecVars getElecVars(const ElectronRef &theEleRef)
Definition: AntiElectronIDMVA6.cc:915
pat::Tau::phiAtEcalEntrance
float phiAtEcalEntrance() const
return phiAtEcalEntrance
Definition: Tau.h:310
reco::PFCandidate::ecalEnergy
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:221
looper.cfg
cfg
Definition: looper.py:297
AntiElectronIDMVA6::mvaName_woGwGSF_BL_
std::string mvaName_woGwGSF_BL_
Definition: AntiElectronIDMVA6.h:169
AntiElectronIDMVA6::mvaName_NoEleMatch_woGwoGSF_VFEC_
std::string mvaName_NoEleMatch_woGwoGSF_VFEC_
Definition: AntiElectronIDMVA6.h:175
antiElecIDMVA6_blocks::TauGammaMoms::gammaPhiMomIn
float gammaPhiMomIn
Definition: AntiElectronIDMVA6.h:65
antiElecIDMVA6_blocks::ElecVars::r9
float r9
Definition: AntiElectronIDMVA6.h:94
AntiElectronIDMVA6::loadMVAfromDB_
bool loadMVAfromDB_
Definition: AntiElectronIDMVA6.h:164
DDAxes::phi
AntiElectronIDMVA6::mvaName_woGwGSF_EC_
std::string mvaName_woGwGSF_EC_
Definition: AntiElectronIDMVA6.h:173
AntiElectronIDMVA6::isPhase2_
const bool isPhase2_
Definition: AntiElectronIDMVA6.h:210
pat::PackedCandidate::hcalFraction
float hcalFraction() const
Definition: PackedCandidate.h:933
AntiElectronIDMVA6::isInitialized_
bool isInitialized_
Definition: AntiElectronIDMVA6.h:163
AntiElectronIDMVA6::mvaName_wGwGSF_VFEC_
std::string mvaName_wGwGSF_VFEC_
Definition: AntiElectronIDMVA6.h:178
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
edm::FileInPath::Unknown
Definition: FileInPath.h:66
antiElecIDMVA6_blocks::ElecVars::pOut
float pOut
Definition: AntiElectronIDMVA6.h:81
reco::PFCandidate::hcalEnergy
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:233
pat::Tau::etaAtEcalEntranceLeadChargedCand
float etaAtEcalEntranceLeadChargedCand() const
return etaAtEcalEntrance from LeadChargedCand
Definition: Tau.h:314
edm::ValueMap< float >
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Exception
Definition: hltDiff.cc:246
reco::LeafCandidate::p
double p() const final
magnitude of momentum vector
Definition: LeafCandidate.h:123
AntiElectronIDMVA6::ecalEndcapVFEndcapEtaBorder_
static constexpr float ecalEndcapVFEndcapEtaBorder_
Definition: AntiElectronIDMVA6.h:161
antiElecIDMVA6_blocks::ElecVars
Definition: AntiElectronIDMVA6.h:70
AntiElectronIDMVA6::mva_NoEleMatch_woGwoGSF_VFEC_
const GBRForest * mva_NoEleMatch_woGwoGSF_VFEC_
Definition: AntiElectronIDMVA6.h:203
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
AntiElectronIDMVA6::verbosity_
const int verbosity_
Definition: AntiElectronIDMVA6.h:217
antiElecIDMVA6_blocks::TauVars::etaAtEcalEntrance
float etaAtEcalEntrance
Definition: AntiElectronIDMVA6.h:40
AntiElectronIDMVA6::mva_NoEleMatch_wGwoGSF_BL_
const GBRForest * mva_NoEleMatch_wGwoGSF_BL_
Definition: AntiElectronIDMVA6.h:196
edm::Ptr::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146
AntiElectronIDMVA6::minimum
double minimum(double a, double b)
Definition: AntiElectronIDMVA6.cc:996
antiElecIDMVA6_blocks::TauGammaVecs::gammasPtInSigCone
std::vector< float > gammasPtInSigCone
Definition: AntiElectronIDMVA6.h:55
antiElecIDMVA6_blocks::TauVars::dCrackPhi
float dCrackPhi
Definition: AntiElectronIDMVA6.h:49
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
antiElecIDMVA6_blocks::ElecVars::hgcalSigmaEE
float hgcalSigmaEE
Definition: AntiElectronIDMVA6.h:97
pat::Tau::ptLeadChargedCand
float ptLeadChargedCand() const
return pt from LeadChargedCand
Definition: Tau.h:316
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
ztail.d
d
Definition: ztail.py:151
AntiElectronIDMVA6::mvaName_NoEleMatch_wGwoGSF_EC_
std::string mvaName_NoEleMatch_wGwoGSF_EC_
Definition: AntiElectronIDMVA6.h:172
antiElecIDMVA6_blocks::ElecVars::hgcalSigmaPP
float hgcalSigmaPP
Definition: AntiElectronIDMVA6.h:98
antiElecIDMVA6_blocks::ElecVars::gsfTracklnPt
float gsfTracklnPt
Definition: AntiElectronIDMVA6.h:79
pi
const Double_t pi
Definition: trackSplitPlot.h:36
AntiElectronIDMVA6::mvaValue
double mvaValue(const antiElecIDMVA6_blocks::TauVars &tauVars, const antiElecIDMVA6_blocks::TauGammaVecs &tauGammaVecs, const antiElecIDMVA6_blocks::ElecVars &elecVars)
Definition: AntiElectronIDMVA6.cc:208
cms::Exception
Definition: Exception.h:70
AntiElectronIDMVA6::mva_wGwGSF_EC_
const GBRForest * mva_wGwGSF_EC_
Definition: AntiElectronIDMVA6.h:202
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
AntiElectronIDMVA6::mva_wGwGSF_VFEC_
const GBRForest * mva_wGwGSF_VFEC_
Definition: AntiElectronIDMVA6.h:206
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
antiElecIDMVA6_blocks::ElecVars::eTotOverPin
float eTotOverPin
Definition: AntiElectronIDMVA6.h:73
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
reco::Candidate::Point
math::XYZPoint Point
point in the space
Definition: Candidate.h:40
SimL1EmulatorRepack_Full_cff.inputTag
inputTag
Definition: SimL1EmulatorRepack_Full_cff.py:56
antiElecIDMVA6_blocks::TauGammaMoms::signalPFGammaCandsIn
int signalPFGammaCandsIn
Definition: AntiElectronIDMVA6.h:61
antiElecIDMVA6_blocks::TauVars::leadChargedPFCandPt
float leadChargedPFCandPt
Definition: AntiElectronIDMVA6.h:42
antiElecIDMVA6_blocks::ElecVars::deltaPhi
float deltaPhi
Definition: AntiElectronIDMVA6.h:84
AntiElectronIDMVA6::getTauVarsTypeSpecific
antiElecIDMVA6_blocks::TauVars getTauVarsTypeSpecific(const reco::PFTau &theTau)
Definition: AntiElectronIDMVA6.cc:1143
AntiElectronIDMVA6::mva_woGwGSF_BL_
const GBRForest * mva_woGwGSF_BL_
Definition: AntiElectronIDMVA6.h:197
AntiElectronIDMVA6::mvaName_wGwGSF_BL_
std::string mvaName_wGwGSF_BL_
Definition: AntiElectronIDMVA6.h:170
edm::Event::getHandle
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Definition: Event.h:555
AntiElectronIDMVA6::dCrackEta
double dCrackEta(double eta)
Definition: AntiElectronIDMVA6.cc:1073
AntiElectronIDMVA6::var_NoEleMatch_woGwoGSF_Barrel_
std::vector< float > var_NoEleMatch_woGwoGSF_Barrel_
Definition: AntiElectronIDMVA6.h:182
edm::FileInPath::fullPath
std::string fullPath() const
Definition: FileInPath.cc:163
antiElecIDMVA6_blocks::TauGammaMoms::gammaPhiMomOut
float gammaPhiMomOut
Definition: AntiElectronIDMVA6.h:66
antiElecIDMVA6_blocks::ElecVars::hgcalLastLayer
float hgcalLastLayer
Definition: AntiElectronIDMVA6.h:101