24 #include "FWCore/Framework/interface/Frameworkfwd.h"
25 #include "FWCore/Framework/interface/EDAnalyzer.h"
26 #include "FWCore/Framework/interface/Event.h"
27 #include "FWCore/Framework/interface/MakerMacros.h"
28 #include "FWCore/ParameterSet/interface/ParameterSet.h"
30 #include "FWCore/ServiceRegistry/interface/Service.h"
31 #include "HGCal/DataFormats/interface/HGCalTBRecHitCollections.h"
32 #include "HGCal/DataFormats/interface/HGCalTBDetId.h"
33 #include "HGCal/DataFormats/interface/HGCalTBRecHit.h"
34 #include "HGCal/Geometry/interface/HGCalTBCellVertices.h"
35 #include "HGCal/Geometry/interface/HGCalTBTopology.h"
36 #include "CommonTools/UtilAlgos/interface/TFileService.h"
48 class TestRecHit :
public edm::EDAnalyzer
51 explicit TestRecHit(
const edm::ParameterSet&);
53 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
56 virtual void beginJob();
57 void analyze(
const edm::Event& ,
const edm::EventSetup&);
58 virtual void endJob();
62 edm::EDGetToken token;
66 TestRecHit::TestRecHit(
const edm::ParameterSet& config)
69 (config.getParameter<edm::InputTag>(
"HGCALTBRECHITS"))),
75 TestRecHit::~TestRecHit()
86 TestRecHit::analyze(
const edm::Event& event,
const edm::EventSetup& setup)
91 Handle<HGCalTBRecHitCollection> Rechits;
92 event.getByToken(token, Rechits);
94 for(
auto RecHit : *Rechits) {
95 int layer = RecHit.id().layer();
96 int sensor_u = RecHit.id().sensorIU();
97 int sensor_v = RecHit.id().sensorIV();
98 int u = RecHit.id().iu();
99 int v = RecHit.id().iv();
100 bool good = check.iu_iv_valid(layer,
108 "\tlayer=%4d, sensor_u=%4d, sensor_v=%4d, u=%4d, v=%4d",
109 layer, sensor_u, sensor_v, u, v);
110 cout << record << endl;
118 TestRecHit::beginJob()
128 TestRecHit::fillDescriptions(edm::ConfigurationDescriptions& descriptions)
130 edm::ParameterSetDescription desc;
132 descriptions.addDefault(desc);
DEFINE_FWK_MODULE(Pedestals)
edm::SortedCollection< HGCalTBRecHit > HGCalTBRecHitCollection