59 "\n------------------------------------------"
60 "\nUnAvailable Service TkHistoMap: please insert in the configuration file an instance like" "\n\tprocess.TkDetMap = cms.Service(\"TkDetMap\")" "\n------------------------------------------";
108 LogDebug (
"SiStripMonitorHLTMuon") <<
" processing conterEvt_: " <<
counterEvt_ << std::endl;
121 bool accessToL3Muons =
true;
123 reco::RecoChargedCandidateCollection::const_iterator cand;
127 bool accessToClusters =
true;
133 bool accessToTracks =
true;
135 reco::TrackCollection::const_iterator track;
141 for (clust = clusters->begin_record (); clust != clusters->end_record (); ++clust)
145 std::stringstream
ss;
151 LocalPoint clustlp = topol->localPosition (clust->barycenter ());
155 float etaWeight = 1.;
156 float phiWeight = 1.;
161 LayerMEMap[label.c_str ()].EtaDistribAllClustersMap->Fill (clustgp.
eta (),etaWeight);
162 LayerMEMap[label.c_str ()].PhiDistribAllClustersMap->Fill (clustgp.
phi (),phiWeight);
163 LayerMEMap[label.c_str ()].EtaPhiAllClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
170 for (cand = l3mucands->begin (); cand != l3mucands->end (); ++cand)
179 for (track = trackCollection->begin (); track != trackCollection->end() ; ++ track)
195 uint detID = l3tk->
recHit (
hit)->geographicalId ()();
218 float etaWeight = 1.;
219 float phiWeight = 1.;
225 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
226 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
227 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
231 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
232 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
233 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
255 float etaWeight = 1.;
256 float phiWeight = 1.;
262 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
263 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
264 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
268 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
269 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
270 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
277 if (hitMatched2D != 0)
280 detID = hitMatched2D->monoId();
293 float etaWeight = 1.;
294 float phiWeight = 1.;
300 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
301 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
302 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
306 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
307 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
308 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
315 detID = hitMatched2D->stereoId ();
319 if (theGeomDet2 != 0)
328 float etaWeight = 1.;
329 float phiWeight = 1.;
335 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
336 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
337 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
341 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
342 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
343 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
354 detID = hitProj2D->geographicalId ();
367 float etaWeight = 1.;
368 float phiWeight = 1.;
374 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
375 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
376 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
380 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
381 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
382 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
398 std::vector <float *> tgraphEta;
399 std::vector <float *> tgraphPhi;
400 std::vector <int> tgraphSize;
402 std::vector <std::vector<float> > binningEta;
403 std::vector <std::vector<float> > binningPhi;
405 for (
int p = 0;
p < 34;
p++){
406 tgraphEta.push_back (
new float[1000]);
407 tgraphPhi.push_back (
new float[1000]);
411 std::map< std::string,std::vector<float> > m_BinEta_Prel ;
412 std::map< std::string,std::vector<float> > m_PhiStripMod_Eta;
413 std::map< std::string,std::vector<float> > m_PhiStripMod_Nb;
423 std::vector<DetId> Dets = theTracker.
detUnitIds();
444 std::stringstream
ss;
446 uint32_t subdetlayer, side;
468 labelHisto_ID.erase(3);
471 unsigned int sizePhi = 0;
472 unsigned int sizeEta = 0;
473 float * xbinsPhi =
new float[100];
474 float * xbinsEta =
new float[100];
477 if (labelHisto_ID ==
"TEC" || labelHisto_ID ==
"TID" || labelHisto_ID ==
"TOB" || labelHisto_ID ==
"TIB"){
487 sizePhi =
m_BinPhi[labelHisto].size();
489 for (
unsigned int i = 0;
i < sizePhi;
i++){
494 std::vector <float > v_BinEta_Prel;
496 for (
unsigned int i = 0;
i < 12;
i++){
498 if (m_PhiStripMod_Nb[labelHisto][
i] != 0 && fabs(m_PhiStripMod_Eta[labelHisto][
i]) > 0.05){
499 float EtaBarycenter = m_PhiStripMod_Eta[labelHisto][
i]/m_PhiStripMod_Nb[labelHisto][
i];
500 v_BinEta_Prel.push_back(EtaBarycenter);
505 sort(v_BinEta_Prel.begin(),v_BinEta_Prel.end());
508 for (
unsigned int i = 0;
i < v_BinEta_Prel.size();
i++){
509 if (
i == 0)
m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] - 0.15);
511 float shift = v_BinEta_Prel[
i] - v_BinEta_Prel[
i-1];
512 m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] - shift/2.);
514 if (
i == v_BinEta_Prel.size()-1)
m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] + 0.15);
520 sizeEta =
m_BinEta[labelHisto].size();
522 for (
unsigned int i = 0;
i < sizeEta;
i++){
530 histoname =
"EtaAllClustersDistrib_" + labelHisto;
531 title =
"#eta(All Clusters) in " + labelHisto;
533 histoname =
"PhiAllClustersDistrib_" + labelHisto;
534 title =
"#phi(All Clusters) in " + labelHisto;
536 histoname =
"EtaPhiAllClustersMap_" + labelHisto;
537 title =
"#eta-#phi All Clusters map in " + labelHisto;
542 histoname =
"EtaOnTrackClustersDistrib_" + labelHisto;
543 title =
"#eta(OnTrack Clusters) in " + labelHisto;
545 histoname =
"PhiOnTrackClustersDistrib_" + labelHisto;
546 title =
"#phi(OnTrack Clusters) in " + labelHisto;
548 histoname =
"EtaPhiOnTrackClustersMap_" + labelHisto;
549 title =
"#eta-#phi OnTrack Clusters map in " + labelHisto;
554 histoname =
"EtaL3MuTrackClustersDistrib_" + labelHisto;
555 title =
"#eta(L3MuTrack Clusters) in " + labelHisto;
557 histoname =
"PhiL3MuTrackClustersDistrib_" + labelHisto;
558 title =
"#phi(L3MuTrack Clusters) in " + labelHisto;
560 histoname =
"EtaPhiL3MuTrackClustersMap_" + labelHisto;
561 title =
"#eta-#phi L3MuTrack Clusters map in " + labelHisto;
568 LayerMEMap[labelHisto].EtaDistribAllClustersMap->getTH1F()->Sumw2();
569 LayerMEMap[labelHisto].PhiDistribAllClustersMap->getTH1F()->Sumw2();
570 LayerMEMap[labelHisto].EtaPhiAllClustersMap->getTH2F()->Sumw2();
573 LayerMEMap[labelHisto].EtaDistribOnTrackClustersMap->getTH1F()->Sumw2();
574 LayerMEMap[labelHisto].PhiDistribOnTrackClustersMap->getTH1F()->Sumw2();
575 LayerMEMap[labelHisto].EtaPhiOnTrackClustersMap->getTH2F()->Sumw2();
578 LayerMEMap[labelHisto].EtaDistribL3MuTrackClustersMap->getTH1F()->Sumw2();
579 LayerMEMap[labelHisto].PhiDistribL3MuTrackClustersMap->getTH1F()->Sumw2();
580 LayerMEMap[labelHisto].EtaPhiL3MuTrackClustersMap->getTH2F()->Sumw2();
602 std::vector<std::string> v_LabelHisto;
606 for(std::vector<DetId>::const_iterator detid_iterator = Dets.begin(); detid_iterator!=Dets.end(); ++detid_iterator){
607 uint32_t
detid = (*detid_iterator)();
609 if ( (*detid_iterator).null() ==
true)
break;
610 if (detid == 0)
break;
630 LocalPoint clustlp = topol->localPosition (1.);
642 unsigned int count = 0;
643 while (count < v_LabelHisto.size()){
644 if (mylabelHisto == v_LabelHisto[count])
break;
647 if (count == v_LabelHisto.size()){
650 v_LabelHisto.push_back(mylabelHisto);
655 for (
int i = 0;
i < 12;
i++){
656 m_PhiStripMod_Eta[mylabelHisto].push_back(0.);
657 m_PhiStripMod_Nb[mylabelHisto].push_back(0.);
668 if (tTopo->
tecRing(detid) == 7){
678 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] + clustgp.
eta();
679 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tecRing(detid)-1]++;
691 if (tTopo->
tecRing(detid) == 1){
701 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] + clustgp.
eta();
702 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tecRing(detid)-1]++;
724 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)-1] + clustgp.
eta();
725 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tobModule(detid)-1]++;
728 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)+5] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)+5] + clustgp.
eta();
729 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tobModule(detid)+5]++;
754 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)-1] + clustgp.
eta();
755 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)-1]++;
758 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+2] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+2] + clustgp.
eta();
759 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+2]++;
764 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+5] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+5] + clustgp.
eta();
765 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+5]++;
768 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+8] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+8] + clustgp.
eta();
769 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+8]++;
787 std::vector<std::string> v_LabelHisto;
791 for(std::vector<DetId>::const_iterator detid_iterator = Dets.begin(); detid_iterator!=Dets.end(); detid_iterator++){
792 uint32_t
detid = (*detid_iterator)();
794 if ( (*detid_iterator).null() ==
true)
break;
795 if (detid == 0)
break;
823 unsigned int count = 0;
825 while (count < v_LabelHisto.size()){
826 if (mylabelHisto == v_LabelHisto[count])
break;
830 if (count == v_LabelHisto.size()){
832 v_LabelHisto.push_back(mylabelHisto);
836 for (
unsigned int i = 0;
i <
m_BinEta[mylabelHisto].size() -1;
i++){
841 for (
unsigned int i = 0;
i <
m_BinPhi[mylabelHisto].size() -1;
i++){
860 const Bounds& bound = GeomDetSurface.bounds();
863 labelHisto_ID.erase(3);
868 std::vector <GlobalPoint> v_Edge_G;
874 if (labelHisto_ID ==
"TOB" || labelHisto_ID ==
"TIB"){
876 length = rectangularBound->
length();
877 width = rectangularBound->
width();
878 ratio = width/length;
889 if (labelHisto_ID ==
"TEC" || labelHisto_ID ==
"TID"){
892 length = trapezoidalBound->
length();
895 ratio = width/length;
915 std::vector <bool> v_Fill;
916 v_Fill.push_back(
false);
917 v_Fill.push_back(
false);
918 v_Fill.push_back(
false);
919 v_Fill.push_back(
false);
921 for (
unsigned int i =0 ;
i< v_Edge_G.size() ;
i++){
922 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
923 if (v_Edge_G[
i].
phi() < clustgp.
phi()) {
924 bot_left_G = v_Edge_G[
i];
927 if (v_Edge_G[
i].
phi() > clustgp.
phi()){
928 top_left_G = v_Edge_G[
i];
932 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
933 if (v_Edge_G[
i].
phi() < clustgp.
phi()){
934 bot_rightG = v_Edge_G[
i];
937 if (v_Edge_G[
i].
phi() > clustgp.
phi()){
938 top_rightG = v_Edge_G[
i];
949 bool flag_border =
false;
951 if (v_Fill[0] ==
true
954 && v_Fill[3] ==
true){
957 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()) );
960 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()) );
969 for (
unsigned int i =0 ;
i< v_Edge_G.size() ;
i++){
971 if (v_Edge_G[
i].
phi() > 0. ){
972 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
973 bot_left_G = v_Edge_G[
i];
975 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
976 bot_rightG = v_Edge_G[
i];
979 if (v_Edge_G[
i].
phi() < 0. ){
980 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
981 top_left_G = v_Edge_G[
i];
983 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
984 top_rightG = v_Edge_G[
i];
990 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()) );
991 G_width = G_length*ratio;
997 for (
unsigned int i = 0;
i <
m_BinEta[mylabelHisto].size() - 1;
i++){
1007 unsigned int LastBinPhi =
m_BinPhi[mylabelHisto].size() - 2;
1008 for (
unsigned int i = 0;
i <
m_BinPhi[mylabelHisto].size() - 1;
i++){
1016 bool offlimit_prev =
false;
1017 bool offlimit_foll =
false;
1019 if (phiMin <
m_BinPhi[mylabelHisto][
i]) offlimit_prev =
true;
1020 if (i != LastBinPhi){
1021 if (phiMax >
m_BinPhi[mylabelHisto][i+1]) offlimit_foll =
true;
1025 float MidPoint_X_prev;
1026 float MidPoint_Y_prev;
1027 float MidPoint_Z_prev;
1028 float MidPoint_X_foll;
1029 float MidPoint_Y_foll;
1030 float MidPoint_Z_foll;
1036 float tStar1 = (
m_BinPhi[mylabelHisto][
i]-bot_left_G.
phi())/(top_left_G.
phi()-bot_left_G.
phi());
1039 float tStar2 = (
m_BinPhi[mylabelHisto][
i]-bot_rightG.
phi())/(top_rightG.
phi()-bot_rightG.
phi());
1041 if (tStar1 < 0.) tStar1 = 0.;
1042 if (tStar2 < 0.) tStar2 = 0.;
1045 float xStar1 = bot_left_G.
x() + (tStar1*1.)*(top_left_G.
x()-bot_left_G.
x());
1046 float xStar2 = bot_rightG.
x() + (tStar2*1.)*(top_rightG.
x()-bot_rightG.
x());
1048 float yStar1 = bot_left_G.
y() + (tStar1*1.)*(top_left_G.
y()-bot_left_G.
y());
1049 float yStar2 = bot_rightG.
y() + (tStar2*1.)*(top_rightG.
y()-bot_rightG.
y());
1051 float zStar1 = bot_left_G.
z() + (tStar1*1.)*(top_left_G.
z()-bot_left_G.
z());
1052 float zStar2 = bot_rightG.
z() + (tStar2*1.)*(top_rightG.
z()-bot_rightG.
z());
1055 MidPoint_X_prev = (xStar1 + xStar2)/2.;
1056 MidPoint_Y_prev = (yStar1 + yStar2)/2.;
1057 MidPoint_Z_prev = (zStar1 + zStar2)/2.;
1060 if (offlimit_prev ==
false){
1061 MidPoint_X_prev = (bot_left_G.
x() + bot_rightG.
x())/2.;
1062 MidPoint_Y_prev = (bot_left_G.
y() + bot_rightG.
y())/2.;
1063 MidPoint_Z_prev = (bot_left_G.
z() + bot_rightG.
z())/2.;
1070 float tStar1 = (
m_BinPhi[mylabelHisto][i+1]-bot_left_G.
phi())/(top_left_G.
phi()-bot_left_G.
phi());
1073 float tStar2 = (
m_BinPhi[mylabelHisto][i+1]-bot_rightG.
phi())/(top_rightG.
phi()-bot_rightG.
phi());
1075 if (tStar1 > 1.) tStar1 = 1.;
1076 if (tStar2 > 1.) tStar2 = 1.;
1079 float xStar1 = bot_left_G.
x() + (tStar1*1.)*(top_left_G.
x()-bot_left_G.
x());
1080 float xStar2 = bot_rightG.
x() + (tStar2*1.)*(top_rightG.
x()-bot_rightG.
x());
1082 float yStar1 = bot_left_G.
y() + (tStar1*1.)*(top_left_G.
y()-bot_left_G.
y());
1083 float yStar2 = bot_rightG.
y() + (tStar2*1.)*(top_rightG.
y()-bot_rightG.
y());
1085 float zStar1 = bot_left_G.
z() + (tStar1*1.)*(top_left_G.
z()-bot_left_G.
z());
1086 float zStar2 = bot_rightG.
z() + (tStar2*1.)*(top_rightG.
z()-bot_rightG.
z());
1089 MidPoint_X_foll = (xStar1 + xStar2)/2.;
1090 MidPoint_Y_foll = (yStar1 + yStar2)/2.;
1091 MidPoint_Z_foll = (zStar1 + zStar2)/2.;
1094 if (offlimit_foll ==
false){
1095 MidPoint_X_foll = (top_left_G.
x() + top_rightG.
x())/2.;
1096 MidPoint_Y_foll = (top_left_G.
y() + top_rightG.
y())/2.;
1097 MidPoint_Z_foll = (top_left_G.
z() + top_rightG.
z())/2.;
1101 float EdgePoint_X_B = (bot_left_G.
x() + bot_rightG.
x())/2.;
1102 float EdgePoint_Y_B = (bot_left_G.
y() + bot_rightG.
y())/2.;
1103 float EdgePoint_Z_B = (bot_left_G.
z() + bot_rightG.
z())/2.;
1105 float EdgePoint_X_T = (top_left_G.
x() + top_rightG.
x())/2.;
1106 float EdgePoint_Y_T = (top_left_G.
y() + top_rightG.
y())/2.;
1107 float EdgePoint_Z_T = (top_left_G.
z() + top_rightG.
z())/2.;
1109 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) );
1115 if (i != 0 && i != LastBinPhi){
1120 if (i == 0 || i == LastBinPhi){
1121 float PhiBalance = 0.;
1122 if (clustgp.
phi() > 0.) PhiBalance = clustgp.
phi() -
M_PI ;
1123 if (clustgp.
phi() < 0.) PhiBalance = clustgp.
phi() +
M_PI ;
1128 float weight_FirstBin = (1.+ (PhiBalance/(Phi_Width/2.)))/2. ;
1129 float weight_LastBin = fabs(1. - weight_FirstBin);
1132 m_ModNormPhi[mylabelHisto][LastBinPhi] = m_ModNormPhi[mylabelHisto][LastBinPhi] + weight_LastBin*(factor*G_length*G_width);
1136 if (flag_border ==
false){
1139 if (offlimit_prev ==
false && offlimit_foll ==
false){
1144 if ((offlimit_prev ==
true && offlimit_foll ==
false)
1145 ||(offlimit_prev ==
false && offlimit_foll ==
true) ){
1146 float G_width_Out = fabs(G_width - G_width_Ins);
1152 if (offlimit_prev && i != 0)
m_ModNormPhi[mylabelHisto][i-1] =
m_ModNormPhi[mylabelHisto][i-1] + factor*G_width_Out*G_length;
1153 if (offlimit_foll && i != LastBinPhi)
m_ModNormPhi[mylabelHisto][i+1] =
m_ModNormPhi[mylabelHisto][i+1] + factor*G_width_Out*G_length;
1157 if (offlimit_prev ==
true && offlimit_foll ==
true){
1160 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) );
1161 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) );
1164 if (i != 0 && i != LastBinPhi){
1170 if (i != LastBinPhi)
m_ModNormPhi[mylabelHisto][i+1] =
m_ModNormPhi[mylabelHisto][i+1] + factor*G_width_T*G_length;
1184 TFile
output(
"MuonHLTDQMNormalization.root",
"recreate");
1197 std::vector <TH1F *> h_ModNorm_Eta;
1198 std::vector <TH1F *> h_ModNorm_Phi;
1200 for (
unsigned int p = 0;
p < v_LabelHisto.size();
p++){
1207 float * xbinsPhi =
new float[100];
1208 float * xbinsEta =
new float[100];
1211 unsigned int sizePhi =
m_BinPhi[labelHisto].size();
1212 for (
unsigned int i = 0;
i < sizePhi;
i++){
1216 unsigned int sizeEta =
m_BinEta[labelHisto].size();
1217 for (
unsigned int i = 0;
i < sizeEta;
i++){
1221 h_ModNorm_Eta.push_back(
new TH1F (titleHistoEta.c_str(),titleHistoEta.c_str(),sizeEta - 1,xbinsEta));
1222 h_ModNorm_Phi.push_back(
new TH1F (titleHistoPhi.c_str(),titleHistoPhi.c_str(),sizePhi - 1,xbinsPhi));
1231 (*h_ModNorm_Eta[
p]).Write();
1232 (*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