26 siStripClusterInfo_(consumesCollector()),
32 tracksCollection_in_EventTree(
true),
35 conf.getParameter<
edm::
ParameterSet>(
"genericTriggerEventPSet"), consumesCollector(), *this)) {
79 <<
" detectors instantiated in the geometry" << std::endl;
94 book(ibooker, trackerTopology, tkDetMap);
110 LogDebug(
"SiStripMonitorTrack") <<
"[SiStripMonitorTrack::analyse] " 111 <<
"Run " <<
e.id().run() <<
" Event " <<
e.id().event() << std::endl;
120 iSubDet->second.totNClustersOnTrack = 0;
121 iSubDet->second.totNClustersOffTrack = 0;
134 std::map<std::string, MonitorElement*>::iterator iME;
135 std::map<std::string, LayerMEs>::iterator iLayerME;
137 if (!(
topFolderName_.find(
"IsolatedBunches") != std::string::npos)) {
184 std::make_unique<TkHistoMap>(tkDetMap,
topFolderName_,
"TkHMap_StoNCorrOnTrack", 0.0,
true);
186 std::make_unique<TkHistoMap>(tkDetMap,
topFolderName_,
"TkHMap_NumberOfOnTrackCluster", 0.0,
true);
188 std::make_unique<TkHistoMap>(tkDetMap,
topFolderName_,
"TkHMap_NumberOfOfffTrackCluster", 0.0,
true);
190 std::make_unique<TkHistoMap>(tkDetMap,
topFolderName_,
"TkHMap_ChargePerCMfromTrack", 0.0,
true);
192 std::make_unique<TkHistoMap>(tkDetMap,
topFolderName_,
"TkHMap_NumberMissingHits", 0.0,
true,
true);
194 std::make_unique<TkHistoMap>(tkDetMap,
topFolderName_,
"TkHMap_NumberInactiveHits", 0.0,
true,
true);
196 std::make_unique<TkHistoMap>(tkDetMap,
topFolderName_,
"TkHMap_NumberValidHits", 0.0,
true,
true);
200 std::make_unique<TkHistoMap>(tkDetMap,
topFolderName_,
"TkHMap_ClusterWidthOnTrack", 0.0,
true);
202 std::make_unique<TkHistoMap>(tkDetMap,
topFolderName_,
"TkHMap_ClusterWidthOffTrack", 0.0,
true);
206 std::make_unique<TkHistoMap>(tkDetMap,
topFolderName_,
"TkHMap_ChargePerCMfromOrigin", 0.0,
true);
209 std::vector<uint32_t> vdetId_;
211 const char* tec =
"TEC";
212 const char* tid =
"TID";
217 for (std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(), detid_end = vdetId_.end();
218 detid_iter != detid_end;
220 uint32_t detid = *detid_iter;
223 edm::LogError(
"SiStripMonitorTrack") <<
"[" << __PRETTY_FUNCTION__ <<
"] invalid detid " << detid << std::endl;
230 std::pair<std::string, int32_t> det_layer_pair = folder_organizer.
GetSubDetAndLayer(detid, tTopo,
false);
239 std::map<std::string, LayerMEs>::iterator iLayerME =
LayerMEsMap.find(layer_id);
241 folder_organizer.
setLayerFolder(detid, tTopo, det_layer_pair.second,
false);
245 const char* subdet = det_layer_pair.first.c_str();
246 if (std::strstr(subdet, tec) !=
nullptr || std::strstr(subdet, tid) !=
nullptr) {
250 std::pair<std::string, int32_t> det_ring_pair = folder_organizer.
GetSubDetAndLayer(detid, tTopo,
true);
251 folder_organizer.
setLayerFolder(detid, tTopo, det_ring_pair.second,
true);
257 std::pair<std::string, std::string> sdet_pair = folder_organizer.
getSubDetFolderAndTag(detid, tTopo);
267 for (std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(), detid_end = vdetId_.end();
268 detid_iter != detid_end;
270 uint32_t detid = *detid_iter;
273 edm::LogError(
"SiStripMonitorTrack") <<
"[" << __PRETTY_FUNCTION__ <<
"] invalid detid " << detid << std::endl;
280 std::pair<std::string, int32_t> det_layer_pair = folder_organizer.
GetSubDetAndLayer(detid, tTopo,
false);
289 std::map<std::string, LayerMEs>::iterator iLayerME =
LayerMEsMap.find(layer_id);
291 folder_organizer.
setLayerFolder(detid, tTopo, det_layer_pair.second,
false);
295 const char* subdet = det_layer_pair.first.c_str();
296 if (std::strstr(subdet, tec) !=
nullptr || std::strstr(subdet, tid) !=
nullptr) {
300 std::pair<std::string, int32_t> det_ring_pair = folder_organizer.
GetSubDetAndLayer(detid, tTopo,
true);
301 folder_organizer.
setLayerFolder(detid, tTopo, det_ring_pair.second,
true);
307 std::pair<std::string, std::string> sdet_pair = folder_organizer.
getSubDetFolderAndTag(detid, tTopo);
316 if (!(
topFolderName_.find(
"IsolatedBunches") != std::string::npos)) {
320 ibooker.
book1D(
"ClusterStoNCorr_OnTrack_TIBTID",
"TIB/TID [FECCrate=1] (OnTrack)", 100, 0., 100.);
324 ibooker.
book1D(
"ClusterStoNCorr_OnTrack_TOB",
"TOB [FECCrate=4] (OnTrack)", 100, 0., 100.);
328 ibooker.
book1D(
"ClusterStoNCorr_OnTrack_TECM",
"TECM [FECCrate=3] (OnTrack)", 100, 0., 100.);
332 ibooker.
book1D(
"ClusterStoNCorr_OnTrack_TECP",
"TECP [FECCrate=2] (OnTrack)", 100, 0., 100.);
336 ibooker.
book2D(
"ClusterStoNCorr_OnTrack_FECCratevsFECSlot",
" S/N (On track)", 22, 0.5, 22.5, 4, 0.5, 4.5);
345 "TIB/TID [FECCrate=1] (OnTrack)",
356 "ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB",
"TOB [FECCrate=4] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
361 "ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM",
"TEC- [FECCrate=3] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
366 "ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP",
"TEC- [FECCrate=2] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
375 ibooker.
book2D(
"ClusterCount_OnTrack_FECCratevsFECSlot",
" S/N (On track)", 22, 0.5, 22.5, 4, 0.5, 4.5);
384 "ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID",
"TIB/TID [FECCrate=1] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
389 "ClusterCount_OnTrack_FECSlotVsFECRing_TOB",
"TOB [FECCrate=4] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
394 "ClusterCount_OnTrack_FECSlotVsFECRing_TECM",
"TEC- [FECCrate=3] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
399 "ClusterCount_OnTrack_FECSlotVsFECRing_TECP",
"TEC- [FECCrate=2] (OnTrack)", 10, -0.5, 9.5, 22, 0.5, 22.5);
411 std::map<std::string, ModMEs>::iterator iModME =
ModMEsMap.find(hid);
426 ibooker,
"TH1ClusterChargeRaw", hidmanager.
createHistoId(
"ClusterChargeRaw_OnTrack",
name,
id).c_str());
429 ibooker,
"TH1ClusterChargeCorr", hidmanager.
createHistoId(
"ClusterChargeCorr_OnTrack",
name,
id).c_str());
432 ibooker,
"TH1ClusterStoNCorrMod", hidmanager.
createHistoId(
"ClusterStoNCorr_OnTrack",
name,
id).c_str());
439 total_nr_strips + 0.5);
445 ibooker,
"TH1ClusterChargePerCM", hidmanager.
createHistoId(
"ClusterChargePerCMfromTrack",
name,
id).c_str());
448 ibooker,
"TH1ClusterChargePerCM", hidmanager.
createHistoId(
"ClusterChargePerCMfromOrigin",
name,
id).c_str());
462 if (
id.
find(
"TEC") == std::string::npos &&
id.find(
"TID") == std::string::npos) {
488 hpar =
"TH1ClusterStoNCorr";
493 hpar =
"TH1ClusterGain";
498 hpar =
"TH1ClusterChargeCorr";
503 hpar =
"TH1ClusterCharge";
507 hpar =
"TH1ClusterCharge";
512 hpar =
"TH1ClusterChargeRaw";
516 hpar =
"TH1ClusterChargeRaw";
521 hpar =
"TH1ClusterNoise";
525 hpar =
"TH1ClusterNoise";
530 hpar =
"TH1ClusterWidth";
534 hpar =
"TH1ClusterWidth";
539 if (layer_id.find(
"TEC") != std::string::npos)
540 total_nr_strips = 3 * 2 * 128;
543 hpar =
"TH1ClusterPos";
544 if (layer_id.find(
"TIB") != std::string::npos || layer_id.find(
"TOB") != std::string::npos ||
551 hpar =
"TH2ClusterPosTOB";
552 if (layer_id.find(
"TOB") != std::string::npos)
556 hpar =
"TH2ClusterPosTIB";
557 if (layer_id.find(
"TIB") != std::string::npos)
561 hpar =
"TH2ClusterPosTEC";
562 if (layer_id.find(
"TEC") != std::string::npos) {
563 static constexpr
int nbinR = 8;
564 static constexpr
float rval[9] = {0, 21.2, 30.8, 40.4, 50.0, 60.0, 75.0, 90.0, 110.0};
565 static constexpr
int nmodulesPhi = 40 * 6;
566 float phival[nmodulesPhi];
567 for (
int i = 0;
i < nmodulesPhi;
i++)
568 phival[
i] = -3.2 + 2 *
i * 3.2 / nmodulesPhi;
570 TH2F*
temp =
new TH2F(
"tmp",
"tmp", nbinR, rval, nmodulesPhi - 1, phival);
575 hpar =
"TH2ClusterPosTID";
576 if (layer_id.find(
"TID") != std::string::npos) {
577 static constexpr
int nbinR = 4;
578 static constexpr
float rval[5] = {0, 21.2, 30.8, 40.4, 50.0};
579 static constexpr
int nmodulesPhi = 80 * 4;
580 float phival[nmodulesPhi];
581 for (
int i = 0;
i < nmodulesPhi;
i++)
582 phival[
i] = -3.2 +
i * 2 * 3.2 / nmodulesPhi;
584 TH2F*
temp =
new TH2F(
"tmp",
"tmp", nbinR, rval, nmodulesPhi - 1, phival);
589 hpar =
"TH1ClusterPos";
590 if (layer_id.find(
"TIB") != std::string::npos || layer_id.find(
"TOB") != std::string::npos ||
596 hpar =
"TH1ClusterChargePerCM";
599 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargePerCMfromOrigin",
name, layer_id,
"OnTrack");
600 hpar =
"TH1ClusterChargePerCM";
603 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargePerCMfromOrigin",
name, layer_id,
"OffTrack");
604 hpar =
"TH1ClusterChargePerCM";
621 hpar =
"TH1ClusterStoNCorr";
626 hpar =
"TH1ClusterGain";
631 hpar =
"TH1ClusterChargeCorr";
636 hpar =
"TH1ClusterCharge";
640 hpar =
"TH1ClusterCharge";
645 hpar =
"TH1ClusterChargeRaw";
649 hpar =
"TH1ClusterChargeRaw";
654 hpar =
"TH1ClusterNoise";
658 hpar =
"TH1ClusterNoise";
663 hpar =
"TH1ClusterWidth";
667 hpar =
"TH1ClusterWidth";
672 if (
ring_id.find(
"TEC") != std::string::npos)
673 total_nr_strips = 3 * 2 * 128;
676 hpar =
"TH1ClusterPos";
681 hpar =
"TH1ClusterPos";
687 hpar =
"TH1ClusterChargePerCM";
691 hpar =
"TH1ClusterChargePerCM";
695 hpar =
"TH1ClusterChargePerCM";
714 completeName =
"Summary_TotalNumberOfClusters_OnTrack" +
subdet_tag;
715 axisName =
"Number of on-track clusters in " +
name;
721 completeName =
"Summary_TotalNumberOfClusters_OnTrackStereo" +
subdet_tag;
722 axisName =
"Number of on-track stereo clusters in " +
name;
728 completeName =
"Summary_TotalNumberOfClusters_OffTrack" +
subdet_tag;
729 axisName =
"Number of off-track clusters in " +
name;
734 if (
name.find(
"TIB") != std::string::npos) {
738 if (
name.find(
"TOB") != std::string::npos) {
742 if (
name.find(
"TID") != std::string::npos) {
746 if (
name.find(
"TEC") != std::string::npos) {
754 completeName =
"Summary_ClusterGain" +
subdet_tag;
758 completeName =
"Summary_ClusterStoNCorr_OnTrack" +
subdet_tag;
761 completeName =
"Summary_ClusterStoNCorrThin_OnTrack" +
subdet_tag;
762 if (
subdet_tag.find(
"TEC") != std::string::npos)
765 completeName =
"Summary_ClusterStoNCorrThick_OnTrack" +
subdet_tag;
766 if (
subdet_tag.find(
"TEC") != std::string::npos)
770 completeName =
"Summary_ClusterChargeCorr_OnTrack" +
subdet_tag;
773 completeName =
"Summary_ClusterChargeCorrThin_OnTrack" +
subdet_tag;
774 if (
subdet_tag.find(
"TEC") != std::string::npos)
777 completeName =
"Summary_ClusterChargeCorrThick_OnTrack" +
subdet_tag;
778 if (
subdet_tag.find(
"TEC") != std::string::npos)
782 completeName =
"Summary_ClusterCharge_OnTrack" +
subdet_tag;
786 completeName =
"Summary_ClusterChargeRaw_OnTrack" +
subdet_tag;
790 completeName =
"Summary_ClusterCharge_OffTrack" +
subdet_tag;
794 completeName =
"Summary_ClusterChargeRaw_OffTrack" +
subdet_tag;
798 completeName =
"Summary_ClusterStoN_OffTrack" +
subdet_tag;
802 completeName =
"Summary_ClusterChargePerCMfromTrack" +
subdet_tag;
806 completeName =
"Summary_ClusterChargePerCMfromOrigin_OnTrack" +
subdet_tag;
810 completeName =
"Summary_ClusterChargePerCMfromOrigin_OffTrack" +
subdet_tag;
815 completeName =
"Trend_TotalNumberOfClusters_OnTrack" +
subdet_tag;
817 completeName =
"Trend_TotalNumberOfClusters_OffTrack" +
subdet_tag;
827 const char* ParameterSetLabel,
839 const char* ParameterSetLabel,
854 const char* ParameterSetLabel,
872 const char* ParameterSetLabel,
899 me->setCanExtend(TH1::kAllAxes);
903 me->setAxisTitle(
"Lumisection", 1);
912 auto const& trajParams =
track.extra()->trajParams();
914 auto hb =
track.recHitsBegin();
915 for (
unsigned int h = 0;
h <
track.recHitsSize();
h++) {
916 auto ttrh = *(
hb +
h);
919 uint32_t thedetid = ttrh->rawId();
922 if ((ttrh->getType() == 1))
924 if ((ttrh->getType() == 2))
926 if ((ttrh->getType() == 0))
931 if (!ttrh->isValid())
935 auto statedirection = trajParams[
h].momentum();
945 LogTrace(
"SiStripMonitorTrack") <<
"\nMatched recHit found" << std::endl;
952 statedirection = monodet->
toLocal(gtrkdirup);
955 if (statedirection.mag())
956 RecHitInfo<SiStripRecHit2D>(&
m, statedirection, digilist,
ev, track_ok);
959 statedirection = stereodet->
toLocal(gtrkdirup);
962 if (statedirection.mag())
963 RecHitInfo<SiStripRecHit2D>(&
s, statedirection, digilist,
ev, track_ok);
964 }
else if (projhit) {
965 LogTrace(
"SiStripMonitorTrack") <<
"\nProjected recHit found" << std::endl;
974 LogTrace(
"SiStripMonitorTrack") <<
"\nProjected recHit found MONO" << std::endl;
976 statedirection = det->
toLocal(gtrkdirup);
977 if (statedirection.mag())
978 RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist,
ev, track_ok);
980 LogTrace(
"SiStripMonitorTrack") <<
"\nProjected recHit found STEREO" << std::endl;
983 statedirection = det->
toLocal(gtrkdirup);
984 if (statedirection.mag())
985 RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist,
ev, track_ok);
988 if (statedirection.mag())
989 RecHitInfo<SiStripRecHit2D>(hit2D, statedirection, digilist,
ev, track_ok);
991 if (statedirection.mag())
992 RecHitInfo<SiStripRecHit1D>(hit1D, statedirection, digilist,
ev, track_ok);
994 LogDebug(
"SiStripMonitorTrack") <<
" LocalMomentum: " << statedirection
995 <<
"\nLocal x-z plane angle: " << atan2(statedirection.x(), statedirection.z());
1007 const bool track_ok) {
1010 LogTrace(
"SiStripMonitorTrack") <<
"\nMatched recHit found" << std::endl;
1018 statedirection = monodet->
toLocal(gtrkdirup);
1020 if (statedirection.
mag())
1021 RecHitInfo<SiStripRecHit2D>(&
m, statedirection, digilist,
ev, track_ok);
1025 statedirection = stereodet->
toLocal(gtrkdirup);
1027 if (statedirection.
mag())
1028 RecHitInfo<SiStripRecHit2D>(&
s, statedirection, digilist,
ev, track_ok);
1029 }
else if (projhit) {
1030 LogTrace(
"SiStripMonitorTrack") <<
"\nProjected recHit found" << std::endl;
1040 LogTrace(
"SiStripMonitorTrack") <<
"\nProjected recHit found MONO" << std::endl;
1042 statedirection = det->
toLocal(gtrkdirup);
1043 if (statedirection.
mag())
1044 RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist,
ev, track_ok);
1046 LogTrace(
"SiStripMonitorTrack") <<
"\nProjected recHit found STEREO" << std::endl;
1049 statedirection = det->
toLocal(gtrkdirup);
1050 if (statedirection.
mag())
1051 RecHitInfo<SiStripRecHit2D>(&(originalhit), statedirection, digilist,
ev, track_ok);
1054 statedirection = localMomentum;
1055 if (statedirection.
mag())
1056 RecHitInfo<SiStripRecHit2D>(hit2D, statedirection, digilist,
ev, track_ok);
1058 statedirection = localMomentum;
1059 if (statedirection.
mag())
1060 RecHitInfo<SiStripRecHit1D>(hit1D, statedirection, digilist,
ev, track_ok);
1062 LogDebug(
"SiStripMonitorTrack") <<
" LocalMomentum: " << statedirection
1063 <<
"\nLocal x-z plane angle: " << atan2(statedirection.
x(), statedirection.
z());
1068 using namespace std;
1069 using namespace edm;
1070 using namespace reco;
1085 if (trackCollectionHandle.
isValid()) {
1096 if (
track.pt() < 0.8)
1098 if (
track.p() < 2.0)
1100 if (
track.hitPattern().numberOfValidTrackerHits() <= 6)
1102 if (
track.normalizedChi2() > 10.0)
1120 uint32_t thedetid = (*hit)->rawId();
1123 if (((*hit)->getType() == 1))
1125 if (((*hit)->getType() == 2))
1127 if (((*hit)->getType() == 0))
1132 if (!(*hit)->isValid())
1134 DetId detID = (*hit)->geographicalId();
1147 hitStudy(
ev, digilist, projhit, matchedhit, hit2D, hit1D, localMomentum, track_ok);
1194 LogDebug(
"SiStripMonitorTrack") <<
"Track number " << ++
i << std::endl;
1216 if (!tkrecHit->isValid()) {
1217 LogTrace(
"SiStripMonitorTrack") <<
"\t\t Invalid Hit " << std::endl;
1221 const uint32_t& detid = tkrecHit->geographicalId().rawId();
1224 <<
"\n\t\tRecHit on det " << detid <<
"\n\t\tRecHit in LP " << tkrecHit->localPosition() <<
"\n\t\tRecHit in GP " 1226 <<
"\n\t\tRecHit trackLocal vector " <<
LV.
x() <<
" " <<
LV.y() <<
" " <<
LV.z() << std::endl;
1229 if (tkrecHit !=
nullptr && tkrecHit->isValid()) {
1230 const DetId detid = tkrecHit->geographicalId();
1233 float clust_Pos1 = -1000;
1234 float clust_Pos2 = -1000;
1239 clust_Pos1 = theGlobalPos.
z();
1240 clust_Pos2 = theGlobalPos.
phi();
1242 clust_Pos1 =
pow(theGlobalPos.
x() * theGlobalPos.
x() + theGlobalPos.
y() * theGlobalPos.
y(), 0.5);
1243 clust_Pos2 = theGlobalPos.
phi();
1265 edm::LogError(
"SiStripMonitorTrack") <<
"NULL hit" << std::endl;
1286 if (siStripClusterHandle.
isValid()) {
1289 DSVEnd = siStripClusterHandle->end();
1292 uint32_t detid = DSViter->id();
1295 LogDebug(
"SiStripMonitorTrack") <<
"on detid " << detid <<
" N Cluster= " << DSViter->size();
1326 edm::LogError(
"SiStripMonitorTrack") <<
"ClusterCollection is not valid!!" << std::endl;
1340 me.iLayer =
nullptr;
1342 me.iSubdet =
nullptr;
1344 std::map<std::string, LayerMEs>::iterator iLayer =
LayerMEsMap.find(layer_id);
1346 me.iLayer = &(iLayer->second);
1351 me.iRing = &(iRing->second);
1354 std::map<std::string, SubDetMEs>::iterator iSubdet =
SubDetMEsMap.find(sdet_tag);
1356 me.iSubdet = &(iSubdet->second);
1376 uint32_t thedetid = (*hit)->rawId();
1377 if (!(
DetId(thedetid).subdetId() >= 3 &&
DetId(thedetid).subdetId() <= 6)) {
1381 if (!(*hit)->isValid())
1385 if (theHit ==
nullptr) {
1393 if (hit1D && !hit2D) {
1399 else if (!hit1D && hit2D) {
1405 std::vector<const FedChannelConnection*> getFedChanConnections;
1412 for (
const auto& getFedChanConnection : getFedChanConnections) {
1413 if (getFedChanConnection ==
nullptr) {
1417 int binfeccrate = getFedChanConnection->fecCrate();
1418 int binfecslot = getFedChanConnection->fecSlot();
1419 int binfecring = getFedChanConnection->fecRing();
1478 if (
input1->getBinContent(binx, biny) == 0.) {
1480 input2->setBinContent(binx, biny, 1);
1482 double nentries =
input2->getBinContent(binx, biny);
1483 double theMeanSoN = (
input1->getBinContent(binx, biny) * nentries +
value) / (nentries + 1);
1485 input1->setBinContent(binx, biny, theMeanSoN);
1486 input2->setBinContent(binx, biny,
input2->getBinContent(binx, biny) + 1);
1493 const uint32_t detid,
1504 if (cluster ==
nullptr)
1514 LogDebug(
"SiStripMonitorTrack") <<
"\n\tLV " <<
LV.x() <<
" " <<
LV.y() <<
" " <<
LV.z() <<
" " <<
LV.mag()
1517 cosRZ = fabs(
LV.z()) /
LV.mag();
1518 LogDebug(
"SiStripMonitorTrack") <<
"\n\t cosRZ " << cosRZ << std::endl;
1529 double chargeraw = 0;
1530 double clustergain = 0;
1531 auto digi_it = digilist.
find(detid);
1533 for (
size_t chidx = 0; chidx < cluster->
stripCharges().size(); ++chidx) {
1542 if (digi_it == digilist.
end()) {
1545 for (
const auto& digiobj : *digi_it) {
1546 if (digiobj.strip() == cluster->
firstStrip() + chidx) {
1547 chargeraw += digiobj.adc();
1564 uint32_t adet = cluster->
detId();
1569 uint32_t adet = cluster->
detId();
1575 if (
MEs.iSubdet !=
nullptr) {
1576 MEs.iSubdet->totNClustersOnTrack++;
1578 MEs.iSubdet->totNClustersOnTrackStereo++;
1580 MEs.iSubdet->totNClustersOnTrackMono++;
1583 if (
MEs.iLayer !=
nullptr) {
1585 fillME(
MEs.iLayer->ClusterStoNCorrOnTrack, StoN * cosRZ);
1587 LogDebug(
"SiStripMonitorTrack") <<
"Module " << detid <<
" in Event " <<
eventNb <<
" noise " 1589 fillME(
MEs.iLayer->ClusterGain, clustergain);
1592 fillME(
MEs.iLayer->ClusterChargeRawOnTrack, chargeraw);
1598 fillME(
MEs.iLayer->ClusterPosOnTrack2D, valX, valY);
1601 fillME(
MEs.iLayer->ClusterChargePerCMfromTrack, dQdx_fromTrack);
1603 fillME(
MEs.iLayer->ClusterChargePerCMfromOriginOnTrack, dQdx_fromOrigin);
1606 if (
MEs.iRing !=
nullptr) {
1608 fillME(
MEs.iRing->ClusterStoNCorrOnTrack, StoN * cosRZ);
1610 LogDebug(
"SiStripMonitorTrack") <<
"Module " << detid <<
" in Event " <<
eventNb <<
" noise " 1612 fillME(
MEs.iRing->ClusterGain, clustergain);
1615 fillME(
MEs.iRing->ClusterChargeRawOnTrack, chargeraw);
1620 fillME(
MEs.iRing->ClusterChargePerCMfromTrack, dQdx_fromTrack);
1622 fillME(
MEs.iRing->ClusterChargePerCMfromOriginOnTrack, dQdx_fromOrigin);
1625 if (
MEs.iSubdet !=
nullptr) {
1626 fillME(
MEs.iSubdet->ClusterGain, clustergain);
1628 fillME(
MEs.iSubdet->ClusterChargeRawOnTrack, chargeraw);
1630 fillME(
MEs.iSubdet->ClusterStoNCorrOnTrack, StoN * cosRZ);
1633 fillME(
MEs.iSubdet->ClusterChargePerCMfromTrack, dQdx_fromTrack);
1635 fillME(
MEs.iSubdet->ClusterChargePerCMfromOriginOnTrack, dQdx_fromOrigin);
1640 fillME(
MEs.iSubdet->ClusterStoNCorrThickOnTrack, StoN * cosRZ);
1644 fillME(
MEs.iSubdet->ClusterStoNCorrThinOnTrack, StoN * cosRZ);
1650 uint32_t adet = cluster->
detId();
1655 LogDebug(
"SiStripMonitorTrack") <<
"Module " << detid <<
" in Event " <<
eventNb <<
" noise " <<
noise 1659 uint32_t adet = cluster->
detId();
1670 std::map<std::string, ModMEs>::iterator iModME =
ModMEsMap.find(
name);
1673 fillME(iModME->second.ClusterStoNCorr, StoN * cosRZ);
1676 <<
"Module " <<
name <<
" in Event " <<
eventNb <<
" noise " <<
noise << std::endl;
1677 fillME(iModME->second.ClusterGain, clustergain);
1679 fillME(iModME->second.ClusterChargeRaw, chargeraw);
1681 fillME(iModME->second.ClusterChargeCorr,
charge * cosRZ);
1687 fillME(iModME->second.ClusterChargePerCMfromTrack, dQdx_fromTrack);
1689 fillME(iModME->second.ClusterChargePerCMfromOrigin, dQdx_fromOrigin);
1693 int PGVposCounter = cluster->
maxIndex();
1697 fillME(iModME->second.ClusterPGV,
i, 0.);
1699 fillME(iModME->second.ClusterPGV, PGVposCounter++, (*it) / PGVmax);
1701 for (
int i = PGVposCounter;
1704 fillME(iModME->second.ClusterPGV,
i, 0.);
1710 if (
MEs.iSubdet !=
nullptr)
1711 MEs.iSubdet->totNClustersOffTrack++;
1714 uint32_t adet = cluster->
detId();
1717 LogDebug(
"SiStripMonitorTrack") <<
"Module firing " << detid <<
" in Event " <<
eventNb << std::endl;
1721 uint32_t adet = cluster->
detId();
1728 if (
MEs.iLayer !=
nullptr) {
1729 fillME(
MEs.iLayer->ClusterGain, clustergain);
1731 fillME(
MEs.iLayer->ClusterChargeRawOffTrack, chargeraw);
1735 fillME(
MEs.iLayer->ClusterChargePerCMfromOriginOffTrack, dQdx_fromOrigin);
1738 if (
MEs.iRing !=
nullptr) {
1739 fillME(
MEs.iRing->ClusterGain, clustergain);
1741 fillME(
MEs.iRing->ClusterChargeRawOffTrack, chargeraw);
1745 fillME(
MEs.iRing->ClusterChargePerCMfromOriginOffTrack, dQdx_fromOrigin);
1748 if (
MEs.iSubdet !=
nullptr) {
1749 fillME(
MEs.iSubdet->ClusterGain, clustergain);
1751 fillME(
MEs.iSubdet->ClusterChargeRawOffTrack, chargeraw);
1753 fillME(
MEs.iSubdet->ClusterStoNOffTrack, StoN);
1754 fillME(
MEs.iSubdet->ClusterChargePerCMfromOriginOffTrack, dQdx_fromOrigin);
MonitorElement * ClusterStoNCorr
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID
MonitorElement * ClusterNoiseOnTrack
std::unique_ptr< TkHistoMap > tkhisto_NoiseOffTrack
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyRunToken_
void return2DME(MonitorElement *input1, MonitorElement *input2, int binx, int biny, double value)
Det2MEs findMEs(const TrackerTopology *tTopo, const uint32_t detid)
MonitorElement * ClusterStoNCorr_OnTrack_TECP
MonitorElement * ClusterChargePerCMfromTrack
MonitorElement * bookMEProfile(DQMStore::IBooker &, const char *, const char *)
T getParameter(std::string const &) const
SiStripRecHit2D stereoHit() const
SiStripMonitorTrack(const edm::ParameterSet &)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyEventToken_
~SiStripMonitorTrack() override
iterator find(det_id_type id)
std::unique_ptr< TkHistoMap > tkhisto_ClChPerCMfromOrigin
void setSiStripFolderName(std::string name)
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > siStripDetCablingToken_
void setCluster(const SiStripCluster &cluster, int detId)
edm::EDGetTokenT< reco::TrackCollection > trackToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
MonitorElement * ClusterChargeRawOffTrack
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
void fillME(MonitorElement *ME, float value1)
std::pair< const std::string, const char * > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
virtual void setCurrentFolder(std::string const &fullpath)
SiStripDCSStatus * dcsStatus_
MonitorElement * nClustersTrendOnTrack
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
MonitorElement * ClusterPosOffTrack
MonitorElement * ClusterPosOnTrack
void trackStudyFromTrack(edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev)
static constexpr auto TID
MonitorElement * ClusterGain
MonitorElement * ClusterStoNCorrOnTrack
math::XYZTLorentzVectorD LV
MonitorElement * ClusterStoNOffTrack
MonitorElement * ClusterChargeOnTrack
Geom::Phi< T > phi() const
std::map< std::string, RingMEs > RingMEsMap
std::string topFolderName_
const TrackerGeometry * tkgeom_
T const * product() const
Global3DPoint GlobalPoint
std::vector< Track > TrackCollection
collection of Tracks
bool clusterInfos(SiStripClusterInfo *cluster, const uint32_t detid, enum ClusterFlags flags, bool track_ok, LocalVector LV, const Det2MEs &MEs, const TrackerTopology *tTopo, const SiStripGain *stripGain, const SiStripQuality *stripQuality, const edm::DetSetVector< SiStripDigi > &digilist, float clustZ, float clustPhi)
MonitorElement * ClusterStoNCorrThinOnTrack
const SiStripGain * siStripGain() const
MonitorElement * bookMETrend(DQMStore::IBooker &, const char *)
MonitorElement * ClusterChargePerCMfromTrack
const SiStripApvGain::Range getRange(uint32_t detID) const
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=false)
MonitorElement * ClusterChargeCorrOnTrack
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
MonitorElement * ClusterChargeRawOffTrack
data_type const * const_iterator
std::string TrackProducer_
MonitorElement * ClusterPosOnTrack2D
bool trackFilter(const reco::Track &track)
void bookLayerMEs(DQMStore::IBooker &, const uint32_t, std::string &)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
void RecHitInfo(const T *tkrecHit, LocalVector LV, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, bool track_ok)
MonitorElement * ClusterChargeCorr
Log< level::Error, false > LogError
MonitorElement * ClusterGain
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
MonitorElement * ClusterChargeOffTrack
const Range getRange(const uint32_t detID) const
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM
MonitorElement * nClustersOnTrackMono
MonitorElement * ClusterStoNCorrOnTrack
constexpr Detector det() const
get the detector field from this detid
void bookHistograms(DQMStore::IBooker &, edm::Run const &, const edm::EventSetup &) override
MonitorElement * ClusterChargePerCMfromOriginOffTrack
ClusterRef cluster() const
auto stripCharges() const -> decltype(cluster() ->amplitudes())
MonitorElement * nClustersOnTrackStereo
MonitorElement * ClusterPGV
MonitorElement * ClusterChargeCorrThinOnTrack
MonitorElement * nClustersTrendOffTrack
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
float signalOverNoise() const
MonitorElement * ClusterCharge
bool getStatus(edm::Event const &e, edm::EventSetup const &eSetup)
edmNew::DetSet< SiStripCluster >::const_iterator ClusIter
edm::ESGetToken< TkDetMap, TrackerTopologyRcd > tkDetMapToken_
MonitorElement * ClusterCount_OnTrack_FECCratevsFECSlot
MonitorElement * ClusterChargeRawOnTrack
MonitorElement * ClusterChargeRaw
MonitorElement * ClusterStoNCorr_OnTrack_TOB
MonitorElement * ClusterGain
edm::EventNumber_t eventNb
std::unordered_set< const SiStripCluster * > vPSiStripCluster
std::map< std::string, SubDetMEs > SubDetMEsMap
unsigned int tecSide(const DetId &id) const
virtual void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * ClusterChargeOffTrack
static float getStripGain(const uint16_t &strip, const SiStripApvGain::Range &range)
MonitorElement * nClustersOnTrack
bool accept(const edm::Event &event, const edm::EventSetup &setup)
To be called from analyze/filter() methods.
const std::string subdet_tag("SubDet")
MonitorElement * ClusterStoNCorrOnTrack
std::unique_ptr< TkHistoMap > tkhisto_ClChPerCMfromTrack
MonitorElement * ClusterNoiseOffTrack
uint8_t maxCharge() const
MonitorElement * bookME2D(DQMStore::IBooker &, const char *, const char *)
MonitorElement * ClusterWidthOnTrack
void bookSubDetMEs(DQMStore::IBooker &, std::string &name)
const SiStripQuality * siStripQuality() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void book(DQMStore::IBooker &, const TrackerTopology *tTopo, const TkDetMap *tkDetMap)
SiStripClusterInfo siStripClusterInfo_
std::unique_ptr< TkHistoMap > tkhisto_NumOffTrack
MonitorElement * ClusterChargePerCMfromOrigin
MonitorElement * ClusterChargePerCMfromOriginOffTrack
SiStripFolderOrganizer folderOrganizer_
std::string getSubdetid(uint32_t id, const TrackerTopology *tTopo, bool flag_ring)
MonitorElement * ClusterChargePerCMfromTrack
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * ClusterChargeOnTrack
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TOB
static constexpr auto TOB
MonitorElement * ClusterNoiseOffTrack
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
const TrackerGeomDet * idToDet(DetId) const override
iterator end()
Return the off-the-end iterator.
MonitorElement * ClusterChargeCorrOnTrack
MonitorElement * ClusterChargeCorrThickOnTrack
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
float noiseRescaledByGain() const
const GeomDetUnit * monoDet() const
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECM
uint16_t firstStrip() const
SiStripModuleGeometry moduleGeometry(const DetId &id) const
Detector identifier class for the strip tracker.
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
uint16_t maxIndex() const
void bookModMEs(DQMStore::IBooker &, const uint32_t)
MonitorElement * ClusterChargeRawOnTrack
MonitorElement * ClusterWidth
MonitorElement * ClusterChargeOnTrack
void trajectoryStudy(const reco::Track &track, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, bool track_ok)
DetId geographicalId() const
MonitorElement * ClusterStoNCorr_OnTrack_FECCratevsFECSlot
bool IsStripBad(uint32_t detid, short strip) const
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP
MonitorElement * ClusterWidthOffTrack
std::unique_ptr< TkHistoMap > tkhisto_ClusterWidthOffTrack
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
MonitorElement * ClusterPosOnTrack
constexpr uint32_t rawId() const
get the raw id
void AllClusters(const edm::Event &ev)
MonitorElement * ClusterChargePerCMfromTrack
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * ClusterPosOffTrack
bool fillControlViewHistos(const edm::Event &ev)
MonitorElement * ClusterChargeOffTrack
const GeomDetUnit * stereoDet() const
std::map< std::string, ModMEs > ModMEsMap
virtual DQM_DEPRECATED void setStatOverflows(bool value)
MonitorElement * ClusterPos
MonitorElement * ClusterChargeCorrOnTrack
std::unique_ptr< TkHistoMap > tkhisto_StoNCorrOnTrack
static constexpr auto TIB
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=false)
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB
void trackStudyFromTrajectory(edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev)
MonitorElement * bookME3D(DQMStore::IBooker &, const char *, const char *)
int totNClustersOnTrackStereo
MonitorElement * ClusterStoNCorr_OnTrack_TIBTID
GenericTriggerEventFlag * genTriggerEventFlag_
MonitorElement * ClusterChargeRawOnTrack
std::unique_ptr< TkHistoMap > tkhisto_ClusterWidthOnTrack
MonitorElement * ClusterChargePerCMfromOriginOnTrack
std::unique_ptr< TkHistoMap > tkhisto_NumMissingHits
SiStripRecHit2D originalHit() const
static int position[264][3]
const SiStripDetCabling * siStripDetCabling_
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &) override
std::unique_ptr< TkHistoMap > tkhisto_NoiseOnTrack
int totNClustersOnTrackMono
std::unique_ptr< TkHistoMap > tkhisto_NumberValidHits
std::unique_ptr< TkHistoMap > tkhisto_NumOnTrack
MonitorElement * ClusterWidthOnTrack
SiStripRecHit2D monoHit() const
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID
MonitorElement * ClusterGain
std::unique_ptr< TkHistoMap > tkhisto_NumberInactiveHits
bool clchCMoriginTkHmap_On_
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
MonitorElement * ClusterChargePerCMfromOriginOnTrack
edm::ParameterSet Parameters
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
void initEvent(const edm::EventSetup &iSetup)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void hitStudy(const edm::Event &ev, const edm::DetSetVector< SiStripDigi > &digilist, const ProjectedSiStripRecHit2D *projhit, const SiStripMatchedRecHit2D *matchedhit, const SiStripRecHit2D *hit2D, const SiStripRecHit1D *hit1D, LocalVector localMomentum, const bool track_ok)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
MonitorElement * ClusterWidthOffTrack
MonitorElement * book3D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, FUNC onbooking=NOOP())
MonitorElement * nClustersOffTrack
void trackStudy(const edm::Event &ev)
ClusterRef cluster() const
void bookRingMEs(DQMStore::IBooker &, const uint32_t, std::string &)
MonitorElement * ClusterStoNCorrThickOnTrack
MonitorElement * ClusterChargePerCMfromOriginOnTrack
bool applyClusterQuality_
Power< A, B >::type pow(const A &a, const B &b)
edm::InputTag Cluster_src_
const uint16_t nApvPairs(uint32_t det_id) const
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * handleBookMEs(DQMStore::IBooker &, std::string &, std::string &, std::string &, std::string &)
static constexpr auto TEC
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECP
void addActiveDetectorsRawIds(std::vector< uint32_t > &) const
MonitorElement * ClusterStoNCorr_OnTrack_TECM
const TrackerTopology * trackerTopology_
MonitorElement * ClusterChargeRawOffTrack
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::map< std::string, LayerMEs > LayerMEsMap
MonitorElement * ClusterChargePerCMfromOriginOffTrack
MonitorElement * ClusterNoiseOnTrack