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()) status = 1;
27  if (a.eta() != b.eta()) status = 1;
28  if (a.phi() != b.phi()) status = 1;
29 
30  if (status){
31  cout << "COMPARISON FAILURE: \n";
32  cout << "A: pt = " << a.pt() << " eta = " << a.eta() << " phi = " << a.phi() << "\n";
33  cout << "B: pt = " << b.pt() << " eta = " << b.eta() << " phi = " << b.phi() << "\n";
34  }
35 
36  if (a.hwPt() != b.hwPt()) status = 1;
37  if (a.hwEta() != b.hwEta()) status = 1;
38  if (a.hwPhi() != b.hwPhi()) status = 1;
39 
40  if (status){
41  cout << "COMPARISON FAILURE: \n";
42  cout << "A: hwPt = " << a.hwPt() << " hwEta = " << a.hwEta() << " hwPhi = " << a.hwPhi() << "\n";
43  cout << "B: hwPt = " << b.hwPt() << " hwEta = " << b.hwEta() << " hwPhi = " << b.hwPhi() << "\n";
44  }
45 
46  if (a.hwQual() != b.hwQual()) status = 1;
47  if (a.hwIso() != b.hwIso()) status = 1;
48  if (status){
49  cout << "COMPARISON FAILURE: \n";
50  cout << "A: hwQual = " << a.hwQual() << " hwIso = " << a.hwIso() << "\n";
51  cout << "B: hwQual = " << b.hwQual() << " hwIso = " << b.hwIso() << "\n";
52  }
53 
54 
55 
56  return status;
57 }
double eta() const final
momentum pseudorapidity
double pt() const final
transverse momentum
int hwPhi() const
Definition: L1Candidate.h:50
int hwIso() const
Definition: L1Candidate.h:52
int hwEta() const
Definition: L1Candidate.h:49
int hwQual() const
Definition: L1Candidate.h:51
int hwPt() const
Definition: L1Candidate.h:48
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