#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_track_eta (track with highest tau_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.026; HoP_C0 = 0.060; EoP_C0 = 0.868; TrtRatio_C0a = 0.227; TrtRatio_C0b = 0.108; TrtRatio_C0c = 0.151; HoP_C1 = 0.088; EoP_C1 = 0.102; } else if (qual == "medium") { TrkAvgDist_C0= 0.051; HoP_C0 = 0.090; EoP_C0 = 0.812; TrtRatio_C0a = 0.162; TrtRatio_C0b = 0.069; TrtRatio_C0c = 0.097; HoP_C1 = 0.195; EoP_C1 = 1.076; } else if (qual == "tight") { TrkAvgDist_C0= 0.096; HoP_C0 = 0.035; EoP_C0 = 0.104; TrtRatio_C0a = 0.107; TrtRatio_C0b = 0.254; TrtRatio_C0c = 0.085; HoP_C1 = 0.301; EoP_C1 = 2.550; } else if (qual == "tighter") { TrkAvgDist_C0= 0.096; HoP_C0 = 0.066; EoP_C0 = 0.103; TrtRatio_C0a = 0.098; TrtRatio_C0b = 0.708; TrtRatio_C0c = 0.056; HoP_C1 = 0.560; EoP_C1 = 1.582; } 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; } } }