11 std::cout << X << std::endl; \ 59 for (
int i = 1;
i <= 100;
i++)
60 for (
int j = 1;
j <= 100;
j++) {
76 for (
int i = 1;
i <= 171;
i++) {
79 for (
int j = 1;
j <= 360;
j++) {
104 for (
int i = 1;
i <= 171;
i++)
105 for (
int j = 1;
j <= 360;
j++) {
109 for (
int i = 1;
i <= 100;
i++)
110 for (
int j = 1;
j <= 100;
j++) {
206 for (std::vector<DetId>::iterator
i = EBids.begin();
i != EBids.end();
i++) {
213 int Crystal_ieta = EcalID.
ieta();
214 int Crystal_iphi = EcalID.iphi();
215 double Crystal_eta = cell->getPosition().eta();
216 double Crystal_phi = cell->getPosition().phi();
221 DEBUG(
" ieta, iphi = " << Crystal_ieta <<
", " << Crystal_iphi);
222 DEBUG(
" eta, phi = " << cell->getPosition().eta() <<
", " << cell->getPosition().phi());
229 for (std::vector<DetId>::iterator
i = EEids.begin();
i != EEids.end();
i++) {
234 int Crystal_zside = EcalID.
zside();
235 int Crystal_ix = EcalID.ix();
236 int Crystal_iy = EcalID.iy();
237 Float_t ix_ = Crystal_ix - 50.5;
238 Float_t iy_ = Crystal_iy - 50.5;
239 Int_t ir = (Int_t)
sqrt(ix_ * ix_ + iy_ * iy_);
243 double Crystal_x = cell->getPosition().x();
244 double Crystal_y = cell->getPosition().y();
245 double Crystal_z = cell->getPosition().z();
247 if (Crystal_zside == -1) {
254 if (Crystal_zside == 1) {
262 DEBUG(
" side = " << Crystal_zside);
263 DEBUG(
" ix, iy = " << Crystal_ix <<
", " << Crystal_iy);
264 DEBUG(
" x, y = " << Crystal_x <<
", " << Crystal_y);
272 int ieta_ = 86 +
ieta;
283 double deta = fabs(
eta - etam1);
305 DEBUG(
"Got ECALRecHits");
309 DEBUG(
"Got Geometry");
311 TLorentzVector vEBMET_EtaRing[171];
312 int EBActiveRing[171];
313 int EBNActiveCells[171];
314 double EBSET_EtaRing[171];
315 double EBMaxEnergy_EtaRing[171];
316 double EBMinEnergy_EtaRing[171];
317 double EBenergy_EtaRing[171];
319 for (
int i = 0;
i < 171;
i++) {
321 EBNActiveCells[
i] = 0;
322 EBSET_EtaRing[
i] = 0.0;
323 EBMaxEnergy_EtaRing[
i] = -999;
324 EBMinEnergy_EtaRing[
i] = 14E3;
325 EBenergy_EtaRing[
i] = 0.0;
328 edm::LogInfo(
"OutputInfo") <<
"Looping over EB" << std::endl;
335 double Energy = ebrechit->energy();
338 int EtaRing = 85 +
ieta;
345 if (
Energy > EBMaxEnergy_EtaRing[EtaRing])
346 EBMaxEnergy_EtaRing[EtaRing] =
Energy;
347 if (
Energy < EBMinEnergy_EtaRing[EtaRing])
348 EBMinEnergy_EtaRing[EtaRing] =
Energy;
351 EBActiveRing[EtaRing] = 1;
352 EBNActiveCells[EtaRing]++;
353 EBSET_EtaRing[EtaRing] +=
ET;
354 v_.SetPtEtaPhiE(
ET, 0,
phi,
ET);
355 vEBMET_EtaRing[EtaRing] -= v_;
356 EBenergy_EtaRing[EtaRing] +=
Energy;
363 if (Energy < hEB_Minenergy_ieta_iphi->getBinContent(EtaRing + 1,
iphi))
368 for (
int iEtaRing = 0; iEtaRing < 171; iEtaRing++) {
372 if (EBActiveRing[iEtaRing]) {
383 TLorentzVector vEEpZMET_EtaRing[101];
384 int EEpZActiveRing[101];
385 int EEpZNActiveCells[101];
386 double EEpZSET_EtaRing[101];
387 double EEpZMaxEnergy_EtaRing[101];
388 double EEpZMinEnergy_EtaRing[101];
390 TLorentzVector vEEmZMET_EtaRing[101];
391 int EEmZActiveRing[101];
392 int EEmZNActiveCells[101];
393 double EEmZSET_EtaRing[101];
394 double EEmZMaxEnergy_EtaRing[101];
395 double EEmZMinEnergy_EtaRing[101];
397 for (
int i = 0;
i < 101;
i++) {
398 EEpZActiveRing[
i] = 0;
399 EEpZNActiveCells[
i] = 0;
400 EEpZSET_EtaRing[
i] = 0.0;
401 EEpZMaxEnergy_EtaRing[
i] = -999;
402 EEpZMinEnergy_EtaRing[
i] = 14E3;
404 EEmZActiveRing[
i] = 0;
405 EEmZNActiveCells[
i] = 0;
406 EEmZSET_EtaRing[
i] = 0.0;
407 EEmZMaxEnergy_EtaRing[
i] = -999;
408 EEmZMinEnergy_EtaRing[
i] = 14E3;
411 edm::LogInfo(
"OutputInfo") <<
"Looping over EE" << std::endl;
416 double Energy = eerechit->energy();
430 int Crystal_zside = det.
zside();
432 if (Crystal_zside == -1) {
438 if (Crystal_zside == 1) {
444 TVector3 pos_vector(
x,
y,
z);
445 phi = pos_vector.Phi();
446 theta = pos_vector.Theta();
450 if (Crystal_zside == -1) {
452 EEmZActiveRing[ir] = 1;
453 EEmZNActiveCells[ir]++;
454 EEmZSET_EtaRing[ir] +=
ET;
455 v_.SetPtEtaPhiE(
ET, 0,
phi,
ET);
456 vEEmZMET_EtaRing[ir] -= v_;
462 if (
Energy > EEmZMaxEnergy_EtaRing[ir])
463 EEmZMaxEnergy_EtaRing[ir] =
Energy;
464 if (
Energy < EEmZMinEnergy_EtaRing[ir])
465 EEmZMinEnergy_EtaRing[ir] =
Energy;
469 if (Energy < hEEmZ_Minenergy_ix_iy->getBinContent(ix, iy))
472 if (Crystal_zside == 1) {
474 EEpZActiveRing[ir] = 1;
475 EEpZNActiveCells[ir]++;
476 EEpZSET_EtaRing[ir] +=
ET;
477 v_.SetPtEtaPhiE(
ET, 0,
phi,
ET);
478 vEEpZMET_EtaRing[ir] -= v_;
484 if (
Energy > EEpZMaxEnergy_EtaRing[ir])
485 EEpZMaxEnergy_EtaRing[ir] =
Energy;
486 if (
Energy < EEpZMinEnergy_EtaRing[ir])
487 EEpZMinEnergy_EtaRing[ir] =
Energy;
490 if (Energy < hEEpZ_Minenergy_ix_iy->getBinContent(ix, iy))
494 edm::LogInfo(
"OutputInfo") <<
"Done Looping over EE" << std::endl;
495 for (
int iEtaRing = 0; iEtaRing < 101; iEtaRing++) {
501 if (EEpZActiveRing[iEtaRing]) {
510 if (EEmZActiveRing[iEtaRing]) {
MonitorElement * hEB_Maxenergyvsieta
T getParameter(std::string const &) const
MonitorElement * hEB_MExvsieta
MonitorElement * hEEmZ_ix_iy_dxMap
MonitorElement * hEEmZ_Occvsir
MonitorElement * hEEpZ_METPhivsir
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
MonitorElement * hEEmZ_METvsir
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * hEEpZ_METvsir
int iphi() const
get the crystal iphi
MonitorElement * hEB_Maxenergy_ieta_iphi
MonitorElement * hEB_METvsieta
MonitorElement * hEEpZ_ix_iy_irMap
MonitorElement * hEB_Occvsieta
std::vector< EcalRecHit >::const_iterator const_iterator
MonitorElement * hEB_energyvsieta
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * hEEpZ_ix_iy_zMap
MonitorElement * hEEpZ_Maxenergy_ix_iy
MonitorElement * hEB_METPhivsieta
MonitorElement * hEEmZ_Minenergyvsir
int ieta() const
get the crystal ieta
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * hEEmZ_energy_ix_iy
MonitorElement * hEEmZ_energyvsir
MonitorElement * hEEmZ_ix_iy_dyMap
MonitorElement * hEEmZ_Occ_ix_iy
MonitorElement * hECAL_Nevents
MonitorElement * hEB_ieta_dphiMap
MonitorElement * hEEmZ_Maxenergyvsir
MonitorElement * hEEmZ_SETvsir
const CaloGeometry * caloGeom_
MonitorElement * hEB_Occ_ieta_iphi
MonitorElement * hEEpZ_Minenergyvsir
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeomToken_
MonitorElement * hEEpZ_Minenergy_ix_iy
MonitorElement * hEB_Minenergy_ieta_iphi
MonitorElement * hEEmZ_METPhivsir
MonitorElement * hEEmZ_MEyvsir
MonitorElement * hEEpZ_energyvsir
void FillGeometry(const edm::EventSetup &)
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
MonitorElement * hEEpZ_ix_iy_dyMap
MonitorElement * hEB_ieta_detaMap
MonitorElement * hEEmZ_Minenergy_ix_iy
MonitorElement * hEB_energy_ieta_iphi
MonitorElement * hEB_MEyvsieta
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
MonitorElement * hEB_Minenergyvsieta
ECALRecHitAnalyzer(const edm::ParameterSet &)
Log< level::Info, false > LogInfo
MonitorElement * hEEpZ_ix_iy_yMap
MonitorElement * hEEmZ_ix_iy_zMap
MonitorElement * hEEmZ_Maxenergy_ix_iy
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
virtual void dqmbeginRun(const edm::Run &, const edm::EventSetup &)
MonitorElement * hEB_ieta_iphi_etaMap
MonitorElement * hEEpZ_SETvsir
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * hEEpZ_Maxenergyvsir
MonitorElement * hEEmZ_MExvsir
MonitorElement * hEEmZ_ix_iy_yMap
MonitorElement * hEEmZ_ix_iy_xMap
MonitorElement * hEEpZ_MEyvsir
void WriteECALRecHits(const edm::Event &, const edm::EventSetup &)
MonitorElement * hEB_SETvsieta
MonitorElement * hEEpZ_MExvsir
MonitorElement * hEEpZ_Occvsir
MonitorElement * hEEpZ_energy_ix_iy
MonitorElement * hEEpZ_Occ_ix_iy
MonitorElement * hEEmZ_ix_iy_irMap
edm::EDGetTokenT< EERecHitCollection > EERecHitsLabel_
MonitorElement * hEB_ieta_iphi_phiMap
MonitorElement * hEEpZ_ix_iy_xMap
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Geom::Theta< T > theta() const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
edm::EDGetTokenT< EBRecHitCollection > EBRecHitsLabel_
void analyze(const edm::Event &, const edm::EventSetup &) override
virtual double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * hEEpZ_ix_iy_dxMap