49 bool accepted =
false;
51 bool acceptedtot =
false;
52 bool acceptedEcal =
false;
53 bool acceptedHcal =
false;
55 int ievt =
iEvent.id().event();
56 int irun =
iEvent.id().run();
57 int ils =
iEvent.luminosityBlock();
58 int ibx =
iEvent.bunchCrossing();
72 if (!EBRecHitCollection_.label().empty() && !EBRecHitCollection_.instance().empty()) {
73 iEvent.getByLabel(EBRecHitCollection_, pEBRecHits);
77 edm::LogError(
"EcalRecHitError") <<
"Error! can't get the product " << EBRecHitCollection_.label();
81 if (!EERecHitCollection_.label().empty() && !EERecHitCollection_.instance().empty()) {
82 iEvent.getByLabel(EERecHitCollection_, pEERecHits);
87 edm::LogError(
"EcalRecHitError") <<
"Error! can't get the product " << EERecHitCollection_.label();
91 if (!HBHERecHitCollection_.label().empty()) {
92 iEvent.getByLabel(HBHERecHitCollection_, pHBHERecHits);
97 edm::LogError(
"HcalRecHitError") <<
"Error! can't get the product " << HBHERecHitCollection_.label();
104 totene +=
it->energy();
105 ecalene +=
it->energy();
110 totene +=
it->energy();
111 ecalene +=
it->energy();
116 totene +=
it->energy();
117 hcalene +=
it->energy();
121 if (totene > EnergyCutTot)
123 if (ecalene > EnergyCutEcal)
125 if (hcalene > EnergyCutHcal)
128 accepted = acceptedtot | acceptedEcal | acceptedHcal;
131 edm::LogVerbatim(
"BeamSplash") <<
"!!!!!!!BeamSplash!!!!!!!: run:" << irun <<
" event:" << ievt <<
" ls:" << ils
132 <<
" bx= " << ibx <<
" totene=" << totene <<
" ecalene=" << ecalene
133 <<
" hcalene=" << hcalene;
134 std::cout <<
"!!!!!!!BeamSplash!!!!!!!: run:" << irun <<
" event:" << ievt <<
" ls:" << ils <<
" bx= " << ibx
135 <<
" totene=" << totene <<
" ecalene=" << ecalene <<
" hcalene=" << hcalene << std::endl;
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
T const * product() const
std::vector< EcalRecHit >::const_iterator const_iterator
Log< level::Error, false > LogError
T getUntrackedParameter(std::string const &, T const &) const
bool filter(edm::Event &, const edm::EventSetup &) override
BeamSplash(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)