66 #define LOGPRINT edm::LogPrint("SiStripHitEfficiency:HitEff") 77 siStripClusterInfo_(consumesCollector()),
78 combinatorialTracks_token_(
120 traj =
fs->make<TTree>(
"traj",
"tree of trajectory positions");
121 #ifdef ExtendedCALIBTree 122 traj->Branch(
"timeDT", &timeDT,
"timeDT/F");
123 traj->Branch(
"timeDTErr", &timeDTErr,
"timeDTErr/F");
124 traj->Branch(
"timeDTDOF", &timeDTDOF,
"timeDTDOF/I");
125 traj->Branch(
"timeECAL", &timeECAL,
"timeECAL/F");
126 traj->Branch(
"dedx", &dedx,
"dedx/F");
127 traj->Branch(
"dedxNOM", &dedxNOM,
"dedxNOM/I");
128 traj->Branch(
"nLostHits", &nLostHits,
"nLostHits/I");
129 traj->Branch(
"chi2", &
chi2,
"chi2/F");
130 traj->Branch(
"p", &
p,
"p/F");
146 traj->Branch(
"ResX", &
ResX,
"ResX/F");
151 traj->Branch(
"nHits", &
nHits,
"nHits/I");
152 traj->Branch(
"pT", &
pT,
"pT/F");
155 traj->Branch(
"Id", &
Id,
"Id/i");
156 traj->Branch(
"run", &
run,
"run/i");
157 traj->Branch(
"event", &
event,
"event/i");
163 traj->Branch(
"PU", &
PU,
"PU/F");
182 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"beginning analyze from HitEff" << endl;
185 using namespace reco;
188 int run_nr =
e.id().run();
189 int ev_nr =
e.id().event();
190 int bunch_nr =
e.bunchCrossing();
204 }
else if (metaData.
isValid()) {
208 edm::LogWarning(
"SiStripHitEfficiencyWorker") <<
"could not find a source for the Luminosity and PU";
296 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"number ckf tracks found = " << tracksCKF->size() << endl;
298 if (!tracksCKF->empty()) {
302 LogDebug(
"SiStripHitEfficiency:HitEff")
307 #ifdef ExtendedCALIBTree 310 if (
e.getByLabel(
"dedxMedianCTF", dEdxUncalibHandle)) {
314 dedx = dEdxTrackUncalib[itTrack].dEdx();
315 dedxNOM = dEdxTrackUncalib[itTrack].numberOfMeasurements();
323 if (
e.getByLabel(
"muonsWitht0Correction", muH)) {
325 if (!muonsT0.empty()) {
329 timeDTDOF = mt0.
nDof;
331 bool hasCaloEnergyInfo = muonsT0[0].isEnergyValid();
332 if (hasCaloEnergyInfo)
333 timeECAL = muonsT0[0].calEnergy().ecal_time;
347 it != trajTrackAssociationHandle->
end();
353 nHits = itraj->foundHits();
354 #ifdef ExtendedCALIBTree 355 nLostHits = itraj->lostHits();
356 chi2 = (itraj->chiSquared() / itraj->ndof());
357 p = itraj->lastMeasurement().updatedState().globalMomentum().mag();
359 pT =
sqrt((itraj->lastMeasurement().updatedState().globalMomentum().x() *
360 itraj->lastMeasurement().updatedState().globalMomentum().x()) +
361 (itraj->lastMeasurement().updatedState().globalMomentum().y() *
362 itraj->lastMeasurement().updatedState().globalMomentum().y()));
367 std::vector<TrajectoryMeasurement> TMeas = itraj->measurements();
369 vector<TrajectoryMeasurement>::iterator itm;
374 double angleX = -999.;
375 double angleY = -999.;
376 double xglob, yglob, zglob;
379 bool hasMissingHits =
false;
380 int previous_layer = 999;
381 vector<unsigned int> missedLayers;
382 for (
const auto& itm : TMeas) {
383 auto theHit = itm.recHit();
384 unsigned int iidd = theHit->geographicalId().rawId();
385 int layer = ::checkLayer(iidd, tTopo);
386 int missedLayer = (
layer + 1);
387 int diffPreviousLayer = (
layer - previous_layer);
390 if (diffPreviousLayer == -2 && missedLayer > k_LayersStart && missedLayer < k_LayersAtTOBEnd) {
392 hasMissingHits =
true;
395 else if (diffPreviousLayer == -2 && (missedLayer > k_LayersAtTOBEnd + 1 && missedLayer <= k_LayersAtTIDEnd)) {
397 hasMissingHits =
true;
400 else if (diffPreviousLayer == -2 && missedLayer > k_LayersAtTIDEnd && missedLayer <= k_LayersAtTECEnd) {
402 hasMissingHits =
true;
406 if ((
layer > k_LayersStart &&
layer <= k_LayersAtTIBEnd) && (previous_layer == 12)) {
408 hasMissingHits =
true;
412 if ((
layer > k_LayersAtTIBEnd &&
layer <= k_LayersAtTOBEnd) && (previous_layer == 15)) {
414 hasMissingHits =
true;
418 hasMissingHits =
true;
421 missedLayers.push_back(
layer);
422 previous_layer =
layer;
427 unsigned int prev_TKlayers = 0;
428 for (itm = TMeas.begin(); itm != TMeas.end(); itm++) {
429 auto theInHit = (*itm).recHit();
431 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"theInHit is valid = " << theInHit->isValid() << endl;
433 unsigned int iidd = theInHit->geographicalId().rawId();
435 unsigned int TKlayers = ::checkLayer(iidd, tTopo);
436 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"TKlayer from trajectory: " << TKlayers <<
" from module = " << iidd
437 <<
" matched/stereo/rphi = " << ((iidd & 0x3) == 0) <<
"/" 438 << ((iidd & 0x3) == 1) <<
"/" << ((iidd & 0x3) == 2) << endl;
442 bool isFirstMeas = (itm == (TMeas.end() - 1));
443 bool isLastMeas = (itm == (TMeas.begin()));
456 if (TKlayers == 10 || TKlayers == 22) {
457 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"skipping original TM for TOB 6 or TEC 9" << endl;
462 std::vector<TrajectoryAtInvalidHit> TMs;
470 if (::isDoubleSided(iidd, tTopo) && ((iidd & 0x3) == 0)) {
475 }
else if (::isDoubleSided(iidd, tTopo) && (!::check2DPartner(iidd, TMeas))) {
480 LogDebug(
"SiStripHitEfficiency:HitEff") <<
" found a hit with a missing partner";
485 bool missingHitAdded =
false;
487 vector<TrajectoryMeasurement> tmpTmeas;
488 unsigned int misLayer = TKlayers + 1;
491 if (
int(TKlayers) -
int(prev_TKlayers) == -2) {
492 const DetLayer* detlayer = itm->layer();
497 if (misLayer > k_LayersAtTIDEnd && misLayer < k_LayersAtTECEnd) {
498 std::vector<ForwardDetLayer const*> negTECLayers =
499 measurementTrackerHandle->geometricSearchTracker()->negTecLayers();
500 std::vector<ForwardDetLayer const*> posTECLayers =
501 measurementTrackerHandle->geometricSearchTracker()->posTecLayers();
502 const DetLayer* tecLayerneg = negTECLayers[misLayer - k_LayersAtTIDEnd - 1];
503 const DetLayer* tecLayerpos = posTECLayers[misLayer - k_LayersAtTIDEnd - 1];
504 if (tTopo->
tecSide(iidd) == 1) {
505 tmpTmeas = layerMeasurements.measurements(*tecLayerneg, tsos, *thePropagator, *
estimator);
506 }
else if (tTopo->
tecSide(iidd) == 2) {
507 tmpTmeas = layerMeasurements.measurements(*tecLayerpos, tsos, *thePropagator, *
estimator);
511 else if (misLayer == (k_LayersAtTIDEnd - 1) ||
512 misLayer == k_LayersAtTIDEnd) {
514 std::vector<ForwardDetLayer const*> negTIDLayers =
515 measurementTrackerHandle->geometricSearchTracker()->negTidLayers();
516 std::vector<ForwardDetLayer const*> posTIDLayers =
517 measurementTrackerHandle->geometricSearchTracker()->posTidLayers();
518 const DetLayer* tidLayerneg = negTIDLayers[misLayer - k_LayersAtTOBEnd - 1];
519 const DetLayer* tidLayerpos = posTIDLayers[misLayer - k_LayersAtTOBEnd - 1];
521 if (tTopo->
tidSide(iidd) == 1) {
522 tmpTmeas = layerMeasurements.measurements(*tidLayerneg, tsos, *thePropagator, *
estimator);
523 }
else if (tTopo->
tidSide(iidd) == 2) {
524 tmpTmeas = layerMeasurements.measurements(*tidLayerpos, tsos, *thePropagator, *
estimator);
528 if (misLayer > k_LayersStart && misLayer < k_LayersAtTOBEnd) {
530 std::vector<BarrelDetLayer const*> barrelTIBLayers =
531 measurementTrackerHandle->geometricSearchTracker()->tibLayers();
532 std::vector<BarrelDetLayer const*> barrelTOBLayers =
533 measurementTrackerHandle->geometricSearchTracker()->tobLayers();
535 if (misLayer > k_LayersStart && misLayer <= k_LayersAtTIBEnd) {
536 const DetLayer* tibLayer = barrelTIBLayers[misLayer - k_LayersStart - 1];
537 tmpTmeas = layerMeasurements.measurements(*tibLayer, tsos, *thePropagator, *
estimator);
538 }
else if (misLayer > k_LayersAtTIBEnd && misLayer < k_LayersAtTOBEnd) {
539 const DetLayer* tobLayer = barrelTOBLayers[misLayer - k_LayersAtTIBEnd - 1];
540 tmpTmeas = layerMeasurements.measurements(*tobLayer, tsos, *thePropagator, *
estimator);
544 if ((
int(TKlayers) > k_LayersStart &&
int(TKlayers) <= k_LayersAtTIBEnd) &&
int(prev_TKlayers) == 12) {
545 const DetLayer* detlayer = itm->layer();
549 std::vector<ForwardDetLayer const*> negTIDLayers =
550 measurementTrackerHandle->geometricSearchTracker()->negTidLayers();
551 std::vector<ForwardDetLayer const*> posTIDLayers =
552 measurementTrackerHandle->geometricSearchTracker()->posTidLayers();
554 const DetLayer* tidLayerneg = negTIDLayers[k_LayersStart];
555 const DetLayer* tidLayerpos = posTIDLayers[k_LayersStart];
556 if (tTopo->
tidSide(iidd) == 1) {
557 tmpTmeas = layerMeasurements.measurements(*tidLayerneg, tsos, *thePropagator, *
estimator);
558 }
else if (tTopo->
tidSide(iidd) == 2) {
559 tmpTmeas = layerMeasurements.measurements(*tidLayerpos, tsos, *thePropagator, *
estimator);
563 if ((
int(TKlayers) > k_LayersAtTIBEnd &&
int(TKlayers) <= k_LayersAtTOBEnd) &&
int(prev_TKlayers) == 15) {
564 const DetLayer* detlayer = itm->layer();
569 std::vector<ForwardDetLayer const*> negTECLayers =
570 measurementTrackerHandle->geometricSearchTracker()->negTecLayers();
571 std::vector<ForwardDetLayer const*> posTECLayers =
572 measurementTrackerHandle->geometricSearchTracker()->posTecLayers();
574 const DetLayer* tecLayerneg = negTECLayers[k_LayersStart];
575 const DetLayer* tecLayerpos = posTECLayers[k_LayersStart];
576 if (tTopo->
tecSide(iidd) == 1) {
577 tmpTmeas = layerMeasurements.measurements(*tecLayerneg, tsos, *thePropagator, *
estimator);
578 }
else if (tTopo->
tecSide(iidd) == 2) {
579 tmpTmeas = layerMeasurements.measurements(*tecLayerpos, tsos, *thePropagator, *
estimator);
583 if (!tmpTmeas.empty()) {
585 unsigned int iidd_tmp = TM_tmp.
recHit()->geographicalId().rawId();
587 LogDebug(
"SiStripHitEfficiency:HitEff") <<
" hit actually being added to TM vector";
590 if (::isDoubleSided(iidd_tmp, tTopo)) {
595 missingHitAdded =
true;
601 prev_TKlayers = TKlayers;
606 bool hitsWithBias =
false;
607 for (
auto ilayer : missedLayers) {
608 if (ilayer < TKlayers)
621 bool isValid = theInHit->isValid();
622 bool isLast = (itm == (TMeas.end() - 1));
623 bool isLastTOB5 =
true;
625 if (::checkLayer((++itm)->recHit()->geographicalId().rawId(), tTopo) == 9)
632 if (TKlayers == 9 &&
isValid && isLastTOB5) {
635 std::vector<BarrelDetLayer const*> barrelTOBLayers =
636 measurementTrackerHandle->geometricSearchTracker()->tobLayers();
637 const DetLayer* tob6 = barrelTOBLayers[barrelTOBLayers.size() - 1];
640 auto tmp = layerMeasurements.measurements(*tob6, tsosTOB5, *thePropagator, *
estimator);
643 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"size of TM from propagation = " <<
tmp.size() << endl;
649 const auto& tob6Hit = tob6TM.
recHit();
651 if (tob6Hit->geographicalId().rawId() != 0) {
652 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"tob6 hit actually being added to TM vector" << endl;
658 bool isLastTEC8 =
true;
660 if (::checkLayer((++itm)->
recHit()->geographicalId().rawId(), tTopo) == 21)
667 if (TKlayers == 21 &&
isValid && isLastTEC8) {
668 std::vector<const ForwardDetLayer*> posTecLayers =
669 measurementTrackerHandle->geometricSearchTracker()->posTecLayers();
670 const DetLayer* tec9pos = posTecLayers[posTecLayers.size() - 1];
671 std::vector<const ForwardDetLayer*> negTecLayers =
672 measurementTrackerHandle->geometricSearchTracker()->negTecLayers();
673 const DetLayer* tec9neg = negTecLayers[negTecLayers.size() - 1];
679 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"there is a problem with TEC 9 extrapolation" << endl;
682 vector<TrajectoryMeasurement>
tmp;
683 if (tTopo->
tecSide(iidd) == 1) {
684 tmp = layerMeasurements.measurements(*tec9neg, tsosTEC9, *thePropagator, *
estimator);
687 if (tTopo->
tecSide(iidd) == 2) {
688 tmp = layerMeasurements.measurements(*tec9pos, tsosTEC9, *thePropagator, *
estimator);
697 const auto& tec9Hit = tec9TM.
recHit();
699 unsigned int tec9id = tec9Hit->geographicalId().rawId();
700 LogDebug(
"SiStripHitEfficiency:HitEff")
701 <<
"tec9id = " << tec9id <<
" is Double sided = " << ::isDoubleSided(tec9id, tTopo)
702 <<
" and 0x3 = " << (tec9id & 0x3) << endl;
704 if (tec9Hit->geographicalId().rawId() != 0) {
705 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"tec9 hit actually being added to TM vector" << endl;
708 if (::isDoubleSided(tec9id, tTopo)) {
722 for (std::vector<TrajectoryAtInvalidHit>::const_iterator TM = TMs.begin(); TM != TMs.end(); ++TM) {
724 iidd = TM->monodet_id();
725 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"setting iidd = " << iidd <<
" before checking efficiency and ";
730 angleX = atan(TM->localDxDz());
731 angleY = atan(TM->localDyDz());
736 xglob = TM->globalX();
737 yglob = TM->globalY();
738 zglob = TM->globalZ();
739 xErr = TM->localErrorX();
740 yErr = TM->localErrorY();
751 TKlayers = ::checkLayer(iidd, tTopo);
755 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"Looking at layer under study" << endl;
777 if (!
input.empty()) {
778 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"Checking clusters with size = " <<
input.size() << endl;
780 std::vector<std::vector<float> >
786 unsigned int ClusterId = DSViter->id();
787 if (ClusterId == iidd) {
788 LogDebug(
"SiStripHitEfficiency:HitEff")
789 <<
"found (ClusterId == iidd) with ClusterId = " << ClusterId <<
" and iidd = " << iidd << endl;
790 DetId ClusterDetId(ClusterId);
799 if (TKlayers >= 11) {
802 dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds())));
803 std::array<const float, 4>
const& parameterTrap =
805 hbedge = parameterTrap[0];
806 htedge = parameterTrap[1];
807 hapoth = parameterTrap[3];
808 uylfac = (htedge - hbedge) / (htedge + hbedge) / hapoth;
809 uxlden = 1 + yloc * uylfac;
813 if (TrajStrip == -1) {
816 TrajStrip = xloc / pitch + nstrips / 2.0;
818 if (TKlayers >= 11) {
819 float TrajLocXMid = xloc / (1 + (htedge - hbedge) * yloc / (htedge + hbedge) /
821 TrajStrip = TrajLocXMid / pitch + nstrips / 2.0;
831 float sigma = ::checkConsistency(
parameters, xloc, xErr);
838 if (TKlayers >= 11) {
842 yErr * yErr * xloc * xloc * uylfac * uylfac / uxlden / uxlden / uxlden / uxlden);
849 std::vector<float> cluster_info;
850 cluster_info.push_back(
res);
851 cluster_info.push_back(sigma);
857 VCluster_info.push_back(cluster_info);
859 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"Have ID match. residual = " << VCluster_info.back()[0]
860 <<
" res sigma = " << VCluster_info.back()[1] << endl;
861 LogDebug(
"SiStripHitEfficiency:HitEff")
862 <<
"trajectory measurement compatability estimate = " << (*itm).estimate() << endl;
863 LogDebug(
"SiStripHitEfficiency:HitEff")
865 <<
" trajectory position = " << xloc <<
" traj error = " << xErr << endl;
869 float FinalResSig = 1000.0;
870 float FinalCluster[7] = {1000.0, 1000.0, 0.0, 0.0, 0.0, 0.0, 0.0};
872 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"found clusters > 0" << endl;
875 vector<vector<float> >::iterator ires;
876 for (ires = VCluster_info.begin(); ires != VCluster_info.end(); ires++) {
877 if (
abs((*ires)[1]) <
abs(FinalResSig)) {
878 FinalResSig = (*ires)[1];
879 for (
unsigned int i = 0;
i < ires->size();
i++) {
880 LogDebug(
"SiStripHitEfficiency:HitEff")
881 <<
"filling final cluster. i = " <<
i <<
" before fill FinalCluster[i]=" << FinalCluster[
i]
882 <<
" and (*ires)[i] =" << (*ires)[
i] << endl;
883 FinalCluster[
i] = (*ires)[
i];
884 LogDebug(
"SiStripHitEfficiency:HitEff")
885 <<
"filling final cluster. i = " <<
i <<
" after fill FinalCluster[i]=" << FinalCluster[
i]
886 <<
" and (*ires)[i] =" << (*ires)[
i] << endl;
889 LogDebug(
"SiStripHitEfficiency:HitEff")
890 <<
"iresidual = " << (*ires)[0] <<
" isigma = " << (*ires)[1]
891 <<
" and FinalRes = " << FinalCluster[0] << endl;
894 FinalResSig = VCluster_info.at(0)[1];
895 for (
unsigned int i = 0;
i < VCluster_info.at(0).size();
i++) {
896 FinalCluster[
i] = VCluster_info.at(0)[
i];
899 VCluster_info.clear();
902 LogDebug(
"SiStripHitEfficiency:HitEff")
903 <<
"Final residual in X = " << FinalCluster[0] <<
"+-" << (FinalCluster[0] / FinalResSig) << endl;
904 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"Checking location of trajectory: abs(yloc) = " <<
abs(yloc)
905 <<
" abs(xloc) = " <<
abs(xloc) << endl;
906 LogDebug(
"SiStripHitEfficiency:HitEff")
907 <<
"Checking location of cluster hit: yloc = " << FinalCluster[4] <<
"+-" << FinalCluster[5]
908 <<
" xloc = " << FinalCluster[2] <<
"+-" << FinalCluster[3] << endl;
909 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"Final cluster signal to noise = " << FinalCluster[6] << endl;
911 float exclusionWidth = 0.4;
912 float TOBexclusion = 0.0;
913 float TECexRing5 = -0.89;
914 float TECexRing6 = -0.56;
915 float TECexRing7 = 0.60;
918 int ringnumber = ((iidd >> 5) & 0x7);
921 if ((TKlayers >= 5 && TKlayers < 11) ||
922 ((
subdetector == 6) && ((ringnumber >= 5) && (ringnumber <= 7)))) {
924 float highzone = 0.0;
926 float higherr = yloc + 5.0 * yErr;
927 float lowerr = yloc - 5.0 * yErr;
928 if (TKlayers >= 5 && TKlayers < 11) {
930 highzone = TOBexclusion + exclusionWidth;
931 lowzone = TOBexclusion - exclusionWidth;
932 }
else if (ringnumber == 5) {
934 highzone = TECexRing5 + exclusionWidth;
935 lowzone = TECexRing5 - exclusionWidth;
936 }
else if (ringnumber == 6) {
938 highzone = TECexRing6 + exclusionWidth;
939 lowzone = TECexRing6 - exclusionWidth;
940 }
else if (ringnumber == 7) {
942 highzone = TECexRing7 + exclusionWidth;
943 lowzone = TECexRing7 - exclusionWidth;
946 if ((highzone <= higherr) && (highzone >= lowerr))
948 if ((lowzone >= lowerr) && (lowzone <= higherr))
950 if ((higherr <= highzone) && (higherr >= lowzone))
952 if ((lowerr >= lowzone) && (lowerr <= highzone))
972 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"strip is bad from SiStripQuality" << endl;
975 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"strip is good from SiStripQuality" << endl;
979 for (
unsigned int ii = 0;
ii < fedErrorIds->
size();
ii++) {
980 if (iidd == (*fedErrorIds)[
ii].rawId())
988 ResX = FinalCluster[0];
990 if (FinalResSig != FinalCluster[1])
991 LogDebug(
"SiStripHitEfficiency:HitEff")
992 <<
"Problem with best cluster selection because FinalResSig = " << FinalResSig
993 <<
" and FinalCluster[1] = " << FinalCluster[1] << endl;
1002 if (commonModeDigis.
isValid() && TrajStrip >= 0 && TrajStrip <= 768) {
1004 if (digiframe != commonModeDigis->end())
1005 if ((
unsigned)TrajStrip / 128 < digiframe->data.
size())
1006 commonMode = digiframe->data.at(TrajStrip / 128).adc();
1009 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"before check good" << endl;
1011 if (FinalResSig < 999.0) {
1013 LogDebug(
"SiStripHitEfficiency:HitEff")
1014 <<
"hit being counted as good " << FinalCluster[0] <<
" FinalRecHit " << iidd <<
" TKlayers " 1015 << TKlayers <<
" xloc " << xloc <<
" yloc " << yloc <<
" module " << iidd
1016 <<
" matched/stereo/rphi = " << ((iidd & 0x3) == 0) <<
"/" << ((iidd & 0x3) == 1) <<
"/" 1017 << ((iidd & 0x3) == 2) << endl;
1021 LogDebug(
"SiStripHitEfficiency:HitEff")
1022 <<
"hit being counted as bad ######### Invalid RPhi FinalResX " << FinalCluster[0]
1023 <<
" FinalRecHit " << iidd <<
" TKlayers " << TKlayers <<
" xloc " << xloc <<
" yloc " << yloc
1024 <<
" module " << iidd <<
" matched/stereo/rphi = " << ((iidd & 0x3) == 0) <<
"/" 1025 << ((iidd & 0x3) == 1) <<
"/" << ((iidd & 0x3) == 2) << endl;
1029 LogDebug(
"SiStripHitEfficiency:HitEff") <<
" RPhi Error " <<
sqrt(xErr * xErr + yErr * yErr)
1030 <<
" ErrorX " << xErr <<
" yErr " << yErr << endl;
1032 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"after good location check" << endl;
1034 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"after list of clusters" << endl;
1036 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"After layers=TKLayers if" << endl;
1038 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"After looping over TrajAtValidHit list" << endl;
1040 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"end TMeasurement loop" << endl;
1042 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"end of trajectories loop" << endl;
1047 traj->GetDirectory()->cd();
1050 LogDebug(
"SiStripHitEfficiency:HitEff") <<
" Events Analysed " <<
events << endl;
1059 float totTIBrepro = 0.0;
1060 float totTOBrepro = 0.0;
1061 float totTIDrepro = 0.0;
1062 float totTECrepro = 0.0;
1064 edm::LogInfo(
"SiStripHitEfficiency:HitEff") <<
"Within TIB :";
1065 for (
int i = 0;
i <= k_LayersAtTIBEnd;
i++) {
1073 <<
" % of missing hit";
1077 <<
"TOTAL % of missing hits within TIB :" << (totTIB * 1.0 /
totalNbHits) * 100 <<
"%";
1079 <<
"AFTER repropagation :" << (totTIBrepro * 1.0 /
totalNbHits) * 100 <<
"%";
1081 edm::LogInfo(
"SiStripHitEfficiency:HitEff") <<
"Within TOB :";
1082 for (
int i = k_LayersAtTIBEnd + 1;
i <= k_LayersAtTOBEnd;
i++) {
1090 <<
" % of missing hit";
1094 <<
"TOTAL % of missing hits within TOB :" << (totTOB * 1.0 /
totalNbHits) * 100 <<
"%";
1096 <<
"AFTER repropagation :" << (totTOBrepro * 1.0 /
totalNbHits) * 100 <<
"%";
1098 edm::LogInfo(
"SiStripHitEfficiency:HitEff") <<
"Within TID :";
1099 for (
int i = k_LayersAtTOBEnd + 1;
i <= k_LayersAtTIDEnd;
i++) {
1107 <<
" % of missing hit";
1111 <<
"TOTAL % of missing hits within TID :" << (totTID * 1.0 /
totalNbHits) * 100 <<
"%";
1113 <<
"AFTER repropagation :" << (totTIDrepro * 1.0 /
totalNbHits) * 100 <<
"%";
1115 edm::LogInfo(
"SiStripHitEfficiency:HitEff") <<
"Within TEC :";
1116 for (
int i = k_LayersAtTIDEnd + 1;
i < k_END_OF_LAYERS;
i++) {
1124 <<
" % of missing hit";
1128 <<
"TOTAL % of missing hits within TEC :" << (totTEC * 1.0 /
totalNbHits) * 100 <<
"%";
1130 <<
"AFTER repropagation :" << (totTECrepro * 1.0 /
totalNbHits) * 100 <<
"%";
1132 edm::LogInfo(
"SiStripHitEfficiency:HitEff") <<
" Hit recovery summary:";
1134 for (
int ilayer = 0; ilayer < k_END_OF_LAYERS; ilayer++) {
std::pair< LocalPoint, LocalError > LocalValues
static const std::string kSharedResource
static constexpr auto TEC
virtual int nstrips() const =0
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
T getParameter(std::string const &) const
std::vector< unsigned int > hitRecoveryCounters
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
const edm::EDGetTokenT< OnlineLuminosityRecord > metaDataToken_
void setCluster(const SiStripCluster &cluster, int detId)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
std::vector< unsigned int > hitTotalCounters
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
friend struct const_iterator
virtual void localParameters(AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters <p) const
bool useAllHitsFromTracksWithMissingHits_
unsigned int tidSide(const DetId &id) const
bool doMissingHitsRecovery_
const edm::EDGetTokenT< std::vector< Trajectory > > trajectories_token_
T const * product() const
Class to contain the online luminosity from soft FED 1022.
std::vector< Track > TrackCollection
collection of Tracks
HitEff(const edm::ParameterSet &conf)
SiStripClusterInfo siStripClusterInfo_
data_type const * const_iterator
float instLumi() const
Return the luminosity for the current nibble.
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > siStripQualityToken_
key_type key() const
Accessor for product key.
std::vector< Muon > MuonCollection
collection of Muon objects
const edm::EDGetTokenT< MeasurementTrackerEvent > trackerEvent_token_
static std::string const input
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
const_iterator end() const
last iterator over the map (read only)
float signalOverNoise() const
T getUntrackedParameter(std::string const &, T const &) const
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
void analyze(const edm::Event &e, const edm::EventSetup &c) override
size_type size() const
Return the number of contained DetSets.
const edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusters_token_
unsigned int tecSide(const DetId &id) const
const edm::EDGetTokenT< reco::TrackCollection > combinatorialTracks_token_
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
const edm::EDGetTokenT< DetIdCollection > digis_token_
int nDof
number of muon stations used
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
Abs< T >::type abs(const T &t)
unsigned int trajHitValid
#define DEFINE_FWK_MODULE(type)
const edm::ESGetToken< MeasurementTracker, CkfComponentsRecord > measurementTkToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const edm::ESGetToken< Chi2MeasurementEstimatorBase, TrackingComponentsRecord > chi2MeasurementEstimatorToken_
Log< level::Info, false > LogInfo
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const Plane & surface() const
The nominal surface of the GeomDet.
const edm::ESGetToken< StripClusterParameterEstimator, TkStripCPERecord > cpeToken_
virtual const std::array< const float, 4 > parameters() const
unsigned int trackMultiplicityCut_
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
unsigned int SiStripQualBad
const_iterator begin() const
first iterator over the map (read only)
const edm::EDGetTokenT< TrajTrackAssociationCollection > trajTrackAsso_token_
std::vector< LumiScalers > LumiScalersCollection
Log< level::Warning, false > LogWarning
void initEvent(const edm::EventSetup &iSetup)
collection_type::const_iterator const_iterator
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
const edm::EDGetTokenT< LumiScalersCollection > scalerToken_
virtual float width() const =0
const edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > commonModeToken_
float avgPileUp() const
Return the average pileup for th current nibble.
std::vector< int > missHitPerLayer
ConstRecHitPointer const & recHit() const
short getBadApvs(uint32_t detid) const
const Bounds & bounds() const