184 if ( tau->leadChargedHadrCand().
isNull() )
return 0.;
186 int tauDecayMode = tau->decayMode();
197 float decayDistX = tau->flightLength().x();
198 float decayDistY = tau->flightLength().y();
199 float decayDistZ = tau->flightLength().z();
200 float decayDistMag =
std::sqrt(decayDistX*decayDistX + decayDistY*decayDistY + decayDistZ*decayDistZ);
210 float leadingTrackChi2 = tau->leadingTrackNormChi2();
215 mvaInput_[1] = std::fabs((
float)tau->eta());
217 mvaInput_[3] =
std::log(
std::max((
float)1.
e-2, neutralIsoPtSum - (
float)0.125*puCorrPtSum));
219 mvaInput_[5] = tauDecayMode;
222 mvaInput_[1] = std::fabs((
float)tau->eta());
224 mvaInput_[3] =
std::log(
std::max((
float)1.
e-2, neutralIsoPtSum - (
float)0.125*puCorrPtSum));
226 mvaInput_[5] = tauDecayMode;
227 mvaInput_[6] =
TMath::Sign((
float)+1., tau->dxy());
229 mvaInput_[8] =
std::min((
float)10., std::fabs(tau->dxy_Sig()));
230 mvaInput_[9] = ( tau->hasSecondaryVertex() ) ? 1. : 0.;
232 mvaInput_[11] =
std::min((
float)10., tau->flightLengthSig());
235 mvaInput_[1] = std::fabs(tau->eta());
240 mvaInput_[6] = tauDecayMode;
241 mvaInput_[7] =
std::min((
float)30., nPhoton);
242 mvaInput_[8] =
std::min((
float)0.5, ptWeightedDetaStrip);
243 mvaInput_[9] =
std::min((
float)0.5, ptWeightedDphiStrip);
244 mvaInput_[10] =
std::min((
float)0.5, ptWeightedDrSignal);
245 mvaInput_[11] =
std::min((
float)0.5, ptWeightedDrIsolation);
246 mvaInput_[12] =
std::min((
float)100., leadingTrackChi2);
247 mvaInput_[13] =
std::min((
float)1., eRatio);
248 mvaInput_[14] =
TMath::Sign((
float)+1., tau->dxy());
250 mvaInput_[16] =
std::min((
float)10., std::fabs(tau->dxy_Sig()));
251 mvaInput_[17] =
TMath::Sign((
float)+1., tau->ip3d());
253 mvaInput_[19] =
std::min((
float)10., std::fabs(tau->ip3d_Sig()));
254 mvaInput_[20] = ( tau->hasSecondaryVertex() ) ? 1. : 0.;
256 mvaInput_[22] =
std::min((
float)10., tau->flightLengthSig());
259 mvaInput_[1] = std::fabs(tau->eta());
264 mvaInput_[6] = tauDecayMode;
265 mvaInput_[7] =
std::min((
float)30., nPhoton);
266 mvaInput_[8] =
std::min((
float)0.5, ptWeightedDetaStrip);
267 mvaInput_[9] =
std::min((
float)0.5, ptWeightedDphiStrip);
268 mvaInput_[10] =
std::min((
float)0.5, ptWeightedDrSignal);
269 mvaInput_[11] =
std::min((
float)0.5, ptWeightedDrIsolation);
270 mvaInput_[12] =
std::min((
float)100., leadingTrackChi2);
271 mvaInput_[13] =
std::min((
float)1., eRatio);
272 mvaInput_[14] =
TMath::Sign((
float)+1., tau->dxy());
273 mvaInput_[15] =
std::sqrt(std::fabs(
std::min((
float)1., std::fabs(tau->dxy()))));
274 mvaInput_[16] =
std::min((
float)10., std::fabs(tau->dxy_Sig()));
275 mvaInput_[17] =
TMath::Sign((
float)+1., tau->ip3d());
276 mvaInput_[18] =
std::sqrt(std::fabs(
std::min((
float)1., std::fabs(tau->ip3d()))));
277 mvaInput_[19] =
std::min((
float)10., std::fabs(tau->ip3d_Sig()));
278 mvaInput_[20] = ( tau->hasSecondaryVertex() ) ? 1. : 0.;
280 mvaInput_[22] =
std::min((
float)10., tau->flightLengthSig());
285 edm::LogPrint(
"PATTauDiscByMVAIsolRun2") <<
"<PATTauDiscriminationByMVAIsolationRun2::discriminate>:";
286 edm::LogPrint(
"PATTauDiscByMVAIsolRun2") <<
" tau: Pt = " << tau->pt() <<
", eta = " << tau->eta();
287 edm::LogPrint(
"PATTauDiscByMVAIsolRun2") <<
" isolation: charged = " << chargedIsoPtSum <<
", neutral = " << neutralIsoPtSum <<
", PUcorr = " <<
puCorrPtSum;
288 edm::LogPrint(
"PATTauDiscByMVAIsolRun2") <<
" decay mode = " << tauDecayMode;
289 edm::LogPrint(
"PATTauDiscByMVAIsolRun2") <<
" impact parameter: distance = " << tau->dxy() <<
", significance = " << tau->dxy_Sig();
290 edm::LogPrint(
"PATTauDiscByMVAIsolRun2") <<
" has decay vertex = " << tau->hasSecondaryVertex() <<
":"
291 <<
" distance = " << decayDistMag <<
", significance = " << tau->flightLengthSig();
292 edm::LogPrint(
"PATTauDiscByMVAIsolRun2") <<
"--> mvaValue = " << mvaValue;
std::string footprintCorrection_
std::string photonPtSumOutsideSignalCone_
float tau_Eratio(const reco::PFTau &tau) const
return ratio of energy in ECAL over sum of energy in ECAL and HCAL
TauIdMVAAuxiliaries clusterVariables_
float tau_pt_weighted_dphi_strip(const reco::PFTau &tau, int dm) const
const GBRForest * mvaReader_
float tau_pt_weighted_dr_signal(const reco::PFTau &tau, int dm) const
bool isNull() const
Checks for null.
float tau_pt_weighted_dr_iso(const reco::PFTau &tau, int dm) const
float tau_pt_weighted_deta_strip(const reco::PFTau &tau, int dm) const
std::unique_ptr< pat::PATTauDiscriminator > category_output_
std::string neutralIsoPtSums_
tuple footprintCorrection
tuple photonPtSumOutsideSignalCone
std::string chargedIsoPtSums_
double GetClassifier(const float *vector) const
unsigned int tau_n_photons_total(const reco::PFTau &tau) const
return total number of pf photon candidates with pT>500 MeV, which are associated to signal ...
std::string puCorrPtSums_