CMS 3D CMS Logo

Classes | Functions
L1TCaloParamsCompare.cc File Reference
#include <vector>
#include "CondFormats/L1TObjects/interface/CaloParams.h"

Go to the source code of this file.

Classes

class  CaloParams_PUBLIC
 
class  LUT_PUBLIC
 

Functions

bool operator== (const l1t::CaloParams &b1, const l1t::CaloParams &b2)
 
bool operator== (const l1t::CaloParams::Node &a1, const l1t::CaloParams::Node &a2)
 
bool operator== (const l1t::CaloParams::TowerParams &a1, const l1t::CaloParams::TowerParams &a2)
 
bool operator== (const l1t::LUT &b1, const l1t::LUT &b2)
 
bool operator== (const std::vector< int > &a1, const std::vector< int > &a2)
 
bool operator== (const std::vector< l1t::CaloParams::Node > &a1, const std::vector< l1t::CaloParams::Node > &a2)
 

Function Documentation

◆ operator==() [1/6]

bool operator== ( const l1t::CaloParams b1,
const l1t::CaloParams b2 
)

Definition at line 110 of file L1TCaloParamsCompare.cc.

110  {
111  CaloParams_PUBLIC a1(b1);
113 
114  bool v = (a1.version_ == a2.version_);
115  std::cout << " version_: " << v << std::endl;
116 
117  bool pn = (a1.pnode_[1] == a2.pnode_[1]);
118  std::cout << " pnode_: " << pn << std::endl;
119 
120  bool tp = (a1.towerp_ == a2.towerp_);
121  std::cout << " towerp_: " << tp << std::endl;
122  bool rlsb = (a1.regionLsb_ == a2.regionLsb_);
123  std::cout << " regionLsb_: " << rlsb << std::endl;
124 
125  bool egp =
126  ((a1.egp_.lsb_ == a2.egp_.lsb_) && (a1.egp_.seedThreshold_ == a2.egp_.seedThreshold_) &&
127  (a1.egp_.neighbourThreshold_ == a2.egp_.neighbourThreshold_) &&
128  (a1.egp_.hcalThreshold_ == a2.egp_.hcalThreshold_) && (a1.egp_.maxHcalEt_ == a2.egp_.maxHcalEt_) &&
129  (a1.egp_.maxPtHOverE_ == a2.egp_.maxPtHOverE_) && (a1.egp_.minPtJetIsolation_ == a2.egp_.minPtJetIsolation_) &&
130  (a1.egp_.maxPtJetIsolation_ == a2.egp_.maxPtJetIsolation_) &&
131  (a1.egp_.isoAreaNrTowersEta_ == a2.egp_.isoAreaNrTowersEta_) &&
132  (a1.egp_.isoAreaNrTowersPhi_ == a2.egp_.isoAreaNrTowersPhi_) &&
133  (a1.egp_.isoVetoNrTowersPhi_ == a2.egp_.isoVetoNrTowersPhi_));
134  std::cout << " egp_: " << egp << std::endl;
135 
136  bool taup =
137  ((a1.taup_.lsb_ == a2.taup_.lsb_) && (a1.taup_.seedThreshold_ == a2.taup_.seedThreshold_) &&
138  (a1.taup_.neighbourThreshold_ == a2.taup_.neighbourThreshold_) &&
139  (a1.taup_.maxPtTauVeto_ == a2.taup_.maxPtTauVeto_) &&
140  (a1.taup_.minPtJetIsolationB_ == a2.taup_.minPtJetIsolationB_) &&
141  (a1.taup_.maxJetIsolationB_ == a2.taup_.maxJetIsolationB_) &&
142  (a1.taup_.maxJetIsolationA_ == a2.taup_.maxJetIsolationA_) && (a1.taup_.isoEtaMin_ == a2.taup_.isoEtaMin_) &&
143  (a1.taup_.isoEtaMax_ == a2.taup_.isoEtaMax_) && (a1.taup_.isoAreaNrTowersEta_ == a2.taup_.isoAreaNrTowersEta_) &&
144  (a1.taup_.isoAreaNrTowersPhi_ == a2.taup_.isoAreaNrTowersPhi_) &&
145  (a1.taup_.isoVetoNrTowersPhi_ == a2.taup_.isoVetoNrTowersPhi_));
146  std::cout << " taup_: " << taup << std::endl;
147 
148  bool jetp = ((a1.jetp_.lsb_ == a2.jetp_.lsb_) && (a1.jetp_.seedThreshold_ == a2.jetp_.seedThreshold_) &&
149  (a1.jetp_.neighbourThreshold_ == a2.jetp_.neighbourThreshold_));
150  std::cout << " jetp_: " << jetp << std::endl;
151 
152  bool etslsb = (a1.etSumLsb_ == a2.etSumLsb_);
153  std::cout << " etSumLsb_: " << etslsb << std::endl;
154  bool etsemn = (a1.etSumEtaMin_ == a2.etSumEtaMin_);
155  std::cout << " etSumEtaMin_: " << etsemn << std::endl;
156 
157  bool etsemx = (a1.etSumEtaMax_ == a2.etSumEtaMax_);
158  std::cout << " etSumEtaMax_: " << etsemx << std::endl;
159  bool sett = (a1.etSumEtThreshold_ == a2.etSumEtThreshold_);
160  std::cout << " etSumEtThreshold_: " << sett << std::endl;
161 
162  return v && pn && tp && rlsb && egp && taup && jetp && etslsb && etsemn && etsemx && sett;
163 }

References testProducerWithPsetDescEmpty_cfi::a2, b1, b2, gather_cfg::cout, CaloParams_PUBLIC::egp_, CaloParams_PUBLIC::etSumEtaMax_, CaloParams_PUBLIC::etSumEtaMin_, CaloParams_PUBLIC::etSumEtThreshold_, CaloParams_PUBLIC::etSumLsb_, l1t::CaloParams::TauParams::isoAreaNrTowersEta_, l1t::CaloParams::TauParams::isoAreaNrTowersPhi_, l1t::CaloParams::TauParams::isoEtaMax_, l1t::CaloParams::TauParams::isoEtaMin_, l1t::CaloParams::TauParams::isoVetoNrTowersPhi_, CaloParams_PUBLIC::jetp_, l1t::CaloParams::TauParams::lsb_, l1t::CaloParams::TauParams::maxJetIsolationA_, l1t::CaloParams::TauParams::maxJetIsolationB_, l1t::CaloParams::TauParams::maxPtTauVeto_, l1t::CaloParams::TauParams::minPtJetIsolationB_, l1t::CaloParams::TauParams::neighbourThreshold_, CaloParams_PUBLIC::pnode_, CaloParams_PUBLIC::regionLsb_, l1t::CaloParams::TauParams::seedThreshold_, CaloParams_PUBLIC::taup_, CaloParams_PUBLIC::towerp_, cmsswSequenceInfo::tp, findQualityFiles::v, and CaloParams_PUBLIC::version_.

◆ operator==() [2/6]

bool operator== ( const l1t::CaloParams::Node a1,
const l1t::CaloParams::Node a2 
)

Definition at line 87 of file L1TCaloParamsCompare.cc.

87  {
88  bool t = (a1.type_ == a2.type_);
89  bool v = (a1.version_ == a2.version_);
90  bool l = (a1.LUT_ == a2.LUT_);
91  bool d = (a1.dparams_ == a2.dparams_);
92  bool u = (a1.uparams_ == a2.uparams_);
93  bool i = (a1.iparams_ == a2.iparams_);
94  bool s = (a1.sparams_ == a2.sparams_);
95  std::cout << "t=" << t << " v=" << v << " l=" << l << " d=" << d << " u=" << u << " i=" << i << " s=" << s
96  << std::endl;
97  return t && v && l && d && u && i && s;
98 }

References testProducerWithPsetDescEmpty_cfi::a2, gather_cfg::cout, ztail::d, l1t::CaloParams::Node::dparams_, mps_fire::i, l1t::CaloParams::Node::iparams_, cmsLHEtoEOSManager::l, l1t::CaloParams::Node::LUT_, alignCSCRings::s, l1t::CaloParams::Node::sparams_, submitPVValidationJobs::t, l1t::CaloParams::Node::type_, l1t::CaloParams::Node::uparams_, findQualityFiles::v, and l1t::CaloParams::Node::version_.

◆ operator==() [3/6]

bool operator== ( const l1t::CaloParams::TowerParams a1,
const l1t::CaloParams::TowerParams a2 
)

◆ operator==() [4/6]

bool operator== ( const l1t::LUT b1,
const l1t::LUT b2 
)

Definition at line 74 of file L1TCaloParamsCompare.cc.

74  {
75  const LUT_PUBLIC& a1 = reinterpret_cast<const LUT_PUBLIC&>(b1);
76  const LUT_PUBLIC& a2 = reinterpret_cast<const LUT_PUBLIC&>(b2);
77 
78  bool a = (a1.nrBitsAddress_ == a2.nrBitsAddress_);
79  bool d = (a1.nrBitsData_ == a2.nrBitsData_);
80  bool m = (a1.addressMask_ == a2.addressMask_);
81  bool mm = (a1.dataMask_ == a2.dataMask_);
82  bool v = (a1.data_ == a2.data_);
83  std::cout << "a=" << a << " d=" << d << " m=" << m << " mm=" << mm << " v=" << v << std::endl;
84  return a && d && m && mm && v;
85 }

References a, testProducerWithPsetDescEmpty_cfi::a2, LUT_PUBLIC::addressMask_, b1, b2, gather_cfg::cout, ztail::d, LUT_PUBLIC::data_, LUT_PUBLIC::dataMask_, visualization-live-secondInstance_cfg::m, LUT_PUBLIC::nrBitsAddress_, LUT_PUBLIC::nrBitsData_, and findQualityFiles::v.

◆ operator==() [5/6]

bool operator== ( const std::vector< int > &  a1,
const std::vector< int > &  a2 
)

Definition at line 58 of file L1TCaloParamsCompare.cc.

58  {
59  if (a1.size() != a2.size())
60  return false;
61  for (unsigned i = 0; i < a1.size(); i++)
62  if (a1[i] != a2[i])
63  return false;
64  return true;
65 }

References testProducerWithPsetDescEmpty_cfi::a2, and mps_fire::i.

◆ operator==() [6/6]

bool operator== ( const std::vector< l1t::CaloParams::Node > &  a1,
const std::vector< l1t::CaloParams::Node > &  a2 
)

Definition at line 100 of file L1TCaloParamsCompare.cc.

100  {
101  if (a1.size() != a2.size())
102  return false;
103  for (unsigned i = 0; i < a1.size(); i++) {
104  if (!(a1[i] == a2[i]))
105  return false;
106  }
107  return true;
108 }

References testProducerWithPsetDescEmpty_cfi::a2, and mps_fire::i.

l1t::CaloParams::TowerParams::lsbE_
double lsbE_
Definition: CaloParams.h:53
mps_fire.i
i
Definition: mps_fire.py:428
l1t::CaloParams::Node::sparams_
std::vector< std::string > sparams_
Definition: CaloParams.h:37
l1t::CaloParams::TowerParams::lsbH_
double lsbH_
Definition: CaloParams.h:50
l1t::CaloParams::Node::LUT_
l1t::LUT LUT_
Definition: CaloParams.h:33
l1t::CaloParams::Node::dparams_
std::vector< double > dparams_
Definition: CaloParams.h:34
l1t::CaloParams::TowerParams::nBitsE_
int nBitsE_
Definition: CaloParams.h:62
gather_cfg.cout
cout
Definition: gather_cfg.py:144
l1t::CaloParams::TowerParams::maskRatio_
int maskRatio_
Definition: CaloParams.h:80
LUT_PUBLIC::nrBitsData_
unsigned int nrBitsData_
Definition: L1TCaloParamsCompare.cc:51
LUT_PUBLIC::nrBitsAddress_
unsigned int nrBitsAddress_
Definition: L1TCaloParamsCompare.cc:50
findQualityFiles.v
v
Definition: findQualityFiles.py:179
l1t::CaloParams::TowerParams::nBitsRatio_
int nBitsRatio_
Definition: CaloParams.h:68
b2
static constexpr float b2
Definition: L1EGammaCrystalsEmulatorProducer.cc:83
l1t::CaloParams::Node::iparams_
std::vector< int > iparams_
Definition: CaloParams.h:36
l1t::CaloParams::TowerParams::maskE_
int maskE_
Definition: CaloParams.h:74
l1t::CaloParams::TowerParams::lsbSum_
double lsbSum_
Definition: CaloParams.h:56
testProducerWithPsetDescEmpty_cfi.a2
a2
Definition: testProducerWithPsetDescEmpty_cfi.py:35
l1t::CaloParams::Node::uparams_
std::vector< unsigned > uparams_
Definition: CaloParams.h:35
b1
static constexpr float b1
Definition: L1EGammaCrystalsEmulatorProducer.cc:83
alignCSCRings.s
s
Definition: alignCSCRings.py:92
LUT_PUBLIC::data_
std::vector< int > data_
Definition: L1TCaloParamsCompare.cc:55
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
CaloParams_PUBLIC
Definition: L1TCaloParamsCompare.cc:4
a
double a
Definition: hdecay.h:119
LUT_PUBLIC::addressMask_
unsigned int addressMask_
Definition: L1TCaloParamsCompare.cc:52
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
l1t::CaloParams::TowerParams::maskSum_
int maskSum_
Definition: CaloParams.h:77
l1t::CaloParams::Node::type_
std::string type_
Definition: CaloParams.h:31
l1t::CaloParams::Node::version_
unsigned version_
Definition: CaloParams.h:32
l1t::CaloParams::TowerParams::doEncoding_
bool doEncoding_
Definition: CaloParams.h:83
LUT_PUBLIC::dataMask_
unsigned int dataMask_
Definition: L1TCaloParamsCompare.cc:53
ztail.d
d
Definition: ztail.py:151
l1t::CaloParams::TowerParams::maskH_
int maskH_
Definition: CaloParams.h:71
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
l1t::CaloParams::TowerParams::nBitsSum_
int nBitsSum_
Definition: CaloParams.h:65
l1t::CaloParams::TowerParams::nBitsH_
int nBitsH_
Definition: CaloParams.h:59
LUT_PUBLIC
Definition: L1TCaloParamsCompare.cc:48