58 "\n------------------------------------------"
59 "\nUnAvailable Service TkHistoMap: please insert in the configuration file an instance like" "\n\tprocess.TkDetMap = cms.Service(\"TkDetMap\")" "\n------------------------------------------";
107 LogDebug (
"SiStripMonitorHLTMuon") <<
" processing conterEvt_: " <<
counterEvt_ << std::endl;
120 bool accessToL3Muons =
true;
122 reco::RecoChargedCandidateCollection::const_iterator cand;
126 bool accessToClusters =
true;
132 bool accessToTracks =
true;
134 reco::TrackCollection::const_iterator track;
140 for (clust = clusters->begin_record (); clust != clusters->end_record (); ++clust)
144 std::stringstream
ss;
150 LocalPoint clustlp = topol->localPosition (clust->barycenter ());
154 float etaWeight = 1.;
155 float phiWeight = 1.;
160 LayerMEMap[label.c_str ()].EtaDistribAllClustersMap->Fill (clustgp.
eta (),etaWeight);
161 LayerMEMap[label.c_str ()].PhiDistribAllClustersMap->Fill (clustgp.
phi (),phiWeight);
162 LayerMEMap[label.c_str ()].EtaPhiAllClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
169 for (cand = l3mucands->begin (); cand != l3mucands->end (); ++cand)
178 for (track = trackCollection->begin (); track != trackCollection->end() ; ++ track)
194 uint detID = l3tk->
recHit (
hit)->geographicalId ()();
217 float etaWeight = 1.;
218 float phiWeight = 1.;
224 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
225 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
226 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
230 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
231 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
232 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
254 float etaWeight = 1.;
255 float phiWeight = 1.;
261 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
262 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
263 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
267 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
268 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
269 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
276 if (hitMatched2D != 0)
279 detID = hitMatched2D->monoId();
292 float etaWeight = 1.;
293 float phiWeight = 1.;
299 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
300 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
301 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
305 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
306 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
307 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
314 detID = hitMatched2D->stereoId ();
318 if (theGeomDet2 != 0)
327 float etaWeight = 1.;
328 float phiWeight = 1.;
334 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
335 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
336 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
340 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
341 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
342 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
353 detID = hitProj2D->geographicalId ();
366 float etaWeight = 1.;
367 float phiWeight = 1.;
373 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
374 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
375 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
379 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
380 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
381 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
397 std::vector <float *> tgraphEta;
398 std::vector <float *> tgraphPhi;
399 std::vector <int> tgraphSize;
401 std::vector <std::vector<float> > binningEta;
402 std::vector <std::vector<float> > binningPhi;
404 for (
int p = 0;
p < 34;
p++){
405 tgraphEta.push_back (
new float[1000]);
406 tgraphPhi.push_back (
new float[1000]);
410 std::map< std::string,std::vector<float> > m_BinEta_Prel ;
411 std::map< std::string,std::vector<float> > m_PhiStripMod_Eta;
412 std::map< std::string,std::vector<float> > m_PhiStripMod_Nb;
422 std::vector<DetId> Dets = theTracker.
detUnitIds();
443 std::stringstream
ss;
445 uint32_t subdetlayer, side;
467 labelHisto_ID.erase(3);
470 unsigned int sizePhi = 0;
471 unsigned int sizeEta = 0;
472 float * xbinsPhi =
new float[100];
473 float * xbinsEta =
new float[100];
476 if (labelHisto_ID ==
"TEC" || labelHisto_ID ==
"TID" || labelHisto_ID ==
"TOB" || labelHisto_ID ==
"TIB"){
486 sizePhi =
m_BinPhi[labelHisto].size();
488 for (
unsigned int i = 0;
i < sizePhi;
i++){
493 std::vector <float > v_BinEta_Prel;
495 for (
unsigned int i = 0;
i < 12;
i++){
497 if (m_PhiStripMod_Nb[labelHisto][
i] != 0 && fabs(m_PhiStripMod_Eta[labelHisto][
i]) > 0.05){
498 float EtaBarycenter = m_PhiStripMod_Eta[labelHisto][
i]/m_PhiStripMod_Nb[labelHisto][
i];
499 v_BinEta_Prel.push_back(EtaBarycenter);
504 sort(v_BinEta_Prel.begin(),v_BinEta_Prel.end());
507 for (
unsigned int i = 0;
i < v_BinEta_Prel.size();
i++){
508 if (
i == 0)
m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] - 0.15);
510 float shift = v_BinEta_Prel[
i] - v_BinEta_Prel[
i-1];
511 m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] - shift/2.);
513 if (
i == v_BinEta_Prel.size()-1)
m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] + 0.15);
519 sizeEta =
m_BinEta[labelHisto].size();
521 for (
unsigned int i = 0;
i < sizeEta;
i++){
529 histoname =
"EtaAllClustersDistrib_" + labelHisto;
530 title =
"#eta(All Clusters) in " + labelHisto;
532 histoname =
"PhiAllClustersDistrib_" + labelHisto;
533 title =
"#phi(All Clusters) in " + labelHisto;
535 histoname =
"EtaPhiAllClustersMap_" + labelHisto;
536 title =
"#eta-#phi All Clusters map in " + labelHisto;
541 histoname =
"EtaOnTrackClustersDistrib_" + labelHisto;
542 title =
"#eta(OnTrack Clusters) in " + labelHisto;
544 histoname =
"PhiOnTrackClustersDistrib_" + labelHisto;
545 title =
"#phi(OnTrack Clusters) in " + labelHisto;
547 histoname =
"EtaPhiOnTrackClustersMap_" + labelHisto;
548 title =
"#eta-#phi OnTrack Clusters map in " + labelHisto;
553 histoname =
"EtaL3MuTrackClustersDistrib_" + labelHisto;
554 title =
"#eta(L3MuTrack Clusters) in " + labelHisto;
556 histoname =
"PhiL3MuTrackClustersDistrib_" + labelHisto;
557 title =
"#phi(L3MuTrack Clusters) in " + labelHisto;
559 histoname =
"EtaPhiL3MuTrackClustersMap_" + labelHisto;
560 title =
"#eta-#phi L3MuTrack Clusters map in " + labelHisto;
567 LayerMEMap[labelHisto].EtaDistribAllClustersMap->getTH1F()->Sumw2();
568 LayerMEMap[labelHisto].PhiDistribAllClustersMap->getTH1F()->Sumw2();
569 LayerMEMap[labelHisto].EtaPhiAllClustersMap->getTH2F()->Sumw2();
572 LayerMEMap[labelHisto].EtaDistribOnTrackClustersMap->getTH1F()->Sumw2();
573 LayerMEMap[labelHisto].PhiDistribOnTrackClustersMap->getTH1F()->Sumw2();
574 LayerMEMap[labelHisto].EtaPhiOnTrackClustersMap->getTH2F()->Sumw2();
577 LayerMEMap[labelHisto].EtaDistribL3MuTrackClustersMap->getTH1F()->Sumw2();
578 LayerMEMap[labelHisto].PhiDistribL3MuTrackClustersMap->getTH1F()->Sumw2();
579 LayerMEMap[labelHisto].EtaPhiL3MuTrackClustersMap->getTH2F()->Sumw2();
601 std::vector<std::string> v_LabelHisto;
605 for(std::vector<DetId>::const_iterator detid_iterator = Dets.begin(); detid_iterator!=Dets.end(); ++detid_iterator){
606 uint32_t
detid = (*detid_iterator)();
608 if ( (*detid_iterator).null() ==
true)
break;
609 if (detid == 0)
break;
629 LocalPoint clustlp = topol->localPosition (1.);
641 unsigned int count = 0;
642 while (count < v_LabelHisto.size()){
643 if (mylabelHisto == v_LabelHisto[count])
break;
646 if (count == v_LabelHisto.size()){
649 v_LabelHisto.push_back(mylabelHisto);
654 for (
int i = 0;
i < 12;
i++){
655 m_PhiStripMod_Eta[mylabelHisto].push_back(0.);
656 m_PhiStripMod_Nb[mylabelHisto].push_back(0.);
667 if (tTopo->
tecRing(detid) == 7){
677 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] + clustgp.
eta();
678 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tecRing(detid)-1]++;
690 if (tTopo->
tecRing(detid) == 1){
700 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] + clustgp.
eta();
701 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tecRing(detid)-1]++;
723 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)-1] + clustgp.
eta();
724 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tobModule(detid)-1]++;
727 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)+5] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)+5] + clustgp.
eta();
728 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tobModule(detid)+5]++;
753 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)-1] + clustgp.
eta();
754 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)-1]++;
757 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+2] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+2] + clustgp.
eta();
758 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+2]++;
763 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+5] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+5] + clustgp.
eta();
764 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+5]++;
767 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+8] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+8] + clustgp.
eta();
768 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+8]++;
786 std::vector<std::string> v_LabelHisto;
790 for(std::vector<DetId>::const_iterator detid_iterator = Dets.begin(); detid_iterator!=Dets.end(); detid_iterator++){
791 uint32_t
detid = (*detid_iterator)();
793 if ( (*detid_iterator).null() ==
true)
break;
794 if (detid == 0)
break;
822 unsigned int count = 0;
824 while (count < v_LabelHisto.size()){
825 if (mylabelHisto == v_LabelHisto[count])
break;
829 if (count == v_LabelHisto.size()){
831 v_LabelHisto.push_back(mylabelHisto);
835 for (
unsigned int i = 0;
i <
m_BinEta[mylabelHisto].size() -1;
i++){
840 for (
unsigned int i = 0;
i <
m_BinPhi[mylabelHisto].size() -1;
i++){
859 const Bounds& bound = GeomDetSurface.bounds();
862 labelHisto_ID.erase(3);
867 std::vector <GlobalPoint> v_Edge_G;
873 if (labelHisto_ID ==
"TOB" || labelHisto_ID ==
"TIB"){
875 length = rectangularBound->
length();
876 width = rectangularBound->
width();
877 ratio = width/length;
888 if (labelHisto_ID ==
"TEC" || labelHisto_ID ==
"TID"){
891 length = trapezoidalBound->
length();
894 ratio = width/length;
914 std::vector <bool> v_Fill;
915 v_Fill.push_back(
false);
916 v_Fill.push_back(
false);
917 v_Fill.push_back(
false);
918 v_Fill.push_back(
false);
920 for (
unsigned int i =0 ;
i< v_Edge_G.size() ;
i++){
921 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
922 if (v_Edge_G[
i].
phi() < clustgp.
phi()) {
923 bot_left_G = v_Edge_G[
i];
926 if (v_Edge_G[
i].
phi() > clustgp.
phi()){
927 top_left_G = v_Edge_G[
i];
931 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
932 if (v_Edge_G[
i].
phi() < clustgp.
phi()){
933 bot_rightG = v_Edge_G[
i];
936 if (v_Edge_G[
i].
phi() > clustgp.
phi()){
937 top_rightG = v_Edge_G[
i];
948 bool flag_border =
false;
950 if (v_Fill[0] ==
true
953 && v_Fill[3] ==
true){
956 G_length =
sqrt( (top_left_G.
x()-top_rightG.
x())*(top_left_G.
x()-top_rightG.
x()) + (top_left_G.
y()-top_rightG.
y())*(top_left_G.
y()-top_rightG.
y()) + (top_left_G.
z()-top_rightG.
z())*(top_left_G.
z()-top_rightG.
z()) );
959 G_width =
sqrt( (bot_left_G.
x()-top_left_G.
x())*(bot_left_G.
x()-top_left_G.
x()) + (bot_left_G.
y()-top_left_G.
y())*(bot_left_G.
y()-top_left_G.
y()) + (bot_left_G.
z()-top_left_G.
z())*(bot_left_G.
z()-top_left_G.
z()) );
968 for (
unsigned int i =0 ;
i< v_Edge_G.size() ;
i++){
970 if (v_Edge_G[
i].
phi() > 0. ){
971 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
972 bot_left_G = v_Edge_G[
i];
974 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
975 bot_rightG = v_Edge_G[
i];
978 if (v_Edge_G[
i].
phi() < 0. ){
979 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
980 top_left_G = v_Edge_G[
i];
982 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
983 top_rightG = v_Edge_G[
i];
989 G_length =
sqrt( (top_left_G.
x()-top_rightG.
x())*(top_left_G.
x()-top_rightG.
x()) + (top_left_G.
y()-top_rightG.
y())*(top_left_G.
y()-top_rightG.
y()) + (top_left_G.
z()-top_rightG.
z())*(top_left_G.
z()-top_rightG.
z()) );
990 G_width = G_length*ratio;
996 for (
unsigned int i = 0;
i <
m_BinEta[mylabelHisto].size() - 1;
i++){
1006 unsigned int LastBinPhi =
m_BinPhi[mylabelHisto].size() - 2;
1007 for (
unsigned int i = 0;
i <
m_BinPhi[mylabelHisto].size() - 1;
i++){
1015 bool offlimit_prev =
false;
1016 bool offlimit_foll =
false;
1018 if (phiMin <
m_BinPhi[mylabelHisto][
i]) offlimit_prev =
true;
1019 if (i != LastBinPhi){
1020 if (phiMax >
m_BinPhi[mylabelHisto][i+1]) offlimit_foll =
true;
1024 float MidPoint_X_prev;
1025 float MidPoint_Y_prev;
1026 float MidPoint_Z_prev;
1027 float MidPoint_X_foll;
1028 float MidPoint_Y_foll;
1029 float MidPoint_Z_foll;
1035 float tStar1 = (
m_BinPhi[mylabelHisto][
i]-bot_left_G.
phi())/(top_left_G.
phi()-bot_left_G.
phi());
1038 float tStar2 = (
m_BinPhi[mylabelHisto][
i]-bot_rightG.
phi())/(top_rightG.
phi()-bot_rightG.
phi());
1040 if (tStar1 < 0.) tStar1 = 0.;
1041 if (tStar2 < 0.) tStar2 = 0.;
1044 float xStar1 = bot_left_G.
x() + (tStar1*1.)*(top_left_G.
x()-bot_left_G.
x());
1045 float xStar2 = bot_rightG.
x() + (tStar2*1.)*(top_rightG.
x()-bot_rightG.
x());
1047 float yStar1 = bot_left_G.
y() + (tStar1*1.)*(top_left_G.
y()-bot_left_G.
y());
1048 float yStar2 = bot_rightG.
y() + (tStar2*1.)*(top_rightG.
y()-bot_rightG.
y());
1050 float zStar1 = bot_left_G.
z() + (tStar1*1.)*(top_left_G.
z()-bot_left_G.
z());
1051 float zStar2 = bot_rightG.
z() + (tStar2*1.)*(top_rightG.
z()-bot_rightG.
z());
1054 MidPoint_X_prev = (xStar1 + xStar2)/2.;
1055 MidPoint_Y_prev = (yStar1 + yStar2)/2.;
1056 MidPoint_Z_prev = (zStar1 + zStar2)/2.;
1059 if (offlimit_prev ==
false){
1060 MidPoint_X_prev = (bot_left_G.
x() + bot_rightG.
x())/2.;
1061 MidPoint_Y_prev = (bot_left_G.
y() + bot_rightG.
y())/2.;
1062 MidPoint_Z_prev = (bot_left_G.
z() + bot_rightG.
z())/2.;
1069 float tStar1 = (
m_BinPhi[mylabelHisto][i+1]-bot_left_G.
phi())/(top_left_G.
phi()-bot_left_G.
phi());
1072 float tStar2 = (
m_BinPhi[mylabelHisto][i+1]-bot_rightG.
phi())/(top_rightG.
phi()-bot_rightG.
phi());
1074 if (tStar1 > 1.) tStar1 = 1.;
1075 if (tStar2 > 1.) tStar2 = 1.;
1078 float xStar1 = bot_left_G.
x() + (tStar1*1.)*(top_left_G.
x()-bot_left_G.
x());
1079 float xStar2 = bot_rightG.
x() + (tStar2*1.)*(top_rightG.
x()-bot_rightG.
x());
1081 float yStar1 = bot_left_G.
y() + (tStar1*1.)*(top_left_G.
y()-bot_left_G.
y());
1082 float yStar2 = bot_rightG.
y() + (tStar2*1.)*(top_rightG.
y()-bot_rightG.
y());
1084 float zStar1 = bot_left_G.
z() + (tStar1*1.)*(top_left_G.
z()-bot_left_G.
z());
1085 float zStar2 = bot_rightG.
z() + (tStar2*1.)*(top_rightG.
z()-bot_rightG.
z());
1088 MidPoint_X_foll = (xStar1 + xStar2)/2.;
1089 MidPoint_Y_foll = (yStar1 + yStar2)/2.;
1090 MidPoint_Z_foll = (zStar1 + zStar2)/2.;
1093 if (offlimit_foll ==
false){
1094 MidPoint_X_foll = (top_left_G.
x() + top_rightG.
x())/2.;
1095 MidPoint_Y_foll = (top_left_G.
y() + top_rightG.
y())/2.;
1096 MidPoint_Z_foll = (top_left_G.
z() + top_rightG.
z())/2.;
1100 float EdgePoint_X_B = (bot_left_G.
x() + bot_rightG.
x())/2.;
1101 float EdgePoint_Y_B = (bot_left_G.
y() + bot_rightG.
y())/2.;
1102 float EdgePoint_Z_B = (bot_left_G.
z() + bot_rightG.
z())/2.;
1104 float EdgePoint_X_T = (top_left_G.
x() + top_rightG.
x())/2.;
1105 float EdgePoint_Y_T = (top_left_G.
y() + top_rightG.
y())/2.;
1106 float EdgePoint_Z_T = (top_left_G.
z() + top_rightG.
z())/2.;
1108 float G_width_Ins =
sqrt( (MidPoint_X_foll-MidPoint_X_prev)*(MidPoint_X_foll-MidPoint_X_prev) + (MidPoint_Y_foll-MidPoint_Y_prev)*(MidPoint_Y_foll-MidPoint_Y_prev) + (MidPoint_Z_foll-MidPoint_Z_prev)*(MidPoint_Z_foll-MidPoint_Z_prev) );
1114 if (i != 0 && i != LastBinPhi){
1119 if (i == 0 || i == LastBinPhi){
1120 float PhiBalance = 0.;
1121 if (clustgp.
phi() > 0.) PhiBalance = clustgp.
phi() -
M_PI ;
1122 if (clustgp.
phi() < 0.) PhiBalance = clustgp.
phi() +
M_PI ;
1127 float weight_FirstBin = (1.+ (PhiBalance/(Phi_Width/2.)))/2. ;
1128 float weight_LastBin = fabs(1. - weight_FirstBin);
1131 m_ModNormPhi[mylabelHisto][LastBinPhi] = m_ModNormPhi[mylabelHisto][LastBinPhi] + weight_LastBin*(factor*G_length*G_width);
1135 if (flag_border ==
false){
1138 if (offlimit_prev ==
false && offlimit_foll ==
false){
1143 if ((offlimit_prev ==
true && offlimit_foll ==
false)
1144 ||(offlimit_prev ==
false && offlimit_foll ==
true) ){
1145 float G_width_Out = fabs(G_width - G_width_Ins);
1151 if (offlimit_prev && i != 0)
m_ModNormPhi[mylabelHisto][i-1] =
m_ModNormPhi[mylabelHisto][i-1] + factor*G_width_Out*G_length;
1152 if (offlimit_foll && i != LastBinPhi)
m_ModNormPhi[mylabelHisto][i+1] =
m_ModNormPhi[mylabelHisto][i+1] + factor*G_width_Out*G_length;
1156 if (offlimit_prev ==
true && offlimit_foll ==
true){
1159 float G_width_T =
sqrt( (MidPoint_X_foll-EdgePoint_X_T)*(MidPoint_X_foll-EdgePoint_X_T) + (MidPoint_Y_foll-EdgePoint_Y_T)*(MidPoint_Y_foll-EdgePoint_Y_T) + (MidPoint_Z_foll-EdgePoint_Z_T)*(MidPoint_Z_foll-EdgePoint_Z_T) );
1160 float G_width_B =
sqrt( (MidPoint_X_prev-EdgePoint_X_B)*(MidPoint_X_prev-EdgePoint_X_B) + (MidPoint_Y_prev-EdgePoint_Y_B)*(MidPoint_Y_prev-EdgePoint_Y_B) + (MidPoint_Z_prev-EdgePoint_Z_B)*(MidPoint_Z_prev-EdgePoint_Z_B) );
1163 if (i != 0 && i != LastBinPhi){
1169 if (i != LastBinPhi)
m_ModNormPhi[mylabelHisto][i+1] =
m_ModNormPhi[mylabelHisto][i+1] + factor*G_width_T*G_length;
1183 TFile
output(
"MuonHLTDQMNormalization.root",
"recreate");
1196 std::vector <TH1F *> h_ModNorm_Eta;
1197 std::vector <TH1F *> h_ModNorm_Phi;
1199 for (
unsigned int p = 0;
p < v_LabelHisto.size();
p++){
1206 float * xbinsPhi =
new float[100];
1207 float * xbinsEta =
new float[100];
1210 unsigned int sizePhi =
m_BinPhi[labelHisto].size();
1211 for (
unsigned int i = 0;
i < sizePhi;
i++){
1215 unsigned int sizeEta =
m_BinEta[labelHisto].size();
1216 for (
unsigned int i = 0;
i < sizeEta;
i++){
1220 h_ModNorm_Eta.push_back(
new TH1F (titleHistoEta.c_str(),titleHistoEta.c_str(),sizeEta - 1,xbinsEta));
1221 h_ModNorm_Phi.push_back(
new TH1F (titleHistoPhi.c_str(),titleHistoPhi.c_str(),sizePhi - 1,xbinsPhi));
1230 (*h_ModNorm_Eta[
p]).Write();
1231 (*h_ModNorm_Phi[
p]).Write();
ClusterRef cluster() const
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
virtual const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
T getUntrackedParameter(std::string const &, T const &) const
TkHistoMap * tkmapAllClusters
std::map< std::string, std::vector< float > > m_BinPhi
MonitorElement * EtaDistribAllClustersMap
unsigned int tibString(const DetId &id) const
edm::EDGetTokenT< reco::TrackCollection > TrackCollectionToken_
bool tobIsStereo(const DetId &id) const
edm::InputTag clusterCollectionTag_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
unsigned int tecRing(const DetId &id) const
ring id
Geom::Phi< T > phi() const
edm::InputTag l3collectionTag_
float GetPhiWeight(std::string label, GlobalPoint gp)
TkLayerMap::XYbin cached_XYbin
edm::EDGetTokenT< reco::RecoChargedCandidateCollection > l3collectionToken_
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
const Plane & surface() const
The nominal surface of the GeomDet.
void GeometryFromTrackGeom(const std::vector< DetId > &Dets, const TrackerGeometry &theTracker, const edm::EventSetup &iSetup, std::map< std::string, std::vector< float > > &m_PhiStripMod_Eta, std::map< std::string, std::vector< float > > &m_PhiStripMod_Nb)
bool tecIsZMinusSide(const DetId &id) const
TkHistoMap * tkmapOnTrackClusters
MonitorElement * EtaPhiL3MuTrackClustersMap
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
MonitorElement * EtaDistribOnTrackClustersMap
bool tecIsStereo(const DetId &id) const
float GetEtaWeight(std::string label, GlobalPoint gp)
record_type::const_iterator record_iterator
bool tibIsZMinusSide(const DetId &id) const
void getSubDetLayerSide(int &in, SiStripDetId::SubDetector &, uint32_t &layer, uint32_t &side) const
std::string getLayerName(int &in) const
MonitorElement * EtaPhiAllClustersMap
MonitorElement * PhiDistribAllClustersMap
bool verbose_
every n events
edm::InputTag TrackCollectionTag_
bool tobIsZMinusSide(const DetId &id) const
void analyzeOnTrackClusters(const reco::Track *l3tk, const TrackerGeometry &theTracker, bool isL3MuTrack=true)
MonitorElement * book1D(Args &&...args)
SiStripMonitorMuonHLT(const edm::ParameterSet &ps)
MonitorElement * EtaPhiOnTrackClustersMap
T const * get() const
Returns C++ pointer to the item.
virtual float width() const
Width along local X.
int prescaleEvt_
mutriggered events
unsigned int tibModule(const DetId &id) const
MonitorElement * EtaDistribL3MuTrackClustersMap
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::map< std::string, LayerMEs > LayerMEMap
unsigned int tecModule(const DetId &id) const
bool tecIsFrontPetal(const DetId &id) const
bool tecIsBackPetal(const DetId &id) const
void Normalizer(const std::vector< DetId > &Dets, const TrackerGeometry &theTracker)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
std::map< std::string, std::vector< float > > m_BinEta
std::map< std::string, std::vector< float > > m_ModNormPhi
virtual float widthAtHalfLength() const
bool tibIsStereo(const DetId &id) const
T const * product() const
void PrintNormalization(const std::vector< std::string > &v_LabelHisto)
unsigned int tobModule(const DetId &id) const
bool runOnMuonCandidates_
edm::EDGetTokenT< edm::LazyGetter< SiStripCluster > > clusterCollectionToken_
virtual float length() const
Lenght along local Y.
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
virtual const DetIdContainer & detUnitIds() const
Returm a vector of all GeomDetUnit DetIds.
TkHistoMap * tkmapL3MuTrackClusters
static unsigned int const shift
MonitorElement * PhiDistribOnTrackClustersMap
virtual LocalPoint localPosition(float strip) const =0
int16_t FindLayer(uint32_t &detid, uint32_t &cached_detid, int16_t &cached_layer, TkLayerMap::XYbin &cached_XYbin) const
unsigned int tecPetalNumber(const DetId &id) const
virtual float length() const
std::map< std::string, std::vector< float > > m_ModNormEta
unsigned int tobRod(const DetId &id) const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
virtual SubDetector subDetector() const
Which subdetector.
bool tibIsInternalString(const DetId &id) const
void add(uint32_t &detid, float value)
edm::ParameterSet parameters_
virtual const TrackerGeomDet * idToDet(DetId) const
void createMEs(DQMStore::IBooker &, const edm::EventSetup &es)
MonitorElement * PhiDistribL3MuTrackClustersMap