CMS 3D CMS Logo

PFRecoTauDiscriminationByMVAIsolationRun2.cc
Go to the documentation of this file.
1 
11 
18 
20 
23 
32 
36 
37 #include <TFile.h>
38 
39 #include <iostream>
40 
41 using namespace reco;
42 
43 namespace {
44  const GBRForest* loadMVAfromFile(const edm::FileInPath& inputFileName,
45  const std::string& mvaName,
46  std::vector<TFile*>& inputFilesToDelete) {
47  if (inputFileName.location() == edm::FileInPath::Unknown)
48  throw cms::Exception("PFRecoTauDiscriminationByIsolationMVA2::loadMVA")
49  << " Failed to find File = " << inputFileName << " !!\n";
50  TFile* inputFile = new TFile(inputFileName.fullPath().data());
51 
52  //const GBRForest* mva = dynamic_cast<GBRForest*>(inputFile->Get(mvaName.data())); // CV: dynamic_cast<GBRForest*> fails for some reason ?!
53  const GBRForest* mva = (GBRForest*)inputFile->Get(mvaName.data());
54  if (!mva)
55  throw cms::Exception("PFRecoTauDiscriminationByIsolationMVA2::loadMVA")
56  << " Failed to load MVA = " << mvaName.data() << " from file = " << inputFileName.fullPath().data()
57  << " !!\n";
58 
59  inputFilesToDelete.push_back(inputFile);
60 
61  return mva;
62  }
63 
64  const GBRForest* loadMVAfromDB(const edm::EventSetup& es, const std::string& mvaName) {
67  return mva.product();
68  }
69 } // namespace
70 
71 namespace reco {
72  namespace tau {
73 
75  public:
78  moduleLabel_(cfg.getParameter<std::string>("@module_label")),
79  mvaReader_(nullptr),
80  mvaInput_(nullptr) {
81  mvaName_ = cfg.getParameter<std::string>("mvaName");
82  loadMVAfromDB_ = cfg.getParameter<bool>("loadMVAfromDB");
83  if (!loadMVAfromDB_) {
84  inputFileName_ = cfg.getParameter<edm::FileInPath>("inputFileName");
85  }
86  std::string mvaOpt_string = cfg.getParameter<std::string>("mvaOpt");
87  if (mvaOpt_string == "oldDMwoLT")
89  else if (mvaOpt_string == "oldDMwLT")
91  else if (mvaOpt_string == "newDMwoLT")
93  else if (mvaOpt_string == "newDMwLT")
95  else if (mvaOpt_string == "DBoldDMwLT")
97  else if (mvaOpt_string == "DBnewDMwLT")
99  else if (mvaOpt_string == "PWoldDMwLT")
101  else if (mvaOpt_string == "PWnewDMwLT")
103  else if (mvaOpt_string == "DBoldDMwLTwGJ")
105  else if (mvaOpt_string == "DBnewDMwLTwGJ")
107  else
108  throw cms::Exception("PFRecoTauDiscriminationByMVAIsolationRun2")
109  << " Invalid Configuration Parameter 'mvaOpt' = " << mvaOpt_string << " !!\n";
110 
111  if (mvaOpt_ == kOldDMwoLT || mvaOpt_ == kNewDMwoLT)
112  mvaInput_ = new float[6];
113  else if (mvaOpt_ == kOldDMwLT || mvaOpt_ == kNewDMwLT)
114  mvaInput_ = new float[12];
117  mvaInput_ = new float[23];
118  else
119  assert(0);
120 
122  consumes<PFTauTIPAssociationByRef>(cfg.getParameter<edm::InputTag>("srcTauTransverseImpactParameters"));
123 
125  consumes<reco::TauDiscriminatorContainer>(cfg.getParameter<edm::InputTag>("srcBasicTauDiscriminators"));
126  input_id_name_suffix_ = cfg.getParameter<std::string>("inputIDNameSuffix");
127 
128  verbosity_ = cfg.getParameter<int>("verbosity");
129  }
130 
131  void beginEvent(const edm::Event&, const edm::EventSetup&) override;
132 
134 
136  if (!loadMVAfromDB_)
137  delete mvaReader_;
138  delete[] mvaInput_;
139  for (std::vector<TFile*>::iterator it = inputFilesToDelete_.begin(); it != inputFilesToDelete_.end(); ++it) {
140  delete (*it);
141  }
142  }
143 
144  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
145 
146  private:
148 
153  int mvaOpt_;
154  float* mvaInput_;
155 
160 
170 
172 
173  std::vector<TFile*> inputFilesToDelete_;
174 
176  };
177 
179  if (!mvaReader_) {
180  if (loadMVAfromDB_) {
182  } else {
184  }
185  }
186 
188 
190 
191  evt.getByToken(Tau_token, taus_);
192 
193  // load indices from input provenance config if process history changed, in particular for the first event
194  // skip missing IDs and leave treatment to produce/discriminate function
195  if (evt.processHistoryID() != phID_ && basicTauDiscriminators_.isValid()) {
196  phID_ = evt.processHistoryID();
197  const edm::Provenance* prov = basicTauDiscriminators_.provenance();
198  const std::vector<edm::ParameterSet> psetsFromProvenance =
199  edm::parameterSet(prov->stable(), evt.processHistory())
200  .getParameter<std::vector<edm::ParameterSet>>("IDdefinitions");
201  for (uint i = 0; i < psetsFromProvenance.size(); i++) {
202  if (psetsFromProvenance[i].getParameter<std::string>("IDname") == "ChargedIsoPtSum" + input_id_name_suffix_)
204  else if (psetsFromProvenance[i].getParameter<std::string>("IDname") ==
205  "NeutralIsoPtSum" + input_id_name_suffix_)
207  else if (psetsFromProvenance[i].getParameter<std::string>("IDname") == "PUcorrPtSum" + input_id_name_suffix_)
209  else if (psetsFromProvenance[i].getParameter<std::string>("IDname") ==
210  "PhotonPtSumOutsideSignalCone" + input_id_name_suffix_)
212  else if (psetsFromProvenance[i].getParameter<std::string>("IDname") ==
213  "TauFootprintCorrection" + input_id_name_suffix_)
215  }
216  }
217  }
218 
220  const PFTauRef& tau) const {
222  result.rawValues = {-1.};
223 
224  // CV: computation of MVA value requires presence of leading charged hadron
225  if (tau->leadChargedHadrCand().isNull())
226  return 0.;
227 
228  int tauDecayMode = tau->decayMode();
229 
231  mvaOpt_ == kDBoldDMwLTwGJ) &&
232  (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 10)) ||
234  mvaOpt_ == kDBnewDMwLTwGJ) &&
235  (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 5 || tauDecayMode == 6 ||
236  tauDecayMode == 10 || tauDecayMode == 11))) {
237  auto const rawValues = (*basicTauDiscriminators_)[tau].rawValues;
238  float chargedIsoPtSum = rawValues.at(chargedIsoPtSum_index_);
239  float neutralIsoPtSum = rawValues.at(neutralIsoPtSum_index_);
240  float puCorrPtSum = rawValues.at(pucorrPtSum_index_);
241  float photonPtSumOutsideSignalCone = rawValues.at(photonPtSumOutsideSignalCone_index_);
242  float footprintCorrection = rawValues.at(footprintCorrection_index_);
243 
244  const reco::PFTauTransverseImpactParameter& tauLifetimeInfo = *(*tauLifetimeInfos)[tau];
245 
246  float decayDistX = tauLifetimeInfo.flightLength().x();
247  float decayDistY = tauLifetimeInfo.flightLength().y();
248  float decayDistZ = tauLifetimeInfo.flightLength().z();
249  float decayDistMag = std::sqrt(decayDistX * decayDistX + decayDistY * decayDistY + decayDistZ * decayDistZ);
250 
251  float nPhoton = (float)reco::tau::n_photons_total(*tau);
252  float ptWeightedDetaStrip = reco::tau::pt_weighted_deta_strip(*tau, tauDecayMode);
253  float ptWeightedDphiStrip = reco::tau::pt_weighted_dphi_strip(*tau, tauDecayMode);
254  float ptWeightedDrSignal = reco::tau::pt_weighted_dr_signal(*tau, tauDecayMode);
255  float ptWeightedDrIsolation = reco::tau::pt_weighted_dr_iso(*tau, tauDecayMode);
256  float leadingTrackChi2 = reco::tau::lead_track_chi2(*tau);
257  float eRatio = reco::tau::eratio(*tau);
258 
259  // Difference between measured and maximally allowed Gottfried-Jackson angle
260  float gjAngleDiff = -999;
261  if (tauDecayMode == 10) {
262  double mTau = 1.77682;
263  double mAOne = tau->p4().M();
264  double pAOneMag = tau->p();
265  double argumentThetaGJmax = (std::pow(mTau, 2) - std::pow(mAOne, 2)) / (2 * mTau * pAOneMag);
266  double argumentThetaGJmeasured =
267  (tau->p4().px() * decayDistX + tau->p4().py() * decayDistY + tau->p4().pz() * decayDistZ) /
268  (pAOneMag * decayDistMag);
269  if (std::abs(argumentThetaGJmax) <= 1. && std::abs(argumentThetaGJmeasured) <= 1.) {
270  double thetaGJmax = std::asin(argumentThetaGJmax);
271  double thetaGJmeasured = std::acos(argumentThetaGJmeasured);
272  gjAngleDiff = thetaGJmeasured - thetaGJmax;
273  }
274  }
275 
276  if (mvaOpt_ == kOldDMwoLT || mvaOpt_ == kNewDMwoLT) {
277  mvaInput_[0] = std::log(std::max(1.f, (float)tau->pt()));
278  mvaInput_[1] = std::abs((float)tau->eta());
279  mvaInput_[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
280  mvaInput_[3] = std::log(std::max(1.e-2f, neutralIsoPtSum - 0.125f * puCorrPtSum));
281  mvaInput_[4] = std::log(std::max(1.e-2f, puCorrPtSum));
282  mvaInput_[5] = tauDecayMode;
283  } else if (mvaOpt_ == kOldDMwLT || mvaOpt_ == kNewDMwLT) {
284  mvaInput_[0] = std::log(std::max(1.f, (float)tau->pt()));
285  mvaInput_[1] = std::abs((float)tau->eta());
286  mvaInput_[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
287  mvaInput_[3] = std::log(std::max(1.e-2f, neutralIsoPtSum - 0.125f * puCorrPtSum));
288  mvaInput_[4] = std::log(std::max(1.e-2f, puCorrPtSum));
289  mvaInput_[5] = tauDecayMode;
290  mvaInput_[6] = std::copysign(+1.f, (float)tauLifetimeInfo.dxy());
291  mvaInput_[7] = std::sqrt(std::abs(std::min(1.f, (float)tauLifetimeInfo.dxy())));
292  mvaInput_[8] = std::min(10.f, std::abs((float)tauLifetimeInfo.dxy_Sig()));
293  mvaInput_[9] = (tauLifetimeInfo.hasSecondaryVertex()) ? 1. : 0.;
294  mvaInput_[10] = std::sqrt(decayDistMag);
295  mvaInput_[11] = std::min(10.f, (float)tauLifetimeInfo.flightLengthSig());
296  } else if (mvaOpt_ == kDBoldDMwLT || mvaOpt_ == kDBnewDMwLT) {
297  mvaInput_[0] = std::log(std::max(1.f, (float)tau->pt()));
298  mvaInput_[1] = std::abs((float)tau->eta());
299  mvaInput_[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
300  mvaInput_[3] = std::log(std::max(1.e-2f, neutralIsoPtSum));
301  mvaInput_[4] = std::log(std::max(1.e-2f, puCorrPtSum));
302  mvaInput_[5] = std::log(std::max(1.e-2f, photonPtSumOutsideSignalCone));
303  mvaInput_[6] = tauDecayMode;
304  mvaInput_[7] = std::min(30.f, nPhoton);
305  mvaInput_[8] = std::min(0.5f, ptWeightedDetaStrip);
306  mvaInput_[9] = std::min(0.5f, ptWeightedDphiStrip);
307  mvaInput_[10] = std::min(0.5f, ptWeightedDrSignal);
308  mvaInput_[11] = std::min(0.5f, ptWeightedDrIsolation);
309  mvaInput_[12] = std::min(100.f, leadingTrackChi2);
310  mvaInput_[13] = std::min(1.f, eRatio);
311  mvaInput_[14] = std::copysign(+1.f, (float)tauLifetimeInfo.dxy());
312  mvaInput_[15] = std::sqrt(std::min(1.f, std::abs((float)tauLifetimeInfo.dxy())));
313  mvaInput_[16] = std::min(10.f, std::abs((float)tauLifetimeInfo.dxy_Sig()));
314  mvaInput_[17] = std::copysign(+1.f, (float)tauLifetimeInfo.ip3d());
315  mvaInput_[18] = std::sqrt(std::min(1.f, std::abs((float)tauLifetimeInfo.ip3d())));
316  mvaInput_[19] = std::min(10.f, std::abs((float)tauLifetimeInfo.ip3d_Sig()));
317  mvaInput_[20] = (tauLifetimeInfo.hasSecondaryVertex()) ? 1. : 0.;
318  mvaInput_[21] = std::sqrt(decayDistMag);
319  mvaInput_[22] = std::min(10.f, (float)tauLifetimeInfo.flightLengthSig());
320  } else if (mvaOpt_ == kPWoldDMwLT || mvaOpt_ == kPWnewDMwLT) {
321  mvaInput_[0] = std::log(std::max(1.f, (float)tau->pt()));
322  mvaInput_[1] = std::abs((float)tau->eta());
323  mvaInput_[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
324  mvaInput_[3] = std::log(std::max(1.e-2f, neutralIsoPtSum));
325  mvaInput_[4] = std::log(std::max(1.e-2f, footprintCorrection));
326  mvaInput_[5] = std::log(std::max(1.e-2f, photonPtSumOutsideSignalCone));
327  mvaInput_[6] = tauDecayMode;
328  mvaInput_[7] = std::min(30.f, nPhoton);
329  mvaInput_[8] = std::min(0.5f, ptWeightedDetaStrip);
330  mvaInput_[9] = std::min(0.5f, ptWeightedDphiStrip);
331  mvaInput_[10] = std::min(0.5f, ptWeightedDrSignal);
332  mvaInput_[11] = std::min(0.5f, ptWeightedDrIsolation);
333  mvaInput_[12] = std::min(100.f, leadingTrackChi2);
334  mvaInput_[13] = std::min(1.f, eRatio);
335  mvaInput_[14] = std::copysign(+1.f, (float)tauLifetimeInfo.dxy());
336  mvaInput_[15] = std::sqrt(std::min(1.f, std::abs((float)tauLifetimeInfo.dxy())));
337  mvaInput_[16] = std::min(10.f, std::abs((float)tauLifetimeInfo.dxy_Sig()));
338  mvaInput_[17] = std::copysign(+1.f, (float)tauLifetimeInfo.ip3d());
339  mvaInput_[18] = std::sqrt(std::min(1.f, std::abs((float)tauLifetimeInfo.ip3d())));
340  mvaInput_[19] = std::min(10.f, std::abs((float)tauLifetimeInfo.ip3d_Sig()));
341  mvaInput_[20] = (tauLifetimeInfo.hasSecondaryVertex()) ? 1. : 0.;
342  mvaInput_[21] = std::sqrt(decayDistMag);
343  mvaInput_[22] = std::min(10.f, (float)tauLifetimeInfo.flightLengthSig());
344  } else if (mvaOpt_ == kDBoldDMwLTwGJ || mvaOpt_ == kDBnewDMwLTwGJ) {
345  mvaInput_[0] = std::log(std::max(1.f, (float)tau->pt()));
346  mvaInput_[1] = std::abs((float)tau->eta());
347  mvaInput_[2] = std::log(std::max(1.e-2f, chargedIsoPtSum));
348  mvaInput_[3] = std::log(std::max(1.e-2f, neutralIsoPtSum));
349  mvaInput_[4] = std::log(std::max(1.e-2f, puCorrPtSum));
350  mvaInput_[5] = std::log(std::max(1.e-2f, photonPtSumOutsideSignalCone));
351  mvaInput_[6] = tauDecayMode;
352  mvaInput_[7] = std::min(30.f, nPhoton);
353  mvaInput_[8] = std::min(0.5f, ptWeightedDetaStrip);
354  mvaInput_[9] = std::min(0.5f, ptWeightedDphiStrip);
355  mvaInput_[10] = std::min(0.5f, ptWeightedDrSignal);
356  mvaInput_[11] = std::min(0.5f, ptWeightedDrIsolation);
357  mvaInput_[12] = std::min(1.f, eRatio);
358  mvaInput_[13] = std::copysign(+1.f, (float)tauLifetimeInfo.dxy());
359  mvaInput_[14] = std::sqrt(std::min(1.f, std::abs((float)tauLifetimeInfo.dxy())));
360  mvaInput_[15] = std::min(10.f, std::abs((float)tauLifetimeInfo.dxy_Sig()));
361  mvaInput_[16] = std::copysign(+1.f, (float)tauLifetimeInfo.ip3d());
362  mvaInput_[17] = std::sqrt(std::min(1.f, std::abs((float)tauLifetimeInfo.ip3d())));
363  mvaInput_[18] = std::min(10.f, std::abs((float)tauLifetimeInfo.ip3d_Sig()));
364  mvaInput_[19] = (tauLifetimeInfo.hasSecondaryVertex()) ? 1. : 0.;
365  mvaInput_[20] = std::sqrt(decayDistMag);
366  mvaInput_[21] = std::min(10.f, (float)tauLifetimeInfo.flightLengthSig());
367  mvaInput_[22] = std::max(-1.f, gjAngleDiff);
368  }
369 
370  double mvaValue = mvaReader_->GetClassifier(mvaInput_);
371  if (verbosity_) {
372  edm::LogPrint("PFTauDiscByMVAIsol2") << "<PFRecoTauDiscriminationByMVAIsolationRun2::discriminate>:";
373  edm::LogPrint("PFTauDiscByMVAIsol2") << " tau: Pt = " << tau->pt() << ", eta = " << tau->eta();
374  edm::LogPrint("PFTauDiscByMVAIsol2") << " isolation: charged = " << chargedIsoPtSum
375  << ", neutral = " << neutralIsoPtSum << ", PUcorr = " << puCorrPtSum;
376  edm::LogPrint("PFTauDiscByMVAIsol2") << " decay mode = " << tauDecayMode;
377  edm::LogPrint("PFTauDiscByMVAIsol2") << " impact parameter: distance = " << tauLifetimeInfo.dxy()
378  << ", significance = " << tauLifetimeInfo.dxy_Sig();
379  edm::LogPrint("PFTauDiscByMVAIsol2")
380  << " has decay vertex = " << tauLifetimeInfo.hasSecondaryVertex() << ":"
381  << " distance = " << decayDistMag << ", significance = " << tauLifetimeInfo.flightLengthSig();
382  edm::LogPrint("PFTauDiscByMVAIsol2") << "--> mvaValue = " << mvaValue;
383  }
384  result.rawValues.at(0) = mvaValue;
385  }
386  return result;
387  }
388 
390  // pfRecoTauDiscriminationByMVAIsolationRun2
392 
393  desc.add<std::string>("mvaName", "tauIdMVAnewDMwLT");
394  desc.add<bool>("loadMVAfromDB", true);
395  desc.addOptional<edm::FileInPath>("inputFileName");
396  desc.add<std::string>("mvaOpt", "newDMwLT");
397 
398  desc.add<edm::InputTag>("srcTauTransverseImpactParameters", edm::InputTag(""));
399  desc.add<edm::InputTag>("srcBasicTauDiscriminators", edm::InputTag("hpsPFTauBasicDiscriminators"));
400  desc.add<std::string>("inputIDNameSuffix", "");
401 
402  desc.add<int>("verbosity", 0);
403 
404  fillProducerDescriptions(desc); // inherited from the base
405 
406  descriptions.add("pfRecoTauDiscriminationByMVAIsolationRun2", desc);
407  }
408 
410 
411  } // namespace tau
412 } // namespace reco
ConfigurationDescriptions.h
reco::tau::kDBnewDMwLTwGJ
Definition: PFRecoTauClusterVariables.h:68
reco::tau::pt_weighted_deta_strip
float pt_weighted_deta_strip(const reco::PFTau &tau, int dm)
Definition: PFRecoTauClusterVariables.h:36
reco::tau::kOldDMwoLT
Definition: PFRecoTauClusterVariables.h:59
taus_updatedMVAIds_cff.loadMVAfromDB
loadMVAfromDB
Definition: taus_updatedMVAIds_cff.py:17
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::mvaReader_
const GBRForest * mvaReader_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:152
ProcessHistoryID.h
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::PFTauTIPAssociationByRef
edm::AssociationVector< reco::PFTauRefProd, std::vector< reco::PFTauTransverseImpactParameterRef > > PFTauTIPAssociationByRef
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:157
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:389
PDWG_TauSkim_cff.rawValues
rawValues
Definition: PDWG_TauSkim_cff.py:13
mps_fire.i
i
Definition: mps_fire.py:428
PFTauFwd.h
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::basicTauDiscriminators_token
edm::EDGetTokenT< reco::TauDiscriminatorContainer > basicTauDiscriminators_token
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:161
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
GBRForest::GetClassifier
double GetClassifier(const float *vector) const
Definition: GBRForest.h:34
TauDiscriminationProducerBase.h
ESHandle.h
reco::tau::kNewDMwLT
Definition: PFRecoTauClusterVariables.h:62
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
metsig::tau
Definition: SignAlgoResolutions.h:49
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:74
min
T min(T a, T b)
Definition: MathUtil.h:58
edm::EDGetTokenT
Definition: EDGetToken.h:33
reco::tau::eratio
float eratio(const reco::PFTau &tau)
return ratio of energy in ECAL over sum of energy in ECAL and HCAL
Definition: PFRecoTauClusterVariables.cc:78
PFTauTransverseImpactParameterAssociation.h
GBRWrapperRcd.h
reco::tau::kOldDMwLT
Definition: PFRecoTauClusterVariables.h:60
reco::tau::kDBoldDMwLT
Definition: PFRecoTauClusterVariables.h:63
GBRForest
Definition: GBRForest.h:25
edm::LogPrint
Log< level::Warning, true > LogPrint
Definition: MessageLogger.h:130
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::mvaName_
std::string mvaName_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:149
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::input_id_name_suffix_
std::string input_id_name_suffix_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:168
cms::cuda::assert
assert(be >=bs)
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::TauTransverseImpactParameters_token
edm::EDGetTokenT< PFTauTIPAssociationByRef > TauTransverseImpactParameters_token
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:158
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::beginEvent
void beginEvent(const edm::Event &, const edm::EventSetup &) override
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:178
reco::tau::kNewDMwoLT
Definition: PFRecoTauClusterVariables.h:61
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
beam_dqm_sourceclient-live_cfg.mva
mva
Definition: beam_dqm_sourceclient-live_cfg.py:126
GBRForest.h
edm::Handle
Definition: AssociativeIterator.h:50
parallelization.uint
uint
Definition: parallelization.py:124
edm::Ref< PFTauCollection >
FileInPath.h
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::photonPtSumOutsideSignalCone_index_
int photonPtSumOutsideSignalCone_index_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:166
reco::PFTauTransverseImpactParameter::dxy
double dxy() const
Definition: PFTauTransverseImpactParameter.h:51
edm::parameterSet
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
reco::tau::kPWoldDMwLT
Definition: PFRecoTauClusterVariables.h:65
PFRecoTauClusterVariables.h
edm::FileInPath
Definition: FileInPath.h:64
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::neutralIsoPtSum_index_
int neutralIsoPtSum_index_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:164
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
reco::tau::pt_weighted_dphi_strip
float pt_weighted_dphi_strip(const reco::PFTau &tau, int dm)
Definition: PFRecoTauClusterVariables.h:44
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
InefficientDoubleROC.inputFileName
inputFileName
Definition: InefficientDoubleROC.py:437
reco::PFTauTransverseImpactParameter::flightLengthSig
double flightLengthSig() const
Definition: PFTauTransverseImpactParameter.cc:71
ProductProvenance.h
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::tau::kPWnewDMwLT
Definition: PFRecoTauClusterVariables.h:66
reco::tau::kDBnewDMwLT
Definition: PFRecoTauClusterVariables.h:64
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::phID_
edm::ProcessHistoryID phID_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:169
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::mvaInput_
float * mvaInput_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:154
edm::ESHandle< GBRForest >
edm::Event::processHistoryID
ProcessHistoryID const & processHistoryID() const
Definition: Event.cc:116
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::~PFRecoTauDiscriminationByMVAIsolationRun2
~PFRecoTauDiscriminationByMVAIsolationRun2() override
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:135
edm::Hash< ProcessHistoryType >
taus_updatedMVAIds_cff.mvaName
mvaName
Definition: taus_updatedMVAIds_cff.py:18
TauDiscriminationProducerBase
Definition: TauDiscriminationProducerBase.h:55
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:535
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::basicTauDiscriminators_
edm::Handle< reco::TauDiscriminatorContainer > basicTauDiscriminators_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:162
ParameterSetDescription.h
reco::PFTauTransverseImpactParameter::ip3d_Sig
double ip3d_Sig() const
Definition: PFTauTransverseImpactParameter.h:57
reco::PFTauTransverseImpactParameter
Definition: PFTauTransverseImpactParameter.h:24
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
reco::PFTauTransverseImpactParameter::hasSecondaryVertex
bool hasSecondaryVertex() const
Definition: PFTauTransverseImpactParameter.h:61
edm::AssociationVector
Definition: AssociationVector.h:67
edm::Event::processHistory
ProcessHistory const & processHistory() const override
Definition: Event.cc:250
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::footprintCorrection_index_
int footprintCorrection_index_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:167
edm::ParameterSet
Definition: ParameterSet.h:47
TauDiscriminationProducerBase::fillProducerDescriptions
static void fillProducerDescriptions(edm::ParameterSetDescription &desc)
Definition: TauDiscriminationProducerBase.cc:173
Event.h
deltaR.h
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::tauLifetimeInfos
edm::Handle< PFTauTIPAssociationByRef > tauLifetimeInfos
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:159
reco::tau::lead_track_chi2
float lead_track_chi2(const reco::PFTau &tau)
return chi2 of the leading track ==> deprecated? <==
Definition: PFRecoTauClusterVariables.cc:58
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
TauDiscriminationProducerBase::Tau_token
edm::EDGetTokenT< TauCollection > Tau_token
Definition: TauDiscriminationProducerBase.h:107
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::inputFilesToDelete_
std::vector< TFile * > inputFilesToDelete_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:173
reco::tau::kDBoldDMwLTwGJ
Definition: PFRecoTauClusterVariables.h:67
reco::tau::n_photons_total
unsigned int n_photons_total(const reco::PFTau &tau)
return total number of pf photon candidates with pT>500 MeV, which are associated to signal
Definition: PFRecoTauClusterVariables.cc:163
dtResolutionTest_cfi.inputFile
inputFile
Definition: dtResolutionTest_cfi.py:14
reco::PFTauTransverseImpactParameter::ip3d
double ip3d() const
Definition: PFTauTransverseImpactParameter.h:55
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::PFRecoTauDiscriminationByMVAIsolationRun2
PFRecoTauDiscriminationByMVAIsolationRun2(const edm::ParameterSet &cfg)
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:76
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::verbosity_
int verbosity_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:175
edm::EventSetup
Definition: EventSetup.h:58
reco::PFTauTransverseImpactParameter::dxy_Sig
double dxy_Sig() const
Definition: PFTauTransverseImpactParameter.h:53
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::moduleLabel_
std::string moduleLabel_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:147
InputTag.h
reco::get
T get(const Candidate &c)
Definition: component.h:60
looper.cfg
cfg
Definition: looper.py:297
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::pucorrPtSum_index_
int pucorrPtSum_index_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:165
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::taus_
edm::Handle< TauCollection > taus_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:171
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
std
Definition: JetResolutionObject.h:76
edm::FileInPath::Unknown
Definition: FileInPath.h:66
edm::Provenance::stable
StableProvenance const & stable() const
Definition: Provenance.h:42
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::inputFileName_
edm::FileInPath inputFileName_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:151
Exception
Definition: hltDiff.cc:245
reco::tau::pt_weighted_dr_signal
float pt_weighted_dr_signal(const reco::PFTau &tau, int dm)
Definition: PFRecoTauClusterVariables.h:32
PFTau.h
GBRWrapperRcd
Definition: GBRWrapperRcd.h:24
Provenance.h
EventSetup.h
reco::tau::pt_weighted_dr_iso
float pt_weighted_dr_iso(const reco::PFTau &tau, int dm)
Definition: PFRecoTauClusterVariables.h:52
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::loadMVAfromDB_
bool loadMVAfromDB_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:150
Exception.h
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::discriminate
reco::SingleTauDiscriminatorContainer discriminate(const PFTauRef &) const override
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:219
mps_fire.result
result
Definition: mps_fire.py:311
cms::Exception
Definition: Exception.h:70
Candidate.h
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ParameterSet.h
edm::Provenance
Definition: Provenance.h:34
edm::Event
Definition: Event.h:73
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::mvaOpt_
int mvaOpt_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:153
edm::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
reco::PFTauTransverseImpactParameter::flightLength
const Vector & flightLength() const
Definition: PFTauTransverseImpactParameter.cc:67
reco::SingleTauDiscriminatorContainer
Definition: TauDiscriminatorContainer.h:9
reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2::chargedIsoPtSum_index_
int chargedIsoPtSum_index_
Definition: PFRecoTauDiscriminationByMVAIsolationRun2.cc:163