File indexing completed on 2024-04-06 12:32:34
0001
0002 #include <memory>
0003 #include <iostream>
0004 #include <string>
0005 #include <vector>
0006
0007
0008 #include "FWCore/Framework/interface/Frameworkfwd.h"
0009 #include "FWCore/Framework/interface/Event.h"
0010 #include "DataFormats/Common/interface/Handle.h"
0011 #include "FWCore/Framework/interface/ESHandle.h"
0012 #include "FWCore/Utilities/interface/ESGetToken.h"
0013
0014 #include "FWCore/Framework/interface/MakerMacros.h"
0015 #include "FWCore/ServiceRegistry/interface/Service.h"
0016 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0017 #include "FWCore/Common/interface/Provenance.h"
0018
0019 #include <DQMServices/Core/interface/DQMStore.h>
0020 #include "DQMServices/Core/interface/DQMGlobalEDAnalyzer.h"
0021
0022 #include "DataFormats/DetId/interface/DetId.h"
0023 #include "DataFormats/L1THGCal/interface/HGCalTriggerCell.h"
0024 #include "DataFormats/L1THGCal/interface/HGCalCluster.h"
0025 #include "DataFormats/L1THGCal/interface/HGCalMulticluster.h"
0026 #include "DataFormats/L1THGCal/interface/HGCalTower.h"
0027
0028 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0029 #include "L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h"
0030 #include "L1Trigger/L1THGCal/interface/HGCalTriggerTools.h"
0031 #include "L1Trigger/L1THGCal/interface/backend/HGCalTriggerClusterIdentificationBase.h"
0032
0033
0034
0035
0036
0037 struct Histograms {
0038
0039 dqm::reco::MonitorElement *h_tc_n_;
0040 dqm::reco::MonitorElement *h_tc_mipPt_;
0041 dqm::reco::MonitorElement *h_tc_pt_;
0042 dqm::reco::MonitorElement *h_tc_energy_;
0043 dqm::reco::MonitorElement *h_tc_eta_;
0044 dqm::reco::MonitorElement *h_tc_phi_;
0045 dqm::reco::MonitorElement *h_tc_x_;
0046 dqm::reco::MonitorElement *h_tc_y_;
0047 dqm::reco::MonitorElement *h_tc_z_;
0048 dqm::reco::MonitorElement *h_tc_layer_;
0049
0050
0051 dqm::reco::MonitorElement *h_cl_n_;
0052 dqm::reco::MonitorElement *h_cl_mipPt_;
0053 dqm::reco::MonitorElement *h_cl_pt_;
0054 dqm::reco::MonitorElement *h_cl_energy_;
0055 dqm::reco::MonitorElement *h_cl_eta_;
0056 dqm::reco::MonitorElement *h_cl_phi_;
0057 dqm::reco::MonitorElement *h_cl_layer_;
0058 dqm::reco::MonitorElement *h_cl_cells_n_;
0059
0060
0061 dqm::reco::MonitorElement *h_cl3d_n_;
0062 dqm::reco::MonitorElement *h_cl3d_pt_;
0063 dqm::reco::MonitorElement *h_cl3d_energy_;
0064 dqm::reco::MonitorElement *h_cl3d_eta_;
0065 dqm::reco::MonitorElement *h_cl3d_phi_;
0066 dqm::reco::MonitorElement *h_cl3d_clusters_n_;
0067
0068 dqm::reco::MonitorElement *h_cl3d_showerlength_;
0069 dqm::reco::MonitorElement *h_cl3d_coreshowerlength_;
0070 dqm::reco::MonitorElement *h_cl3d_firstlayer_;
0071 dqm::reco::MonitorElement *h_cl3d_maxlayer_;
0072 dqm::reco::MonitorElement *h_cl3d_seetot_;
0073 dqm::reco::MonitorElement *h_cl3d_seemax_;
0074 dqm::reco::MonitorElement *h_cl3d_spptot_;
0075 dqm::reco::MonitorElement *h_cl3d_sppmax_;
0076 dqm::reco::MonitorElement *h_cl3d_szz_;
0077 dqm::reco::MonitorElement *h_cl3d_srrtot_;
0078 dqm::reco::MonitorElement *h_cl3d_srrmax_;
0079 dqm::reco::MonitorElement *h_cl3d_srrmean_;
0080 dqm::reco::MonitorElement *h_cl3d_emaxe_;
0081 dqm::reco::MonitorElement *h_cl3d_hoe_;
0082 dqm::reco::MonitorElement *h_cl3d_meanz_;
0083 dqm::reco::MonitorElement *h_cl3d_layer10_;
0084 dqm::reco::MonitorElement *h_cl3d_layer50_;
0085 dqm::reco::MonitorElement *h_cl3d_layer90_;
0086 dqm::reco::MonitorElement *h_cl3d_first1layers_;
0087 dqm::reco::MonitorElement *h_cl3d_first3layers_;
0088 dqm::reco::MonitorElement *h_cl3d_first5layers_;
0089 dqm::reco::MonitorElement *h_cl3d_firstHcal1layers_;
0090 dqm::reco::MonitorElement *h_cl3d_firstHcal3layers_;
0091 dqm::reco::MonitorElement *h_cl3d_firstHcal5layers_;
0092 dqm::reco::MonitorElement *h_cl3d_last1layers_;
0093 dqm::reco::MonitorElement *h_cl3d_last3layers_;
0094 dqm::reco::MonitorElement *h_cl3d_last5layers_;
0095 dqm::reco::MonitorElement *h_cl3d_emax1layers_;
0096 dqm::reco::MonitorElement *h_cl3d_emax3layers_;
0097 dqm::reco::MonitorElement *h_cl3d_emax5layers_;
0098 dqm::reco::MonitorElement *h_cl3d_eot_;
0099 dqm::reco::MonitorElement *h_cl3d_ebm0_;
0100 dqm::reco::MonitorElement *h_cl3d_ebm1_;
0101 dqm::reco::MonitorElement *h_cl3d_hbm_;
0102 dqm::reco::MonitorElement *h_cl3d_ntc67_;
0103 dqm::reco::MonitorElement *h_cl3d_ntc90_;
0104 dqm::reco::MonitorElement *h_cl3d_bdteg_;
0105 dqm::reco::MonitorElement *h_cl3d_quality_;
0106
0107
0108 dqm::reco::MonitorElement *h_tower_n_;
0109 dqm::reco::MonitorElement *h_tower_pt_;
0110 dqm::reco::MonitorElement *h_tower_energy_;
0111 dqm::reco::MonitorElement *h_tower_eta_;
0112 dqm::reco::MonitorElement *h_tower_phi_;
0113 dqm::reco::MonitorElement *h_tower_etEm_;
0114 dqm::reco::MonitorElement *h_tower_etHad_;
0115 dqm::reco::MonitorElement *h_tower_iEta_;
0116 dqm::reco::MonitorElement *h_tower_iPhi_;
0117 };
0118
0119 class HGCalTriggerValidator : public DQMGlobalEDAnalyzer<Histograms> {
0120 public:
0121 explicit HGCalTriggerValidator(const edm::ParameterSet &);
0122 ~HGCalTriggerValidator() override = default;
0123
0124 private:
0125 void dqmBeginRun(edm::Run const &, edm::EventSetup const &, Histograms &) const override;
0126 void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override;
0127 void dqmAnalyze(edm::Event const &, edm::EventSetup const &, Histograms const &) const override;
0128
0129 private:
0130
0131 const edm::EDGetToken trigger_cells_token_;
0132 const edm::EDGetToken clusters_token_;
0133 const edm::EDGetToken multiclusters_token_;
0134 const edm::EDGetToken towers_token_;
0135 const edm::ESGetToken<HGCalTriggerGeometryBase, CaloGeometryRecord> triggerGeomToken_;
0136
0137 std::unique_ptr<HGCalTriggerClusterIdentificationBase> id_;
0138
0139 std::shared_ptr<HGCalTriggerTools> triggerTools_;
0140 };
0141
0142 HGCalTriggerValidator::HGCalTriggerValidator(const edm::ParameterSet &iConfig)
0143 : trigger_cells_token_{consumes<l1t::HGCalTriggerCellBxCollection>(
0144 iConfig.getParameter<edm::InputTag>("TriggerCells"))},
0145 clusters_token_{consumes<l1t::HGCalClusterBxCollection>(iConfig.getParameter<edm::InputTag>("Clusters"))},
0146 multiclusters_token_{
0147 consumes<l1t::HGCalMulticlusterBxCollection>(iConfig.getParameter<edm::InputTag>("Multiclusters"))},
0148 towers_token_{consumes<l1t::HGCalTowerBxCollection>(iConfig.getParameter<edm::InputTag>("Towers"))},
0149 triggerGeomToken_(esConsumes<HGCalTriggerGeometryBase, CaloGeometryRecord, edm::Transition::BeginRun>()),
0150 id_{HGCalTriggerClusterIdentificationFactory::get()->create("HGCalTriggerClusterIdentificationBDT")} {
0151 id_->initialize(iConfig.getParameter<edm::ParameterSet>("EGIdentification"));
0152
0153 triggerTools_ = std::make_shared<HGCalTriggerTools>();
0154 }
0155
0156 void HGCalTriggerValidator::dqmBeginRun(edm::Run const &iRun,
0157 edm::EventSetup const &iSetup,
0158 Histograms &histograms) const {
0159 auto const triggerGeometry = iSetup.getHandle(triggerGeomToken_);
0160 triggerTools_->setGeometry(triggerGeometry.product());
0161 }
0162
0163 void HGCalTriggerValidator::bookHistograms(DQMStore::IBooker &iBooker,
0164 edm::Run const &,
0165 edm::EventSetup const &iSetup,
0166 Histograms &histograms) const {
0167 iBooker.cd();
0168 iBooker.setCurrentFolder("HGCALTPG");
0169
0170
0171
0172 histograms.h_tc_n_ = iBooker.book1D("tc_n", "trigger cell number; number", 100, 10000, 40000);
0173 histograms.h_tc_mipPt_ = iBooker.book1D("tc_mipPt", "trigger cell mipPt; mipPt", 100, 0, 10);
0174 histograms.h_tc_pt_ = iBooker.book1D("tc_pt", "trigger cell pt; pt [GeV]", 100, 0, 2);
0175 histograms.h_tc_energy_ = iBooker.book1D("tc_energy", "trigger cell energy; energy [GeV]", 100, 0, 5);
0176 histograms.h_tc_eta_ = iBooker.book1D("tc_eta", "trigger cell eta; eta", 320, -3.2, 3.2);
0177 histograms.h_tc_phi_ = iBooker.book1D("tc_phi", "trigger cell phi; phi", 100, -M_PI, M_PI);
0178 histograms.h_tc_x_ = iBooker.book1D("tc_x", "trigger cell x; x [cm]", 100, -250, 250);
0179 histograms.h_tc_y_ = iBooker.book1D("tc_y", "trigger cell y; y [cm]", 100, -250, 250);
0180 histograms.h_tc_z_ = iBooker.book1D("tc_z", "trigger cell z; z [cm]", 100, -550, 550);
0181 histograms.h_tc_layer_ = iBooker.book1D("tc_layer", "trigger cell layer; layer", 50, 0, 50);
0182
0183
0184 histograms.h_cl_n_ = iBooker.book1D("cl_n", "cluster2D number; number", 100, 10000, 40000);
0185 histograms.h_cl_mipPt_ = iBooker.book1D("cl_mipPt", "cluster2D mipPt; mipPt", 100, 0, 10);
0186 histograms.h_cl_pt_ = iBooker.book1D("cl_pt", "cluster2D pt; pt [GeV]", 100, 0, 2);
0187 histograms.h_cl_energy_ = iBooker.book1D("cl_energy", "cluster2D energy; energy [GeV]", 100, 0, 5);
0188 histograms.h_cl_eta_ = iBooker.book1D("cl_eta", "cluster2D eta; eta", 320, -3.2, 3.2);
0189 histograms.h_cl_phi_ = iBooker.book1D("cl_phi", "cluster2D phi; phi", 100, -M_PI, M_PI);
0190 histograms.h_cl_cells_n_ = iBooker.book1D("cl_cells_n", "cluster2D cells_n; cells_n", 20, 0, 20);
0191 histograms.h_cl_layer_ = iBooker.book1D("cl_layer", "cluster2D layer; layer", 50, 0, 50);
0192
0193
0194 histograms.h_cl3d_n_ = iBooker.book1D("cl3d_n", "cl3duster3D number; number", 200, 0, 400);
0195 histograms.h_cl3d_pt_ = iBooker.book1D("cl3d_pt", "cl3duster3D pt; pt [GeV]", 50, 0, 50);
0196 histograms.h_cl3d_energy_ = iBooker.book1D("cl3d_energy", "cl3duster3D energy; energy [GeV]", 50, 0, 200);
0197 histograms.h_cl3d_eta_ = iBooker.book1D("cl3d_eta", "cl3duster3D eta; eta", 320, -3.2, 3.2);
0198 histograms.h_cl3d_phi_ = iBooker.book1D("cl3d_phi", "cl3duster3D phi; phi", 100, -M_PI, M_PI);
0199 histograms.h_cl3d_clusters_n_ = iBooker.book1D("cl3d_clusters_n", "cl3duster3D clusters_n; clusters_n", 50, 0, 200);
0200
0201 histograms.h_cl3d_showerlength_ =
0202 iBooker.book1D("cl3d_showerlength", "cl3duster3D showerlength; showerlength", 50, 0, 50);
0203 histograms.h_cl3d_coreshowerlength_ =
0204 iBooker.book1D("cl3d_coreshowerlength", "cl3duster3D coreshowerlength; coreshowerlength", 20, 0, 20);
0205 histograms.h_cl3d_firstlayer_ = iBooker.book1D("cl3d_firstlayer", "cl3duster3D firstlayer; firstlayer", 10, 0, 10);
0206 histograms.h_cl3d_maxlayer_ = iBooker.book1D("cl3d_maxlayer", "cl3duster3D maxlayer; maxlayer", 50, 0, 50);
0207 histograms.h_cl3d_seetot_ = iBooker.book1D("cl3d_seetot", "cl3duster3D seetot; seetot", 50, 0, 0.1);
0208 histograms.h_cl3d_seemax_ = iBooker.book1D("cl3d_seemax", "cl3duster3D seemax; seemax", 50, 0, 0.2);
0209 histograms.h_cl3d_spptot_ = iBooker.book1D("cl3d_spptot", "cl3duster3D spptot; spptot", 50, 0, 0.1);
0210 histograms.h_cl3d_sppmax_ = iBooker.book1D("cl3d_sppmax", "cl3duster3D sppmax; sppmax", 50, 0, 0.15);
0211 histograms.h_cl3d_szz_ = iBooker.book1D("cl3d_szz", "cl3duster3D szz; szz", 50, 0, 80);
0212 histograms.h_cl3d_srrtot_ = iBooker.book1D("cl3d_srrtot", "cl3duster3D srrtot; srrtot", 50, 0, 0.01);
0213 histograms.h_cl3d_srrmax_ = iBooker.book1D("cl3d_srrmax", "cl3duster3D srrmax; srrmax", 50, 0, 0.014);
0214 histograms.h_cl3d_srrmean_ = iBooker.book1D("cl3d_srrmean", "cl3duster3D srrmean; srrmean", 50, 0, 0.006);
0215 histograms.h_cl3d_emaxe_ = iBooker.book1D("cl3d_emaxe", "cl3duster3D emaxe; emaxe", 50, 0, 1.01);
0216 histograms.h_cl3d_hoe_ = iBooker.book1D("cl3d_hoe", "cl3duster3D hoe; hoe", 50, 0, 2.);
0217 histograms.h_cl3d_meanz_ = iBooker.book1D("cl3d_meanz", "cl3duster3D meanz; meanz", 50, 300, 400);
0218 histograms.h_cl3d_layer10_ = iBooker.book1D("cl3d_layer10", "cl3duster3D layer10; layer10", 10, 0, 10);
0219 histograms.h_cl3d_layer50_ = iBooker.book1D("cl3d_layer50", "cl3duster3D layer50; layer50", 20, 0, 20);
0220 histograms.h_cl3d_layer90_ = iBooker.book1D("cl3d_layer90", "cl3duster3D layer90; layer90", 40, 0, 40);
0221 histograms.h_cl3d_first1layers_ =
0222 iBooker.book1D("cl3d_first1layers", "cl3duster3D first1layers; first1layers", 50, 0, 1.01);
0223 histograms.h_cl3d_first3layers_ =
0224 iBooker.book1D("cl3d_first3layers", "cl3duster3D first3layers; first3layers", 50, 0, 1.01);
0225 histograms.h_cl3d_first5layers_ =
0226 iBooker.book1D("cl3d_first5layers", "cl3duster3D first5layers; first5layers", 50, 0, 1.01);
0227 histograms.h_cl3d_firstHcal1layers_ =
0228 iBooker.book1D("cl3d_firstHcal1layers", "cl3duster3D firstHcal1layers; hcal1layers", 50, 0, 0.5);
0229 histograms.h_cl3d_firstHcal3layers_ =
0230 iBooker.book1D("cl3d_firstHcal3layers", "cl3duster3D firstHcal3layers; hcal1layers", 50, 0, 0.5);
0231 histograms.h_cl3d_firstHcal5layers_ =
0232 iBooker.book1D("cl3d_firstHcal5layers", "cl3duster3D firstHcal5layers; hcal1layers", 50, 0, 0.5);
0233 histograms.h_cl3d_last1layers_ =
0234 iBooker.book1D("cl3d_last1layers", "cl3duster3D last1layers; last1layers", 50, 0, 0.1);
0235 histograms.h_cl3d_last3layers_ =
0236 iBooker.book1D("cl3d_last3layers", "cl3duster3D last3layers; last3layers", 50, 0, 0.1);
0237 histograms.h_cl3d_last5layers_ =
0238 iBooker.book1D("cl3d_last5layers", "cl3duster3D last5layers; last5layers", 50, 0, 0.1);
0239 histograms.h_cl3d_emax1layers_ =
0240 iBooker.book1D("cl3d_emax1layers", "cl3duster3D emax1layers; emax1layers", 50, 0, 1.01);
0241 histograms.h_cl3d_emax3layers_ =
0242 iBooker.book1D("cl3d_emax3layers", "cl3duster3D emax3layers; emax3layers", 50, 0, 1.01);
0243 histograms.h_cl3d_emax5layers_ =
0244 iBooker.book1D("cl3d_emax5layers", "cl3duster3D emax5layers; emax5layers", 50, 0, 1.01);
0245 histograms.h_cl3d_eot_ = iBooker.book1D("cl3d_eot", "cl3duster3D eot; eot", 50, 0, 1.01);
0246 histograms.h_cl3d_ebm0_ = iBooker.book1D("cl3d_ebm0", "cl3duster3D ebm0; ebm0", 50, 0, 9000);
0247 histograms.h_cl3d_ebm1_ = iBooker.book1D("cl3d_ebm1", "cl3duster3D ebm1; ebm1", 50, 0, 9000);
0248 histograms.h_cl3d_hbm_ = iBooker.book1D("cl3d_hbm", "cl3duster3D hbm; hbm", 50, 0, 4000);
0249 histograms.h_cl3d_ntc67_ = iBooker.book1D("cl3d_ntc67", "cl3duster3D ntc67; ntc67", 50, 0, 50);
0250 histograms.h_cl3d_ntc90_ = iBooker.book1D("cl3d_ntc90", "cl3duster3D ntc90; ntc90", 50, 0, 100);
0251 histograms.h_cl3d_bdteg_ = iBooker.book1D("cl3d_bdteg", "cl3duster3D bdteg; bdteg", 50, -1., 1.);
0252 histograms.h_cl3d_quality_ = iBooker.book1D("cl3d_quality", "cl3duster3D quality; quality", 5, 0, 5);
0253
0254
0255 histograms.h_tower_n_ = iBooker.book1D("tower_n", "tower n; number", 100, 2000, 3000);
0256 histograms.h_tower_pt_ = iBooker.book1D("tower_pt", "tower pt; pt [GeV]", 100, 0, 10);
0257 histograms.h_tower_energy_ = iBooker.book1D("tower_energy", "tower energy; energy [GeV]", 100, 0, 100);
0258 histograms.h_tower_eta_ = iBooker.book1D("tower_eta", "tower eta; eta", 640, -3.2, 3.2);
0259 histograms.h_tower_phi_ = iBooker.book1D("tower_phi", "tower phi; phi", 600, -M_PI, M_PI);
0260 histograms.h_tower_etEm_ = iBooker.book1D("tower_etEm", "tower etEm; etEm", 100, 0, 10);
0261 histograms.h_tower_etHad_ = iBooker.book1D("tower_etHad", "tower etHad; etHad", 100, 0, 5);
0262 histograms.h_tower_iEta_ = iBooker.book1D("tower_iEta", "tower iEta; iEta", 20, 0, 20);
0263 histograms.h_tower_iPhi_ = iBooker.book1D("tower_iPhi", "tower iPhi; iPhi", 80, 0, 80);
0264 }
0265
0266 void HGCalTriggerValidator::dqmAnalyze(edm::Event const &iEvent,
0267 edm::EventSetup const &iSetup,
0268 Histograms const &histograms) const {
0269 int tc_n = 0;
0270 int cl_n = 0;
0271 int cl3d_n = 0;
0272 int tower_n = 0;
0273
0274
0275 edm::Handle<l1t::HGCalTriggerCellBxCollection> trigger_cells_h;
0276 iEvent.getByToken(trigger_cells_token_, trigger_cells_h);
0277 const l1t::HGCalTriggerCellBxCollection &trigger_cells = *trigger_cells_h;
0278
0279 if (trigger_cells_h.isValid()) {
0280 for (auto tc_itr = trigger_cells.begin(0); tc_itr != trigger_cells.end(0); tc_itr++) {
0281 tc_n++;
0282 DetId id(tc_itr->detId());
0283 histograms.h_tc_pt_->Fill(tc_itr->pt());
0284 histograms.h_tc_mipPt_->Fill(tc_itr->mipPt());
0285 histograms.h_tc_energy_->Fill(tc_itr->energy());
0286 histograms.h_tc_eta_->Fill(tc_itr->eta());
0287 histograms.h_tc_phi_->Fill(tc_itr->phi());
0288 histograms.h_tc_x_->Fill(tc_itr->position().x());
0289 histograms.h_tc_y_->Fill(tc_itr->position().y());
0290 histograms.h_tc_z_->Fill(tc_itr->position().z());
0291 histograms.h_tc_layer_->Fill(triggerTools_->layerWithOffset(id));
0292 }
0293 }
0294 histograms.h_tc_n_->Fill(tc_n);
0295
0296
0297 edm::Handle<l1t::HGCalClusterBxCollection> clusters_h;
0298 iEvent.getByToken(clusters_token_, clusters_h);
0299 const l1t::HGCalClusterBxCollection &clusters = *clusters_h;
0300
0301 if (clusters_h.isValid()) {
0302 for (auto cl_itr = clusters.begin(0); cl_itr != clusters.end(0); cl_itr++) {
0303 cl_n++;
0304 histograms.h_cl_mipPt_->Fill(cl_itr->mipPt());
0305 histograms.h_cl_pt_->Fill(cl_itr->pt());
0306 histograms.h_cl_energy_->Fill(cl_itr->energy());
0307 histograms.h_cl_eta_->Fill(cl_itr->eta());
0308 histograms.h_cl_phi_->Fill(cl_itr->phi());
0309 histograms.h_cl_layer_->Fill(triggerTools_->layerWithOffset(cl_itr->detId()));
0310 histograms.h_cl_cells_n_->Fill(cl_itr->constituents().size());
0311 }
0312 }
0313 histograms.h_cl_n_->Fill(cl_n);
0314
0315
0316 edm::Handle<l1t::HGCalMulticlusterBxCollection> multiclusters_h;
0317 iEvent.getByToken(multiclusters_token_, multiclusters_h);
0318 const l1t::HGCalMulticlusterBxCollection &multiclusters = *multiclusters_h;
0319
0320 if (multiclusters_h.isValid()) {
0321 for (auto cl3d_itr = multiclusters.begin(0); cl3d_itr != multiclusters.end(0); cl3d_itr++) {
0322 cl3d_n++;
0323 histograms.h_cl3d_pt_->Fill(cl3d_itr->pt());
0324 histograms.h_cl3d_energy_->Fill(cl3d_itr->energy());
0325 histograms.h_cl3d_eta_->Fill(cl3d_itr->eta());
0326 histograms.h_cl3d_phi_->Fill(cl3d_itr->phi());
0327 histograms.h_cl3d_clusters_n_->Fill(cl3d_itr->constituents().size());
0328
0329 histograms.h_cl3d_showerlength_->Fill(cl3d_itr->showerLength());
0330 histograms.h_cl3d_coreshowerlength_->Fill(cl3d_itr->coreShowerLength());
0331 histograms.h_cl3d_firstlayer_->Fill(cl3d_itr->firstLayer());
0332 histograms.h_cl3d_maxlayer_->Fill(cl3d_itr->maxLayer());
0333 histograms.h_cl3d_seetot_->Fill(cl3d_itr->sigmaEtaEtaTot());
0334 histograms.h_cl3d_seemax_->Fill(cl3d_itr->sigmaEtaEtaMax());
0335 histograms.h_cl3d_spptot_->Fill(cl3d_itr->sigmaPhiPhiTot());
0336 histograms.h_cl3d_sppmax_->Fill(cl3d_itr->sigmaPhiPhiMax());
0337 histograms.h_cl3d_szz_->Fill(cl3d_itr->sigmaZZ());
0338 histograms.h_cl3d_srrtot_->Fill(cl3d_itr->sigmaRRTot());
0339 histograms.h_cl3d_srrmax_->Fill(cl3d_itr->sigmaRRMax());
0340 histograms.h_cl3d_srrmean_->Fill(cl3d_itr->sigmaRRMean());
0341 histograms.h_cl3d_emaxe_->Fill(cl3d_itr->eMax() / cl3d_itr->energy());
0342 histograms.h_cl3d_hoe_->Fill(cl3d_itr->hOverE());
0343 histograms.h_cl3d_meanz_->Fill(cl3d_itr->zBarycenter());
0344 histograms.h_cl3d_layer10_->Fill(cl3d_itr->layer10percent());
0345 histograms.h_cl3d_layer50_->Fill(cl3d_itr->layer50percent());
0346 histograms.h_cl3d_layer90_->Fill(cl3d_itr->layer90percent());
0347 histograms.h_cl3d_first1layers_->Fill(cl3d_itr->first1layers());
0348 histograms.h_cl3d_first3layers_->Fill(cl3d_itr->first3layers());
0349 histograms.h_cl3d_first5layers_->Fill(cl3d_itr->first5layers());
0350 histograms.h_cl3d_firstHcal1layers_->Fill(cl3d_itr->firstHcal1layers());
0351 histograms.h_cl3d_firstHcal3layers_->Fill(cl3d_itr->firstHcal3layers());
0352 histograms.h_cl3d_firstHcal5layers_->Fill(cl3d_itr->firstHcal5layers());
0353 histograms.h_cl3d_last1layers_->Fill(cl3d_itr->last1layers());
0354 histograms.h_cl3d_last3layers_->Fill(cl3d_itr->last3layers());
0355 histograms.h_cl3d_last5layers_->Fill(cl3d_itr->last5layers());
0356 histograms.h_cl3d_emax1layers_->Fill(cl3d_itr->emax1layers());
0357 histograms.h_cl3d_emax3layers_->Fill(cl3d_itr->emax3layers());
0358 histograms.h_cl3d_emax5layers_->Fill(cl3d_itr->emax5layers());
0359 histograms.h_cl3d_eot_->Fill(cl3d_itr->eot());
0360 histograms.h_cl3d_ebm0_->Fill(cl3d_itr->ebm0());
0361 histograms.h_cl3d_ebm1_->Fill(cl3d_itr->ebm1());
0362 histograms.h_cl3d_hbm_->Fill(cl3d_itr->hbm());
0363 histograms.h_cl3d_ntc67_->Fill(cl3d_itr->triggerCells67percent());
0364 histograms.h_cl3d_ntc90_->Fill(cl3d_itr->triggerCells90percent());
0365 histograms.h_cl3d_bdteg_->Fill(id_->value(*cl3d_itr));
0366 histograms.h_cl3d_quality_->Fill(cl3d_itr->hwQual());
0367 }
0368 }
0369 histograms.h_cl3d_n_->Fill(cl3d_n);
0370
0371
0372 edm::Handle<l1t::HGCalTowerBxCollection> towers_h;
0373 iEvent.getByToken(towers_token_, towers_h);
0374 const l1t::HGCalTowerBxCollection &towers = *towers_h;
0375
0376 if (towers_h.isValid()) {
0377 for (auto tower_itr = towers.begin(0); tower_itr != towers.end(0); tower_itr++) {
0378 tower_n++;
0379 histograms.h_tower_pt_->Fill(tower_itr->pt());
0380 histograms.h_tower_energy_->Fill(tower_itr->energy());
0381 histograms.h_tower_eta_->Fill(tower_itr->eta());
0382 histograms.h_tower_phi_->Fill(tower_itr->phi());
0383 histograms.h_tower_etEm_->Fill(tower_itr->etEm());
0384 histograms.h_tower_etHad_->Fill(tower_itr->etHad());
0385 histograms.h_tower_iEta_->Fill(tower_itr->id().iEta());
0386 histograms.h_tower_iPhi_->Fill(tower_itr->id().iPhi());
0387 }
0388 }
0389 histograms.h_tower_n_->Fill(tower_n);
0390 }
0391
0392 #include "FWCore/Framework/interface/MakerMacros.h"
0393
0394
0395 DEFINE_FWK_MODULE(HGCalTriggerValidator);