File indexing completed on 2024-04-06 12:30:58
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include <iostream>
0021
0022
0023 #include "FWCore/Framework/interface/Frameworkfwd.h"
0024 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0025
0026 #include "FWCore/Framework/interface/Event.h"
0027 #include "FWCore/Framework/interface/MakerMacros.h"
0028 #include "DataFormats/Common/interface/Handle.h"
0029
0030 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0031 #include "FWCore/ServiceRegistry/interface/Service.h"
0032 #include "FWCore/Framework/interface/ESHandle.h"
0033
0034
0035
0036
0037 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0038 #include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
0039 #include "Geometry/CommonDetUnit/interface/PixelGeomDetType.h"
0040 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" //
0041
0042 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
0043
0044 #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
0045 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0046 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0047
0048
0049
0050 #include <TROOT.h>
0051 #include <TChain.h>
0052 #include <TFile.h>
0053 #include <TF1.h>
0054 #include <TH2F.h>
0055 #include <TH1F.h>
0056 #include <TProfile.h>
0057
0058 using namespace std;
0059 using namespace edm;
0060
0061
0062
0063
0064
0065 class PixelSimHitsTestForward : public edm::one::EDAnalyzer<> {
0066 public:
0067 explicit PixelSimHitsTestForward(const edm::ParameterSet &);
0068 ~PixelSimHitsTestForward();
0069 virtual void beginJob();
0070 virtual void analyze(const edm::Event &, const edm::EventSetup &);
0071 virtual void endJob();
0072
0073 private:
0074
0075 const static bool PRINT = true;
0076
0077 edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> trackerTopoToken;
0078 edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeomToken;
0079
0080 TFile *hFile;
0081 TH1F *heloss1, *heloss2, *heloss3, *hdetunit, *hpabs, *hpid, *htof, *htid;
0082 TH1F *hpixid, *hpixsubid, *hlayerid, *hladder1id, *hladder2id, *hladder3id, *hz1id, *hz2id, *hz3id;
0083 TH1F *hladder1idUp, *hladder2idUp, *hladder3idUp;
0084 TH1F *hthick1, *hthick2, *hthick3, *hlength1, *hlength2, *hlength3;
0085 TH1F *hwidth1, *hwidth2, *hwidth3;
0086 TH1F *hwidth1h, *hwidth2h, *hwidth3h;
0087 TH1F *hsimHitsPerDet1, *hsimHitsPerDet2, *hsimHitsPerDet3;
0088 TH1F *hsimHitsPerLay1, *hsimHitsPerLay2, *hsimHitsPerLay3;
0089 TH1F *hdetsPerLay1, *hdetsPerLay2, *hdetsPerLay3;
0090 TH1F *heloss1e, *heloss2e, *heloss3e;
0091 TH1F *heloss1mu, *heloss2mu, *heloss3mu;
0092 TH1F *htheta1, *htheta2, *htheta3;
0093 TH1F *hphi1, *hphi1h, *hphi2, *hphi3;
0094 TH1F *hdetr, *hdetz, *hdetphi1, *hdetphi2, *hdetphi3;
0095 TH1F *hglobr1, *hglobr2, *hglobr3, *hglobz1, *hglobz2, *hglobz3;
0096 TH1F *hglobr1h;
0097 TH1F *hcolsB, *hrowsB, *hcolsF, *hrowsF;
0098 TH1F *hglox1;
0099
0100 TH2F *htest, *htest2, *htest3, *htest4, *htest5;
0101
0102 TProfile *hp1, *hp2, *hp3, *hp4, *hp5;
0103
0104
0105
0106
0107 };
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120 PixelSimHitsTestForward::PixelSimHitsTestForward(const edm::ParameterSet &iConfig) {
0121
0122
0123
0124
0125 cout << " Construct PixelSimHitsTestForward " << endl;
0126
0127 trackerTopoToken = esConsumes<TrackerTopology, TrackerTopologyRcd>();
0128 trackerGeomToken = esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>();
0129 }
0130
0131 PixelSimHitsTestForward::~PixelSimHitsTestForward() {
0132
0133
0134 cout << " Destroy PixelSimHitsTestForward " << endl;
0135 }
0136
0137
0138
0139
0140
0141 void PixelSimHitsTestForward::beginJob() {
0142 using namespace edm;
0143 cout << "Initialize PixelSimHitsTestForward " << endl;
0144
0145
0146 hFile = new TFile("simhistos.root", "RECREATE");
0147
0148 const float max_charge = 200.;
0149 heloss1 = new TH1F("heloss1", "Eloss l1", 100, 0., max_charge);
0150 heloss2 = new TH1F("heloss2", "Eloss l2", 100, 0., max_charge);
0151 heloss3 = new TH1F("heloss3", "Eloss l3", 100, 0., max_charge);
0152
0153 hdetunit = new TH1F("hdetunit", "Det unit", 1000, 302000000., 302300000.);
0154 hpabs = new TH1F("hpabs", "Pabs", 100, 0., 100.);
0155 htof = new TH1F("htof", "TOF", 50, -25., 25.);
0156 hpid = new TH1F("hpid", "PID", 1000, 0., 1000.);
0157 htid = new TH1F("htid", "Track id", 100, 0., 100.);
0158
0159 hpixid = new TH1F("hpixid", "Pix det id", 10, 0., 10.);
0160 hpixsubid = new TH1F("hpixsubid", "Pix Barrel id", 10, 0., 10.);
0161 hlayerid = new TH1F("hlayerid", "Pix layer id", 10, 0., 10.);
0162 hladder1id = new TH1F("hladder1id", "Ladder L1 id", 100, -0.5, 49.5);
0163 hladder2id = new TH1F("hladder2id", "Ladder L2 id", 100, -0.5, 49.5);
0164 hladder3id = new TH1F("hladder3id", "Ladder L3 id", 100, -0.5, 49.5);
0165 hz1id = new TH1F("hz1id", "Z-index id L1", 10, 0., 10.);
0166 hz2id = new TH1F("hz2id", "Z-index id L2", 10, 0., 10.);
0167 hz3id = new TH1F("hz3id", "Z-index id L3", 10, 0., 10.);
0168
0169 hthick1 = new TH1F("hthick1", "Det 1 Thinckess", 400, 0., 0.04);
0170 hthick2 = new TH1F("hthick2", "Det 2 Thinckess", 400, 0., 0.04);
0171 hthick3 = new TH1F("hthick3", "Det 3 Thinckess", 400, 0., 0.04);
0172
0173 hlength1 = new TH1F("hlength1", "Det 1 Length", 700, -3.5, 3.5);
0174 hlength2 = new TH1F("hlength2", "Det 2 Length", 700, -3.5, 3.5);
0175 hlength3 = new TH1F("hlength3", "Det 3 Length", 700, -3.5, 3.5);
0176
0177 hwidth1 = new TH1F("hwidth1", "Det 1 Width", 200, -1., 1.);
0178 hwidth2 = new TH1F("hwidth2", "Det 2 Width", 200, -1., 1.);
0179 hwidth3 = new TH1F("hwidth3", "Det 3 Width", 200, -1., 1.);
0180
0181 hwidth1h = new TH1F("hwidth1h", "Det 1 Width half-m", 200, -1., 1.);
0182 hwidth2h = new TH1F("hwidth2h", "Det 2 Width half-m", 200, -1., 1.);
0183 hwidth3h = new TH1F("hwidth3h", "Det 3 Width half-m", 200, -1., 1.);
0184
0185 hsimHitsPerDet1 = new TH1F("hsimHitsPerDet1", "SimHits per det l1", 200, -0.5, 199.5);
0186 hsimHitsPerDet2 = new TH1F("hsimHitsPerDet2", "SimHits per det l2", 200, -0.5, 199.5);
0187 hsimHitsPerDet3 = new TH1F("hsimHitsPerDet3", "SimHits per det l3", 200, -0.5, 199.5);
0188 hsimHitsPerLay1 = new TH1F("hsimHitsPerLay1", "SimHits per layer l1", 2000, -0.5, 1999.5);
0189 hsimHitsPerLay2 = new TH1F("hsimHitsPerLay2", "SimHits per layer l2", 2000, -0.5, 1999.5);
0190 hsimHitsPerLay3 = new TH1F("hsimHitsPerLay3", "SimHits per layer l3", 2000, -0.5, 1999.5);
0191 hdetsPerLay1 = new TH1F("hdetsPerLay1", "Full dets per layer l1", 161, -0.5, 160.5);
0192 hdetsPerLay3 = new TH1F("hdetsPerLay3", "Full dets per layer l3", 353, -0.5, 352.5);
0193 hdetsPerLay2 = new TH1F("hdetsPerLay2", "Full dets per layer l2", 257, -0.5, 256.5);
0194 heloss1e = new TH1F("heloss1e", "Eloss e l1", 100, 0., max_charge);
0195 heloss2e = new TH1F("heloss2e", "Eloss e l2", 100, 0., max_charge);
0196 heloss3e = new TH1F("heloss3e", "Eloss e l3", 100, 0., max_charge);
0197
0198 heloss1mu = new TH1F("heloss1mu", "Eloss mu l1", 100, 0., max_charge);
0199 heloss2mu = new TH1F("heloss2mu", "Eloss mu l2", 100, 0., max_charge);
0200 heloss3mu = new TH1F("heloss3mu", "Eloss mu l3", 100, 0., max_charge);
0201
0202 htheta1 = new TH1F("htheta1", "Theta det1", 350, 0.0, 3.5);
0203 htheta2 = new TH1F("htheta2", "Theta det2", 350, 0.0, 3.5);
0204 htheta3 = new TH1F("htheta3", "Theta det3", 350, 0.0, 3.5);
0205 hphi1 = new TH1F("hphi1", "phi l1", 1400, -3.5, 3.5);
0206 hphi2 = new TH1F("hphi2", "phi l2", 1400, -3.5, 3.5);
0207 hphi3 = new TH1F("hphi3", "phi l3", 1400, -3.5, 3.5);
0208 hphi1h = new TH1F("hphi1h", "phi l1", 1400, -3.5, 3.5);
0209
0210 hdetr = new TH1F("hdetr", "det r", 1500, 0., 15.);
0211 hdetz = new TH1F("hdetz", "det z", 5200, -26., 26.);
0212 hdetphi1 = new TH1F("hdetphi1", "det phi l1", 700, -3.5, 3.5);
0213 hdetphi2 = new TH1F("hdetphi2", "det phi l2", 700, -3.5, 3.5);
0214 hdetphi3 = new TH1F("hdetphi3", "det phi l3", 700, -3.5, 3.5);
0215
0216 hcolsB = new TH1F("hcolsB", "cols per bar det", 450, 0., 450.);
0217 hrowsB = new TH1F("hrowsB", "rows per bar det", 200, 0., 200.);
0218 hcolsF = new TH1F("hcolsF", "cols per for det", 300, 0., 300.);
0219 hrowsF = new TH1F("hrowsF", "rows per for det", 200, 0., 200.);
0220
0221 hladder1idUp = new TH1F("hladder1idUp", "Ladder L1 id", 100, -0.5, 49.5);
0222 hladder2idUp = new TH1F("hladder2idUp", "Ladder L2 id", 100, -0.5, 49.5);
0223 hladder3idUp = new TH1F("hladder3idUp", "Ladder L3 id", 100, -0.5, 49.5);
0224
0225 hglobr1 = new TH1F("hglobr1", "global r1", 150, 0., 15.);
0226 hglobz1 = new TH1F("hglobz1", "global z1", 540, -27., 27.);
0227 hglobr2 = new TH1F("hglobr2", "global r2", 150, 0., 15.);
0228 hglobz2 = new TH1F("hglobz2", "global z2", 540, -27., 27.);
0229 hglobr3 = new TH1F("hglobr3", "global r3", 150, 0., 15.);
0230 hglobz3 = new TH1F("hglobz3", "global z3", 540, -27., 27.);
0231
0232 hglox1 = new TH1F("hglox1", "global x in l1", 200, -1., 1.);
0233 hglobr1h = new TH1F("hglobr1h", "global r1", 700, 4.1, 4.8);
0234
0235 htest = new TH2F("htest", " ", 108, -27., 27., 35, -3.5, 3.5);
0236 htest2 = new TH2F("htest2", " ", 108, -27., 27., 60, 0., 600.);
0237 htest3 = new TH2F("htest3", " ", 240, -12., 12., 240, -12., 12.);
0238 htest4 = new TH2F("htest4", " ", 80, -4., 4., 100, -5., 5.);
0239
0240 hp1 = new TProfile("hp1", " ", 50, 0., 50.);
0241 hp2 = new TProfile("hp2", " ", 50, 0., 50., " ");
0242 hp3 = new TProfile("hp3", " ", 50, 0., 50., -100., 100.);
0243 hp4 = new TProfile("hp4", " ", 50, 0., 50.);
0244 hp5 = new TProfile("hp5", " ", 50, 0., 50.);
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255
0256 }
0257
0258
0259 void PixelSimHitsTestForward::analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) {
0260
0261 edm::ESHandle<TrackerTopology> tTopo = iSetup.getHandle(trackerTopoToken);
0262
0263 const double PI = 3.142;
0264
0265 using namespace edm;
0266 if (PRINT)
0267 cout << " Analyze PixelSimHitsTestForward " << endl;
0268
0269
0270 edm::ESHandle<TrackerGeometry> geom = iSetup.getHandle(trackerGeomToken);
0271 const TrackerGeometry &theTracker(*geom);
0272
0273
0274 int totalNumOfSimHits = 0;
0275 int totalNumOfSimHits1 = 0;
0276 int totalNumOfSimHits2 = 0;
0277 int totalNumOfSimHits3 = 0;
0278
0279
0280
0281
0282
0283
0284 map<unsigned int, vector<PSimHit>, less<unsigned int> > SimHitMap1;
0285 map<unsigned int, vector<PSimHit>, less<unsigned int> > SimHitMap2;
0286 map<unsigned int, vector<PSimHit>, less<unsigned int> > SimHitMap3;
0287
0288 Handle<PSimHitContainer> PixelForwardHitsLowTof;
0289 Handle<PSimHitContainer> PixelForwardHitsHighTof;
0290
0291 iEvent.getByLabel("g4SimHits", "TrackerHitsPixelEndcapLowTof", PixelForwardHitsLowTof);
0292 iEvent.getByLabel("g4SimHits", "TrackerHitsPixelEndcapHighTof", PixelForwardHitsHighTof);
0293
0294
0295
0296
0297
0298
0299
0300
0301
0302 for (vector<PSimHit>::const_iterator isim = PixelForwardHitsLowTof->begin(); isim != PixelForwardHitsLowTof->end();
0303 ++isim) {
0304 totalNumOfSimHits++;
0305
0306 DetId detId = DetId((*isim).detUnitId());
0307 unsigned int detid = detId.det();
0308 unsigned int subid = detId.subdetId();
0309
0310 if (detid != 1 && subid != 2)
0311 cout << " error in det id " << detid << " " << subid << endl;
0312
0313
0314
0315
0316
0317 const PixelGeomDetUnit *theGeomDet = dynamic_cast<const PixelGeomDetUnit *>(theTracker.idToDet(detId));
0318 double detZ = theGeomDet->surface().position().z();
0319 double detR = theGeomDet->surface().position().perp();
0320 double detPhi = theGeomDet->surface().position().phi();
0321 hdetr->Fill(detR);
0322 hdetz->Fill(detZ);
0323
0324
0325
0326 double detThick = theGeomDet->specificSurface().bounds().thickness();
0327 double detLength = theGeomDet->specificSurface().bounds().length();
0328 double detWidth = theGeomDet->specificSurface().bounds().width();
0329
0330 int cols = theGeomDet->specificTopology().ncolumns();
0331 int rows = theGeomDet->specificTopology().nrows();
0332
0333 hcolsB->Fill(float(cols));
0334 hrowsB->Fill(float(rows));
0335 if (PRINT)
0336 cout << "Forward det z/r " << detZ << " " << detR << " " << detThick << " " << detLength << " " << detWidth << " "
0337 << cols << " " << rows << endl;
0338
0339 unsigned int disk = tTopo->pxfDisk(detId);
0340 unsigned int blade = tTopo->pxfBlade(detId);
0341 unsigned int zindex = tTopo->pxfModule(detId);
0342 unsigned int side = tTopo->pxfSide(detId);
0343 unsigned int panel = tTopo->pxfPanel(detId);
0344
0345 if (PRINT)
0346 cout << "det " << subid << ", disk " << disk << ", blade " << blade << ", module " << zindex << ", side " << side
0347 << ", panel " << panel << " pos = " << detZ << " " << detR << " " << detPhi << endl;
0348
0349
0350
0351
0352
0353
0354
0355 float eloss = (*isim).energyLoss() * 1000000 / 3.7;
0356 float tof = (*isim).timeOfFlight();
0357 float p = (*isim).pabs();
0358 float theta = (*isim).thetaAtEntry();
0359 float phi = (*isim).phiAtEntry();
0360 int pid = abs((*isim).particleType());
0361 int tid = (*isim).trackId();
0362 int procType = (*isim).processType();
0363
0364 float x = (*isim).entryPoint().x();
0365 float y = (*isim).entryPoint().y();
0366 float z = (*isim).entryPoint().z();
0367
0368 float x2 = (*isim).exitPoint().x();
0369 float y2 = (*isim).exitPoint().y();
0370 float z2 = (*isim).exitPoint().z();
0371
0372 float dz = abs(z - z2);
0373 bool moduleDirectionUp = (z < z2);
0374
0375 float xpos = (x + x2) / 2.;
0376 float ypos = (y + y2) / 2.;
0377 float zpos = (z + z2) / 2.;
0378
0379 if (PRINT)
0380 cout << "simhit " << pid << " " << tid << " " << procType << " " << tof << " " << eloss << " " << p << " " << x
0381 << " " << y << " " << z << " " << dz << endl;
0382 if (PRINT)
0383 cout << " pos " << xpos << " " << ypos << " " << zpos;
0384
0385 LocalPoint loc(xpos, ypos, zpos);
0386
0387 double gloX = theGeomDet->surface().toGlobal(loc).x();
0388 double gloY = theGeomDet->surface().toGlobal(loc).y();
0389 double gloR = theGeomDet->surface().toGlobal(loc).perp();
0390 double gloZ = theGeomDet->surface().toGlobal(loc).z();
0391 if (PRINT)
0392 cout << ", global " << gloX << " " << gloY << " " << gloR << " " << gloZ << endl;
0393
0394 htest3->Fill(gloX, gloY);
0395 hdetunit->Fill(float(detId.rawId()));
0396 hpabs->Fill(p);
0397 htof->Fill(tof);
0398 hpid->Fill(float(pid));
0399 htid->Fill(float(tid));
0400 hpixid->Fill(float(detid));
0401 hpixsubid->Fill(float(subid));
0402 hlayerid->Fill(float(disk));
0403
0404
0405
0406
0407
0408 if (disk == 1) {
0409
0410 totalNumOfSimHits1++;
0411 heloss1->Fill(eloss);
0412 if (pid == 11)
0413 heloss1e->Fill(eloss);
0414 else
0415 heloss1mu->Fill(eloss);
0416 hladder1id->Fill(float(blade));
0417 hz1id->Fill(float(zindex));
0418 hthick1->Fill(dz);
0419 hlength1->Fill(y);
0420 if (blade == 5 || blade == 6 || blade == 15 || blade == 16) {
0421
0422 hwidth1h->Fill(x);
0423 if (pid == 13 && p > 1.) {
0424 hphi1h->Fill(phi);
0425 hglox1->Fill(gloX);
0426 hglobr1h->Fill(gloR);
0427
0428
0429
0430
0431
0432
0433
0434
0435
0436
0437 }
0438 } else {
0439 hwidth1->Fill(x);
0440 if (pid == 13 && p > 1.)
0441 hphi1->Fill(phi);
0442 }
0443 SimHitMap1[detId.rawId()].push_back((*isim));
0444 htheta1->Fill(theta);
0445 hglobr1->Fill(gloR);
0446 hglobz1->Fill(gloZ);
0447
0448
0449 htest->Fill(gloZ, ypos);
0450 if (pid != 11)
0451 htest2->Fill(gloZ, eloss);
0452
0453 if (pid != 11 && moduleDirectionUp)
0454 hladder1idUp->Fill(float(blade));
0455
0456 if (blade == 6)
0457 htest4->Fill(xpos, gloX);
0458 hp1->Fill(float(blade), detR, 1);
0459 hp2->Fill(float(blade), detPhi);
0460 hdetphi1->Fill(detPhi);
0461
0462 } else if (disk == 2) {
0463
0464 totalNumOfSimHits2++;
0465 heloss2->Fill(eloss);
0466 if (pid == 11)
0467 heloss2e->Fill(eloss);
0468 else
0469 heloss2mu->Fill(eloss);
0470 hladder2id->Fill(float(blade));
0471 hz2id->Fill(float(zindex));
0472 hthick2->Fill(dz);
0473 hlength2->Fill(y);
0474 if (blade == 8 || blade == 9 || blade == 24 || blade == 25) {
0475 hwidth2h->Fill(x);
0476 } else {
0477 hwidth2->Fill(x);
0478 if (pid == 13 && p > 1.)
0479 hphi2->Fill(phi);
0480 }
0481 SimHitMap2[detId.rawId()].push_back((*isim));
0482 hglobr2->Fill(gloR);
0483 hglobz2->Fill(gloZ);
0484 hdetphi2->Fill(detPhi);
0485 if (pid != 11 && moduleDirectionUp)
0486 hladder2idUp->Fill(float(blade));
0487
0488 } else if (disk == 3) {
0489
0490 totalNumOfSimHits3++;
0491 heloss3->Fill(eloss);
0492 if (pid == 11)
0493 heloss3e->Fill(eloss);
0494 else
0495 heloss3mu->Fill(eloss);
0496
0497 hladder3id->Fill(float(blade));
0498 hz3id->Fill(float(zindex));
0499 hthick3->Fill(dz);
0500 hlength3->Fill(y);
0501 if (blade == 11 || blade == 12 || blade == 33 || blade == 34) {
0502 hwidth3h->Fill(x);
0503 } else {
0504 hwidth3->Fill(x);
0505 if (pid == 13 && p > 1.)
0506 hphi3->Fill(phi);
0507 }
0508 SimHitMap3[detId.rawId()].push_back((*isim));
0509 hglobr3->Fill(gloR);
0510 hglobz3->Fill(gloZ);
0511 hdetphi3->Fill(detPhi);
0512 if (pid != 11 && moduleDirectionUp)
0513 hladder3idUp->Fill(float(blade));
0514 }
0515 }
0516
0517 hsimHitsPerLay1->Fill(float(totalNumOfSimHits1));
0518 hsimHitsPerLay2->Fill(float(totalNumOfSimHits2));
0519 hsimHitsPerLay3->Fill(float(totalNumOfSimHits3));
0520
0521 int numberOfDetUnits1 = SimHitMap1.size();
0522 int numberOfDetUnits2 = SimHitMap2.size();
0523 int numberOfDetUnits3 = SimHitMap3.size();
0524 int numberOfDetUnits = numberOfDetUnits1 + numberOfDetUnits2 + numberOfDetUnits3;
0525
0526 if (PRINT)
0527 cout << " Number of full det-units = " << numberOfDetUnits << " total simhits = " << totalNumOfSimHits << endl;
0528
0529 hdetsPerLay1->Fill(float(numberOfDetUnits1));
0530 hdetsPerLay2->Fill(float(numberOfDetUnits2));
0531 hdetsPerLay3->Fill(float(numberOfDetUnits3));
0532
0533 map<unsigned int, vector<PSimHit>, less<unsigned int> >::iterator simhit_map_iterator;
0534 for (simhit_map_iterator = SimHitMap1.begin(); simhit_map_iterator != SimHitMap1.end(); simhit_map_iterator++) {
0535 if (PRINT)
0536 cout << " Lay1 det = " << simhit_map_iterator->first << " simHits = " << (simhit_map_iterator->second).size()
0537 << endl;
0538 hsimHitsPerDet1->Fill(float((simhit_map_iterator->second).size()));
0539 }
0540 for (simhit_map_iterator = SimHitMap2.begin(); simhit_map_iterator != SimHitMap2.end(); simhit_map_iterator++) {
0541 if (PRINT)
0542 cout << " Lay2 det = " << simhit_map_iterator->first << " simHits = " << (simhit_map_iterator->second).size()
0543 << endl;
0544 hsimHitsPerDet2->Fill(float((simhit_map_iterator->second).size()));
0545 }
0546 for (simhit_map_iterator = SimHitMap3.begin(); simhit_map_iterator != SimHitMap3.end(); simhit_map_iterator++) {
0547 if (PRINT)
0548 cout << " Lay3 det = " << simhit_map_iterator->first << " simHits = " << (simhit_map_iterator->second).size()
0549 << endl;
0550 hsimHitsPerDet3->Fill(float((simhit_map_iterator->second).size()));
0551 }
0552 }
0553
0554 void PixelSimHitsTestForward::endJob() {
0555 cout << " End PixelSimHitsTestForward " << endl;
0556 hFile->Write();
0557 hFile->Close();
0558
0559
0560
0561
0562
0563
0564
0565
0566
0567
0568
0569
0570
0571
0572
0573
0574
0575 }
0576
0577
0578 DEFINE_FWK_MODULE(PixelSimHitsTestForward);