67 #define LOGPRINT edm::LogPrint("SiStripHitEfficiency:HitEff") 78 siStripClusterInfo_(consumesCollector()),
79 combinatorialTracks_token_(
85 digisCol_token_(consumes(conf.getParameter<
edm::
InputTag>(
"siStripDigis"))),
86 digisVec_token_(consumes(conf.getParameter<
edm::
InputTag>(
"siStripDigis"))),
122 traj =
fs->make<TTree>(
"traj",
"tree of trajectory positions");
123 #ifdef ExtendedCALIBTree 124 traj->Branch(
"timeDT", &timeDT,
"timeDT/F");
125 traj->Branch(
"timeDTErr", &timeDTErr,
"timeDTErr/F");
126 traj->Branch(
"timeDTDOF", &timeDTDOF,
"timeDTDOF/I");
127 traj->Branch(
"timeECAL", &timeECAL,
"timeECAL/F");
128 traj->Branch(
"dedx", &dedx,
"dedx/F");
129 traj->Branch(
"dedxNOM", &dedxNOM,
"dedxNOM/I");
130 traj->Branch(
"nLostHits", &nLostHits,
"nLostHits/I");
131 traj->Branch(
"chi2", &
chi2,
"chi2/F");
132 traj->Branch(
"p", &
p,
"p/F");
148 traj->Branch(
"ResX", &
ResX,
"ResX/F");
153 traj->Branch(
"nHits", &
nHits,
"nHits/I");
154 traj->Branch(
"pT", &
pT,
"pT/F");
157 traj->Branch(
"Id", &
Id,
"Id/i");
158 traj->Branch(
"run", &
run,
"run/i");
159 traj->Branch(
"event", &
event,
"event/i");
165 traj->Branch(
"PU", &
PU,
"PU/F");
184 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"beginning analyze from HitEff" << endl;
187 using namespace reco;
190 int run_nr =
e.id().run();
191 int ev_nr =
e.id().event();
192 int bunch_nr =
e.bunchCrossing();
206 }
else if (metaData.
isValid()) {
210 edm::LogWarning(
"SiStripHitEfficiencyWorker") <<
"could not find a source for the Luminosity and PU";
259 if (not fedErrorIdsCol_h.isValid() and not fedErrorIdsVec_h.isValid()) {
261 <<
"no valid product for SiStrip DetIds with FED errors (see parameter \"siStripDigis\"), " 262 "neither for new format (DetIdVector) nor old format (DetIdCollection)";
264 auto const& fedErrorIds = fedErrorIdsVec_h.isValid() ? *fedErrorIdsVec_h : fedErrorIdsCol_h->as_vector();
308 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"number ckf tracks found = " << tracksCKF->size() << endl;
310 if (!tracksCKF->empty()) {
314 LogDebug(
"SiStripHitEfficiency:HitEff")
319 #ifdef ExtendedCALIBTree 322 if (
e.getByLabel(
"dedxMedianCTF", dEdxUncalibHandle)) {
326 dedx = dEdxTrackUncalib[itTrack].dEdx();
327 dedxNOM = dEdxTrackUncalib[itTrack].numberOfMeasurements();
335 if (
e.getByLabel(
"muonsWitht0Correction", muH)) {
337 if (!muonsT0.empty()) {
341 timeDTDOF = mt0.
nDof;
343 bool hasCaloEnergyInfo = muonsT0[0].isEnergyValid();
344 if (hasCaloEnergyInfo)
345 timeECAL = muonsT0[0].calEnergy().ecal_time;
359 it != trajTrackAssociationHandle->
end();
365 nHits = itraj->foundHits();
366 #ifdef ExtendedCALIBTree 367 nLostHits = itraj->lostHits();
368 chi2 = (itraj->chiSquared() / itraj->ndof());
369 p = itraj->lastMeasurement().updatedState().globalMomentum().mag();
371 pT =
sqrt((itraj->lastMeasurement().updatedState().globalMomentum().x() *
372 itraj->lastMeasurement().updatedState().globalMomentum().x()) +
373 (itraj->lastMeasurement().updatedState().globalMomentum().y() *
374 itraj->lastMeasurement().updatedState().globalMomentum().y()));
379 std::vector<TrajectoryMeasurement> TMeas = itraj->measurements();
381 vector<TrajectoryMeasurement>::iterator itm;
386 double angleX = -999.;
387 double angleY = -999.;
388 double xglob, yglob, zglob;
391 bool hasMissingHits =
false;
392 int previous_layer = 999;
393 vector<unsigned int> missedLayers;
394 for (
const auto& itm : TMeas) {
395 auto theHit = itm.recHit();
396 unsigned int iidd = theHit->geographicalId().rawId();
397 int layer = ::checkLayer(iidd, tTopo);
398 int missedLayer = (
layer + 1);
399 int diffPreviousLayer = (
layer - previous_layer);
402 if (diffPreviousLayer == -2 && missedLayer > k_LayersStart && missedLayer < k_LayersAtTOBEnd) {
404 hasMissingHits =
true;
407 else if (diffPreviousLayer == -2 && (missedLayer > k_LayersAtTOBEnd + 1 && missedLayer <= k_LayersAtTIDEnd)) {
409 hasMissingHits =
true;
412 else if (diffPreviousLayer == -2 && missedLayer > k_LayersAtTIDEnd && missedLayer <= k_LayersAtTECEnd) {
414 hasMissingHits =
true;
418 if ((
layer > k_LayersStart &&
layer <= k_LayersAtTIBEnd) && (previous_layer == 12)) {
420 hasMissingHits =
true;
424 if ((
layer > k_LayersAtTIBEnd &&
layer <= k_LayersAtTOBEnd) && (previous_layer == 15)) {
426 hasMissingHits =
true;
430 hasMissingHits =
true;
433 missedLayers.push_back(
layer);
434 previous_layer =
layer;
439 unsigned int prev_TKlayers = 0;
440 for (itm = TMeas.begin(); itm != TMeas.end(); itm++) {
441 auto theInHit = (*itm).recHit();
443 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"theInHit is valid = " << theInHit->isValid() << endl;
445 unsigned int iidd = theInHit->geographicalId().rawId();
447 unsigned int TKlayers = ::checkLayer(iidd, tTopo);
448 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"TKlayer from trajectory: " << TKlayers <<
" from module = " << iidd
449 <<
" matched/stereo/rphi = " << ((iidd & 0x3) == 0) <<
"/" 450 << ((iidd & 0x3) == 1) <<
"/" << ((iidd & 0x3) == 2) << endl;
454 bool isFirstMeas = (itm == (TMeas.end() - 1));
455 bool isLastMeas = (itm == (TMeas.begin()));
468 if (TKlayers == 10 || TKlayers == 22) {
469 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"skipping original TM for TOB 6 or TEC 9" << endl;
474 std::vector<TrajectoryAtInvalidHit> TMs;
482 if (::isDoubleSided(iidd, tTopo) && ((iidd & 0x3) == 0)) {
487 }
else if (::isDoubleSided(iidd, tTopo) && (!::check2DPartner(iidd, TMeas))) {
492 LogDebug(
"SiStripHitEfficiency:HitEff") <<
" found a hit with a missing partner";
497 bool missingHitAdded =
false;
499 vector<TrajectoryMeasurement> tmpTmeas;
500 unsigned int misLayer = TKlayers + 1;
503 if (
int(TKlayers) -
int(prev_TKlayers) == -2) {
504 const DetLayer* detlayer = itm->layer();
509 if (misLayer > k_LayersAtTIDEnd && misLayer < k_LayersAtTECEnd) {
510 std::vector<ForwardDetLayer const*> negTECLayers =
511 measurementTrackerHandle->geometricSearchTracker()->negTecLayers();
512 std::vector<ForwardDetLayer const*> posTECLayers =
513 measurementTrackerHandle->geometricSearchTracker()->posTecLayers();
514 const DetLayer* tecLayerneg = negTECLayers[misLayer - k_LayersAtTIDEnd - 1];
515 const DetLayer* tecLayerpos = posTECLayers[misLayer - k_LayersAtTIDEnd - 1];
516 if (tTopo->
tecSide(iidd) == 1) {
517 tmpTmeas = layerMeasurements.measurements(*tecLayerneg, tsos, *thePropagator, *
estimator);
518 }
else if (tTopo->
tecSide(iidd) == 2) {
519 tmpTmeas = layerMeasurements.measurements(*tecLayerpos, tsos, *thePropagator, *
estimator);
523 else if (misLayer == (k_LayersAtTIDEnd - 1) ||
524 misLayer == k_LayersAtTIDEnd) {
526 std::vector<ForwardDetLayer const*> negTIDLayers =
527 measurementTrackerHandle->geometricSearchTracker()->negTidLayers();
528 std::vector<ForwardDetLayer const*> posTIDLayers =
529 measurementTrackerHandle->geometricSearchTracker()->posTidLayers();
530 const DetLayer* tidLayerneg = negTIDLayers[misLayer - k_LayersAtTOBEnd - 1];
531 const DetLayer* tidLayerpos = posTIDLayers[misLayer - k_LayersAtTOBEnd - 1];
533 if (tTopo->
tidSide(iidd) == 1) {
534 tmpTmeas = layerMeasurements.measurements(*tidLayerneg, tsos, *thePropagator, *
estimator);
535 }
else if (tTopo->
tidSide(iidd) == 2) {
536 tmpTmeas = layerMeasurements.measurements(*tidLayerpos, tsos, *thePropagator, *
estimator);
540 if (misLayer > k_LayersStart && misLayer < k_LayersAtTOBEnd) {
542 std::vector<BarrelDetLayer const*> barrelTIBLayers =
543 measurementTrackerHandle->geometricSearchTracker()->tibLayers();
544 std::vector<BarrelDetLayer const*> barrelTOBLayers =
545 measurementTrackerHandle->geometricSearchTracker()->tobLayers();
547 if (misLayer > k_LayersStart && misLayer <= k_LayersAtTIBEnd) {
548 const DetLayer* tibLayer = barrelTIBLayers[misLayer - k_LayersStart - 1];
549 tmpTmeas = layerMeasurements.measurements(*tibLayer, tsos, *thePropagator, *
estimator);
550 }
else if (misLayer > k_LayersAtTIBEnd && misLayer < k_LayersAtTOBEnd) {
551 const DetLayer* tobLayer = barrelTOBLayers[misLayer - k_LayersAtTIBEnd - 1];
552 tmpTmeas = layerMeasurements.measurements(*tobLayer, tsos, *thePropagator, *
estimator);
556 if ((
int(TKlayers) > k_LayersStart &&
int(TKlayers) <= k_LayersAtTIBEnd) &&
int(prev_TKlayers) == 12) {
557 const DetLayer* detlayer = itm->layer();
561 std::vector<ForwardDetLayer const*> negTIDLayers =
562 measurementTrackerHandle->geometricSearchTracker()->negTidLayers();
563 std::vector<ForwardDetLayer const*> posTIDLayers =
564 measurementTrackerHandle->geometricSearchTracker()->posTidLayers();
566 const DetLayer* tidLayerneg = negTIDLayers[k_LayersStart];
567 const DetLayer* tidLayerpos = posTIDLayers[k_LayersStart];
568 if (tTopo->
tidSide(iidd) == 1) {
569 tmpTmeas = layerMeasurements.measurements(*tidLayerneg, tsos, *thePropagator, *
estimator);
570 }
else if (tTopo->
tidSide(iidd) == 2) {
571 tmpTmeas = layerMeasurements.measurements(*tidLayerpos, tsos, *thePropagator, *
estimator);
575 if ((
int(TKlayers) > k_LayersAtTIBEnd &&
int(TKlayers) <= k_LayersAtTOBEnd) &&
int(prev_TKlayers) == 15) {
576 const DetLayer* detlayer = itm->layer();
581 std::vector<ForwardDetLayer const*> negTECLayers =
582 measurementTrackerHandle->geometricSearchTracker()->negTecLayers();
583 std::vector<ForwardDetLayer const*> posTECLayers =
584 measurementTrackerHandle->geometricSearchTracker()->posTecLayers();
586 const DetLayer* tecLayerneg = negTECLayers[k_LayersStart];
587 const DetLayer* tecLayerpos = posTECLayers[k_LayersStart];
588 if (tTopo->
tecSide(iidd) == 1) {
589 tmpTmeas = layerMeasurements.measurements(*tecLayerneg, tsos, *thePropagator, *
estimator);
590 }
else if (tTopo->
tecSide(iidd) == 2) {
591 tmpTmeas = layerMeasurements.measurements(*tecLayerpos, tsos, *thePropagator, *
estimator);
595 if (!tmpTmeas.empty()) {
597 unsigned int iidd_tmp = TM_tmp.
recHit()->geographicalId().rawId();
599 LogDebug(
"SiStripHitEfficiency:HitEff") <<
" hit actually being added to TM vector";
602 if (::isDoubleSided(iidd_tmp, tTopo)) {
607 missingHitAdded =
true;
613 prev_TKlayers = TKlayers;
618 bool hitsWithBias =
false;
619 for (
auto ilayer : missedLayers) {
620 if (ilayer < TKlayers)
633 bool isValid = theInHit->isValid();
634 bool isLast = (itm == (TMeas.end() - 1));
635 bool isLastTOB5 =
true;
637 if (::checkLayer((++itm)->recHit()->geographicalId().rawId(), tTopo) == 9)
644 if (TKlayers == 9 &&
isValid && isLastTOB5) {
647 std::vector<BarrelDetLayer const*> barrelTOBLayers =
648 measurementTrackerHandle->geometricSearchTracker()->tobLayers();
649 const DetLayer* tob6 = barrelTOBLayers[barrelTOBLayers.size() - 1];
652 auto tmp = layerMeasurements.measurements(*tob6, tsosTOB5, *thePropagator, *
estimator);
655 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"size of TM from propagation = " <<
tmp.size() << endl;
661 const auto& tob6Hit = tob6TM.
recHit();
663 if (tob6Hit->geographicalId().rawId() != 0) {
664 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"tob6 hit actually being added to TM vector" << endl;
670 bool isLastTEC8 =
true;
672 if (::checkLayer((++itm)->
recHit()->geographicalId().
rawId(), tTopo) == 21)
679 if (TKlayers == 21 &&
isValid && isLastTEC8) {
680 std::vector<const ForwardDetLayer*> posTecLayers =
681 measurementTrackerHandle->geometricSearchTracker()->posTecLayers();
682 const DetLayer* tec9pos = posTecLayers[posTecLayers.size() - 1];
683 std::vector<const ForwardDetLayer*> negTecLayers =
684 measurementTrackerHandle->geometricSearchTracker()->negTecLayers();
685 const DetLayer* tec9neg = negTecLayers[negTecLayers.size() - 1];
691 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"there is a problem with TEC 9 extrapolation" << endl;
694 vector<TrajectoryMeasurement>
tmp;
695 if (tTopo->
tecSide(iidd) == 1) {
696 tmp = layerMeasurements.measurements(*tec9neg, tsosTEC9, *thePropagator, *
estimator);
699 if (tTopo->
tecSide(iidd) == 2) {
700 tmp = layerMeasurements.measurements(*tec9pos, tsosTEC9, *thePropagator, *
estimator);
709 const auto& tec9Hit = tec9TM.
recHit();
711 unsigned int tec9id = tec9Hit->geographicalId().rawId();
712 LogDebug(
"SiStripHitEfficiency:HitEff")
713 <<
"tec9id = " << tec9id <<
" is Double sided = " << ::isDoubleSided(tec9id, tTopo)
714 <<
" and 0x3 = " << (tec9id & 0x3) << endl;
716 if (tec9Hit->geographicalId().rawId() != 0) {
717 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"tec9 hit actually being added to TM vector" << endl;
720 if (::isDoubleSided(tec9id, tTopo)) {
734 for (std::vector<TrajectoryAtInvalidHit>::const_iterator TM = TMs.begin(); TM != TMs.end(); ++TM) {
736 iidd = TM->monodet_id();
737 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"setting iidd = " << iidd <<
" before checking efficiency and ";
742 angleX = atan(TM->localDxDz());
743 angleY = atan(TM->localDyDz());
748 xglob = TM->globalX();
749 yglob = TM->globalY();
750 zglob = TM->globalZ();
751 xErr = TM->localErrorX();
752 yErr = TM->localErrorY();
763 TKlayers = ::checkLayer(iidd, tTopo);
767 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"Looking at layer under study" << endl;
789 if (!
input.empty()) {
790 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"Checking clusters with size = " <<
input.size() << endl;
792 std::vector<std::vector<float> >
798 unsigned int ClusterId = DSViter->id();
799 if (ClusterId == iidd) {
800 LogDebug(
"SiStripHitEfficiency:HitEff")
801 <<
"found (ClusterId == iidd) with ClusterId = " << ClusterId <<
" and iidd = " << iidd << endl;
802 DetId ClusterDetId(ClusterId);
811 if (TKlayers >= 11) {
814 dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds())));
815 std::array<const float, 4>
const& parameterTrap =
817 hbedge = parameterTrap[0];
818 htedge = parameterTrap[1];
819 hapoth = parameterTrap[3];
820 uylfac = (htedge - hbedge) / (htedge + hbedge) / hapoth;
821 uxlden = 1 + yloc * uylfac;
825 if (TrajStrip == -1) {
828 TrajStrip = xloc / pitch + nstrips / 2.0;
830 if (TKlayers >= 11) {
831 float TrajLocXMid = xloc / (1 + (htedge - hbedge) * yloc / (htedge + hbedge) /
833 TrajStrip = TrajLocXMid / pitch + nstrips / 2.0;
843 float sigma = ::checkConsistency(
parameters, xloc, xErr);
850 if (TKlayers >= 11) {
854 yErr * yErr * xloc * xloc * uylfac * uylfac / uxlden / uxlden / uxlden / uxlden);
861 std::vector<float> cluster_info;
862 cluster_info.push_back(
res);
863 cluster_info.push_back(sigma);
869 VCluster_info.push_back(cluster_info);
871 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"Have ID match. residual = " << VCluster_info.back()[0]
872 <<
" res sigma = " << VCluster_info.back()[1] << endl;
873 LogDebug(
"SiStripHitEfficiency:HitEff")
874 <<
"trajectory measurement compatability estimate = " << (*itm).estimate() << endl;
875 LogDebug(
"SiStripHitEfficiency:HitEff")
877 <<
" trajectory position = " << xloc <<
" traj error = " << xErr << endl;
881 float FinalResSig = 1000.0;
882 float FinalCluster[7] = {1000.0, 1000.0, 0.0, 0.0, 0.0, 0.0, 0.0};
884 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"found clusters > 0" << endl;
887 vector<vector<float> >::iterator ires;
888 for (ires = VCluster_info.begin(); ires != VCluster_info.end(); ires++) {
889 if (
abs((*ires)[1]) <
abs(FinalResSig)) {
890 FinalResSig = (*ires)[1];
891 for (
unsigned int i = 0;
i < ires->size();
i++) {
892 LogDebug(
"SiStripHitEfficiency:HitEff")
893 <<
"filling final cluster. i = " <<
i <<
" before fill FinalCluster[i]=" << FinalCluster[
i]
894 <<
" and (*ires)[i] =" << (*ires)[
i] << endl;
895 FinalCluster[
i] = (*ires)[
i];
896 LogDebug(
"SiStripHitEfficiency:HitEff")
897 <<
"filling final cluster. i = " <<
i <<
" after fill FinalCluster[i]=" << FinalCluster[
i]
898 <<
" and (*ires)[i] =" << (*ires)[
i] << endl;
901 LogDebug(
"SiStripHitEfficiency:HitEff")
902 <<
"iresidual = " << (*ires)[0] <<
" isigma = " << (*ires)[1]
903 <<
" and FinalRes = " << FinalCluster[0] << endl;
906 FinalResSig = VCluster_info.at(0)[1];
907 for (
unsigned int i = 0;
i < VCluster_info.at(0).size();
i++) {
908 FinalCluster[
i] = VCluster_info.at(0)[
i];
911 VCluster_info.clear();
914 LogDebug(
"SiStripHitEfficiency:HitEff")
915 <<
"Final residual in X = " << FinalCluster[0] <<
"+-" << (FinalCluster[0] / FinalResSig) << endl;
916 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"Checking location of trajectory: abs(yloc) = " <<
abs(yloc)
917 <<
" abs(xloc) = " <<
abs(xloc) << endl;
918 LogDebug(
"SiStripHitEfficiency:HitEff")
919 <<
"Checking location of cluster hit: yloc = " << FinalCluster[4] <<
"+-" << FinalCluster[5]
920 <<
" xloc = " << FinalCluster[2] <<
"+-" << FinalCluster[3] << endl;
921 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"Final cluster signal to noise = " << FinalCluster[6] << endl;
923 float exclusionWidth = 0.4;
924 float TOBexclusion = 0.0;
925 float TECexRing5 = -0.89;
926 float TECexRing6 = -0.56;
927 float TECexRing7 = 0.60;
930 int ringnumber = ((iidd >> 5) & 0x7);
933 if ((TKlayers >= 5 && TKlayers < 11) ||
934 ((
subdetector == 6) && ((ringnumber >= 5) && (ringnumber <= 7)))) {
936 float highzone = 0.0;
938 float higherr = yloc + 5.0 * yErr;
939 float lowerr = yloc - 5.0 * yErr;
940 if (TKlayers >= 5 && TKlayers < 11) {
942 highzone = TOBexclusion + exclusionWidth;
943 lowzone = TOBexclusion - exclusionWidth;
944 }
else if (ringnumber == 5) {
946 highzone = TECexRing5 + exclusionWidth;
947 lowzone = TECexRing5 - exclusionWidth;
948 }
else if (ringnumber == 6) {
950 highzone = TECexRing6 + exclusionWidth;
951 lowzone = TECexRing6 - exclusionWidth;
952 }
else if (ringnumber == 7) {
954 highzone = TECexRing7 + exclusionWidth;
955 lowzone = TECexRing7 - exclusionWidth;
958 if ((highzone <= higherr) && (highzone >= lowerr))
960 if ((lowzone >= lowerr) && (lowzone <= higherr))
962 if ((higherr <= highzone) && (higherr >= lowzone))
964 if ((lowerr >= lowzone) && (lowerr <= highzone))
984 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"strip is bad from SiStripQuality" << endl;
987 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"strip is good from SiStripQuality" << endl;
991 for (
unsigned int ii = 0;
ii < fedErrorIds.size();
ii++) {
992 if (iidd == fedErrorIds[
ii].
rawId())
1000 ResX = FinalCluster[0];
1002 if (FinalResSig != FinalCluster[1])
1003 LogDebug(
"SiStripHitEfficiency:HitEff")
1004 <<
"Problem with best cluster selection because FinalResSig = " << FinalResSig
1005 <<
" and FinalCluster[1] = " << FinalCluster[1] << endl;
1014 if (commonModeDigis.
isValid() && TrajStrip >= 0 && TrajStrip <= 768) {
1016 if (digiframe != commonModeDigis->end())
1017 if ((
unsigned)TrajStrip / 128 < digiframe->data.
size())
1018 commonMode = digiframe->data.at(TrajStrip / 128).adc();
1021 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"before check good" << endl;
1023 if (FinalResSig < 999.0) {
1025 LogDebug(
"SiStripHitEfficiency:HitEff")
1026 <<
"hit being counted as good " << FinalCluster[0] <<
" FinalRecHit " << iidd <<
" TKlayers " 1027 << TKlayers <<
" xloc " << xloc <<
" yloc " << yloc <<
" module " << iidd
1028 <<
" matched/stereo/rphi = " << ((iidd & 0x3) == 0) <<
"/" << ((iidd & 0x3) == 1) <<
"/" 1029 << ((iidd & 0x3) == 2) << endl;
1033 LogDebug(
"SiStripHitEfficiency:HitEff")
1034 <<
"hit being counted as bad ######### Invalid RPhi FinalResX " << FinalCluster[0]
1035 <<
" FinalRecHit " << iidd <<
" TKlayers " << TKlayers <<
" xloc " << xloc <<
" yloc " << yloc
1036 <<
" module " << iidd <<
" matched/stereo/rphi = " << ((iidd & 0x3) == 0) <<
"/" 1037 << ((iidd & 0x3) == 1) <<
"/" << ((iidd & 0x3) == 2) << endl;
1041 LogDebug(
"SiStripHitEfficiency:HitEff") <<
" RPhi Error " <<
sqrt(xErr * xErr + yErr * yErr)
1042 <<
" ErrorX " << xErr <<
" yErr " << yErr << endl;
1044 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"after good location check" << endl;
1046 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"after list of clusters" << endl;
1048 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"After layers=TKLayers if" << endl;
1050 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"After looping over TrajAtValidHit list" << endl;
1052 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"end TMeasurement loop" << endl;
1054 LogDebug(
"SiStripHitEfficiency:HitEff") <<
"end of trajectories loop" << endl;
1059 traj->GetDirectory()->cd();
1062 LogDebug(
"SiStripHitEfficiency:HitEff") <<
" Events Analysed " <<
events << endl;
1071 float totTIBrepro = 0.0;
1072 float totTOBrepro = 0.0;
1073 float totTIDrepro = 0.0;
1074 float totTECrepro = 0.0;
1076 edm::LogInfo(
"SiStripHitEfficiency:HitEff") <<
"Within TIB :";
1077 for (
int i = 0;
i <= k_LayersAtTIBEnd;
i++) {
1085 <<
" % of missing hit";
1089 <<
"TOTAL % of missing hits within TIB :" << (totTIB * 1.0 /
totalNbHits) * 100 <<
"%";
1091 <<
"AFTER repropagation :" << (totTIBrepro * 1.0 /
totalNbHits) * 100 <<
"%";
1093 edm::LogInfo(
"SiStripHitEfficiency:HitEff") <<
"Within TOB :";
1094 for (
int i = k_LayersAtTIBEnd + 1;
i <= k_LayersAtTOBEnd;
i++) {
1102 <<
" % of missing hit";
1106 <<
"TOTAL % of missing hits within TOB :" << (totTOB * 1.0 /
totalNbHits) * 100 <<
"%";
1108 <<
"AFTER repropagation :" << (totTOBrepro * 1.0 /
totalNbHits) * 100 <<
"%";
1110 edm::LogInfo(
"SiStripHitEfficiency:HitEff") <<
"Within TID :";
1111 for (
int i = k_LayersAtTOBEnd + 1;
i <= k_LayersAtTIDEnd;
i++) {
1119 <<
" % of missing hit";
1123 <<
"TOTAL % of missing hits within TID :" << (totTID * 1.0 /
totalNbHits) * 100 <<
"%";
1125 <<
"AFTER repropagation :" << (totTIDrepro * 1.0 /
totalNbHits) * 100 <<
"%";
1127 edm::LogInfo(
"SiStripHitEfficiency:HitEff") <<
"Within TEC :";
1128 for (
int i = k_LayersAtTIDEnd + 1;
i < k_END_OF_LAYERS;
i++) {
1136 <<
" % of missing hit";
1140 <<
"TOTAL % of missing hits within TEC :" << (totTEC * 1.0 /
totalNbHits) * 100 <<
"%";
1142 <<
"AFTER repropagation :" << (totTECrepro * 1.0 /
totalNbHits) * 100 <<
"%";
1144 edm::LogInfo(
"SiStripHitEfficiency:HitEff") <<
" Hit recovery summary:";
1146 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
const edm::EDGetTokenT< DetIdVector > digisVec_token_
HitEff(const edm::ParameterSet &conf)
SiStripClusterInfo siStripClusterInfo_
data_type const * const_iterator
float instLumi() const
Return the luminosity for the current nibble.
const edm::EDGetTokenT< DetIdCollection > digisCol_token_
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
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_
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