56 "\n------------------------------------------"
57 "\nUnAvailable Service DQMStore: please insert in the configuration file an instance like" "\n\tprocess.load(\"DQMServices.Core.DQMStore_cfg\")" "\n------------------------------------------";
66 "\n------------------------------------------"
67 "\nUnAvailable Service TkHistoMap: please insert in the configuration file an instance like" "\n\tprocess.TkDetMap = cms.Service(\"TkDetMap\")" "\n------------------------------------------";
108 float phiWeight = 1.;
127 LogDebug (
"SiStripMonitorHLTMuon") <<
" processing conterEvt_: " <<
counterEvt_ << std::endl;
140 bool accessToL3Muons =
true;
143 reco::RecoChargedCandidateCollection::const_iterator cand;
147 bool accessToClusters =
true;
154 bool accessToTracks =
true;
157 reco::TrackCollection::const_iterator track;
163 for (clust = clusters->begin_record (); clust != clusters->end_record (); ++clust)
166 uint detID = clust->geographicalId ();
167 std::stringstream ss;
173 LocalPoint clustlp = topol->localPosition (clust->barycenter ());
177 float etaWeight = 1.;
178 float phiWeight = 1.;
183 LayerMEMap[label.c_str ()].EtaDistribAllClustersMap->Fill (clustgp.
eta (),etaWeight);
184 LayerMEMap[label.c_str ()].PhiDistribAllClustersMap->Fill (clustgp.
phi (),phiWeight);
185 LayerMEMap[label.c_str ()].EtaPhiAllClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
192 for (cand = l3mucands->begin (); cand != l3mucands->end (); ++cand)
201 for (track = trackCollection->begin (); track != trackCollection->end() ; ++ track)
217 uint detID = l3tk->
recHit (
hit)->geographicalId ()();
219 const SiStripRecHit1D *hit1D = dynamic_cast <
const SiStripRecHit1D * >(l3tk->
recHit (
hit).
get ());
220 const SiStripRecHit2D *hit2D = dynamic_cast <
const SiStripRecHit2D * >(l3tk->
recHit (
hit).
get ());
221 const SiStripMatchedRecHit2D *hitMatched2D = dynamic_cast <
const SiStripMatchedRecHit2D * >(l3tk->
recHit (
hit).
get ());
228 if (hit1D->cluster_regional ().isNonnull ())
230 if (hit1D->cluster_regional ().isAvailable ())
247 float etaWeight = 1.;
248 float phiWeight = 1.;
254 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
255 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
256 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
260 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
261 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
262 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
271 if (hit2D->cluster_regional ().isNonnull ())
273 if (hit2D->cluster_regional ().isAvailable ())
275 detID = hit2D->cluster_regional ()->geographicalId ();
291 float etaWeight = 1.;
292 float phiWeight = 1.;
298 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
299 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
300 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
304 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
305 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
306 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
313 if (hitMatched2D != 0)
316 detID = hitMatched2D->monoCluster().geographicalId ();
329 float etaWeight = 1.;
330 float phiWeight = 1.;
336 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
337 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
338 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
342 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
343 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
344 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
351 detID = hitMatched2D->stereoCluster().geographicalId ();
355 if (theGeomDet2 != 0)
364 float etaWeight = 1.;
365 float phiWeight = 1.;
371 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
372 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
373 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
377 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
378 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
379 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
390 if (hitProj2D->originalHit ().cluster_regional ().isNonnull ())
392 if (hitProj2D->originalHit ().cluster_regional ().isAvailable ())
394 detID = hitProj2D->originalHit ().cluster_regional ()->geographicalId ();
409 float etaWeight = 1.;
410 float phiWeight = 1.;
416 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
417 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
418 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
422 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
423 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
424 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
440 std::vector <float *> tgraphEta;
441 std::vector <float *> tgraphPhi;
442 std::vector <int> tgraphSize;
444 std::vector <std::vector<float> > binningEta;
445 std::vector <std::vector<float> > binningPhi;
447 for (
int p = 0;
p < 34;
p++){
448 tgraphEta.push_back (
new float[1000]);
449 tgraphPhi.push_back (
new float[1000]);
453 std::map< std::string,std::vector<float> > m_BinEta_Prel ;
454 std::map< std::string,std::vector<float> > m_PhiStripMod_Eta;
455 std::map< std::string,std::vector<float> > m_PhiStripMod_Nb;
465 std::vector<DetId> Dets = theTracker.
detUnitIds();
486 std::stringstream ss;
488 uint32_t subdetlayer, side;
510 labelHisto_ID.erase(3);
513 unsigned int sizePhi = 0;
514 unsigned int sizeEta = 0;
515 float * xbinsPhi =
new float[100];
516 float * xbinsEta =
new float[100];
519 if (labelHisto_ID ==
"TEC" || labelHisto_ID ==
"TID" || labelHisto_ID ==
"TOB" || labelHisto_ID ==
"TIB"){
529 sizePhi =
m_BinPhi[labelHisto].size();
531 for (
unsigned int i = 0;
i < sizePhi;
i++){
536 std::vector <float > v_BinEta_Prel;
538 for (
unsigned int i = 0;
i < 12;
i++){
540 if (m_PhiStripMod_Nb[labelHisto][
i] != 0 && fabs(m_PhiStripMod_Eta[labelHisto][
i]) > 0.05){
541 float EtaBarycenter = m_PhiStripMod_Eta[labelHisto][
i]/m_PhiStripMod_Nb[labelHisto][
i];
542 v_BinEta_Prel.push_back(EtaBarycenter);
547 sort(v_BinEta_Prel.begin(),v_BinEta_Prel.end());
550 for (
unsigned int i = 0;
i < v_BinEta_Prel.size();
i++){
551 if (
i == 0)
m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] - 0.15);
553 float shift = v_BinEta_Prel[
i] - v_BinEta_Prel[
i-1];
554 m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] - shift/2.);
556 if (
i == v_BinEta_Prel.size()-1)
m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] + 0.15);
562 sizeEta =
m_BinEta[labelHisto].size();
564 for (
unsigned int i = 0;
i < sizeEta;
i++){
572 histoname =
"EtaAllClustersDistrib_" + labelHisto;
573 title =
"#eta(All Clusters) in " + labelHisto;
575 histoname =
"PhiAllClustersDistrib_" + labelHisto;
576 title =
"#phi(All Clusters) in " + labelHisto;
578 histoname =
"EtaPhiAllClustersMap_" + labelHisto;
579 title =
"#eta-#phi All Clusters map in " + labelHisto;
584 histoname =
"EtaOnTrackClustersDistrib_" + labelHisto;
585 title =
"#eta(OnTrack Clusters) in " + labelHisto;
587 histoname =
"PhiOnTrackClustersDistrib_" + labelHisto;
588 title =
"#phi(OnTrack Clusters) in " + labelHisto;
590 histoname =
"EtaPhiOnTrackClustersMap_" + labelHisto;
591 title =
"#eta-#phi OnTrack Clusters map in " + labelHisto;
596 histoname =
"EtaL3MuTrackClustersDistrib_" + labelHisto;
597 title =
"#eta(L3MuTrack Clusters) in " + labelHisto;
599 histoname =
"PhiL3MuTrackClustersDistrib_" + labelHisto;
600 title =
"#phi(L3MuTrack Clusters) in " + labelHisto;
602 histoname =
"EtaPhiL3MuTrackClustersMap_" + labelHisto;
603 title =
"#eta-#phi L3MuTrack Clusters map in " + labelHisto;
610 LayerMEMap[labelHisto].EtaDistribAllClustersMap->getTH1F()->Sumw2();
611 LayerMEMap[labelHisto].PhiDistribAllClustersMap->getTH1F()->Sumw2();
612 LayerMEMap[labelHisto].EtaPhiAllClustersMap->getTH2F()->Sumw2();
615 LayerMEMap[labelHisto].EtaDistribOnTrackClustersMap->getTH1F()->Sumw2();
616 LayerMEMap[labelHisto].PhiDistribOnTrackClustersMap->getTH1F()->Sumw2();
617 LayerMEMap[labelHisto].EtaPhiOnTrackClustersMap->getTH2F()->Sumw2();
620 LayerMEMap[labelHisto].EtaDistribL3MuTrackClustersMap->getTH1F()->Sumw2();
621 LayerMEMap[labelHisto].PhiDistribL3MuTrackClustersMap->getTH1F()->Sumw2();
622 LayerMEMap[labelHisto].EtaPhiL3MuTrackClustersMap->getTH2F()->Sumw2();
644 std::vector<std::string> v_LabelHisto;
648 for(std::vector<DetId>::const_iterator detid_iterator = Dets.begin(); detid_iterator!=Dets.end(); ++detid_iterator){
649 uint32_t
detid = (*detid_iterator)();
651 if ( (*detid_iterator).null() ==
true)
break;
652 if (detid == 0)
break;
672 LocalPoint clustlp = topol->localPosition (1.);
684 unsigned int count = 0;
685 while (count < v_LabelHisto.size()){
686 if (mylabelHisto == v_LabelHisto[count])
break;
689 if (count == v_LabelHisto.size()){
692 v_LabelHisto.push_back(mylabelHisto);
697 for (
int i = 0;
i < 12;
i++){
698 m_PhiStripMod_Eta[mylabelHisto].push_back(0.);
699 m_PhiStripMod_Nb[mylabelHisto].push_back(0.);
710 if (tTopo->
tecRing(detid) == 7){
720 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] + clustgp.
eta();
721 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tecRing(detid)-1]++;
733 if (tTopo->
tecRing(detid) == 1){
743 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] + clustgp.
eta();
744 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tecRing(detid)-1]++;
766 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)-1] + clustgp.
eta();
767 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tobModule(detid)-1]++;
770 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)+5] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)+5] + clustgp.
eta();
771 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tobModule(detid)+5]++;
796 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)-1] + clustgp.
eta();
797 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)-1]++;
800 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+2] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+2] + clustgp.
eta();
801 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+2]++;
806 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+5] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+5] + clustgp.
eta();
807 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+5]++;
810 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+8] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+8] + clustgp.
eta();
811 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+8]++;
829 std::vector<std::string> v_LabelHisto;
833 for(std::vector<DetId>::const_iterator detid_iterator = Dets.begin(); detid_iterator!=Dets.end(); detid_iterator++){
834 uint32_t
detid = (*detid_iterator)();
836 if ( (*detid_iterator).null() ==
true)
break;
837 if (detid == 0)
break;
865 unsigned int count = 0;
867 while (count < v_LabelHisto.size()){
868 if (mylabelHisto == v_LabelHisto[count])
break;
872 if (count == v_LabelHisto.size()){
874 v_LabelHisto.push_back(mylabelHisto);
878 for (
unsigned int i = 0;
i <
m_BinEta[mylabelHisto].size() -1;
i++){
883 for (
unsigned int i = 0;
i <
m_BinPhi[mylabelHisto].size() -1;
i++){
902 const Bounds& bound = GeomDetSurface.bounds();
905 labelHisto_ID.erase(3);
910 std::vector <GlobalPoint> v_Edge_G;
916 if (labelHisto_ID ==
"TOB" || labelHisto_ID ==
"TIB"){
918 length = rectangularBound->length();
919 width = rectangularBound->width();
920 ratio = width/length;
931 if (labelHisto_ID ==
"TEC" || labelHisto_ID ==
"TID"){
934 length = trapezoidalBound->
length();
937 ratio = width/length;
957 std::vector <bool> v_Fill;
958 v_Fill.push_back(
false);
959 v_Fill.push_back(
false);
960 v_Fill.push_back(
false);
961 v_Fill.push_back(
false);
963 for (
unsigned int i =0 ;
i< v_Edge_G.size() ;
i++){
964 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
965 if (v_Edge_G[
i].
phi() < clustgp.
phi()) {
966 bot_left_G = v_Edge_G[
i];
969 if (v_Edge_G[
i].
phi() > clustgp.
phi()){
970 top_left_G = v_Edge_G[
i];
974 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
975 if (v_Edge_G[
i].
phi() < clustgp.
phi()){
976 bot_rightG = v_Edge_G[
i];
979 if (v_Edge_G[
i].
phi() > clustgp.
phi()){
980 top_rightG = v_Edge_G[
i];
991 bool flag_border =
false;
993 if (v_Fill[0] ==
true
996 && v_Fill[3] ==
true){
999 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()) );
1002 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()) );
1011 for (
unsigned int i =0 ;
i< v_Edge_G.size() ;
i++){
1013 if (v_Edge_G[
i].
phi() > 0. ){
1014 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
1015 bot_left_G = v_Edge_G[
i];
1017 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
1018 bot_rightG = v_Edge_G[
i];
1021 if (v_Edge_G[
i].
phi() < 0. ){
1022 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
1023 top_left_G = v_Edge_G[
i];
1025 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
1026 top_rightG = v_Edge_G[
i];
1032 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()) );
1033 G_width = G_length*ratio;
1039 for (
unsigned int i = 0;
i <
m_BinEta[mylabelHisto].size() - 1;
i++){
1049 unsigned int LastBinPhi =
m_BinPhi[mylabelHisto].size() - 2;
1050 for (
unsigned int i = 0;
i <
m_BinPhi[mylabelHisto].size() - 1;
i++){
1058 bool offlimit_prev =
false;
1059 bool offlimit_foll =
false;
1061 if (phiMin <
m_BinPhi[mylabelHisto][
i]) offlimit_prev =
true;
1062 if (i != LastBinPhi){
1063 if (phiMax >
m_BinPhi[mylabelHisto][i+1]) offlimit_foll =
true;
1067 float MidPoint_X_prev;
1068 float MidPoint_Y_prev;
1069 float MidPoint_Z_prev;
1070 float MidPoint_X_foll;
1071 float MidPoint_Y_foll;
1072 float MidPoint_Z_foll;
1078 float tStar1 = (
m_BinPhi[mylabelHisto][
i]-bot_left_G.
phi())/(top_left_G.
phi()-bot_left_G.
phi());
1081 float tStar2 = (
m_BinPhi[mylabelHisto][
i]-bot_rightG.
phi())/(top_rightG.
phi()-bot_rightG.
phi());
1083 if (tStar1 < 0.) tStar1 = 0.;
1084 if (tStar2 < 0.) tStar2 = 0.;
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_prev = (xStar1 + xStar2)/2.;
1098 MidPoint_Y_prev = (yStar1 + yStar2)/2.;
1099 MidPoint_Z_prev = (zStar1 + zStar2)/2.;
1102 if (offlimit_prev ==
false){
1103 MidPoint_X_prev = (bot_left_G.
x() + bot_rightG.
x())/2.;
1104 MidPoint_Y_prev = (bot_left_G.
y() + bot_rightG.
y())/2.;
1105 MidPoint_Z_prev = (bot_left_G.
z() + bot_rightG.
z())/2.;
1112 float tStar1 = (
m_BinPhi[mylabelHisto][i+1]-bot_left_G.
phi())/(top_left_G.
phi()-bot_left_G.
phi());
1115 float tStar2 = (
m_BinPhi[mylabelHisto][i+1]-bot_rightG.
phi())/(top_rightG.
phi()-bot_rightG.
phi());
1117 if (tStar1 > 1.) tStar1 = 1.;
1118 if (tStar2 > 1.) tStar2 = 1.;
1121 float xStar1 = bot_left_G.
x() + (tStar1*1.)*(top_left_G.
x()-bot_left_G.
x());
1122 float xStar2 = bot_rightG.
x() + (tStar2*1.)*(top_rightG.
x()-bot_rightG.
x());
1124 float yStar1 = bot_left_G.
y() + (tStar1*1.)*(top_left_G.
y()-bot_left_G.
y());
1125 float yStar2 = bot_rightG.
y() + (tStar2*1.)*(top_rightG.
y()-bot_rightG.
y());
1127 float zStar1 = bot_left_G.
z() + (tStar1*1.)*(top_left_G.
z()-bot_left_G.
z());
1128 float zStar2 = bot_rightG.
z() + (tStar2*1.)*(top_rightG.
z()-bot_rightG.
z());
1131 MidPoint_X_foll = (xStar1 + xStar2)/2.;
1132 MidPoint_Y_foll = (yStar1 + yStar2)/2.;
1133 MidPoint_Z_foll = (zStar1 + zStar2)/2.;
1136 if (offlimit_foll ==
false){
1137 MidPoint_X_foll = (top_left_G.
x() + top_rightG.
x())/2.;
1138 MidPoint_Y_foll = (top_left_G.
y() + top_rightG.
y())/2.;
1139 MidPoint_Z_foll = (top_left_G.
z() + top_rightG.
z())/2.;
1143 float EdgePoint_X_B = (bot_left_G.
x() + bot_rightG.
x())/2.;
1144 float EdgePoint_Y_B = (bot_left_G.
y() + bot_rightG.
y())/2.;
1145 float EdgePoint_Z_B = (bot_left_G.
z() + bot_rightG.
z())/2.;
1147 float EdgePoint_X_T = (top_left_G.
x() + top_rightG.
x())/2.;
1148 float EdgePoint_Y_T = (top_left_G.
y() + top_rightG.
y())/2.;
1149 float EdgePoint_Z_T = (top_left_G.
z() + top_rightG.
z())/2.;
1151 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) );
1157 if (i != 0 && i != LastBinPhi){
1162 if (i == 0 || i == LastBinPhi){
1163 float PhiBalance = 0.;
1164 if (clustgp.
phi() > 0.) PhiBalance = clustgp.
phi() -
M_PI ;
1165 if (clustgp.
phi() < 0.) PhiBalance = clustgp.
phi() +
M_PI ;
1170 float weight_FirstBin = (1.+ (PhiBalance/(Phi_Width/2.)))/2. ;
1171 float weight_LastBin = fabs(1. - weight_FirstBin);
1174 m_ModNormPhi[mylabelHisto][LastBinPhi] = m_ModNormPhi[mylabelHisto][LastBinPhi] + weight_LastBin*(factor*G_length*G_width);
1178 if (flag_border ==
false){
1181 if (offlimit_prev ==
false && offlimit_foll ==
false){
1186 if ((offlimit_prev ==
true && offlimit_foll ==
false)
1187 ||(offlimit_prev ==
false && offlimit_foll ==
true) ){
1188 float G_width_Out = fabs(G_width - G_width_Ins);
1194 if (offlimit_prev && i != 0)
m_ModNormPhi[mylabelHisto][i-1] =
m_ModNormPhi[mylabelHisto][i-1] + factor*G_width_Out*G_length;
1195 if (offlimit_foll && i != LastBinPhi)
m_ModNormPhi[mylabelHisto][i+1] =
m_ModNormPhi[mylabelHisto][i+1] + factor*G_width_Out*G_length;
1199 if (offlimit_prev ==
true && offlimit_foll ==
true){
1202 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) );
1203 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) );
1206 if (i != 0 && i != LastBinPhi){
1212 if (i != LastBinPhi)
m_ModNormPhi[mylabelHisto][i+1] =
m_ModNormPhi[mylabelHisto][i+1] + factor*G_width_T*G_length;
1226 TFile
output(
"MuonHLTDQMNormalization.root",
"recreate");
1239 std::vector <TH1F *> h_ModNorm_Eta;
1240 std::vector <TH1F *> h_ModNorm_Phi;
1242 for (
unsigned int p = 0;
p < v_LabelHisto.size();
p++){
1249 float * xbinsPhi =
new float[100];
1250 float * xbinsEta =
new float[100];
1253 unsigned int sizePhi =
m_BinPhi[labelHisto].size();
1254 for (
unsigned int i = 0;
i < sizePhi;
i++){
1258 unsigned int sizeEta =
m_BinEta[labelHisto].size();
1259 for (
unsigned int i = 0;
i < sizeEta;
i++){
1263 h_ModNorm_Eta.push_back(
new TH1F (titleHistoEta.c_str(),titleHistoEta.c_str(),sizeEta - 1,xbinsEta));
1264 h_ModNorm_Phi.push_back(
new TH1F (titleHistoPhi.c_str(),titleHistoPhi.c_str(),sizePhi - 1,xbinsPhi));
1273 (*h_ModNorm_Eta[
p]).Write();
1274 (*h_ModNorm_Phi[
p]).Write();
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_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
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)
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
const T & max(const T &a, const T &b)
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)
SiStripMonitorMuonHLT(const edm::ParameterSet &ps)
void createMEs(const edm::EventSetup &es)
MonitorElement * EtaPhiOnTrackClustersMap
void setVerbose(unsigned level)
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)
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
int16_t FindLayer(uint32_t &detid)
void PrintNormalization(const std::vector< std::string > &v_LabelHisto)
virtual void beginRun(const edm::Run &run, const edm::EventSetup &es)
void getSubDetLayerSide(int &in, SiStripDetId::SubDetector &, uint32_t &layer, uint32_t &side)
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_
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.
std::string getLayerName(int &in)
TkHistoMap * tkmapL3MuTrackClusters
static unsigned int const shift
MonitorElement * PhiDistribOnTrackClustersMap
virtual LocalPoint localPosition(float strip) const =0
unsigned int tecPetalNumber(const DetId &id) const
virtual SubDetector subDetector() const
Which subdetector.
virtual float length() const
DetId geographicalId() const
std::map< std::string, std::vector< float > > m_ModNormEta
unsigned int tobRod(const DetId &id) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
T const * get() const
Returns C++ pointer to the item.
bool tibIsInternalString(const DetId &id) const
void add(uint32_t &detid, float value)
void setCurrentFolder(const std::string &fullpath)
edm::ParameterSet parameters_
MonitorElement * PhiDistribL3MuTrackClustersMap