#include #include "TMath.h" #include "TString.h" using namespace std; // macro to implement the e-veto cut-based elections /* * returns false if it a tau * true if it is an electron candidate * * input D3PD variables: ****************************************************** * eta : tau_seedCalo_track_eta (track with highest tau_seedCalo_track_pt) * Et : tau_seedCalo_etEMAtEMScale (not explicitly used) * TrkAvgDist: tau_seedCalo_trkAvgDist * HoP : tau_seedCalo_etHadAtEMScale/tau_leadTrkPt * EoP : tau_seedCalo_etEMAtEMScale/tau_leadTrkPt * TrtRatio : tau_calcVars_TRTHTOverLT_LeadTrk * **************************************************************************** * Usage: * tauElectronVeto(float eta, float Et, float Estripmax, float HoP, * float EoP, float TrtRatio, TString qual) * qual: loose, medium, tight or tighter * returns true if the object is identified as an electron by the algorithm * ATLAS tauWG supported points: loose, medium and tight, tighter is for test * purposes * * Changes since the last release (12 May 2011) * * eta range changed: central taus were defined 0.0-1.7 now 0.0-2.0 * variables replaced: * OLD VARIABLE (ATHENA REL16) -> NEW VARIABLE (ATHENA REL17) * tau_seedTrk_secMaxStripEt -> tau_seedCalo_trkAvgDist * tau_seedTrk_hadLeakEt -> tau_seedCalo_etHadAtEMScale/tau_leadTrkPt * tau_seedTrk_sumEMCellEtOverLeadTrkPt -> tau_seedCalo_etEMAtEMScale/tau_leadTrkPt * **************************************************************************** * nikolaos.rompotis at cern.ch - 6 Oct 2011 * */ bool tauElectronVetoRel17(float eta, float Et, float TrkAvgDist, float HoP, float EoP, float TrtRatio, TString qual) { float TrkAvgDist_C0, HoP_C0, EoP_C0, TrtRatio_C0a, TrtRatio_C0b, TrtRatio_C0c; float HoP_C1, EoP_C1; // define the cut values ............. if (qual == "loose") { TrkAvgDist_C0= 0.028; HoP_C0 = 0.050; EoP_C0 = 0.927; TrtRatio_C0a = 0.216; TrtRatio_C0b = 0.104; TrtRatio_C0c = 0.102; HoP_C1 = 0.085; EoP_C1 = 0.112; } else if (qual == "medium") { TrkAvgDist_C0= 0.046; HoP_C0 = 0.081; EoP_C0 = 0.832; TrtRatio_C0a = 0.179; TrtRatio_C0b = 0.073; TrtRatio_C0c = 0.125; HoP_C1 = 0.218; EoP_C1 = 1.386; } else if (qual == "tight") { TrkAvgDist_C0= 0.026; HoP_C0 = 0.472; EoP_C0 = 3.059; TrtRatio_C0a = 0.161; TrtRatio_C0b = 0.097; TrtRatio_C0c = 0.092; HoP_C1 = 0.304; EoP_C1 = 0.990; } else if (qual == "tighter") { TrkAvgDist_C0= 0.097; HoP_C0 = 0.112; EoP_C0 = 0.104; TrtRatio_C0a = 0.101; TrtRatio_C0b = 0.592; TrtRatio_C0c = 0.057; HoP_C1 = 0.305; EoP_C1 = 0.992; } else { std::cout << "No such option for qual=" << qual << endl; return false; } if (qual == "medium") { if (tauElectronVetoRel17(eta, Et, TrkAvgDist, HoP, EoP, TrtRatio, "loose")) return true; } else if (qual == "tight") { if (tauElectronVetoRel17(eta, Et, TrkAvgDist, HoP, EoP, TrtRatio, "medium")) return true; } else if (qual == "tighter") { // tighter is defined also wrt to the medium if (tauElectronVetoRel17(eta, Et, TrkAvgDist, HoP, EoP, TrtRatio, "medium")) return true; } // ................................... if ( fabs(eta) < 2.0 ) { // central taus // if (HoP > HoP_C0) { if ( TrtRatio <= TrtRatio_C0a) return false; else return true; } else { if (TrkAvgDist > TrkAvgDist_C0) { if (TrtRatio <= TrtRatio_C0b) return false; else return true; } else { if (TrtRatio <= TrtRatio_C0c && EoP <= EoP_C0) return false; else return true; } } } else { // forward taus if (HoP > HoP_C1) return false; else { if (EoP <= EoP_C1) return false; else return true; } } }