CMS 3D CMS Logo

Classes | Functions
L1TComparison.cc File Reference
#include <iostream>
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "DataFormats/L1Trigger/interface/EGamma.h"
#include "DataFormats/L1Trigger/interface/Tau.h"
#include "DataFormats/L1Trigger/interface/Jet.h"
#include "DataFormats/L1Trigger/interface/Muon.h"
#include "DataFormats/L1Trigger/interface/EtSum.h"
#include "DataFormats/L1TGlobal/interface/GlobalAlgBlk.h"

Go to the source code of this file.

Classes

class  L1TComparison
 

Functions

static bool compare_l1candidate (const L1Candidate &a, const L1Candidate &b, int verbose=1)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< L1TComparison > > s_filler__LINE__ ("L1TComparison")
 
static const edm::MakerPluginFactory::PMaker< edm::WorkerMaker< L1TComparison > > s_maker__LINE__ ("L1TComparison")
 

Function Documentation

static bool compare_l1candidate ( const L1Candidate a,
const L1Candidate b,
int  verbose = 1 
)
static

Definition at line 24 of file L1TComparison.cc.

References gather_cfg::cout, reco::LeafCandidate::eta(), l1t::L1Candidate::hwEta(), l1t::L1Candidate::hwIso(), l1t::L1Candidate::hwPhi(), l1t::L1Candidate::hwPt(), l1t::L1Candidate::hwQual(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), and mps_update::status.

Referenced by L1TComparison::analyze().

24  {
25  int status = 0;
26  if (a.pt() != b.pt())
27  status = 1;
28  if (a.eta() != b.eta())
29  status = 1;
30  if (a.phi() != b.phi())
31  status = 1;
32 
33  if (status) {
34  cout << "COMPARISON FAILURE: \n";
35  cout << "A: pt = " << a.pt() << " eta = " << a.eta() << " phi = " << a.phi() << "\n";
36  cout << "B: pt = " << b.pt() << " eta = " << b.eta() << " phi = " << b.phi() << "\n";
37  }
38 
39  if (a.hwPt() != b.hwPt())
40  status = 1;
41  if (a.hwEta() != b.hwEta())
42  status = 1;
43  if (a.hwPhi() != b.hwPhi())
44  status = 1;
45 
46  if (status) {
47  cout << "COMPARISON FAILURE: \n";
48  cout << "A: hwPt = " << a.hwPt() << " hwEta = " << a.hwEta() << " hwPhi = " << a.hwPhi() << "\n";
49  cout << "B: hwPt = " << b.hwPt() << " hwEta = " << b.hwEta() << " hwPhi = " << b.hwPhi() << "\n";
50  }
51 
52  if (a.hwQual() != b.hwQual())
53  status = 1;
54  if (a.hwIso() != b.hwIso())
55  status = 1;
56  if (status) {
57  cout << "COMPARISON FAILURE: \n";
58  cout << "A: hwQual = " << a.hwQual() << " hwIso = " << a.hwIso() << "\n";
59  cout << "B: hwQual = " << b.hwQual() << " hwIso = " << b.hwIso() << "\n";
60  }
61 
62  return status;
63 }
double eta() const final
momentum pseudorapidity
double pt() const final
transverse momentum
int hwPhi() const
Definition: L1Candidate.h:37
int hwIso() const
Definition: L1Candidate.h:39
int hwEta() const
Definition: L1Candidate.h:36
int hwQual() const
Definition: L1Candidate.h:38
int hwPt() const
Definition: L1Candidate.h:35
double phi() const final
momentum azimuthal angle
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< L1TComparison > > s_filler__LINE__ ( "L1TComparison"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< L1TComparison > > s_maker__LINE__ ( "L1TComparison"  )
static