11 std::cout << X << std::endl; \ 57 for (
int i = 1;
i <= 100;
i++)
58 for (
int j = 1;
j <= 100;
j++) {
74 for (
int i = 1;
i <= 171;
i++) {
77 for (
int j = 1;
j <= 360;
j++) {
102 for (
int i = 1;
i <= 171;
i++)
103 for (
int j = 1;
j <= 360;
j++) {
107 for (
int i = 1;
i <= 100;
i++)
108 for (
int j = 1;
j <= 100;
j++) {
208 for (std::vector<DetId>::iterator
i = EBids.begin();
i != EBids.end();
i++) {
215 int Crystal_ieta = EcalID.
ieta();
216 int Crystal_iphi = EcalID.iphi();
217 double Crystal_eta = cell->getPosition().eta();
218 double Crystal_phi = cell->getPosition().phi();
222 DEBUG(
" Crystal " << n);
223 DEBUG(
" ieta, iphi = " << Crystal_ieta <<
", " << Crystal_iphi);
224 DEBUG(
" eta, phi = " << cell->getPosition().eta() <<
", " << cell->getPosition().phi());
231 for (std::vector<DetId>::iterator
i = EEids.begin();
i != EEids.end();
i++) {
236 int Crystal_zside = EcalID.
zside();
237 int Crystal_ix = EcalID.ix();
238 int Crystal_iy = EcalID.iy();
239 Float_t ix_ = Crystal_ix - 50.5;
240 Float_t iy_ = Crystal_iy - 50.5;
241 Int_t ir = (Int_t)
sqrt(ix_ * ix_ + iy_ * iy_);
245 double Crystal_x = cell->getPosition().x();
246 double Crystal_y = cell->getPosition().y();
247 double Crystal_z = cell->getPosition().z();
249 if (Crystal_zside == -1) {
256 if (Crystal_zside == 1) {
263 DEBUG(
" Crystal " << n);
264 DEBUG(
" side = " << Crystal_zside);
265 DEBUG(
" ix, iy = " << Crystal_ix <<
", " << Crystal_iy);
266 DEBUG(
" x, y = " << Crystal_x <<
", " << Crystal_y);
272 double currentLowEdge_eta = 0;
275 int ieta_ = 86 +
ieta;
286 double deta = fabs(eta - etam1);
289 currentLowEdge_eta += deta;
309 DEBUG(
"Got ECALRecHits");
316 DEBUG(
"Got Geometry");
318 TLorentzVector vEBMET_EtaRing[171];
319 int EBActiveRing[171];
320 int EBNActiveCells[171];
321 double EBSET_EtaRing[171];
322 double EBMaxEnergy_EtaRing[171];
323 double EBMinEnergy_EtaRing[171];
324 double EBenergy_EtaRing[171];
326 for (
int i = 0;
i < 171;
i++) {
328 EBNActiveCells[
i] = 0;
329 EBSET_EtaRing[
i] = 0.0;
330 EBMaxEnergy_EtaRing[
i] = -999;
331 EBMinEnergy_EtaRing[
i] = 14E3;
332 EBenergy_EtaRing[
i] = 0.0;
335 edm::LogInfo(
"OutputInfo") <<
"Looping over EB" << std::endl;
340 for (ebrechit = EBRecHits->
begin(); ebrechit != EBRecHits->
end(); ebrechit++) {
342 double Energy = ebrechit->energy();
345 int EtaRing = 85 +
ieta;
348 double theta = 2 * TMath::ATan(
exp(-1 * eta));
349 double ET = Energy * TMath::Sin(theta);
352 if (Energy > EBMaxEnergy_EtaRing[EtaRing])
353 EBMaxEnergy_EtaRing[EtaRing] =
Energy;
354 if (Energy < EBMinEnergy_EtaRing[EtaRing])
355 EBMinEnergy_EtaRing[EtaRing] =
Energy;
358 EBActiveRing[EtaRing] = 1;
359 EBNActiveCells[EtaRing]++;
360 EBSET_EtaRing[EtaRing] +=
ET;
361 v_.SetPtEtaPhiE(ET, 0, phi, ET);
362 vEBMET_EtaRing[EtaRing] -= v_;
363 EBenergy_EtaRing[EtaRing] +=
Energy;
370 if (Energy < hEB_Minenergy_ieta_iphi->getBinContent(EtaRing + 1, iphi))
375 for (
int iEtaRing = 0; iEtaRing < 171; iEtaRing++) {
379 if (EBActiveRing[iEtaRing]) {
390 TLorentzVector vEEpZMET_EtaRing[101];
391 int EEpZActiveRing[101];
392 int EEpZNActiveCells[101];
393 double EEpZSET_EtaRing[101];
394 double EEpZMaxEnergy_EtaRing[101];
395 double EEpZMinEnergy_EtaRing[101];
397 TLorentzVector vEEmZMET_EtaRing[101];
398 int EEmZActiveRing[101];
399 int EEmZNActiveCells[101];
400 double EEmZSET_EtaRing[101];
401 double EEmZMaxEnergy_EtaRing[101];
402 double EEmZMinEnergy_EtaRing[101];
404 for (
int i = 0;
i < 101;
i++) {
405 EEpZActiveRing[
i] = 0;
406 EEpZNActiveCells[
i] = 0;
407 EEpZSET_EtaRing[
i] = 0.0;
408 EEpZMaxEnergy_EtaRing[
i] = -999;
409 EEpZMinEnergy_EtaRing[
i] = 14E3;
411 EEmZActiveRing[
i] = 0;
412 EEmZNActiveCells[
i] = 0;
413 EEmZSET_EtaRing[
i] = 0.0;
414 EEmZMaxEnergy_EtaRing[
i] = -999;
415 EEmZMinEnergy_EtaRing[
i] = 14E3;
418 edm::LogInfo(
"OutputInfo") <<
"Looping over EE" << std::endl;
421 for (eerechit = EERecHits->
begin(); eerechit != EERecHits->
end(); eerechit++) {
423 double Energy = eerechit->energy();
437 int Crystal_zside = det.
zside();
439 if (Crystal_zside == -1) {
445 if (Crystal_zside == 1) {
451 TVector3 pos_vector(x, y, z);
452 phi = pos_vector.Phi();
453 theta = pos_vector.Theta();
454 double ET = Energy * TMath::Sin(theta);
457 if (Crystal_zside == -1) {
459 EEmZActiveRing[ir] = 1;
460 EEmZNActiveCells[ir]++;
461 EEmZSET_EtaRing[ir] +=
ET;
462 v_.SetPtEtaPhiE(ET, 0, phi, ET);
463 vEEmZMET_EtaRing[ir] -= v_;
469 if (Energy > EEmZMaxEnergy_EtaRing[ir])
470 EEmZMaxEnergy_EtaRing[ir] =
Energy;
471 if (Energy < EEmZMinEnergy_EtaRing[ir])
472 EEmZMinEnergy_EtaRing[ir] =
Energy;
476 if (Energy < hEEmZ_Minenergy_ix_iy->getBinContent(ix, iy))
479 if (Crystal_zside == 1) {
481 EEpZActiveRing[ir] = 1;
482 EEpZNActiveCells[ir]++;
483 EEpZSET_EtaRing[ir] +=
ET;
484 v_.SetPtEtaPhiE(ET, 0, phi, ET);
485 vEEpZMET_EtaRing[ir] -= v_;
491 if (Energy > EEpZMaxEnergy_EtaRing[ir])
492 EEpZMaxEnergy_EtaRing[ir] =
Energy;
493 if (Energy < EEpZMinEnergy_EtaRing[ir])
494 EEpZMinEnergy_EtaRing[ir] =
Energy;
497 if (Energy < hEEpZ_Minenergy_ix_iy->getBinContent(ix, iy))
501 edm::LogInfo(
"OutputInfo") <<
"Done Looping over EE" << std::endl;
502 for (
int iEtaRing = 0; iEtaRing < 101; iEtaRing++) {
508 if (EEpZActiveRing[iEtaRing]) {
517 if (EEmZActiveRing[iEtaRing]) {
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * hEB_Maxenergyvsieta
MonitorElement * hEB_MExvsieta
MonitorElement * hEEmZ_ix_iy_dxMap
MonitorElement * hEEmZ_Occvsir
MonitorElement * hEEpZ_METPhivsir
MonitorElement * hEEmZ_METvsir
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * hEEpZ_METvsir
void setCurrentFolder(std::string const &fullpath)
MonitorElement * hEB_Maxenergy_ieta_iphi
MonitorElement * hEB_METvsieta
MonitorElement * hEEpZ_ix_iy_irMap
MonitorElement * hEB_Occvsieta
std::vector< EcalRecHit >::const_iterator const_iterator
Geom::Theta< T > theta() const
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
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 * hEEmZ_Minenergyvsir
int iphi() const
get the crystal iphi
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
MonitorElement * hEB_Occ_ieta_iphi
MonitorElement * hEEpZ_Minenergyvsir
MonitorElement * hEEpZ_Minenergy_ix_iy
MonitorElement * hEB_Minenergy_ieta_iphi
MonitorElement * hEEmZ_METPhivsir
MonitorElement * hEEmZ_MEyvsir
MonitorElement * hEEpZ_energyvsir
void FillGeometry(const edm::EventSetup &)
MonitorElement * hEEpZ_ix_iy_dyMap
MonitorElement * hEB_ieta_detaMap
MonitorElement * hEEmZ_Minenergy_ix_iy
int ieta() const
get the crystal ieta
virtual double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * hEB_energy_ieta_iphi
MonitorElement * hEB_MEyvsieta
MonitorElement * hEB_Minenergyvsieta
const_iterator end() const
ECALRecHitAnalyzer(const edm::ParameterSet &)
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 &)
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_ieta_iphi_etaMap
MonitorElement * hEEpZ_SETvsir
MonitorElement * hEEpZ_Maxenergyvsir
MonitorElement * hEEmZ_MExvsir
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
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
edm::EDGetTokenT< EBRecHitCollection > EBRecHitsLabel_
const_iterator begin() const
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * hEEpZ_ix_iy_dxMap