25 :
public edm::global::EDAnalyzer<edm::RunCache<cgra::DummyCache>, edm::LuminosityBlockCache<cgra::DummyCache>> {
77 return std::shared_ptr<cgra::DummyCache>();
84 if (not
prod1.isProductEqual(prod2)) {
85 throw cms::Exception(
"ComparisonFailure") <<
"The GenRunInfoProducts are different";
94 if (
prod1.randomConfigIndex() != prod2.randomConfigIndex()) {
95 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoHeaders have different randomConfigIndex "
96 <<
prod1.randomConfigIndex() <<
" " << prod2.randomConfigIndex();
99 if (
prod1.configDescription() != prod2.configDescription()) {
100 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoHeaders have different configDescription "
101 <<
prod1.configDescription() <<
" " << prod2.configDescription();
104 if (
prod1.lheHeaders().size() != prod2.lheHeaders().size()) {
105 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoHeaders have different lheHeaders "
106 <<
prod1.lheHeaders().size() <<
" " << prod2.lheHeaders().size();
109 if (
prod1.weightNames().size() != prod2.weightNames().size()) {
110 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoHeaders have different weightNames "
111 <<
prod1.weightNames().size() <<
" " << prod2.weightNames().size();
114 return std::shared_ptr<cgra::DummyCache>();
121 bool allowXSecDifferences) {
123 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
128 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
133 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
138 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
143 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
148 if (allowXSecDifferences) {
150 <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex <<
"] lheXSec.error "
154 <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex <<
"] lheXSec.error "
160 if (allowXSecDifferences) {
163 <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex <<
"] lheXSec.value "
167 <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex <<
"] lheXSec.value "
173 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
174 <<
"] tried.n " << p1.
tried().
n() <<
" " << p2.
tried().
n();
178 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
183 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
188 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
194 <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex <<
"] selected.sum "
200 <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex <<
"] selected.sum2 "
205 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
210 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
215 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
220 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex
226 <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex <<
"] accepted.sum "
232 <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex <<
"] accepted.sum2 "
238 <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex <<
"] acceptedBr.n "
244 <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex <<
"] acceptedZBr.sum "
250 <<
"The GenLumiInfoProducts have different getProcessInfos()[" << iIndex <<
"] acceptedBr.sum2 "
261 if (not
prod1.isProductEqual(prod2)) {
262 if (
prod1.getHEPIDWTUP() !=
prod1.getHEPIDWTUP()) {
263 throw cms::Exception(
"ComparisonFailure") <<
"The GenLumiInfoProducts have different getHEPIDWTUP "
264 <<
prod1.getHEPIDWTUP() <<
" " << prod2.getHEPIDWTUP();
267 if (
prod1.getProcessInfos().size() != prod2.getProcessInfos().size()) {
269 <<
"The GenLumiInfoHeaders have different getProcessInfos " <<
prod1.getProcessInfos().size() <<
" "
270 << prod2.getProcessInfos().size();
273 for (
size_t i = 0;
i <
prod1.getProcessInfos().size(); ++
i) {
278 throw cms::Exception(
"ComparisionFailure") <<
"The GenLumiInfoProducts are different";
286 throw cms::Exception(
"ComparisonFailure") <<
"The GenEventInfoProducts have different weights "
291 throw cms::Exception(
"ComparisonFailure") <<
"The GenEventInfoProducts have different binningValues "
296 throw cms::Exception(
"ComparisonFailure") <<
"The GenEventInfoProducts have different DJRValues "
301 throw cms::Exception(
"ComparisonFailure") <<
"The GenEventInfoProducts have different signalProcessID "
307 <<
"The GenEventInfoProducts have different qScale " << prod1.
qScale() <<
" " << prod2.
qScale();
312 <<
"The GenEventInfoProducts have different alphaQCD " << prod1.
alphaQCD() <<
" " << prod2.
alphaQCD();
317 <<
"The GenEventInfoProducts have different alphaQED " << prod1.
alphaQED() <<
" " << prod2.
alphaQED();
322 <<
"The GenEventInfoProducts have different nMEPartons " << prod1.
nMEPartons() <<
" " << prod2.
nMEPartons();
326 throw cms::Exception(
"ComparisonFailure") <<
"The GenEventInfoProducts have different nMEPartonsFiltered "
332 if (prod1.signal_process_id() != prod2.signal_process_id()) {
333 throw cms::Exception(
"ComparisonFailure") <<
"The HepMCProducts have different signal_process_id "
334 << prod1.signal_process_id() <<
" " << prod2.signal_process_id();
337 if (prod1.vertices_size() != prod2.vertices_size()) {
338 throw cms::Exception(
"ComparisonFailure") <<
"The HepMCProducts have different vertices_size() "
339 << prod1.vertices_size() <<
" " << prod2.vertices_size();
342 if (prod1.particles_size() != prod2.particles_size()) {
343 throw cms::Exception(
"ComparisonFailure") <<
"The HepMCProducts have different particles_size() "
344 << prod1.particles_size() <<
" " << prod2.particles_size();
358 compare(hepmc1.getHepMCData(), hepmc2.getHepMCData());
edm::EDGetTokenT< GenLumiInfoHeader > lumiHeaderToken1_
T getUntrackedParameter(std::string const &, T const &) const
bool compare(const P &i, const P &j)
unsigned int nTotalNeg() const
const std::vector< double > & binningValues() const
PROD const & get(EDGetTokenT< PROD > token) const noexcept(false)
void globalEndRun(edm::Run const &, edm::EventSetup const &) const override
edm::EDGetTokenT< GenLumiInfoHeader > lumiHeaderToken2_
#define DEFINE_FWK_MODULE(type)
unsigned int nPassPos() const
edm::EDGetTokenT< GenLumiInfoProduct > lumiProductToken2_
const std::vector< float > & DJRValues() const
CompareGeneratorResultsAnalyzer(edm::ParameterSet const &)
std::shared_ptr< cgra::DummyCache > globalBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const override
edm::EDGetTokenT< GenEventInfoProduct > evToken2_
edm::EDGetTokenT< edm::HepMCProduct > hepMCToken2_
unsigned int nPassNeg() const
FinalStat const & tried() const
XSec const & lheXSec() const
edm::EDGetTokenT< GenEventInfoProduct > evToken1_
bool get(ProductID const &oid, Handle< PROD > &result) const
FinalStat const & killed() const
PROD const & get(EDGetTokenT< PROD > token) const noexcept(false)
edm::EDGetTokenT< GenRunInfoProduct > runProductToken1_
std::shared_ptr< cgra::DummyCache > globalBeginRun(edm::Run const &, edm::EventSetup const &) const override
edm::EDGetTokenT< GenLumiInfoProduct > lumiProductToken1_
bool allowXSecDifferences_
std::vector< double > & weights()
int nMEPartonsFiltered() const
edm::EDGetTokenT< edm::HepMCProduct > hepMCToken1_
FinalStat const & accepted() const
FinalStat const & acceptedBr() const
unsigned int signalProcessID() const
Log< level::Warning, false > LogWarning
unsigned int nTotalPos() const
void analyze(edm::StreamID, edm::Event const &, edm::EventSetup const &) const override
edm::EDGetTokenT< GenRunInfoProduct > runProductToken2_
void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const override
FinalStat const & selected() const