28 tracksCollection_in_EventTree(
true),
73 LogDebug(
"SiStripMonitorTrack") <<
"[SiStripMonitorTrack::beginRun] There are "<<
tkgeom_->
detUnits().size() <<
" detectors instantiated in the geometry" << std::endl;
104 LogDebug(
"SiStripMonitorTrack") <<
"[SiStripMonitorTrack::analyse] " <<
"Run " << e.
id().
run() <<
" Event " << e.
id().
event() << std::endl;
111 for (std::map<std::string, SubDetMEs>::iterator iSubDet =
SubDetMEsMap.begin();
113 iSubDet->second.totNClustersOnTrack = 0;
114 iSubDet->second.totNClustersOffTrack = 0;
125 std::map<std::string, MonitorElement*>::iterator iME;
126 std::map<std::string, LayerMEs>::iterator iLayerME;
177 std::vector<uint32_t> vdetId_;
179 const char* tec =
"TEC";
180 const char* tid =
"TID";
185 for (std::vector<uint32_t>::const_iterator detid_iter=vdetId_.begin(),detid_end=vdetId_.end();detid_iter!=detid_end;++detid_iter){
186 uint32_t detid = *detid_iter;
189 edm::LogError(
"SiStripMonitorTrack")<<
"[" <<__PRETTY_FUNCTION__ <<
"] invalid detid " << detid<< std::endl;
197 std::pair<std::string,int32_t> det_layer_pair = folder_organizer.
GetSubDetAndLayer(detid,tTopo,
false);
206 std::map<std::string, LayerMEs>::iterator iLayerME =
LayerMEsMap.find(layer_id);
208 folder_organizer.
setLayerFolder(detid, tTopo, det_layer_pair.second,
false);
212 const char* subdet = det_layer_pair.first.c_str();
213 if ( std::strstr(subdet, tec) !=
nullptr || std::strstr(subdet, tid) !=
nullptr ) {
215 std::map<std::string, RingMEs>::iterator iRingME =
RingMEsMap.find(ring_id);
217 std::pair<std::string,int32_t> det_ring_pair = folder_organizer.
GetSubDetAndLayer(detid,tTopo,
true);
218 folder_organizer.
setLayerFolder(detid, tTopo, det_ring_pair.second,
true);
234 for (std::vector<uint32_t>::const_iterator detid_iter=vdetId_.begin(),detid_end=vdetId_.end();detid_iter!=detid_end;++detid_iter){
235 uint32_t detid = *detid_iter;
238 edm::LogError(
"SiStripMonitorTrack")<<
"[" <<__PRETTY_FUNCTION__ <<
"] invalid detid " << detid<< std::endl;
246 std::pair<std::string,int32_t> det_layer_pair = folder_organizer.
GetSubDetAndLayer(detid,tTopo,
false);
255 std::map<std::string, LayerMEs>::iterator iLayerME =
LayerMEsMap.find(layer_id);
257 folder_organizer.
setLayerFolder(detid, tTopo, det_layer_pair.second,
false);
261 const char* subdet = det_layer_pair.first.c_str();
262 if ( std::strstr(subdet, tec) !=
nullptr || std::strstr(subdet, tid) !=
nullptr ) {
264 std::map<std::string, RingMEs>::iterator iRingME =
RingMEsMap.find(ring_id);
266 std::pair<std::string,int32_t> det_ring_pair = folder_organizer.
GetSubDetAndLayer(detid,tTopo,
true);
267 folder_organizer.
setLayerFolder(detid, tTopo, det_ring_pair.second,
true);
282 if (!(topFolderName_.find(
"IsolatedBunches") != std::string::npos)) {
287 ibooker.
book1D(
"ClusterStoNCorr_OnTrack_TIBTID",
"TIB/TID [FECCrate=1] (OnTrack)",100,0.,100.);
291 ibooker.
book1D(
"ClusterStoNCorr_OnTrack_TOB",
"TOB [FECCrate=4] (OnTrack)",100,0.,100.);
295 ibooker.
book1D(
"ClusterStoNCorr_OnTrack_TECM",
"TECM [FECCrate=3] (OnTrack)",100,0.,100.);
299 ibooker.
book1D(
"ClusterStoNCorr_OnTrack_TECP",
"TECP [FECCrate=2] (OnTrack)",100,0.,100.);
304 ibooker.
book2D(
"ClusterStoNCorr_OnTrack_FECCratevsFECSlot",
" S/N (On track)",22,0.5,22.5,4,0.5,4.5);
313 ibooker.
book2D(
"ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID",
"TIB/TID [FECCrate=1] (OnTrack)",10,-0.5,9.5,22,0.5,22.5) \
319 ibooker.
book2D(
"ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB",
"TOB [FECCrate=4] (OnTrack)",10,-0.5,9.5,22,0.5,22.5);
324 ibooker.
book2D(
"ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM",
"TEC- [FECCrate=3] (OnTrack)",10,-0.5,9.5,22,0.5,22.5);
329 ibooker.
book2D(
"ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP",
"TEC- [FECCrate=2] (OnTrack)",10,-0.5,9.5,22,0.5,22.5);
338 ibooker.
book2D(
"ClusterCount_OnTrack_FECCratevsFECSlot",
" S/N (On track)",22,0.5,22.5,4,0.5,4.5);
347 ibooker.
book2D(
"ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID",
"TIB/TID [FECCrate=1] (OnTrack)",10,-0.5,9.5,22,0.5,22.5) \
353 ibooker.
book2D(
"ClusterCount_OnTrack_FECSlotVsFECRing_TOB",
"TOB [FECCrate=4] (OnTrack)",10,-0.5,9.5,22,0.5,22.5);
358 ibooker.
book2D(
"ClusterCount_OnTrack_FECSlotVsFECRing_TECM",
"TEC- [FECCrate=3] (OnTrack)",10,-0.5,9.5,22,0.5,22.5);
363 ibooker.
book2D(
"ClusterCount_OnTrack_FECSlotVsFECRing_TECP",
"TEC- [FECCrate=2] (OnTrack)",10,-0.5,9.5,22,0.5,22.5);
375 std::map<std::string, ModMEs>::iterator iModME =
ModMEsMap.find(hid);
399 theModMEs.
ClusterPos=ibooker.
book1D(hidmanager.
createHistoId(
"ClusterPosition_OnTrack",name,
id).c_str(),hidmanager.
createHistoId(
"ClusterPosition_OnTrack",name,
id).c_str(),total_nr_strips,0.5,total_nr_strips+0.5);
420 if (
id.
find(
"TEC") == std::string::npos &&
id.find(
"TID") == std::string::npos ) {
421 me =
bookME1D(ibooker , histoParameters.c_str(), histoName.c_str());
425 me =
bookME1D(ibooker , histoParameters.c_str(), histoName.c_str());
446 hname = hidmanager.
createHistoLayer(
"Summary_ClusterStoNCorr",name,layer_id,
"OnTrack");
447 hpar =
"TH1ClusterStoNCorr";
451 hname = hidmanager.
createHistoLayer(
"Summary_ClusterGain",name,layer_id,
"");
452 hpar =
"TH1ClusterGain";
456 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargeCorr",name,layer_id,
"OnTrack");
457 hpar =
"TH1ClusterChargeCorr";
461 hname = hidmanager.
createHistoLayer(
"Summary_ClusterCharge",name,layer_id,
"OnTrack");
462 hpar =
"TH1ClusterCharge";
465 hname = hidmanager.
createHistoLayer(
"Summary_ClusterCharge",name,layer_id,
"OffTrack");
466 hpar =
"TH1ClusterCharge";
470 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargeRaw",name,layer_id,
"OnTrack");
471 hpar =
"TH1ClusterChargeRaw";
474 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargeRaw",name,layer_id,
"OffTrack");
475 hpar =
"TH1ClusterChargeRaw";
479 hname = hidmanager.
createHistoLayer(
"Summary_ClusterNoise",name,layer_id,
"OnTrack");
480 hpar =
"TH1ClusterNoise";
483 hname = hidmanager.
createHistoLayer(
"Summary_ClusterNoise",name,layer_id,
"OffTrack");
484 hpar =
"TH1ClusterNoise";
488 hname = hidmanager.
createHistoLayer(
"Summary_ClusterWidth",name,layer_id,
"OnTrack");
489 hpar =
"TH1ClusterWidth";
492 hname = hidmanager.
createHistoLayer(
"Summary_ClusterWidth",name,layer_id,
"OffTrack");
493 hpar =
"TH1ClusterWidth";
498 if (layer_id.find(
"TEC") != std::string::npos) total_nr_strips = 3 * 2 * 128;
500 hname = hidmanager.
createHistoLayer(
"Summary_ClusterPosition",name,layer_id,
"OnTrack");
501 hpar =
"TH1ClusterPos";
502 if ( layer_id.find(
"TIB") != std::string::npos || layer_id.find(
"TOB") != std::string::npos || (
conf_.
getParameter<
edm::ParameterSet>(hpar.c_str())).getParameter<
bool>(view.c_str()) ) theLayerMEs.
ClusterPosOnTrack = ibooker.
book1D(hname, hname, total_nr_strips, 0.5,total_nr_strips+0.5);
504 hname = hidmanager.
createHistoLayer(
"Summary_ClusterPosition",name,layer_id,
"OffTrack");
505 hpar =
"TH1ClusterPos";
506 if ( layer_id.find(
"TIB") != std::string::npos || layer_id.find(
"TOB") != std::string::npos || (
conf_.
getParameter<
edm::ParameterSet>(hpar.c_str())).getParameter<
bool>(view.c_str()) ) theLayerMEs.
ClusterPosOffTrack = ibooker.
book1D(hname, hname, total_nr_strips, 0.5,total_nr_strips+0.5);
509 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargePerCMfromTrack",name,layer_id,
"");
510 hpar =
"TH1ClusterChargePerCM";
513 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargePerCMfromOrigin",name,layer_id,
"OnTrack");
514 hpar =
"TH1ClusterChargePerCM";
517 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargePerCMfromOrigin",name,layer_id,
"OffTrack");
518 hpar =
"TH1ClusterChargePerCM";
537 hname = hidmanager.
createHistoLayer(
"Summary_ClusterStoNCorr",name,ring_id,
"OnTrack");
538 hpar =
"TH1ClusterStoNCorr";
543 hpar =
"TH1ClusterGain";
547 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargeCorr",name,ring_id,
"OnTrack");
548 hpar =
"TH1ClusterChargeCorr";
552 hname = hidmanager.
createHistoLayer(
"Summary_ClusterCharge",name,ring_id,
"OnTrack");
553 hpar =
"TH1ClusterCharge";
556 hname = hidmanager.
createHistoLayer(
"Summary_ClusterCharge",name,ring_id,
"OffTrack");
557 hpar =
"TH1ClusterCharge";
561 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargeRaw",name,ring_id,
"OnTrack");
562 hpar =
"TH1ClusterChargeRaw";
565 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargeRaw",name,ring_id,
"OffTrack");
566 hpar =
"TH1ClusterChargeRaw";
570 hname = hidmanager.
createHistoLayer(
"Summary_ClusterNoise",name,ring_id,
"OnTrack");
571 hpar =
"TH1ClusterNoise";
574 hname = hidmanager.
createHistoLayer(
"Summary_ClusterNoise",name,ring_id,
"OffTrack");
575 hpar =
"TH1ClusterNoise";
579 hname = hidmanager.
createHistoLayer(
"Summary_ClusterWidth",name,ring_id,
"OnTrack");
580 hpar =
"TH1ClusterWidth";
583 hname = hidmanager.
createHistoLayer(
"Summary_ClusterWidth",name,ring_id,
"OffTrack");
584 hpar =
"TH1ClusterWidth";
589 if (ring_id.find(
"TEC") != std::string::npos) total_nr_strips = 3 * 2 * 128;
591 hname = hidmanager.
createHistoLayer(
"Summary_ClusterPosition",name,ring_id,
"OnTrack");
592 hpar =
"TH1ClusterPos";
595 hname = hidmanager.
createHistoLayer(
"Summary_ClusterPosition",name,ring_id,
"OffTrack");
596 hpar =
"TH1ClusterPos";
600 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargePerCMfromTrack",name,ring_id,
"");
601 hpar =
"TH1ClusterChargePerCM";
604 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargePerCMfromOrigin",name,ring_id,
"OnTrack");
605 hpar =
"TH1ClusterChargePerCM";
608 hname = hidmanager.
createHistoLayer(
"Summary_ClusterChargePerCMfromOrigin",name,ring_id,
"OffTrack");
609 hpar =
"TH1ClusterChargePerCM";
623 subdet_tag =
"__" +
name;
630 completeName =
"Summary_TotalNumberOfClusters_OnTrack" +
subdet_tag;
631 axisName =
"Number of on-track clusters in " +
name;
637 completeName =
"Summary_TotalNumberOfClusters_OffTrack" +
subdet_tag;
638 axisName =
"Number of off-track clusters in " +
name;
643 if(name.find(
"TIB") != std::string::npos){
647 if(name.find(
"TOB") != std::string::npos){
651 if(name.find(
"TID") != std::string::npos){
655 if(name.find(
"TEC") != std::string::npos){
663 completeName =
"Summary_ClusterGain" +
subdet_tag;
667 completeName =
"Summary_ClusterStoNCorr_OnTrack" +
subdet_tag;
670 completeName =
"Summary_ClusterStoNCorrThin_OnTrack" +
subdet_tag;
673 completeName =
"Summary_ClusterStoNCorrThick_OnTrack" +
subdet_tag;
677 completeName =
"Summary_ClusterChargeCorr_OnTrack" +
subdet_tag;
680 completeName =
"Summary_ClusterChargeCorrThin_OnTrack" +
subdet_tag;
683 completeName =
"Summary_ClusterChargeCorrThick_OnTrack" +
subdet_tag;
687 completeName =
"Summary_ClusterCharge_OnTrack" +
subdet_tag;
691 completeName =
"Summary_ClusterChargeRaw_OnTrack" +
subdet_tag;
695 completeName =
"Summary_ClusterCharge_OffTrack" +
subdet_tag;
699 completeName =
"Summary_ClusterChargeRaw_OffTrack" +
subdet_tag;
703 completeName =
"Summary_ClusterStoN_OffTrack" +
subdet_tag;
707 completeName =
"Summary_ClusterChargePerCMfromTrack" +
subdet_tag;
711 completeName =
"Summary_ClusterChargePerCMfromOrigin_OnTrack" +
subdet_tag;
715 completeName =
"Summary_ClusterChargePerCMfromOrigin_OffTrack" +
subdet_tag;
720 completeName =
"Trend_TotalNumberOfClusters_OnTrack" +
subdet_tag;
722 completeName =
"Trend_TotalNumberOfClusters_OffTrack" +
subdet_tag;
735 return ibooker.
book1D(HistoName,HistoName,
746 return ibooker.
book2D(HistoName,HistoName,
760 return ibooker.
book3D(HistoName,HistoName,
799 me->setAxisTitle(
"Lumisection",1);
812 auto const & trajParams = track.
extra()->trajParams();
820 uint32_t thedetid=ttrh->rawId();
822 if ( (ttrh->getType()==1) )
824 if ( (ttrh->getType()==2) )
826 if ( (ttrh->getType()==0) )
831 if (!ttrh->isValid())
continue;
834 auto statedirection = trajParams[
h].momentum();
845 LogTrace(
"SiStripMonitorTrack")<<
"\nMatched recHit found"<< std::endl;
852 statedirection=monodet->
toLocal(gtrkdirup);
855 if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&m,statedirection,digilist,ev,es,track_ok);
858 statedirection=stereodet->
toLocal(gtrkdirup);
861 if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&s,statedirection,digilist,ev,es,track_ok);
864 LogTrace(
"SiStripMonitorTrack")<<
"\nProjected recHit found"<< std::endl;
873 LogTrace(
"SiStripMonitorTrack")<<
"\nProjected recHit found MONO"<< std::endl;
875 statedirection=det->
toLocal(gtrkdirup);
876 if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&(originalhit),statedirection,digilist,
ev,es,track_ok);
879 LogTrace(
"SiStripMonitorTrack")<<
"\nProjected recHit found STEREO"<< std::endl;
882 statedirection=det->
toLocal(gtrkdirup);
883 if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(&(originalhit),statedirection,digilist,
ev,es,track_ok);
886 if(statedirection.mag()) RecHitInfo<SiStripRecHit2D>(hit2D,statedirection,digilist,ev,es,track_ok);
888 if(statedirection.mag()) RecHitInfo<SiStripRecHit1D>(hit1D,statedirection,digilist,ev,es,track_ok);
891 <<
" LocalMomentum: "<<statedirection
892 <<
"\nLocal x-z plane angle: "<<atan2(statedirection.x(),statedirection.z());
912 LogTrace(
"SiStripMonitorTrack")<<
"\nMatched recHit found"<< std::endl;
920 statedirection=monodet->
toLocal(gtrkdirup);
922 if(statedirection.
mag()) RecHitInfo<SiStripRecHit2D>(&m,statedirection,digilist,ev,es,track_ok);
926 statedirection=stereodet->
toLocal(gtrkdirup);
928 if(statedirection.
mag()) RecHitInfo<SiStripRecHit2D>(&s,statedirection,digilist,ev,es,track_ok);
931 LogTrace(
"SiStripMonitorTrack")<<
"\nProjected recHit found"<< std::endl;
941 LogTrace(
"SiStripMonitorTrack")<<
"\nProjected recHit found MONO"<< std::endl;
943 statedirection=det->
toLocal(gtrkdirup);
944 if(statedirection.
mag()) RecHitInfo<SiStripRecHit2D>(&(originalhit),statedirection,digilist,
ev,es,track_ok);
947 LogTrace(
"SiStripMonitorTrack")<<
"\nProjected recHit found STEREO"<< std::endl;
950 statedirection=det->
toLocal(gtrkdirup);
951 if(statedirection.
mag()) RecHitInfo<SiStripRecHit2D>(&(originalhit),statedirection,digilist,
ev,es,track_ok);
954 statedirection=localMomentum;
955 if(statedirection.
mag()) RecHitInfo<SiStripRecHit2D>(hit2D,statedirection,digilist,ev,es,track_ok);
957 statedirection=localMomentum;
958 if(statedirection.
mag()) RecHitInfo<SiStripRecHit1D>(hit1D,statedirection,digilist,ev,es,track_ok);
961 <<
" LocalMomentum: "<<statedirection
962 <<
"\nLocal x-z plane angle: "<<atan2(statedirection.
x(),statedirection.
z());
971 using namespace reco;
985 auto& digilist = digihandle.
isValid()? *(digihandle.
product()) : dummy;
987 if (trackCollectionHandle.
isValid()){
998 if (track.
pt() < 0.8)
return false;
999 if (track.
p() < 2.0)
return false;
1018 for (reco::TrackCollection::const_iterator
track = trackCollection.begin(), etrack = trackCollection.end();
1028 uint32_t thedetid=(*hit)->rawId();
1030 if ( ((*hit)->getType()==1) )
1032 if ( ((*hit)->getType()==2) )
1034 if ( ((*hit)->getType()==0) )
1039 if (!(*hit)->isValid())
continue;
1040 DetId detID = (*hit)->geographicalId();
1052 hitStudy(ev,es,digilist,projhit,matchedhit,hit2D,hit1D,localMomentum,track_ok);
1099 for (reco::TrackCollection::const_iterator
track = trackCollection.begin(), etrack = trackCollection.end();
1103 <<
"Track number "<< ++i << std::endl;
1129 if(!tkrecHit->isValid()){
1130 LogTrace(
"SiStripMonitorTrack") <<
"\t\t Invalid Hit " << std::endl;
1134 const uint32_t& detid = tkrecHit->geographicalId().rawId();
1137 <<
"\n\t\tRecHit on det "<<detid
1138 <<
"\n\t\tRecHit in LP "<<tkrecHit->localPosition()
1139 <<
"\n\t\tRecHit in GP "<<
tkgeom_->
idToDet(tkrecHit->geographicalId())->surface().
toGlobal(tkrecHit->localPosition())
1140 <<
"\n\t\tRecHit trackLocal vector "<<LV.
x() <<
" " << LV.
y() <<
" " << LV.
z() <<std::endl;
1162 if ( tkrecHit !=
nullptr ){
1167 if (
clusterInfos(&SiStripClusterInfo_,detid,
OnTrack, track_ok, LV, MEs, tTopo,stripGain,stripQuality,digilist))
1174 edm::LogError(
"SiStripMonitorTrack") <<
"NULL hit" << std::endl;
1199 auto& digilist = digihandle.
isValid()? *(digihandle.
product()) : dummy;
1203 if (siStripClusterHandle.
isValid()){
1206 DSViter!=DSVEnd; ++DSViter) {
1208 uint32_t detid=DSViter->id();
1211 LogDebug(
"SiStripMonitorTrack") <<
"on detid "<< detid <<
" N Cluster= " << DSViter->size();
1224 edm::LogError(
"SiStripMonitorTrack")<<
"ClusterCollection is not valid!!" << std::endl;
1242 std::map<std::string, LayerMEs>::iterator iLayer =
LayerMEsMap.find(layer_id);
1244 me.
iLayer = &(iLayer->second);
1247 std::map<std::string, RingMEs>::iterator iRing =
RingMEsMap.find(ring_id);
1249 me.
iRing = &(iRing->second);
1252 std::map<std::string, SubDetMEs>::iterator iSubdet =
SubDetMEsMap.find(sdet_tag);
1254 me.
iSubdet = &(iSubdet->second);
1266 if( !tracks.
isValid() )
return false;
1269 for (
const auto &
track : *tracks) {
1275 uint32_t thedetid = (*hit)->rawId();
1276 if ( !(
DetId(thedetid).subdetId() >=3 &&
DetId(thedetid).subdetId() <=6) ) {
continue; }
1278 if (!(*hit)->isValid())
continue;
1281 if ( theHit ==
nullptr ) {
continue; }
1291 if (hit1D && !hit2D) {
1297 else if (!hit1D && hit2D) {
1304 std::vector<const FedChannelConnection *> getFedChanConnections;
1311 for (
const auto & getFedChanConnection : getFedChanConnections ) {
1313 if (getFedChanConnection==
nullptr) {
continue; }
1315 int binfeccrate = getFedChanConnection->fecCrate();
1316 int binfecslot = getFedChanConnection->fecSlot();
1317 int binfecring = getFedChanConnection->fecRing();
1367 double theMeanSoN = (input1->
getBinContent(binx,biny)*nentries +
value)/(nentries+1);
1379 const uint32_t detid,
1391 if (cluster==
nullptr)
return false;
1401 LogDebug(
"SiStripMonitorTrack")<<
"\n\tLV " << LV.
x() <<
" " << LV.
y() <<
" " << LV.
z() <<
" " << LV.
mag() << std::endl;
1403 cosRZ= fabs(LV.
z())/LV.
mag();
1404 LogDebug(
"SiStripMonitorTrack")<<
"\n\t cosRZ " << cosRZ << std::endl;
1415 double chargeraw = 0;
1416 double clustergain = 0 ;
1417 auto digi_it = digilist.
find(detid);
1419 for(
size_t chidx = 0 ; chidx < cluster->
stripCharges().size() ; ++chidx ){
1420 if( cluster->
stripCharges().at(chidx) <= 0 ){ continue ; }
1424 if( digi_it == digilist.
end() ){
continue; }
1425 for(
const auto& digiobj : *digi_it ){
1426 if( digiobj.strip() == cluster->
firstStrip() + chidx ){
1427 chargeraw += digiobj.adc();
1431 clustergain /= double(cluster->
stripCharges().size()) ;
1444 uint32_t adet=cluster->
detId();
1448 uint32_t adet=cluster->
detId();
1455 if (MEs.
iLayer !=
nullptr) {
1469 if (MEs.
iRing !=
nullptr) {
1491 if( tTopo->
moduleGeometry(detid) == SiStripDetId::ModuleGeometry::W5 || tTopo->
moduleGeometry(detid) == SiStripDetId::ModuleGeometry::W6 || tTopo->
moduleGeometry(detid) == SiStripDetId::ModuleGeometry::W7) {
1501 uint32_t adet=cluster->
detId();
1505 LogDebug(
"SiStripMonitorTrack") <<
"Module " << detid <<
" in Event " <<
eventNb <<
" noise " << noise << std::endl;
1508 uint32_t adet=cluster->
detId();
1518 std::map<std::string, ModMEs>::iterator iModME =
ModMEsMap.find(name);
1520 if(noise > 0.0)
fillME(iModME->second.ClusterStoNCorr ,StoN*cosRZ);
1521 if(noise == 0.0)
LogDebug(
"SiStripMonitorTrack") <<
"Module " << name <<
" in Event " <<
eventNb <<
" noise " << noise << std::endl;
1522 fillME(iModME->second.ClusterGain, clustergain);
1523 fillME(iModME->second.ClusterCharge,charge);
1524 fillME(iModME->second.ClusterChargeRaw,chargeraw);
1526 fillME(iModME->second.ClusterChargeCorr,charge*cosRZ);
1528 fillME(iModME->second.ClusterWidth ,width);
1529 fillME(iModME->second.ClusterPos ,position);
1531 if(track_ok)
fillME(iModME->second.ClusterChargePerCMfromTrack, dQdx_fromTrack);
1532 if(track_ok)
fillME(iModME->second.ClusterChargePerCMfromOrigin, dQdx_fromOrigin);
1536 int PGVposCounter = cluster->
maxIndex();
1538 fillME(iModME->second.ClusterPGV,
i,0.);
1540 fillME(iModME->second.ClusterPGV, PGVposCounter++,(*it)/PGVmax);
1543 fillME(iModME->second.ClusterPGV,
i,0.);
1552 uint32_t adet=cluster->
detId();
1555 LogDebug(
"SiStripMonitorTrack") <<
"Module firing " << detid <<
" in Event " <<
eventNb << std::endl;
1559 uint32_t adet=cluster->
detId();
1565 if (MEs.
iLayer !=
nullptr) {
1575 if (MEs.
iRing !=
nullptr) {
MonitorElement * ClusterStoNCorr
ClusterRef cluster() const
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID
uint8_t maxCharge() const
MonitorElement * ClusterNoiseOnTrack
double p() const
momentum vector magnitude
std::unique_ptr< TkHistoMap > tkhisto_NoiseOffTrack
T getParameter(std::string const &) const
EventNumber_t event() const
struct SubDetMEs * iSubdet
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
void RecHitInfo(const T *tkrecHit, LocalVector LV, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, const edm::EventSetup &es, bool track_ok)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
void setBinContent(int binx, double content)
set content of bin (1-D)
uint16_t firstStrip() const
void addActiveDetectorsRawIds(std::vector< uint32_t > &) const
SiStripMonitorTrack(const edm::ParameterSet &)
~SiStripMonitorTrack() override
iterator find(det_id_type id)
std::unique_ptr< TkHistoMap > tkhisto_ClChPerCMfromOrigin
void setSiStripFolderName(std::string name)
void trackStudy(const edm::Event &ev, const edm::EventSetup &es)
edm::EDGetTokenT< reco::TrackCollection > trackToken_
MonitorElement * ClusterChargeRawOffTrack
const GeomDetUnit * monoDet() const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void fillME(MonitorElement *ME, float value1)
const TrackExtraRef & extra() const
reference to "extra" object
std::pair< const std::string, const char * > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
SiStripDCSStatus * dcsStatus_
MonitorElement * nClustersTrendOnTrack
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
MonitorElement * bookProfile(Args &&...args)
MonitorElement * ClusterPosOffTrack
MonitorElement * ClusterPosOnTrack
bool getByToken(EDGetToken token, Handle< PROD > &result) const
float noiseRescaledByGain() const
MonitorElement * ClusterGain
MonitorElement * ClusterStoNCorrOnTrack
void AllClusters(const edm::Event &ev, const edm::EventSetup &es)
math::XYZTLorentzVectorD LV
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
MonitorElement * ClusterStoNOffTrack
MonitorElement * ClusterChargeOnTrack
bool IsStripBad(const uint32_t &detid, const short &strip) const
std::map< std::string, RingMEs > RingMEsMap
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
std::string topFolderName_
Global3DPoint GlobalPoint
std::vector< Track > TrackCollection
collection of Tracks
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 * ClusterStoNCorrThinOnTrack
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)
MonitorElement * ClusterChargePerCMfromTrack
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=false)
SiStripDetId::ModuleGeometry moduleGeometry(const DetId &id) const
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_
bool trackFilter(const reco::Track &track)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void bookLayerMEs(DQMStore::IBooker &, const uint32_t, std::string &)
MonitorElement * ClusterChargeCorr
MonitorElement * ClusterGain
uint16_t maxIndex() const
auto stripCharges() const -> decltype(cluster() ->amplitudes())
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
MonitorElement * ClusterChargeOffTrack
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM
MonitorElement * ClusterStoNCorrOnTrack
MonitorElement * ClusterChargePerCMfromOriginOffTrack
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)
MonitorElement * ClusterPGV
MonitorElement * ClusterChargeCorrThinOnTrack
MonitorElement * nClustersTrendOffTrack
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
uint32_t rawId() const
get the raw id
edm::ESHandle< TrackerGeometry > tkgeom_
MonitorElement * ClusterCharge
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
bool getStatus(edm::Event const &e, edm::EventSetup const &eSetup)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
edmNew::DetSet< SiStripCluster >::const_iterator ClusIter
float signalOverNoise() const
MonitorElement * ClusterCount_OnTrack_FECCratevsFECSlot
MonitorElement * ClusterChargeRawOnTrack
MonitorElement * ClusterChargeRaw
vector< ParameterSet > Parameters
MonitorElement * ClusterStoNCorr_OnTrack_TOB
MonitorElement * ClusterGain
edm::EventNumber_t eventNb
std::unordered_set< const SiStripCluster * > vPSiStripCluster
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * ClusterChargeOffTrack
static float getStripGain(const uint16_t &strip, const SiStripApvGain::Range &range)
MonitorElement * nClustersOnTrack
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
bool accept(const edm::Event &event, const edm::EventSetup &setup)
To be called from analyze/filter() methods.
double pt() const
track transverse momentum
const std::string subdet_tag("SubDet")
MonitorElement * ClusterStoNCorrOnTrack
MonitorElement * bookME2D(DQMStore::IBooker &, const char *, const char *)
std::unique_ptr< TkHistoMap > tkhisto_ClChPerCMfromTrack
MonitorElement * ClusterNoiseOffTrack
MonitorElement * book1D(Args &&...args)
void tag(MonitorElement *, unsigned int)
MonitorElement * ClusterWidthOnTrack
void bookSubDetMEs(DQMStore::IBooker &, std::string &name)
MonitorElement * bookME3D(DQMStore::IBooker &, const char *, const char *)
ClusterRef cluster() const
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &es) override
void book(DQMStore::IBooker &, const TrackerTopology *tTopo, const TkDetMap *tkDetMap)
std::unique_ptr< TkHistoMap > tkhisto_NumOffTrack
MonitorElement * ClusterChargePerCMfromOrigin
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
MonitorElement * ClusterChargePerCMfromOriginOffTrack
SiStripFolderOrganizer folderOrganizer_
std::string getSubdetid(uint32_t id, const TrackerTopology *tTopo, bool flag_ring)
MonitorElement * ClusterChargePerCMfromTrack
MonitorElement * ClusterChargeOnTrack
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TOB
MonitorElement * ClusterNoiseOffTrack
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
iterator end()
Return the off-the-end iterator.
MonitorElement * ClusterChargeCorrOnTrack
MonitorElement * ClusterChargeCorrThickOnTrack
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECM
SiStripRecHit2D originalHit() const
Detector identifier class for the strip tracker.
void trackStudyFromTrajectory(edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, const edm::EventSetup &es)
void bookModMEs(DQMStore::IBooker &, const uint32_t)
MonitorElement * ClusterChargeRawOnTrack
MonitorElement * ClusterWidth
MonitorElement * ClusterChargeOnTrack
void setCurrentFolder(const std::string &fullpath)
SiStripRecHit2D stereoHit() const
MonitorElement * ClusterStoNCorr_OnTrack_FECCratevsFECSlot
T const * product() const
MonitorElement * book2D(Args &&...args)
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
MonitorElement * ClusterWidthOffTrack
std::unique_ptr< TkHistoMap > tkhisto_ClusterWidthOffTrack
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
MonitorElement * ClusterPosOnTrack
MonitorElement * ClusterChargePerCMfromTrack
void hitStudy(const edm::Event &ev, const edm::EventSetup &es, const edm::DetSetVector< SiStripDigi > &digilist, const ProjectedSiStripRecHit2D *projhit, const SiStripMatchedRecHit2D *matchedhit, const SiStripRecHit2D *hit2D, const SiStripRecHit1D *hit1D, LocalVector localMomentum, const bool track_ok)
MonitorElement * ClusterPosOffTrack
MonitorElement * ClusterChargeOffTrack
std::map< std::string, ModMEs > ModMEsMap
MonitorElement * bookMETrend(DQMStore::IBooker &, const char *)
MonitorElement * ClusterPos
void trackStudyFromTrack(edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, const edm::EventSetup &es)
MonitorElement * ClusterChargeCorrOnTrack
std::unique_ptr< TkHistoMap > tkhisto_StoNCorrOnTrack
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=false)
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB
int numberOfValidTrackerHits() const
MonitorElement * ClusterStoNCorr_OnTrack_TIBTID
SiStripRecHit2D monoHit() const
GenericTriggerEventFlag * genTriggerEventFlag_
const uint16_t nApvPairs(uint32_t det_id) const
MonitorElement * ClusterChargeRawOnTrack
std::unique_ptr< TkHistoMap > tkhisto_ClusterWidthOnTrack
MonitorElement * ClusterChargePerCMfromOriginOnTrack
double getBinContent(int binx) const
get content of bin (1-D)
const Range getRange(const uint32_t detID) const
std::unique_ptr< TkHistoMap > tkhisto_NumMissingHits
MonitorElement * handleBookMEs(DQMStore::IBooker &, std::string &, std::string &, std::string &, std::string &)
static int position[264][3]
std::unique_ptr< TkHistoMap > tkhisto_NoiseOnTrack
const TrackerGeomDet * idToDet(DetId) const override
std::unique_ptr< TkHistoMap > tkhisto_NumberValidHits
std::unique_ptr< TkHistoMap > tkhisto_NumOnTrack
MonitorElement * ClusterWidthOnTrack
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID
MonitorElement * bookMEProfile(DQMStore::IBooker &, const char *, const char *)
MonitorElement * ClusterGain
std::unique_ptr< TkHistoMap > tkhisto_NumberInactiveHits
DetId geographicalId() const
bool clchCMoriginTkHmap_On_
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
MonitorElement * ClusterChargePerCMfromOriginOnTrack
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
Detector det() const
get the detector field from this detid
MonitorElement * book3D(Args &&...args)
MonitorElement * ClusterWidthOffTrack
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * nClustersOffTrack
void bookRingMEs(DQMStore::IBooker &, const uint32_t, std::string &)
T const * product() const
MonitorElement * ClusterStoNCorrThickOnTrack
MonitorElement * ClusterChargePerCMfromOriginOnTrack
bool applyClusterQuality_
edm::InputTag Cluster_src_
void analyze(const edm::Event &, const edm::EventSetup &) override
void trajectoryStudy(const reco::Track &track, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, const edm::EventSetup &es, bool track_ok)
const GeomDetUnit * stereoDet() const
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECP
bool fillControlViewHistos(const edm::Event &ev, const edm::EventSetup &es)
unsigned int tecSide(const DetId &id) const
MonitorElement * ClusterStoNCorr_OnTrack_TECM
MonitorElement * ClusterChargeRawOffTrack
const SiStripApvGain::Range getRange(uint32_t detID) const
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
std::map< std::string, LayerMEs > LayerMEsMap
MonitorElement * ClusterChargePerCMfromOriginOffTrack
MonitorElement * ClusterNoiseOnTrack