58 "\n------------------------------------------"
59 "\nUnAvailable Service TkHistoMap: please insert in the configuration file an instance like" "\n\tprocess.TkDetMap = cms.Service(\"TkDetMap\")" "\n------------------------------------------";
116 LogDebug (
"SiStripMonitorHLTMuon") <<
" processing conterEvt_: " <<
counterEvt_ << std::endl;
129 bool accessToL3Muons =
true;
131 reco::RecoChargedCandidateCollection::const_iterator cand;
135 bool accessToClusters =
true;
141 bool accessToTracks =
true;
143 reco::TrackCollection::const_iterator track;
149 for (clust = clusters->begin_record (); clust != clusters->end_record (); ++clust)
153 std::stringstream
ss;
159 LocalPoint clustlp = topol->localPosition (clust->barycenter ());
163 float etaWeight = 1.;
164 float phiWeight = 1.;
169 LayerMEMap[label.c_str ()].EtaDistribAllClustersMap->Fill (clustgp.
eta (),etaWeight);
170 LayerMEMap[label.c_str ()].PhiDistribAllClustersMap->Fill (clustgp.
phi (),phiWeight);
171 LayerMEMap[label.c_str ()].EtaPhiAllClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
178 for (cand = l3mucands->begin (); cand != l3mucands->end (); ++cand)
187 for (track = trackCollection->begin (); track != trackCollection->end() ; ++ track)
203 uint detID = l3tk->
recHit (
hit)->geographicalId ()();
226 float etaWeight = 1.;
227 float phiWeight = 1.;
233 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
234 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
235 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
239 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
240 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
241 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
263 float etaWeight = 1.;
264 float phiWeight = 1.;
270 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
271 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
272 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
276 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
277 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
278 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
285 if (hitMatched2D != 0)
288 detID = hitMatched2D->monoId();
301 float etaWeight = 1.;
302 float phiWeight = 1.;
308 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
309 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
310 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
314 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
315 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
316 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
323 detID = hitMatched2D->stereoId ();
327 if (theGeomDet2 != 0)
336 float etaWeight = 1.;
337 float phiWeight = 1.;
343 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
344 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
345 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
349 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
350 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
351 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
362 detID = hitProj2D->geographicalId ();
375 float etaWeight = 1.;
376 float phiWeight = 1.;
382 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
383 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
384 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
388 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
389 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
390 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
406 std::vector <float *> tgraphEta;
407 std::vector <float *> tgraphPhi;
408 std::vector <int> tgraphSize;
410 std::vector <std::vector<float> > binningEta;
411 std::vector <std::vector<float> > binningPhi;
413 for (
int p = 0;
p < 34;
p++){
414 tgraphEta.push_back (
new float[1000]);
415 tgraphPhi.push_back (
new float[1000]);
419 std::map< std::string,std::vector<float> > m_BinEta_Prel ;
420 std::map< std::string,std::vector<float> > m_PhiStripMod_Eta;
421 std::map< std::string,std::vector<float> > m_PhiStripMod_Nb;
431 std::vector<DetId> Dets = theTracker.
detUnitIds();
452 std::stringstream
ss;
454 uint32_t subdetlayer, side;
476 labelHisto_ID.erase(3);
479 unsigned int sizePhi = 0;
480 unsigned int sizeEta = 0;
481 float * xbinsPhi =
new float[100];
482 float * xbinsEta =
new float[100];
485 if (labelHisto_ID ==
"TEC" || labelHisto_ID ==
"TID" || labelHisto_ID ==
"TOB" || labelHisto_ID ==
"TIB"){
495 sizePhi =
m_BinPhi[labelHisto].size();
497 for (
unsigned int i = 0;
i < sizePhi;
i++){
502 std::vector <float > v_BinEta_Prel;
504 for (
unsigned int i = 0;
i < 12;
i++){
506 if (m_PhiStripMod_Nb[labelHisto][
i] != 0 && fabs(m_PhiStripMod_Eta[labelHisto][
i]) > 0.05){
507 float EtaBarycenter = m_PhiStripMod_Eta[labelHisto][
i]/m_PhiStripMod_Nb[labelHisto][
i];
508 v_BinEta_Prel.push_back(EtaBarycenter);
513 sort(v_BinEta_Prel.begin(),v_BinEta_Prel.end());
516 for (
unsigned int i = 0;
i < v_BinEta_Prel.size();
i++){
517 if (
i == 0)
m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] - 0.15);
519 float shift = v_BinEta_Prel[
i] - v_BinEta_Prel[
i-1];
520 m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] - shift/2.);
522 if (
i == v_BinEta_Prel.size()-1)
m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] + 0.15);
528 sizeEta =
m_BinEta[labelHisto].size();
530 for (
unsigned int i = 0;
i < sizeEta;
i++){
538 histoname =
"EtaAllClustersDistrib_" + labelHisto;
539 title =
"#eta(All Clusters) in " + labelHisto;
541 histoname =
"PhiAllClustersDistrib_" + labelHisto;
542 title =
"#phi(All Clusters) in " + labelHisto;
544 histoname =
"EtaPhiAllClustersMap_" + labelHisto;
545 title =
"#eta-#phi All Clusters map in " + labelHisto;
550 histoname =
"EtaOnTrackClustersDistrib_" + labelHisto;
551 title =
"#eta(OnTrack Clusters) in " + labelHisto;
553 histoname =
"PhiOnTrackClustersDistrib_" + labelHisto;
554 title =
"#phi(OnTrack Clusters) in " + labelHisto;
556 histoname =
"EtaPhiOnTrackClustersMap_" + labelHisto;
557 title =
"#eta-#phi OnTrack Clusters map in " + labelHisto;
562 histoname =
"EtaL3MuTrackClustersDistrib_" + labelHisto;
563 title =
"#eta(L3MuTrack Clusters) in " + labelHisto;
565 histoname =
"PhiL3MuTrackClustersDistrib_" + labelHisto;
566 title =
"#phi(L3MuTrack Clusters) in " + labelHisto;
568 histoname =
"EtaPhiL3MuTrackClustersMap_" + labelHisto;
569 title =
"#eta-#phi L3MuTrack Clusters map in " + labelHisto;
576 LayerMEMap[labelHisto].EtaDistribAllClustersMap->getTH1F()->Sumw2();
577 LayerMEMap[labelHisto].PhiDistribAllClustersMap->getTH1F()->Sumw2();
578 LayerMEMap[labelHisto].EtaPhiAllClustersMap->getTH2F()->Sumw2();
581 LayerMEMap[labelHisto].EtaDistribOnTrackClustersMap->getTH1F()->Sumw2();
582 LayerMEMap[labelHisto].PhiDistribOnTrackClustersMap->getTH1F()->Sumw2();
583 LayerMEMap[labelHisto].EtaPhiOnTrackClustersMap->getTH2F()->Sumw2();
586 LayerMEMap[labelHisto].EtaDistribL3MuTrackClustersMap->getTH1F()->Sumw2();
587 LayerMEMap[labelHisto].PhiDistribL3MuTrackClustersMap->getTH1F()->Sumw2();
588 LayerMEMap[labelHisto].EtaPhiL3MuTrackClustersMap->getTH2F()->Sumw2();
610 std::vector<std::string> v_LabelHisto;
614 for(std::vector<DetId>::const_iterator detid_iterator = Dets.begin(); detid_iterator!=Dets.end(); ++detid_iterator){
615 uint32_t
detid = (*detid_iterator)();
617 if ( (*detid_iterator).null() ==
true)
break;
618 if (detid == 0)
break;
638 LocalPoint clustlp = topol->localPosition (1.);
650 unsigned int count = 0;
651 while (count < v_LabelHisto.size()){
652 if (mylabelHisto == v_LabelHisto[count])
break;
655 if (count == v_LabelHisto.size()){
658 v_LabelHisto.push_back(mylabelHisto);
663 for (
int i = 0;
i < 12;
i++){
664 m_PhiStripMod_Eta[mylabelHisto].push_back(0.);
665 m_PhiStripMod_Nb[mylabelHisto].push_back(0.);
676 if (tTopo->
tecRing(detid) == 7){
686 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] + clustgp.
eta();
687 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tecRing(detid)-1]++;
699 if (tTopo->
tecRing(detid) == 1){
709 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] + clustgp.
eta();
710 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tecRing(detid)-1]++;
732 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)-1] + clustgp.
eta();
733 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tobModule(detid)-1]++;
736 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)+5] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)+5] + clustgp.
eta();
737 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tobModule(detid)+5]++;
762 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)-1] + clustgp.
eta();
763 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)-1]++;
766 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+2] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+2] + clustgp.
eta();
767 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+2]++;
772 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+5] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+5] + clustgp.
eta();
773 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+5]++;
776 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+8] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+8] + clustgp.
eta();
777 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+8]++;
795 std::vector<std::string> v_LabelHisto;
799 for(std::vector<DetId>::const_iterator detid_iterator = Dets.begin(); detid_iterator!=Dets.end(); detid_iterator++){
800 uint32_t
detid = (*detid_iterator)();
802 if ( (*detid_iterator).null() ==
true)
break;
803 if (detid == 0)
break;
831 unsigned int count = 0;
833 while (count < v_LabelHisto.size()){
834 if (mylabelHisto == v_LabelHisto[count])
break;
838 if (count == v_LabelHisto.size()){
840 v_LabelHisto.push_back(mylabelHisto);
844 for (
unsigned int i = 0;
i <
m_BinEta[mylabelHisto].size() -1;
i++){
849 for (
unsigned int i = 0;
i <
m_BinPhi[mylabelHisto].size() -1;
i++){
868 const Bounds& bound = GeomDetSurface.bounds();
871 labelHisto_ID.erase(3);
876 std::vector <GlobalPoint> v_Edge_G;
882 if (labelHisto_ID ==
"TOB" || labelHisto_ID ==
"TIB"){
884 length = rectangularBound->
length();
885 width = rectangularBound->
width();
886 ratio = width/length;
897 if (labelHisto_ID ==
"TEC" || labelHisto_ID ==
"TID"){
900 length = trapezoidalBound->
length();
903 ratio = width/length;
923 std::vector <bool> v_Fill;
924 v_Fill.push_back(
false);
925 v_Fill.push_back(
false);
926 v_Fill.push_back(
false);
927 v_Fill.push_back(
false);
929 for (
unsigned int i =0 ;
i< v_Edge_G.size() ;
i++){
930 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
931 if (v_Edge_G[
i].
phi() < clustgp.
phi()) {
932 bot_left_G = v_Edge_G[
i];
935 if (v_Edge_G[
i].
phi() > clustgp.
phi()){
936 top_left_G = v_Edge_G[
i];
940 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
941 if (v_Edge_G[
i].
phi() < clustgp.
phi()){
942 bot_rightG = v_Edge_G[
i];
945 if (v_Edge_G[
i].
phi() > clustgp.
phi()){
946 top_rightG = v_Edge_G[
i];
957 bool flag_border =
false;
959 if (v_Fill[0] ==
true
962 && v_Fill[3] ==
true){
965 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()) );
968 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()) );
977 for (
unsigned int i =0 ;
i< v_Edge_G.size() ;
i++){
979 if (v_Edge_G[
i].
phi() > 0. ){
980 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
981 bot_left_G = v_Edge_G[
i];
983 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
984 bot_rightG = v_Edge_G[
i];
987 if (v_Edge_G[
i].
phi() < 0. ){
988 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
989 top_left_G = v_Edge_G[
i];
991 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
992 top_rightG = v_Edge_G[
i];
998 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()) );
999 G_width = G_length*ratio;
1005 for (
unsigned int i = 0;
i <
m_BinEta[mylabelHisto].size() - 1;
i++){
1015 unsigned int LastBinPhi =
m_BinPhi[mylabelHisto].size() - 2;
1016 for (
unsigned int i = 0;
i <
m_BinPhi[mylabelHisto].size() - 1;
i++){
1024 bool offlimit_prev =
false;
1025 bool offlimit_foll =
false;
1027 if (phiMin <
m_BinPhi[mylabelHisto][
i]) offlimit_prev =
true;
1028 if (i != LastBinPhi){
1029 if (phiMax >
m_BinPhi[mylabelHisto][i+1]) offlimit_foll =
true;
1033 float MidPoint_X_prev;
1034 float MidPoint_Y_prev;
1035 float MidPoint_Z_prev;
1036 float MidPoint_X_foll;
1037 float MidPoint_Y_foll;
1038 float MidPoint_Z_foll;
1044 float tStar1 = (
m_BinPhi[mylabelHisto][
i]-bot_left_G.
phi())/(top_left_G.
phi()-bot_left_G.
phi());
1047 float tStar2 = (
m_BinPhi[mylabelHisto][
i]-bot_rightG.
phi())/(top_rightG.
phi()-bot_rightG.
phi());
1049 if (tStar1 < 0.) tStar1 = 0.;
1050 if (tStar2 < 0.) tStar2 = 0.;
1053 float xStar1 = bot_left_G.
x() + (tStar1*1.)*(top_left_G.
x()-bot_left_G.
x());
1054 float xStar2 = bot_rightG.
x() + (tStar2*1.)*(top_rightG.
x()-bot_rightG.
x());
1056 float yStar1 = bot_left_G.
y() + (tStar1*1.)*(top_left_G.
y()-bot_left_G.
y());
1057 float yStar2 = bot_rightG.
y() + (tStar2*1.)*(top_rightG.
y()-bot_rightG.
y());
1059 float zStar1 = bot_left_G.
z() + (tStar1*1.)*(top_left_G.
z()-bot_left_G.
z());
1060 float zStar2 = bot_rightG.
z() + (tStar2*1.)*(top_rightG.
z()-bot_rightG.
z());
1063 MidPoint_X_prev = (xStar1 + xStar2)/2.;
1064 MidPoint_Y_prev = (yStar1 + yStar2)/2.;
1065 MidPoint_Z_prev = (zStar1 + zStar2)/2.;
1068 if (offlimit_prev ==
false){
1069 MidPoint_X_prev = (bot_left_G.
x() + bot_rightG.
x())/2.;
1070 MidPoint_Y_prev = (bot_left_G.
y() + bot_rightG.
y())/2.;
1071 MidPoint_Z_prev = (bot_left_G.
z() + bot_rightG.
z())/2.;
1078 float tStar1 = (
m_BinPhi[mylabelHisto][i+1]-bot_left_G.
phi())/(top_left_G.
phi()-bot_left_G.
phi());
1081 float tStar2 = (
m_BinPhi[mylabelHisto][i+1]-bot_rightG.
phi())/(top_rightG.
phi()-bot_rightG.
phi());
1083 if (tStar1 > 1.) tStar1 = 1.;
1084 if (tStar2 > 1.) tStar2 = 1.;
1087 float xStar1 = bot_left_G.
x() + (tStar1*1.)*(top_left_G.
x()-bot_left_G.
x());
1088 float xStar2 = bot_rightG.
x() + (tStar2*1.)*(top_rightG.
x()-bot_rightG.
x());
1090 float yStar1 = bot_left_G.
y() + (tStar1*1.)*(top_left_G.
y()-bot_left_G.
y());
1091 float yStar2 = bot_rightG.
y() + (tStar2*1.)*(top_rightG.
y()-bot_rightG.
y());
1093 float zStar1 = bot_left_G.
z() + (tStar1*1.)*(top_left_G.
z()-bot_left_G.
z());
1094 float zStar2 = bot_rightG.
z() + (tStar2*1.)*(top_rightG.
z()-bot_rightG.
z());
1097 MidPoint_X_foll = (xStar1 + xStar2)/2.;
1098 MidPoint_Y_foll = (yStar1 + yStar2)/2.;
1099 MidPoint_Z_foll = (zStar1 + zStar2)/2.;
1102 if (offlimit_foll ==
false){
1103 MidPoint_X_foll = (top_left_G.
x() + top_rightG.
x())/2.;
1104 MidPoint_Y_foll = (top_left_G.
y() + top_rightG.
y())/2.;
1105 MidPoint_Z_foll = (top_left_G.
z() + top_rightG.
z())/2.;
1109 float EdgePoint_X_B = (bot_left_G.
x() + bot_rightG.
x())/2.;
1110 float EdgePoint_Y_B = (bot_left_G.
y() + bot_rightG.
y())/2.;
1111 float EdgePoint_Z_B = (bot_left_G.
z() + bot_rightG.
z())/2.;
1113 float EdgePoint_X_T = (top_left_G.
x() + top_rightG.
x())/2.;
1114 float EdgePoint_Y_T = (top_left_G.
y() + top_rightG.
y())/2.;
1115 float EdgePoint_Z_T = (top_left_G.
z() + top_rightG.
z())/2.;
1117 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) );
1123 if (i != 0 && i != LastBinPhi){
1128 if (i == 0 || i == LastBinPhi){
1129 float PhiBalance = 0.;
1130 if (clustgp.
phi() > 0.) PhiBalance = clustgp.
phi() -
M_PI ;
1131 if (clustgp.
phi() < 0.) PhiBalance = clustgp.
phi() +
M_PI ;
1136 float weight_FirstBin = (1.+ (PhiBalance/(Phi_Width/2.)))/2. ;
1137 float weight_LastBin = fabs(1. - weight_FirstBin);
1140 m_ModNormPhi[mylabelHisto][LastBinPhi] = m_ModNormPhi[mylabelHisto][LastBinPhi] + weight_LastBin*(factor*G_length*G_width);
1144 if (flag_border ==
false){
1147 if (offlimit_prev ==
false && offlimit_foll ==
false){
1152 if ((offlimit_prev ==
true && offlimit_foll ==
false)
1153 ||(offlimit_prev ==
false && offlimit_foll ==
true) ){
1154 float G_width_Out = fabs(G_width - G_width_Ins);
1160 if (offlimit_prev && i != 0)
m_ModNormPhi[mylabelHisto][i-1] =
m_ModNormPhi[mylabelHisto][i-1] + factor*G_width_Out*G_length;
1161 if (offlimit_foll && i != LastBinPhi)
m_ModNormPhi[mylabelHisto][i+1] =
m_ModNormPhi[mylabelHisto][i+1] + factor*G_width_Out*G_length;
1165 if (offlimit_prev ==
true && offlimit_foll ==
true){
1168 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) );
1169 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) );
1172 if (i != 0 && i != LastBinPhi){
1178 if (i != LastBinPhi)
m_ModNormPhi[mylabelHisto][i+1] =
m_ModNormPhi[mylabelHisto][i+1] + factor*G_width_T*G_length;
1192 TFile
output(
"MuonHLTDQMNormalization.root",
"recreate");
1205 std::vector <TH1F *> h_ModNorm_Eta;
1206 std::vector <TH1F *> h_ModNorm_Phi;
1208 for (
unsigned int p = 0;
p < v_LabelHisto.size();
p++){
1215 float * xbinsPhi =
new float[100];
1216 float * xbinsEta =
new float[100];
1219 unsigned int sizePhi =
m_BinPhi[labelHisto].size();
1220 for (
unsigned int i = 0;
i < sizePhi;
i++){
1224 unsigned int sizeEta =
m_BinEta[labelHisto].size();
1225 for (
unsigned int i = 0;
i < sizeEta;
i++){
1229 h_ModNorm_Eta.push_back(
new TH1F (titleHistoEta.c_str(),titleHistoEta.c_str(),sizeEta - 1,xbinsEta));
1230 h_ModNorm_Phi.push_back(
new TH1F (titleHistoPhi.c_str(),titleHistoPhi.c_str(),sizePhi - 1,xbinsPhi));
1239 (*h_ModNorm_Eta[
p]).Write();
1240 (*h_ModNorm_Phi[
p]).Write();
ClusterRef cluster() const
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
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
virtual float width() const
Width along local X.
virtual const GeomDet * idToDet(DetId) const
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
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
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 SubDetector subDetector() const
Which subdetector.
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
T const * get() const
Returns C++ pointer to the item.
bool tibIsInternalString(const DetId &id) const
void add(uint32_t &detid, float value)
edm::ParameterSet parameters_
void createMEs(DQMStore::IBooker &, const edm::EventSetup &es)
MonitorElement * PhiDistribL3MuTrackClustersMap