19 printProvenanceInfo(
false), trackerHitAssociatorConfig_(iPSet, consumesCollector()),
count(0)
21 consumesMany<edm::SortedCollection<HBHERecHit, edm::StrictWeakOrdering<HBHERecHit> > >();
22 consumesMany<edm::SortedCollection<HFRecHit, edm::StrictWeakOrdering<HFRecHit> > >();
23 consumesMany<edm::SortedCollection<HORecHit, edm::StrictWeakOrdering<HORecHit> > >();
24 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_GlobalRecHitsAnalyzer";
33 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
35 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
86 <<
"\n===============================\n" 87 <<
"Initialized as EDProducer with parameter values:\n" 88 <<
" Name = " <<
fName <<
"\n" 89 <<
" Verbosity = " << verbosity <<
"\n" 90 <<
" Frequency = " << frequency <<
"\n" 91 <<
" GetProv = " << getAllProvenances <<
"\n" 92 <<
" PrintProv = " << printProvenanceInfo <<
"\n" 93 <<
" ECalEBSrc = " << ECalEBSrc_.label()
94 <<
":" << ECalEBSrc_.instance() <<
"\n" 95 <<
" ECalUncalEBSrc = " << ECalUncalEBSrc_.
label()
96 <<
":" << ECalUncalEBSrc_.
instance() <<
"\n" 97 <<
" ECalEESrc = " << ECalEESrc_.
label()
98 <<
":" << ECalUncalEESrc_.
instance() <<
"\n" 99 <<
" ECalUncalEESrc = " << ECalUncalEESrc_.
label()
100 <<
":" << ECalEESrc_.
instance() <<
"\n" 101 <<
" ECalESSrc = " << ECalESSrc_.
label()
102 <<
":" << ECalESSrc_.
instance() <<
"\n" 103 <<
" HCalSrc = " << HCalSrc_.
label()
104 <<
":" << HCalSrc_.
instance() <<
"\n" 105 <<
" SiStripSrc = " << SiStripSrc_.
label()
106 <<
":" << SiStripSrc_.
instance() <<
"\n" 107 <<
" SiPixelSrc = " << SiPxlSrc_.
label()
108 <<
":" << SiPxlSrc_.
instance() <<
"\n" 109 <<
" MuDTSrc = " << MuDTSrc_.
label()
110 <<
":" << MuDTSrc_.
instance() <<
"\n" 111 <<
" MuDTSimSrc = " << MuDTSimSrc_.
label()
112 <<
":" << MuDTSimSrc_.
instance() <<
"\n" 113 <<
" MuCSCSrc = " << MuCSCSrc_.
label()
114 <<
":" << MuCSCSrc_.
instance() <<
"\n" 115 <<
" MuRPCSrc = " << MuRPCSrc_.
label()
116 <<
":" << MuRPCSrc_.
instance() <<
"\n" 117 <<
" MuRPCSimSrc = " << MuRPCSimSrc_.
label()
118 <<
":" << MuRPCSimSrc_.
instance() <<
"\n" 119 <<
"===============================\n";
127 string SiStripString[19] = {
"TECW1",
"TECW2",
"TECW3",
"TECW4",
"TECW5",
128 "TECW6",
"TECW7",
"TECW8",
"TIBL1",
"TIBL2",
129 "TIBL3",
"TIBL4",
"TIDW1",
"TIDW2",
"TIDW3",
130 "TOBL1",
"TOBL2",
"TOBL3",
"TOBL4"};
131 for(
int i = 0;
i<19; ++
i) {
136 string hcharname, hchartitle;
138 for(
int amend = 0; amend < 19; ++amend) {
139 hcharname =
"hSiStripn_"+SiStripString[amend];
140 hchartitle= SiStripString[amend]+
" rechits";
143 SiStripString[amend],1);
145 hcharname =
"hSiStripResX_"+SiStripString[amend];
146 hchartitle= SiStripString[amend]+
" rechit x resolution";
149 +SiStripString[amend],1);
151 hcharname =
"hSiStripResY_"+SiStripString[amend];
152 hchartitle= SiStripString[amend]+
" rechit y resolution";
155 SiStripString[amend],1);
162 string HCalString[4]={
"HB",
"HE",
"HF",
"HO"};
163 float HCalnUpper[4]={3000.,3000.,3000.,3000.};
164 float HCalnLower[4]={0.,0.,0.,0.};
165 for(
int j =0; j <4; ++j) {
171 for(
int amend = 0; amend < 4; ++amend) {
172 hcharname =
"hHcaln_"+HCalString[amend];
173 hchartitle= HCalString[amend]+
" rechits";
174 mehHcaln[amend] = iBooker.
book1D(hcharname,hchartitle, 1000, HCalnLower[amend],
178 hcharname =
"hHcalRes_"+HCalString[amend];
179 hchartitle= HCalString[amend]+
" rechit resolution";
187 string ECalString[3] = {
"EB",
"EE",
"ES"};
188 int ECalnBins[3] = {1000,3000,150};
189 float ECalnUpper[3] = {20000., 62000., 3000.};
190 float ECalnLower[3] = {0., 0., 0.};
191 int ECalResBins[3] = {200,200,200};
192 float ECalResUpper[3] = {1., 0.3, .0002};
193 float ECalResLower[3] = {-1., -0.3, -.0002};
194 for(
int i =0;
i<3; ++
i) {
200 for(
int amend = 0; amend < 3; ++amend) {
201 hcharname =
"hEcaln_"+ECalString[amend];
202 hchartitle= ECalString[amend]+
" rechits";
203 mehEcaln[amend] = iBooker.
book1D(hcharname,hchartitle, ECalnBins[amend],
204 ECalnLower[amend], ECalnUpper[amend]);
207 hcharname =
"hEcalRes_"+ECalString[amend];
208 hchartitle= ECalString[amend]+
" rechit resolution";
211 ECalResUpper[amend]);
217 string SiPixelString[7] = {
"BRL1",
"BRL2",
"BRL3",
"FWD1n",
"FWD1p",
219 for(
int j =0; j<7; ++j) {
226 for(
int amend = 0; amend < 7; ++amend) {
227 hcharname =
"hSiPixeln_"+SiPixelString[amend];
228 hchartitle= SiPixelString[amend]+
" rechits";
231 SiPixelString[amend],1);
233 hcharname =
"hSiPixelResX_"+SiPixelString[amend];
234 hchartitle= SiPixelString[amend]+
" rechit x resolution";
237 SiPixelString[amend],1);
239 hcharname =
"hSiPixelResY_"+SiPixelString[amend];
240 hchartitle= SiPixelString[amend]+
" rechit y resolution";
244 SiPixelString[amend],1);
255 string n_List[3] = {
"hDtMuonn",
"hCSCn",
"hRPCn"};
256 string hist_string[3] = {
"Dt",
"CSC",
"RPC"};
258 for(
int amend=0; amend<3; ++amend) {
259 hchartitle = hist_string[amend]+
" rechits";
266 mehCSCn=iBooker.
book1D(n_List[amend],hchartitle,50, 0., 500.);
271 mehRPCn=iBooker.
book1D(n_List[amend],hchartitle,50, 0., 500.);
281 hcharname =
"hDtMuonRes";
282 hchartitle =
"DT wire distance resolution";
284 hcharname =
"CSCResRDPhi";
285 hchartitle =
"CSC perp*dphi resolution";
287 hcharname =
"hRPCResX";
288 hchartitle =
"RPC rechits x resolution";
296 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_analyze";
307 <<
"Processing run " << nrun <<
", event " << nevt
308 <<
" (" <<
count <<
" events total)";
312 <<
"Processing run " << nrun <<
", event " << nevt
313 <<
" (" <<
count <<
" events total)";
320 std::vector<const edm::StableProvenance*> AllProv;
325 <<
"Number of Provenances = " << AllProv.size();
328 TString eventout(
"\nProvenance info:\n");
330 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
331 eventout +=
"\n ******************************";
332 eventout +=
"\n Module : ";
333 eventout += AllProv[
i]->moduleLabel();
334 eventout +=
"\n ProductID : ";
335 eventout += AllProv[
i]->productID().id();
336 eventout +=
"\n ClassName : ";
337 eventout += AllProv[
i]->className();
338 eventout +=
"\n InstanceName : ";
339 eventout += AllProv[
i]->productInstanceName();
340 eventout +=
"\n BranchName : ";
341 eventout += AllProv[
i]->branchName();
343 eventout +=
"\n ******************************\n";
362 <<
"Done gathering data from event.";
370 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_fillECal";
374 eventout =
"\nGathering info:";
384 bool validUncalibRecHitEB =
true;
385 if (!EcalUncalibRecHitEB.
isValid()) {
387 <<
"Unable to find EcalUncalRecHitEB in event!";
388 validUncalibRecHitEB =
false;
393 bool validRecHitEB =
true;
396 <<
"Unable to find EcalRecHitEB in event!";
397 validRecHitEB =
false;
402 bool validXFrame =
true;
403 if (!crossingFrame.
isValid()) {
405 <<
"Unable to find cal barrel crossingFrame in event!";
417 uint32_t crystid = ebid.
rawId();
418 ebSimMap[crystid] += iHit.energy();
424 if (validUncalibRecHitEB && validRecHitEB) {
430 EBUncalibRecHit->
begin();
431 uncalibRecHit != EBUncalibRecHit->
end();
438 if (myRecHit != EBRecHit->
end()) {
445 eventout +=
"\n Number of EBRecHits collected:............ ";
446 eventout += nEBRecHits;
456 bool validuncalibRecHitEE =
true;
457 if (!EcalUncalibRecHitEE.
isValid()) {
459 <<
"Unable to find EcalUncalRecHitEE in event!";
460 validuncalibRecHitEE =
false;
465 bool validRecHitEE =
true;
468 <<
"Unable to find EcalRecHitEE in event!";
469 validRecHitEE =
false;
475 if (!crossingFrame.
isValid()) {
477 <<
"Unable to find cal endcap crossingFrame in event!";
489 uint32_t crystid = eeid.
rawId();
490 eeSimMap[crystid] += iHit.energy();
495 if (validuncalibRecHitEE && validRecHitEE) {
502 EEUncalibRecHit->
begin();
503 uncalibRecHit != EEUncalibRecHit->
end();
510 if (myRecHit != EERecHit->
end()) {
517 eventout +=
"\n Number of EERecHits collected:............ ";
518 eventout += nEERecHits;
528 bool validRecHitES =
true;
531 <<
"Unable to find EcalRecHitES in event!";
532 validRecHitES =
false;
538 if (!crossingFrame.
isValid()) {
540 <<
"Unable to find cal preshower crossingFrame in event!";
552 uint32_t crystid = esid.
rawId();
553 esSimMap[crystid] += iHit.energy();
573 eventout +=
"\n Number of ESRecHits collected:............ ";
574 eventout += nESRecHits;
588 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_fillHCal";
592 eventout =
"\nGathering info:";
599 <<
"Unable to find CaloGeometry in event!";
604 edm::PCaloHitContainer::const_iterator itHit;
611 bool validhcalHits =
true;
614 <<
"Unable to find hcalHits in event!";
615 validhcalHits =
false;
618 std::map<HcalDetId,float> fHBEnergySimHits;
619 std::map<HcalDetId,float> fHEEnergySimHits;
620 std::map<HcalDetId,float> fHOEnergySimHits;
621 std::map<HcalDetId,float> fHFEnergySimHits;
625 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin();
626 simhits != simhitResult->end();
632 fHBEnergySimHits[detId] += simhits->energy();
635 fHEEnergySimHits[detId] += simhits->energy();
638 fHOEnergySimHits[detId] += simhits->energy();
641 fHFEnergySimHits[detId] += simhits->energy();
647 Double_t maxHBEnergy = 0.;
648 Double_t maxHEEnergy = 0.;
649 Double_t maxHFEnergy = 0.;
651 Double_t maxHBPhi = -1000.;
652 Double_t maxHEPhi = -1000.;
653 Double_t maxHOPhi = -1000.;
654 Double_t maxHFPhi = -1000.;
657 Double_t
PI = 3.141592653589;
662 std::vector<edm::Handle<HBHERecHitCollection> >
hbhe;
664 bool validHBHE =
true;
665 if (!hbhe[0].isValid()) {
667 <<
"Unable to find any HBHERecHitCollections in event!";
672 std::vector<edm::Handle<HBHERecHitCollection> >::iterator ihbhe;
677 for (ihbhe = hbhe.begin(); ihbhe != hbhe.end(); ++ihbhe) {
681 jhbhe != (*ihbhe)->end(); ++jhbhe) {
690 if ( (jhbhe->energy()) > maxHBEnergy ) {
691 maxHBEnergy = jhbhe->energy();
702 if ( (jhbhe->energy()) > maxHEEnergy ) {
703 maxHEEnergy = jhbhe->energy();
710 jhbhe != (*ihbhe)->end(); ++jhbhe) {
722 float deltaphi = maxHBPhi - fPhi;
723 if (fPhi > maxHBPhi) { deltaphi = fPhi - maxHBPhi;}
724 if (deltaphi > PI) { deltaphi = 2.0 * PI - deltaphi;}
727 fHBEnergySimHits[cell]);
738 float deltaphi = maxHEPhi - fPhi;
739 if (fPhi > maxHEPhi) { deltaphi = fPhi - maxHEPhi;}
740 if (deltaphi > PI) { deltaphi = 2.0 * PI - deltaphi;}
742 fHEEnergySimHits[cell]);
749 eventout +=
"\n Number of HBRecHits collected:............ ";
754 eventout +=
"\n Number of HERecHits collected:............ ";
764 std::vector<edm::Handle<HFRecHitCollection> >
hf;
767 if (!hf[0].isValid()) {
769 <<
"Unable to find any HFRecHitCollections in event!";
773 std::vector<edm::Handle<HFRecHitCollection> >::iterator
ihf;
776 for (ihf = hf.begin(); ihf != hf.end(); ++
ihf) {
780 jhf != (*ihf)->end(); ++jhf) {
787 double fPhi = cellGeometry->getPosition().phi () ;
788 if ( (jhf->energy()) > maxHFEnergy ) {
789 maxHFEnergy = jhf->energy();
796 jhf != (*ihf)->end(); ++jhf) {
805 double fPhi = cellGeometry->getPosition().phi () ;
807 float deltaphi = maxHBPhi - fPhi;
808 if (fPhi > maxHFPhi) { deltaphi = fPhi - maxHFPhi;}
809 if (deltaphi > PI) { deltaphi = 2.0 * PI - deltaphi;}
817 eventout +=
"\n Number of HFDigis collected:.............. ";
826 std::vector<edm::Handle<HORecHitCollection> >
ho;
829 if (!ho[0].isValid()) {
831 <<
"Unable to find any HORecHitCollections in event!";
836 std::vector<edm::Handle<HORecHitCollection> >::iterator iho;
839 for (iho = ho.begin(); iho != ho.end(); ++iho) {
842 jho != (*iho)->end(); ++jho) {
851 double fPhi = cellGeometry->getPosition().phi () ;
853 float deltaphi = maxHOPhi - fPhi;
854 if (fPhi > maxHOPhi) { deltaphi = fPhi - maxHOPhi;}
855 if (deltaphi > PI) { deltaphi = 2.0 * PI - deltaphi;}
862 eventout +=
"\n Number of HODigis collected:.............. ";
883 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_fillTrk";
887 eventout =
"\nGathering info:";
892 bool validstrip =
true;
893 if (!rechitsmatched.
isValid()) {
895 <<
"Unable to find stripmatchedrechits in event!";
905 <<
"Unable to find TrackerDigiGeometry in event!";
911 int nStripBrl = 0, nStripFwd = 0;
914 for (TrackerGeometry::DetContainer::const_iterator it =
916 it != pDD->
dets().end(); ++it) {
918 uint32_t myid = ((*it)->geographicalId()).rawId();
919 DetId detid = ((*it)->geographicalId());
924 if (rechitmatchedMatch != rechitsmatched->
end()) {
930 for ( itermatched = rechitmatchedRangeIteratorBegin;
931 itermatched != rechitmatchedRangeIteratorEnd;
937 float mindist = 999999.;
938 float distx = 999999.;
939 float disty = 999999.;
940 float dist = 999999.;
941 std::pair<LocalPoint,LocalVector> closestPair;
944 float rechitmatchedx = position.
x();
945 float rechitmatchedy = position.
y();
955 std::pair<LocalPoint,LocalVector> hitPair;
957 for(std::vector<PSimHit>::const_iterator
m =
matched.begin();
961 distx = fabs(rechitmatchedx - hitPair.first.x());
962 disty = fabs(rechitmatchedy - hitPair.first.y());
963 dist =
sqrt(distx*distx+disty*disty);
967 closestPair = hitPair;
1087 eventout +=
"\n Number of BrlStripRecHits collected:...... ";
1088 eventout += nStripBrl;
1091 for(
int i =8;
i<12; ++
i)
1093 for(
int i =16;
i<19; ++
i)
1097 eventout +=
"\n Number of FrwdStripRecHits collected:..... ";
1098 eventout += nStripFwd;
1100 for(
int i =0;
i<8; ++
i)
1102 for(
int i =12;
i<16; ++
i)
1110 bool validpixel =
true;
1113 <<
"Unable to find SiPixelRecHitCollection in event!";
1122 <<
"Unable to find TrackerDigiGeometry in event!";
1127 int nPxlBrl = 0, nPxlFwd = 0;
1129 for (TrackerGeometry::DetContainer::const_iterator it =
1130 geom->
dets().begin();
1131 it != geom->
dets().end(); ++it) {
1133 uint32_t myid = ((*it)->geographicalId()).rawId();
1134 DetId detId = ((*it)->geographicalId());
1140 if (pixeldet == recHitColl->
end())
continue;
1150 for ( ; pixeliter != pixelrechitRangeIteratorEnd; ++pixeliter) {
1155 if ( !matched.empty() ) {
1157 float closest = 9999.9;
1159 float rechit_x = lp.
x();
1160 float rechit_y = lp.
y();
1166 for (std::vector<PSimHit>::const_iterator
m = matched.begin();
1167 m != matched.end(); ++
m) {
1169 float sim_x1 = (*m).entryPoint().x();
1170 float sim_x2 = (*m).exitPoint().x();
1171 float sim_xpos = 0.5*(sim_x1+sim_x2);
1173 float sim_y1 = (*m).entryPoint().y();
1174 float sim_y2 = (*m).exitPoint().y();
1175 float sim_ypos = 0.5*(sim_y1+sim_y2);
1177 float x_res = fabs(sim_xpos - rechit_x);
1178 float y_res = fabs(sim_ypos - rechit_y);
1180 float dist =
sqrt(x_res*x_res + y_res*y_res);
1182 if ( dist < closest ) {
1214 if (tTopo->
pxfDisk(myid) == 1) {
1215 if (tTopo->
pxfSide(myid) == 1) {
1219 if (tTopo->
pxfSide(myid) == 2) {
1224 if (tTopo->
pxfDisk(myid) == 2) {
1225 if (tTopo->
pxfSide(myid) == 1) {
1229 if (tTopo->
pxfSide(myid) == 2) {
1241 eventout +=
"\n Number of BrlPixelRecHits collected:...... ";
1242 eventout += nPxlBrl;
1244 for(
int i=0;
i<3; ++
i) {
1249 eventout +=
"\n Number of FrwdPixelRecHits collected:..... ";
1250 eventout += nPxlFwd;
1253 for(
int i=3;
i<7; ++
i) {
1267 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_fillMuon";
1271 eventout =
"\nGathering info:";
1278 <<
"Unable to find DTMuonGeometryRecord in event!";
1284 bool validdtsim =
true;
1287 <<
"Unable to find dtsimHits in event!";
1293 bool validdtrec =
true;
1296 <<
"Unable to find dtRecHits in event!";
1300 if (validdtsim && validdtrec) {
1302 std::map<DTWireId, edm::PSimHitContainer> simHitsPerWire =
1305 std::map<DTWireId, std::vector<DTRecHit1DPair> > recHitsPerWire =
1308 int nDt =
compute(dtGeom.
product(), simHitsPerWire, recHitsPerWire, 1);
1311 eventout +=
"\n Number of DtMuonRecHits collected:........ ";
1323 bool validXFrame =
true;
1326 <<
"Unable to find muo CSC crossingFrame in event!";
1327 validXFrame =
false;
1333 for (
auto const & iHit :
simHits ) {
1334 theMap[iHit.detUnitId()].push_back(iHit);
1343 <<
"Unable to find CSCMuonGeometryRecord in event!";
1351 bool validCSC =
true;
1354 <<
"Unable to find CSC RecHits in event!";
1363 recHitItr != cscRecHits->end(); ++recHitItr) {
1365 int detId = (*recHitItr).cscDetId().rawId();
1368 std::map<int, edm::PSimHitContainer>::const_iterator mapItr =
1370 if (mapItr !=
theMap.end()) {
1371 simHits = mapItr->second;
1374 if (simHits.size() == 1) {
1387 eventout +=
"\n Number of CSCRecHits collected:........... ";
1394 std::map<double, int> mapsim, maprec;
1395 std::map<int, double> nmapsim, nmaprec;
1401 <<
"Unable to find RPCMuonGeometryRecord in event!";
1407 bool validrpcsim =
true;
1410 <<
"Unable to find RPCSimHit in event!";
1411 validrpcsim =
false;
1416 bool validrpc =
true;
1419 <<
"Unable to find RPCRecHit in event!";
1427 for (recIt = recHit->begin(); recIt != recHit->end(); ++recIt) {
1434 "\n Number of RPCRecHits collected:........... ";
1443 LocalPoint rhitlocal = (*recIt).localPosition();
1444 double rhitlocalx = rhitlocal.
x();
1445 maprec[rhitlocalx] = nrec;
1449 for (std::map<double,int>::iterator iter = maprec.begin();
1450 iter != maprec.end(); ++iter) {
1452 nmaprec[
i] = (*iter).first;
1457 edm::PSimHitContainer::const_iterator simIt;
1458 for (simIt = simHit->begin(); simIt != simHit->end(); simIt++) {
1459 int ptype = (*simIt).particleType();
1460 if (ptype == 13 || ptype == -13) {
1462 LocalPoint shitlocal = (*simIt).localPosition();
1463 double shitlocalx = shitlocal.
x();
1464 mapsim[shitlocalx] = nsim;
1469 for (std::map<double,int>::iterator iter = mapsim.begin();
1470 iter != mapsim.end(); ++iter) {
1472 nmapsim[
i] = (*iter).first;
1477 for (
int r = 0;
r < nsim;
r++) {
1484 eventout +=
"\n Number of RPCRecHits collected:........... ";
1497 std::pair<LocalPoint,LocalVector>
1505 LocalPoint localHit = plane.toLocal(globalpos);
1512 float scale = -localHit.
z() / dir.
z();
1524 return std::pair<LocalPoint,LocalVector>( projectedPos, localStripDir);
1528 std::map<DTWireId, std::vector<DTRecHit1DPair> >
1531 std::map<DTWireId, std::vector<DTRecHit1DPair> > ret;
1534 rechit != dt1DRecHitPairs->end(); rechit++) {
1535 ret[(*rechit).wireId()].push_back(*rechit);
1548 float xEntry = entryP.
x()-xwire;
1549 float xExit = exitP.
x()-xwire;
1552 return fabs(xEntry - (entryP.
z()*(xExit-xEntry))/(exitP.
z()-entryP.
z()));
1556 template <
typename type>
1560 const std::vector<type>& recHits,
1561 const float simHitDist) {
1563 const type* theBestRecHit =
nullptr;
1565 for(
typename std::vector<type>::const_iterator
recHit = recHits.begin();
1569 if(fabs(distTmp-simHitDist) < res) {
1570 res = fabs(distTmp-simHitDist);
1571 theBestRecHit = &(*recHit);
1575 return theBestRecHit;
1595 template <
typename type>
1603 std::map<DTWireId, std::vector<PSimHit> > simHitsPerWire = _simHitsPerWire;
1604 std::map<DTWireId, std::vector<type> > recHitsPerWire = _recHitsPerWire;
1607 for(
std::map<
DTWireId, std::vector<PSimHit> >::const_iterator wireAndSHits =
1608 simHitsPerWire.begin();
1609 wireAndSHits != simHitsPerWire.end();
1611 DTWireId wireId = (*wireAndSHits).first;
1612 std::vector<PSimHit> simHitsInCell = (*wireAndSHits).second;
1619 if (muSimHit==
nullptr) {
1626 if(simHitWireDist>2.1) {
1631 if(recHitsPerWire.find(wireId) == recHitsPerWire.end()) {
1635 std::vector<type> recHits = recHitsPerWire[wireId];
1638 const type* theBestRecHit =
edm::EDGetTokenT< SiPixelRecHitCollection > SiPxlSrc_Token_
LocalPoint localPosition() const override
Return the 3-dimensional local position.
void getManyByType(std::vector< Handle< PROD > > &results) const
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
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.
MonitorElement * mehCSCResRDPhi
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
std::vector< PCaloHit > PCaloHitContainer
const_iterator end(bool update=false) const
unsigned int tibLayer(const DetId &id) const
~GlobalRecHitsAnalyzer() override
edm::EDGetTokenT< EBRecHitCollection > ECalEBSrc_Token_
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
constexpr uint32_t rawId() const
get the raw id
std::vector< EcalUncalibratedRecHit >::const_iterator const_iterator
edm::InputTag ECalUncalEBSrc_
unsigned long long EventNumber_t
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EEHits_Token_
virtual float strip(const LocalPoint &) const =0
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
unsigned int tidWheel(const DetId &id) const
LocalPoint localPosition() const override
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_
void plotResolution(const PSimHit &simHit, const CSCRecHit2D &recHit, const CSCLayer *layer, int chamberType)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< int, edm::PSimHitContainer > theMap
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire(const DTRecHitCollection *dt1DRecHitPairs)
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
const DTTopology & specificTopology() const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Local3DPoint exitPoint() const
Exit point in the local Det frame.
edm::EDGetTokenT< EBUncalibratedRecHitCollection > ECalUncalEBSrc_Token_
const CSCChamberSpecs * specs() const
std::map< DTWireId, edm::PSimHitContainer > mapSimHitsPerWire(const edm::PSimHitContainer &simhits)
static const int sdPxlBrl
Local3DPoint localPosition() const
virtual float stripAngle(float strip) const =0
int compute(const DTGeometry *dtGeom, const std::map< DTWireId, std::vector< PSimHit > > &simHitsPerWire, const std::map< DTWireId, std::vector< type > > &recHitsPerWire, int step)
edm::EDGetTokenT< CSCRecHit2DCollection > MuCSCSrc_Token_
MonitorElement * mehSiPixelResX[7]
Cos< T >::type cos(const T &t)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * book1D(Args &&...args)
MonitorElement * mehRPCResX
MonitorElement * mehEcaln[3]
const type * findBestRecHit(const DTLayer *layer, DTWireId wireId, const std::vector< type > &recHits, const float simHitDist)
const PSimHit * findMuSimHit(const edm::PSimHitContainer &hits)
Select the SimHit from a muon in a vector of SimHits.
MonitorElement * mehSiPixelResY[7]
MonitorElement * mehSiStripResY[19]
edm::EDGetTokenT< RPCRecHitCollection > MuRPCSrc_Token_
GlobalPoint getPosition(const DetId &id) const
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &hit, const StripGeomDetUnit *stripDet, const BoundPlane &plane)
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_
void setCurrentFolder(const std::string &fullpath)
T const * product() const
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.
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
MonitorElement * mehSiPixeln[7]
static const int sdHcalFwd
std::map< uint32_t, float, std::less< uint32_t > > MapType
static const int sdHcalBrl
void fillTrk(const edm::Event &, const edm::EventSetup &)
const_iterator find(id_type i, bool update=false) const
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
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]
const TrackerGeomDet * idToDet(DetId) const override
void fillECal(const edm::Event &, const edm::EventSetup &)
unsigned int pxfSide(const DetId &id) const
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
LocalPoint localPosition() const final
LocalPoint localPosition() const override
std::vector< PSimHit > PSimHitContainer
static const int sdPxlFwd
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
TrackerHitAssociator::Config trackerHitAssociatorConfig_
DetId geographicalId() 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)
T const * product() const
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
const GeomDetUnit * stereoDet() const
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
const_iterator begin() const
unsigned int tobLayer(const DetId &id) const
edm::InputTag MuDTSimSrc_
void fillHCal(const edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< EERecHitCollection > ECalEESrc_Token_
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
DTWireId wireId() const
Return the wireId.
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > SiStripSrc_Token_