56 bool acceptedtot =
false;
57 bool acceptedEcal =
false;
58 bool acceptedHcal =
false;
61 int irun = iEvent.
id().
run();
78 if ( EBRecHitCollection_.label() !=
"" && EBRecHitCollection_.instance() !=
"" )
80 iEvent.
getByLabel( EBRecHitCollection_, pEBRecHits);
83 EBRecHits = pEBRecHits.
product();
87 edm::LogError(
"EcalRecHitError") <<
"Error! can't get the product " << EBRecHitCollection_.label() ;
91 if ( EERecHitCollection_.label() !=
"" && EERecHitCollection_.instance() !=
"" )
93 iEvent.
getByLabel( EERecHitCollection_, pEERecHits);
97 EERecHits = pEERecHits.
product();
101 edm::LogError(
"EcalRecHitError") <<
"Error! can't get the product " << EERecHitCollection_.label() ;
105 if ( HBHERecHitCollection_.label() !=
"" )
107 iEvent.
getByLabel( HBHERecHitCollection_, pHBHERecHits);
111 HBHERecHits = pHBHERecHits.
product();
115 edm::LogError(
"HcalRecHitError") <<
"Error! can't get the product " << HBHERecHitCollection_.label() ;
124 totene+=it->energy();
125 ecalene+=it->energy();
132 totene+=it->energy();
133 ecalene+=it->energy();
140 totene+=it->energy();
141 hcalene+=it->energy();
145 if(totene>EnergyCutTot) acceptedtot=
true;
146 if(ecalene>EnergyCutEcal) acceptedEcal=
true;
147 if(hcalene>EnergyCutHcal) acceptedHcal=
true;
149 accepted = acceptedtot|acceptedEcal|acceptedHcal;
154 edm::LogVerbatim(
"BeamSplash") <<
"!!!!!!!BeamSplash!!!!!!!: run:" << irun <<
" event:" << ievt <<
" ls:"<< ils <<
" bx= " << ibx <<
" totene=" << totene <<
" ecalene=" << ecalene <<
" hcalene=" << hcalene ;
155 std::cout <<
"!!!!!!!BeamSplash!!!!!!!: run:" << irun <<
" event:" << ievt <<
" ls:"<< ils <<
" bx= " << ibx <<
" totene=" <<totene <<
" ecalene=" << ecalene <<
" hcalene=" << hcalene << std::endl;
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< EcalRecHit >::const_iterator const_iterator
int bunchCrossing() const
edm::LuminosityBlockNumber_t luminosityBlock() const
#define DEFINE_FWK_MODULE(type)
bool filter(edm::Event &, const edm::EventSetup &) override
BeamSplash(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const_iterator end() const
T const * product() const
bool accepted(std::vector< std::string_view > const &, std::string_view)
const_iterator begin() const