73 bool differenceFound =
false;
75 for (
size_t iTau1 = 0; iTau1 < taus1->size(); ++iTau1) {
80 double bestDeltaR = -1;
81 for (
size_t iTau2 = 0; iTau2 < taus2->size(); ++iTau2) {
85 double deltaRVal =
deltaR(jet2->p4(), jet1->p4());
86 if (bestMatch.
isNull() || deltaRVal < bestDeltaR) {
88 bestDeltaR = deltaRVal;
92 bool result1 = ((*disc1)[tau1] > 0.5);
93 bool result2 = ((*disc2)[bestMatch] > 0.5);
96 if (result1 ^ result2) {
97 differenceFound =
true;
101 std::cout <<
"********* RecoTau difference detected! *************"
103 std::cout <<
" Tau1 InputTag: " <<
src1_ <<
" result: " << result1
105 std::cout <<
" Tau2 InputTag: " <<
src2_ <<
" result: " << result2
107 std::cout <<
"--------- Tau 1 -------------"
111 std::cout <<
"--------- Tau 2 -------------"
117 return (
filter_ ? differenceFound :
true);
121 std::cout <<
" RECO TAU DIFFERENCE SUMMARY: " << std::endl;
127 <<
passed1_ <<
" exclusive passes." << std::endl;
130 <<
passed2_ <<
" exclusive passes." << std::endl;
T getParameter(std::string const &) const
RecoTauDifferenceAnalyzer(const edm::ParameterSet &pset)
const PFJetRef & jetRef() const
#define DEFINE_FWK_MODULE(type)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
bool isNonnull() const
Checks for non-null.
bool isNull() const
Checks for null.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
const PFTauTagInfoRef & pfTauTagInfoRef() const
virtual ~RecoTauDifferenceAnalyzer()
virtual bool filter(edm::Event &evt, const edm::EventSetup &es)