20 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_GlobalRecHitsAnalyzer";
29 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
31 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
84 <<
"\n===============================\n"
85 <<
"Initialized as EDProducer with parameter values:\n"
86 <<
" Name = " <<
fName <<
"\n"
87 <<
" Verbosity = " << verbosity <<
"\n"
88 <<
" Frequency = " << frequency <<
"\n"
89 <<
" GetProv = " << getAllProvenances <<
"\n"
90 <<
" PrintProv = " << printProvenanceInfo <<
"\n"
91 <<
" ECalEBSrc = " << ECalEBSrc_.label()
92 <<
":" << ECalEBSrc_.instance() <<
"\n"
93 <<
" ECalUncalEBSrc = " << ECalUncalEBSrc_.
label()
94 <<
":" << ECalUncalEBSrc_.
instance() <<
"\n"
95 <<
" ECalEESrc = " << ECalEESrc_.
label()
96 <<
":" << ECalUncalEESrc_.
instance() <<
"\n"
97 <<
" ECalUncalEESrc = " << ECalUncalEESrc_.
label()
98 <<
":" << ECalEESrc_.
instance() <<
"\n"
99 <<
" ECalESSrc = " << ECalESSrc_.
label()
100 <<
":" << ECalESSrc_.
instance() <<
"\n"
101 <<
" HCalSrc = " << HCalSrc_.
label()
102 <<
":" << HCalSrc_.
instance() <<
"\n"
103 <<
" SiStripSrc = " << SiStripSrc_.
label()
104 <<
":" << SiStripSrc_.
instance() <<
"\n"
105 <<
" SiPixelSrc = " << SiPxlSrc_.
label()
106 <<
":" << SiPxlSrc_.
instance() <<
"\n"
107 <<
" MuDTSrc = " << MuDTSrc_.
label()
108 <<
":" << MuDTSrc_.
instance() <<
"\n"
109 <<
" MuDTSimSrc = " << MuDTSimSrc_.
label()
110 <<
":" << MuDTSimSrc_.
instance() <<
"\n"
111 <<
" MuCSCSrc = " << MuCSCSrc_.
label()
112 <<
":" << MuCSCSrc_.
instance() <<
"\n"
113 <<
" MuRPCSrc = " << MuRPCSrc_.
label()
114 <<
":" << MuRPCSrc_.
instance() <<
"\n"
115 <<
" MuRPCSimSrc = " << MuRPCSimSrc_.
label()
116 <<
":" << MuRPCSimSrc_.
instance() <<
"\n"
117 <<
"===============================\n";
124 if (verbosity > 0 ) {
138 string SiStripString[19] = {
"TECW1",
"TECW2",
"TECW3",
"TECW4",
"TECW5",
139 "TECW6",
"TECW7",
"TECW8",
"TIBL1",
"TIBL2",
140 "TIBL3",
"TIBL4",
"TIDW1",
"TIDW2",
"TIDW3",
141 "TOBL1",
"TOBL2",
"TOBL3",
"TOBL4"};
142 for(
int i = 0;
i<19; ++
i) {
147 string hcharname, hchartitle;
149 for(
int amend = 0; amend < 19; ++amend) {
150 hcharname =
"hSiStripn_"+SiStripString[amend];
151 hchartitle= SiStripString[amend]+
" rechits";
154 SiStripString[amend],1);
156 hcharname =
"hSiStripResX_"+SiStripString[amend];
157 hchartitle= SiStripString[amend]+
" rechit x resolution";
160 +SiStripString[amend],1);
162 hcharname =
"hSiStripResY_"+SiStripString[amend];
163 hchartitle= SiStripString[amend]+
" rechit y resolution";
166 SiStripString[amend],1);
173 string HCalString[4]={
"HB",
"HE",
"HF",
"HO"};
174 float HCalnUpper[4]={3000.,3000.,3000.,3000.};
175 float HCalnLower[4]={0.,0.,0.,0.};
176 for(
int j =0;
j <4; ++
j) {
182 for(
int amend = 0; amend < 4; ++amend) {
183 hcharname =
"hHcaln_"+HCalString[amend];
184 hchartitle= HCalString[amend]+
" rechits";
189 hcharname =
"hHcalRes_"+HCalString[amend];
190 hchartitle= HCalString[amend]+
" rechit resolution";
198 string ECalString[3] = {
"EB",
"EE",
"ES"};
199 int ECalnBins[3] = {1000,3000,150};
200 float ECalnUpper[3] = {20000., 62000., 3000.};
201 float ECalnLower[3] = {0., 0., 0.};
202 int ECalResBins[3] = {200,200,200};
203 float ECalResUpper[3] = {1., 0.3, .0002};
204 float ECalResLower[3] = {-1., -0.3, -.0002};
205 for(
int i =0;
i<3; ++
i) {
211 for(
int amend = 0; amend < 3; ++amend) {
212 hcharname =
"hEcaln_"+ECalString[amend];
213 hchartitle= ECalString[amend]+
" rechits";
215 ECalnLower[amend], ECalnUpper[amend]);
218 hcharname =
"hEcalRes_"+ECalString[amend];
219 hchartitle= ECalString[amend]+
" rechit resolution";
222 ECalResUpper[amend]);
228 string SiPixelString[7] = {
"BRL1",
"BRL2",
"BRL3",
"FWD1n",
"FWD1p",
230 for(
int j =0;
j<7; ++
j) {
237 for(
int amend = 0; amend < 7; ++amend) {
238 hcharname =
"hSiPixeln_"+SiPixelString[amend];
239 hchartitle= SiPixelString[amend]+
" rechits";
242 SiPixelString[amend],1);
244 hcharname =
"hSiPixelResX_"+SiPixelString[amend];
245 hchartitle= SiPixelString[amend]+
" rechit x resolution";
248 SiPixelString[amend],1);
250 hcharname =
"hSiPixelResY_"+SiPixelString[amend];
251 hchartitle= SiPixelString[amend]+
" rechit y resolution";
255 SiPixelString[amend],1);
266 string n_List[3] = {
"hDtMuonn",
"hCSCn",
"hRPCn"};
267 string hist_string[3] = {
"Dt",
"CSC",
"RPC"};
269 for(
int amend=0; amend<3; ++amend) {
270 hchartitle = hist_string[amend]+
" rechits";
292 hcharname =
"hDtMuonRes";
293 hchartitle =
"DT wire distance resolution";
295 hcharname =
"CSCResRDPhi";
296 hchartitle =
"CSC perp*dphi resolution";
298 hcharname =
"hRPCResX";
299 hchartitle =
"RPC rechits x resolution";
313 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_endJob";
316 <<
"Terminating having processed " <<
count <<
" events.";
323 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_analyze";
329 int nrun = iEvent.
id().
run();
334 <<
"Processing run " << nrun <<
", event " << nevt
335 <<
" (" <<
count <<
" events total)";
339 <<
"Processing run " << nrun <<
", event " << nevt
340 <<
" (" <<
count <<
" events total)";
347 std::vector<const edm::Provenance*> AllProv;
352 <<
"Number of Provenances = " << AllProv.size();
355 TString eventout(
"\nProvenance info:\n");
357 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
358 eventout +=
"\n ******************************";
359 eventout +=
"\n Module : ";
360 eventout += AllProv[
i]->moduleLabel();
361 eventout +=
"\n ProductID : ";
362 eventout += AllProv[
i]->productID().id();
363 eventout +=
"\n ClassName : ";
364 eventout += AllProv[
i]->className();
365 eventout +=
"\n InstanceName : ";
366 eventout += AllProv[
i]->productInstanceName();
367 eventout +=
"\n BranchName : ";
368 eventout += AllProv[
i]->branchName();
370 eventout +=
"\n ******************************\n";
389 <<
"Done gathering data from event.";
397 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_fillECal";
401 eventout =
"\nGathering info:";
411 bool validUncalibRecHitEB =
true;
412 if (!EcalUncalibRecHitEB.
isValid()) {
414 <<
"Unable to find EcalUncalRecHitEB in event!";
415 validUncalibRecHitEB =
false;
420 bool validRecHitEB =
true;
423 <<
"Unable to find EcalRecHitEB in event!";
424 validRecHitEB =
false;
429 bool validXFrame =
true;
430 if (!crossingFrame.
isValid()) {
432 <<
"Unable to find cal barrel crossingFrame in event!";
438 std::auto_ptr<MixCollection<PCaloHit> >
443 = barrelHits->begin();
444 hitItr != barrelHits->end();
449 uint32_t crystid = ebid.
rawId();
450 ebSimMap[crystid] += hitItr->energy();
456 if (validUncalibRecHitEB && validRecHitEB) {
462 EBUncalibRecHit->
begin();
463 uncalibRecHit != EBUncalibRecHit->
end();
470 if (myRecHit != EBRecHit->
end()) {
477 eventout +=
"\n Number of EBRecHits collected:............ ";
478 eventout += nEBRecHits;
488 bool validuncalibRecHitEE =
true;
489 if (!EcalUncalibRecHitEE.
isValid()) {
491 <<
"Unable to find EcalUncalRecHitEE in event!";
492 validuncalibRecHitEE =
false;
497 bool validRecHitEE =
true;
500 <<
"Unable to find EcalRecHitEE in event!";
501 validRecHitEE =
false;
507 if (!crossingFrame.
isValid()) {
509 <<
"Unable to find cal endcap crossingFrame in event!";
515 std::auto_ptr<MixCollection<PCaloHit> >
520 = endcapHits->begin();
521 hitItr != endcapHits->end();
526 uint32_t crystid = eeid.
rawId();
527 eeSimMap[crystid] += hitItr->energy();
532 if (validuncalibRecHitEE && validRecHitEE) {
539 EEUncalibRecHit->
begin();
540 uncalibRecHit != EEUncalibRecHit->
end();
547 if (myRecHit != EERecHit->
end()) {
554 eventout +=
"\n Number of EERecHits collected:............ ";
555 eventout += nEERecHits;
565 bool validRecHitES =
true;
568 <<
"Unable to find EcalRecHitES in event!";
569 validRecHitES =
false;
575 if (!crossingFrame.
isValid()) {
577 <<
"Unable to find cal preshower crossingFrame in event!";
583 std::auto_ptr<MixCollection<PCaloHit> >
588 = preshowerHits->begin();
589 hitItr != preshowerHits->end();
594 uint32_t crystid = esid.
rawId();
595 esSimMap[crystid] += hitItr->energy();
605 recHit != ESRecHit->
end();
615 eventout +=
"\n Number of ESRecHits collected:............ ";
616 eventout += nESRecHits;
630 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_fillHCal";
634 eventout =
"\nGathering info:";
641 <<
"Unable to find CaloGeometry in event!";
646 edm::PCaloHitContainer::const_iterator itHit;
653 bool validhcalHits =
true;
656 <<
"Unable to find hcalHits in event!";
657 validhcalHits =
false;
667 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin();
668 simhits != simhitResult->end();
672 uint32_t cellid = detId.
rawId();
675 fHBEnergySimHits[cellid] += simhits->energy();
678 fHEEnergySimHits[cellid] += simhits->energy();
681 fHOEnergySimHits[cellid] += simhits->energy();
684 fHFEnergySimHits[cellid] += simhits->energy();
690 Double_t maxHBEnergy = 0.;
691 Double_t maxHEEnergy = 0.;
692 Double_t maxHFEnergy = 0.;
694 Double_t maxHBPhi = -1000.;
695 Double_t maxHEPhi = -1000.;
696 Double_t maxHOPhi = -1000.;
697 Double_t maxHFPhi = -1000.;
700 Double_t
PI = 3.141592653589;
705 std::vector<edm::Handle<HBHERecHitCollection> > hbhe;
707 bool validHBHE =
true;
708 if (!hbhe[0].isValid()) {
710 <<
"Unable to find any HBHERecHitCollections in event!";
715 std::vector<edm::Handle<HBHERecHitCollection> >::iterator ihbhe;
719 for (ihbhe = hbhe.begin(); ihbhe != hbhe.end(); ++ihbhe) {
723 jhbhe != (*ihbhe)->end(); ++jhbhe) {
730 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
732 if ( (jhbhe->energy()) > maxHBEnergy ) {
733 maxHBEnergy = jhbhe->energy();
742 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
744 if ( (jhbhe->energy()) > maxHEEnergy ) {
745 maxHEEnergy = jhbhe->energy();
752 jhbhe != (*ihbhe)->end(); ++jhbhe) {
761 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
764 float deltaphi = maxHBPhi - fPhi;
765 if (fPhi > maxHBPhi) { deltaphi = fPhi - maxHBPhi;}
766 if (deltaphi > PI) { deltaphi = 2.0 * PI - deltaphi;}
769 fHBEnergySimHits[cell.rawId()]);
777 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
780 float deltaphi = maxHEPhi - fPhi;
781 if (fPhi > maxHEPhi) { deltaphi = fPhi - maxHEPhi;}
782 if (deltaphi > PI) { deltaphi = 2.0 * PI - deltaphi;}
784 fHEEnergySimHits[cell.rawId()]);
791 eventout +=
"\n Number of HBRecHits collected:............ ";
796 eventout +=
"\n Number of HERecHits collected:............ ";
806 std::vector<edm::Handle<HFRecHitCollection> > hf;
809 if (!hf[0].isValid()) {
811 <<
"Unable to find any HFRecHitCollections in event!";
815 std::vector<edm::Handle<HFRecHitCollection> >::iterator
ihf;
818 for (ihf = hf.begin(); ihf != hf.end(); ++
ihf) {
822 jhf != (*ihf)->end(); ++jhf) {
829 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
831 if ( (jhf->energy()) > maxHFEnergy ) {
832 maxHFEnergy = jhf->energy();
839 jhf != (*ihf)->end(); ++jhf) {
848 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
851 float deltaphi = maxHBPhi - fPhi;
852 if (fPhi > maxHFPhi) { deltaphi = fPhi - maxHFPhi;}
853 if (deltaphi > PI) { deltaphi = 2.0 * PI - deltaphi;}
855 mehHcalRes[2]->
Fill(jhf->energy()-fHFEnergySimHits[cell.rawId()]);
861 eventout +=
"\n Number of HFDigis collected:.............. ";
870 std::vector<edm::Handle<HORecHitCollection> > ho;
873 if (!ho[0].isValid()) {
875 <<
"Unable to find any HORecHitCollections in event!";
880 std::vector<edm::Handle<HORecHitCollection> >::iterator iho;
883 for (iho = ho.begin(); iho != ho.end(); ++iho) {
886 jho != (*iho)->end(); ++jho) {
895 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
898 float deltaphi = maxHOPhi - fPhi;
899 if (fPhi > maxHOPhi) { deltaphi = fPhi - maxHOPhi;}
900 if (deltaphi > PI) { deltaphi = 2.0 * PI - deltaphi;}
901 mehHcalRes[3]->
Fill(jho->energy()-fHOEnergySimHits[cell.rawId()]);
907 eventout +=
"\n Number of HODigis collected:.............. ";
928 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_fillTrk";
932 eventout =
"\nGathering info:";
937 bool validstrip =
true;
938 if (!rechitsmatched.
isValid()) {
940 <<
"Unable to find stripmatchedrechits in event!";
950 <<
"Unable to find TrackerDigiGeometry in event!";
956 int nStripBrl = 0, nStripFwd = 0;
959 for (TrackerGeometry::DetContainer::const_iterator it =
961 it != pDD->dets().end(); ++it) {
963 uint32_t myid = ((*it)->geographicalId()).rawId();
969 if (rechitmatchedMatch != rechitsmatched->end()) {
975 for ( itermatched = rechitmatchedRangeIteratorBegin;
976 itermatched != rechitmatchedRangeIteratorEnd;
982 float mindist = 999999.;
983 float distx = 999999.;
984 float disty = 999999.;
985 float dist = 999999.;
986 std::pair<LocalPoint,LocalVector> closestPair;
989 float rechitmatchedx = position.
x();
990 float rechitmatchedy = position.
y();
1000 std::pair<LocalPoint,LocalVector> hitPair;
1002 for(std::vector<PSimHit>::const_iterator
m =
matched.begin();
1006 distx = fabs(rechitmatchedx - hitPair.first.x());
1007 disty = fabs(rechitmatchedy - hitPair.first.y());
1008 dist =
sqrt(distx*distx+disty*disty);
1012 closestPair = hitPair;
1132 eventout +=
"\n Number of BrlStripRecHits collected:...... ";
1133 eventout += nStripBrl;
1136 for(
int i =8;
i<12; ++
i)
1138 for(
int i =16;
i<19; ++
i)
1142 eventout +=
"\n Number of FrwdStripRecHits collected:..... ";
1143 eventout += nStripFwd;
1145 for(
int i =0;
i<8; ++
i)
1147 for(
int i =12;
i<16; ++
i)
1155 bool validpixel =
true;
1158 <<
"Unable to find SiPixelRecHitCollection in event!";
1167 <<
"Unable to find TrackerDigiGeometry in event!";
1172 int nPxlBrl = 0, nPxlFwd = 0;
1174 for (TrackerGeometry::DetContainer::const_iterator it =
1175 geom->dets().begin();
1176 it != geom->dets().end(); ++it) {
1178 uint32_t myid = ((*it)->geographicalId()).rawId();
1179 DetId detId = ((*it)->geographicalId());
1185 if (pixeldet == recHitColl->end())
continue;
1195 for ( ; pixeliter != pixelrechitRangeIteratorEnd; ++pixeliter) {
1200 if ( !matched.empty() ) {
1202 float closest = 9999.9;
1204 float rechit_x = lp.
x();
1205 float rechit_y = lp.
y();
1211 for (std::vector<PSimHit>::const_iterator
m = matched.begin();
1212 m != matched.end(); ++
m) {
1214 float sim_x1 = (*m).entryPoint().x();
1215 float sim_x2 = (*m).exitPoint().x();
1216 float sim_xpos = 0.5*(sim_x1+sim_x2);
1218 float sim_y1 = (*m).entryPoint().y();
1219 float sim_y2 = (*m).exitPoint().y();
1220 float sim_ypos = 0.5*(sim_y1+sim_y2);
1222 float x_res = fabs(sim_xpos - rechit_x);
1223 float y_res = fabs(sim_ypos - rechit_y);
1225 float dist =
sqrt(x_res*x_res + y_res*y_res);
1227 if ( dist < closest ) {
1259 if (tTopo->
pxfDisk(myid) == 1) {
1260 if (tTopo->
pxfSide(myid) == 1) {
1264 if (tTopo->
pxfSide(myid) == 2) {
1269 if (tTopo->
pxfDisk(myid) == 2) {
1270 if (tTopo->
pxfSide(myid) == 1) {
1274 if (tTopo->
pxfSide(myid) == 2) {
1286 eventout +=
"\n Number of BrlPixelRecHits collected:...... ";
1287 eventout += nPxlBrl;
1289 for(
int i=0;
i<3; ++
i) {
1294 eventout +=
"\n Number of FrwdPixelRecHits collected:..... ";
1295 eventout += nPxlFwd;
1298 for(
int i=3;
i<7; ++
i) {
1312 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_fillMuon";
1316 eventout =
"\nGathering info:";
1323 <<
"Unable to find DTMuonGeometryRecord in event!";
1329 bool validdtsim =
true;
1332 <<
"Unable to find dtsimHits in event!";
1338 bool validdtrec =
true;
1341 <<
"Unable to find dtRecHits in event!";
1345 if (validdtsim && validdtrec) {
1347 std::map<DTWireId, edm::PSimHitContainer> simHitsPerWire =
1350 std::map<DTWireId, std::vector<DTRecHit1DPair> > recHitsPerWire =
1353 int nDt =
compute(dtGeom.
product(), simHitsPerWire, recHitsPerWire, 1);
1356 eventout +=
"\n Number of DtMuonRecHits collected:........ ";
1368 bool validXFrame =
true;
1371 <<
"Unable to find muo CSC crossingFrame in event!";
1372 validXFrame =
false;
1379 hitItr !=
simHits.end(); ++hitItr) {
1380 theMap[hitItr->detUnitId()].push_back(*hitItr);
1389 <<
"Unable to find CSCMuonGeometryRecord in event!";
1397 bool validCSC =
true;
1400 <<
"Unable to find CSC RecHits in event!";
1409 recHitItr != cscRecHits->end(); ++recHitItr) {
1411 int detId = (*recHitItr).cscDetId().rawId();
1414 std::map<int, edm::PSimHitContainer>::const_iterator mapItr =
1416 if (mapItr !=
theMap.end()) {
1417 simHits = mapItr->second;
1420 if (simHits.size() == 1) {
1433 eventout +=
"\n Number of CSCRecHits collected:........... ";
1440 std::map<double, int> mapsim, maprec;
1441 std::map<int, double> nmapsim, nmaprec;
1447 <<
"Unable to find RPCMuonGeometryRecord in event!";
1453 bool validrpcsim =
true;
1456 <<
"Unable to find RPCSimHit in event!";
1457 validrpcsim =
false;
1462 bool validrpc =
true;
1465 <<
"Unable to find RPCRecHit in event!";
1473 for (recIt = recHit->begin(); recIt != recHit->end(); ++recIt) {
1475 const RPCRoll *roll =
dynamic_cast<const RPCRoll*
>(rpcGeom->roll(Rid));
1480 "\n Number of RPCRecHits collected:........... ";
1489 LocalPoint rhitlocal = (*recIt).localPosition();
1490 double rhitlocalx = rhitlocal.
x();
1491 maprec[rhitlocalx] = nrec;
1495 for (std::map<double,int>::iterator
iter = maprec.begin();
1498 nmaprec[
i] = (*iter).first;
1503 edm::PSimHitContainer::const_iterator simIt;
1504 for (simIt = simHit->begin(); simIt != simHit->end(); simIt++) {
1505 int ptype = (*simIt).particleType();
1506 if (ptype == 13 || ptype == -13) {
1508 LocalPoint shitlocal = (*simIt).localPosition();
1509 double shitlocalx = shitlocal.
x();
1510 mapsim[shitlocalx] = nsim;
1515 for (std::map<double,int>::iterator
iter = mapsim.begin();
1518 nmapsim[
i] = (*iter).first;
1523 for (
int r = 0;
r < nsim;
r++) {
1530 eventout +=
"\n Number of RPCRecHits collected:........... ";
1543 std::pair<LocalPoint,LocalVector>
1551 LocalPoint localHit = plane.toLocal(globalpos);
1558 float scale = -localHit.
z() / dir.
z();
1570 return std::pair<LocalPoint,LocalVector>( projectedPos, localStripDir);
1574 std::map<DTWireId, std::vector<DTRecHit1DPair> >
1577 std::map<DTWireId, std::vector<DTRecHit1DPair> >
ret;
1580 rechit != dt1DRecHitPairs->end(); rechit++) {
1581 ret[(*rechit).wireId()].push_back(*rechit);
1594 float xEntry = entryP.
x()-xwire;
1595 float xExit = exitP.
x()-xwire;
1598 return fabs(xEntry - (entryP.
z()*(xExit-xEntry))/(exitP.
z()-entryP.
z()));
1602 template <
typename type>
1606 const std::vector<type>& recHits,
1607 const float simHitDist) {
1609 const type* theBestRecHit = 0;
1611 for(
typename std::vector<type>::const_iterator recHit = recHits.begin();
1612 recHit != recHits.end();
1615 if(fabs(distTmp-simHitDist) < res) {
1616 res = fabs(distTmp-simHitDist);
1617 theBestRecHit = &(*recHit);
1621 return theBestRecHit;
1641 template <
typename type>
1649 std::map<DTWireId, std::vector<PSimHit> > simHitsPerWire = _simHitsPerWire;
1650 std::map<DTWireId, std::vector<type> > recHitsPerWire = _recHitsPerWire;
1653 for(
std::map<
DTWireId, std::vector<PSimHit> >::const_iterator wireAndSHits =
1654 simHitsPerWire.begin();
1655 wireAndSHits != simHitsPerWire.end();
1657 DTWireId wireId = (*wireAndSHits).first;
1658 std::vector<PSimHit> simHitsInCell = (*wireAndSHits).second;
1672 if(simHitWireDist>2.1) {
1677 if(recHitsPerWire.find(wireId) == recHitsPerWire.end()) {
1681 std::vector<type> recHits = recHitsPerWire[wireId];
1684 const type* theBestRecHit =
edm::EDGetTokenT< SiPixelRecHitCollection > SiPxlSrc_Token_
void getManyByType(std::vector< Handle< PROD > > &results) const
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
T getParameter(std::string const &) const
EventNumber_t event() const
GlobalRecHitsAnalyzer(const edm::ParameterSet &)
T getUntrackedParameter(std::string const &, T const &) const
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
void getAllProvenance(std::vector< Provenance const * > &provenances) const
MonitorElement * mehCSCResRDPhi
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
std::vector< PCaloHit > PCaloHitContainer
unsigned int tibLayer(const DetId &id) const
virtual float stripAngle(float strip) const =0
edm::EDGetTokenT< EBRecHitCollection > ECalEBSrc_Token_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
static const int sdHcalOut
std::vector< PSimHit > matched
edm::EDGetTokenT< ESRecHitCollection > ECalESSrc_Token_
MonitorElement * mehDtMuonn
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< CrossingFrame< PCaloHit > > ESHits_Token_
MonitorElement * mehHcalRes[4]
unsigned int pxfDisk(const DetId &id) const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Sin< T >::type sin(const T &t)
edm::EDGetTokenT< CrossingFrame< PSimHit > > MuCSCHits_Token_
void fillMuon(const edm::Event &, const edm::EventSetup &)
Geom::Phi< T > phi() const
std::vector< EcalUncalibratedRecHit >::const_iterator const_iterator
static const PSimHit * findMuSimHit(const edm::PSimHitContainer &hits)
Select the SimHit from a muon in a vector of SimHits.
edm::InputTag ECalUncalEBSrc_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EEHits_Token_
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
unsigned int tidWheel(const DetId &id) const
float simHitDistFromWire(const DTLayer *layer, DTWireId wireId, const PSimHit &hit)
edm::InputTag ECalUncalEESrc_
MonitorElement * mehEcalRes[3]
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
const Plane & surface() const
The nominal surface of the GeomDet.
edm::EDGetTokenT< edm::PSimHitContainer > MuDTSimSrc_Token_
MonitorElement * mehSiStripn[19]
edm::InputTag SiStripSrc_
virtual float strip(const LocalPoint &) const =0
void plotResolution(const PSimHit &simHit, const CSCRecHit2D &recHit, const CSCLayer *layer, int chamberType)
const DTLayer * layer(DTLayerId id) const
Return a layer given its id.
uint32_t rawId() const
get the raw id
std::map< int, edm::PSimHitContainer > theMap
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire(const DTRecHitCollection *dt1DRecHitPairs)
const DTTopology & specificTopology() const
Local3DPoint exitPoint() const
Exit point in the local Det frame.
edm::EDGetTokenT< EBUncalibratedRecHitCollection > ECalUncalEBSrc_Token_
const CSCChamberSpecs * specs() const
static const int sdPxlBrl
Local3DPoint localPosition() const
int compute(const DTGeometry *dtGeom, const std::map< DTWireId, std::vector< PSimHit > > &simHitsPerWire, const std::map< DTWireId, std::vector< type > > &recHitsPerWire, int step)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< CSCRecHit2DCollection > MuCSCSrc_Token_
MonitorElement * mehSiPixelResX[7]
Cos< T >::type cos(const T &t)
MonitorElement * mehRPCResX
MonitorElement * mehEcaln[3]
const type * findBestRecHit(const DTLayer *layer, DTWireId wireId, const std::vector< type > &recHits, const float simHitDist)
void setVerbose(unsigned level)
MonitorElement * mehSiPixelResY[7]
MonitorElement * mehSiStripResY[19]
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
virtual const GeomDet * idToDet(DetId) const
edm::EDGetTokenT< RPCRecHitCollection > MuRPCSrc_Token_
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &hit, const StripGeomDetUnit *stripDet, const BoundPlane &plane)
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
unsigned int pxbLayer(const DetId &id) const
const_iterator end() const
LocalVector localDirection() const
Obsolete. Same as momentumAtEntry().unit(), for backward compatibility.
int wire() const
Return the wire number.
edm::InputTag MuRPCSimSrc_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EBHits_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
T const * product() const
MonitorElement * mehSiPixeln[7]
static const int sdHcalFwd
T const * product() const
std::map< uint32_t, float, std::less< uint32_t > > MapType
static const int sdHcalBrl
void fillTrk(const edm::Event &, const edm::EventSetup &)
ESHandle< TrackerGeometry > geometry
edm::EDGetTokenT< DTRecHitCollection > MuDTSrc_Token_
iterator find(key_type k)
MonitorElement * mehHcaln[4]
edm::EDGetTokenT< EEUncalibratedRecHitCollection > ECalUncalEESrc_Token_
static int position[264][3]
void fillECal(const edm::Event &, const edm::EventSetup &)
unsigned int pxfSide(const DetId &id) const
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
virtual const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::vector< PSimHit > PSimHitContainer
static const int sdPxlFwd
virtual ~GlobalRecHitsAnalyzer()
DetId geographicalId() const
static std::map< DTWireId, edm::PSimHitContainer > mapSimHitsPerWire(const edm::PSimHitContainer &simhits)
volatile std::atomic< bool > shutdown_flag false
void showDirStructure(void) const
LocalPoint localPosition() const
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
virtual LocalPoint localPosition() const
unsigned int tecWheel(const DetId &id) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
edm::EDGetTokenT< edm::PSimHitContainer > MuRPCSimSrc_Token_
MonitorElement * mehDtMuonRes
MonitorElement * mehSiStripResX[19]
Local3DPoint entryPoint() const
Entry point in the local Det frame.
static const int sdHcalEC
const CSCChamber * chamber() const
void setCurrentFolder(const std::string &fullpath)
const GeomDetUnit * stereoDet() const
const_iterator begin() const
unsigned int tobLayer(const DetId &id) const
virtual LocalPoint localPosition() const
edm::InputTag MuDTSimSrc_
void fillHCal(const edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< EERecHitCollection > ECalEESrc_Token_
DTWireId wireId() const
Return the wireId.
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > SiStripSrc_Token_