53 "\n------------------------------------------"
54 "\nUnAvailable Service DQMStore: please insert in the configuration file an instance like" "\n\tprocess.load(\"DQMServices.Core.DQMStore_cfg\")" "\n------------------------------------------";
63 "\n------------------------------------------"
64 "\nUnAvailable Service TkHistoMap: please insert in the configuration file an instance like" "\n\tprocess.TkDetMap = cms.Service(\"TkDetMap\")" "\n------------------------------------------";
105 float phiWeight = 1.;
121 #ifdef THIS_IS_AN_EVENT_EXAMPLE
126 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
128 iSetup.
get < SetupRecord > ().
get (pSetup);
136 LogDebug (
"SiStripMonitorHLTMuon") <<
" processing conterEvt_: " <<
counterEvt_ << std::endl;
149 bool accessToL3Muons =
true;
151 reco::RecoChargedCandidateCollection::const_iterator cand;
155 bool accessToClusters =
true;
161 bool accessToTracks =
true;
163 reco::TrackCollection::const_iterator track;
169 for (clust = clusters->begin_record (); clust != clusters->end_record (); ++clust)
172 uint detID = clust->geographicalId ();
173 std::stringstream ss;
179 LocalPoint clustlp = topol->localPosition (clust->barycenter ());
183 float etaWeight = 1.;
184 float phiWeight = 1.;
189 LayerMEMap[label.c_str ()].EtaDistribAllClustersMap->Fill (clustgp.
eta (),etaWeight);
190 LayerMEMap[label.c_str ()].PhiDistribAllClustersMap->Fill (clustgp.
phi (),phiWeight);
191 LayerMEMap[label.c_str ()].EtaPhiAllClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
198 for (cand = l3mucands->begin (); cand != l3mucands->end (); ++cand)
207 for (track = trackCollection->begin (); track != trackCollection->end() ; ++ track)
223 uint detID = l3tk->
recHit (
hit)->geographicalId ()();
225 const SiStripRecHit1D *hit1D = dynamic_cast <
const SiStripRecHit1D * >(l3tk->
recHit (
hit).
get ());
226 const SiStripRecHit2D *hit2D = dynamic_cast <
const SiStripRecHit2D * >(l3tk->
recHit (
hit).
get ());
227 const SiStripMatchedRecHit2D *hitMatched2D = dynamic_cast <
const SiStripMatchedRecHit2D * >(l3tk->
recHit (
hit).
get ());
234 if (hit1D->cluster_regional ().isNonnull ())
236 if (hit1D->cluster_regional ().isAvailable ())
253 float etaWeight = 1.;
254 float phiWeight = 1.;
260 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
261 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
262 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
266 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
267 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
268 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
277 if (hit2D->cluster_regional ().isNonnull ())
279 if (hit2D->cluster_regional ().isAvailable ())
281 detID = hit2D->cluster_regional ()->geographicalId ();
297 float etaWeight = 1.;
298 float phiWeight = 1.;
304 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
305 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
306 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
310 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
311 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
312 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
319 if (hitMatched2D != 0)
322 detID = hitMatched2D->monoCluster().geographicalId ();
335 float etaWeight = 1.;
336 float phiWeight = 1.;
342 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
343 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
344 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
348 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
349 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
350 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
357 detID = hitMatched2D->stereoCluster().geographicalId ();
361 if (theGeomDet2 != 0)
370 float etaWeight = 1.;
371 float phiWeight = 1.;
377 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
378 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
379 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
383 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
384 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
385 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
396 if (hitProj2D->originalHit ().cluster_regional ().isNonnull ())
398 if (hitProj2D->originalHit ().cluster_regional ().isAvailable ())
400 detID = hitProj2D->originalHit ().cluster_regional ()->geographicalId ();
415 float etaWeight = 1.;
416 float phiWeight = 1.;
422 LayerMEMap[label.c_str ()].EtaDistribOnTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
423 LayerMEMap[label.c_str ()].PhiDistribOnTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
424 LayerMEMap[label.c_str ()].EtaPhiOnTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
428 LayerMEMap[label.c_str ()].EtaDistribL3MuTrackClustersMap->Fill (clustgp.
eta (),etaWeight);
429 LayerMEMap[label.c_str ()].PhiDistribL3MuTrackClustersMap->Fill (clustgp.
phi (),phiWeight);
430 LayerMEMap[label.c_str ()].EtaPhiL3MuTrackClustersMap->Fill (clustgp.
eta (), clustgp.
phi ());
446 std::vector <float *> tgraphEta;
447 std::vector <float *> tgraphPhi;
448 std::vector <int> tgraphSize;
450 std::vector <std::vector<float> > binningEta;
451 std::vector <std::vector<float> > binningPhi;
453 for (
int p = 0;
p < 34;
p++){
454 tgraphEta.push_back (
new float[1000]);
455 tgraphPhi.push_back (
new float[1000]);
459 std::map< std::string,std::vector<float> > m_BinEta_Prel ;
460 std::map< std::string,std::vector<float> > m_PhiStripMod_Eta;
461 std::map< std::string,std::vector<float> > m_PhiStripMod_Nb;
471 std::vector<DetId> Dets = theTracker.
detUnitIds();
492 std::stringstream ss;
494 uint32_t subdetlayer, side;
516 labelHisto_ID.erase(3);
519 unsigned int sizePhi = 0;
520 unsigned int sizeEta = 0;
521 float * xbinsPhi =
new float[100];
522 float * xbinsEta =
new float[100];
525 if (labelHisto_ID ==
"TEC" || labelHisto_ID ==
"TID" || labelHisto_ID ==
"TOB" || labelHisto_ID ==
"TIB"){
535 sizePhi =
m_BinPhi[labelHisto].size();
537 for (
unsigned int i = 0;
i < sizePhi;
i++){
542 std::vector <float > v_BinEta_Prel;
544 for (
unsigned int i = 0;
i < 12;
i++){
546 if (m_PhiStripMod_Nb[labelHisto][
i] != 0 && fabs(m_PhiStripMod_Eta[labelHisto][
i]) > 0.05){
547 float EtaBarycenter = m_PhiStripMod_Eta[labelHisto][
i]/m_PhiStripMod_Nb[labelHisto][
i];
548 v_BinEta_Prel.push_back(EtaBarycenter);
553 sort(v_BinEta_Prel.begin(),v_BinEta_Prel.end());
556 for (
unsigned int i = 0;
i < v_BinEta_Prel.size();
i++){
557 if (
i == 0)
m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] - 0.15);
559 float shift = v_BinEta_Prel[
i] - v_BinEta_Prel[
i-1];
560 m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] - shift/2.);
562 if (
i == v_BinEta_Prel.size()-1)
m_BinEta[labelHisto].push_back(v_BinEta_Prel[
i] + 0.15);
568 sizeEta =
m_BinEta[labelHisto].size();
570 for (
unsigned int i = 0;
i < sizeEta;
i++){
578 histoname =
"EtaAllClustersDistrib_" + labelHisto;
579 title =
"#eta(All Clusters) in " + labelHisto;
581 histoname =
"PhiAllClustersDistrib_" + labelHisto;
582 title =
"#phi(All Clusters) in " + labelHisto;
584 histoname =
"EtaPhiAllClustersMap_" + labelHisto;
585 title =
"#eta-#phi All Clusters map in " + labelHisto;
590 histoname =
"EtaOnTrackClustersDistrib_" + labelHisto;
591 title =
"#eta(OnTrack Clusters) in " + labelHisto;
593 histoname =
"PhiOnTrackClustersDistrib_" + labelHisto;
594 title =
"#phi(OnTrack Clusters) in " + labelHisto;
596 histoname =
"EtaPhiOnTrackClustersMap_" + labelHisto;
597 title =
"#eta-#phi OnTrack Clusters map in " + labelHisto;
602 histoname =
"EtaL3MuTrackClustersDistrib_" + labelHisto;
603 title =
"#eta(L3MuTrack Clusters) in " + labelHisto;
605 histoname =
"PhiL3MuTrackClustersDistrib_" + labelHisto;
606 title =
"#phi(L3MuTrack Clusters) in " + labelHisto;
608 histoname =
"EtaPhiL3MuTrackClustersMap_" + labelHisto;
609 title =
"#eta-#phi L3MuTrack Clusters map in " + labelHisto;
616 LayerMEMap[labelHisto].EtaDistribAllClustersMap->getTH1F()->Sumw2();
617 LayerMEMap[labelHisto].PhiDistribAllClustersMap->getTH1F()->Sumw2();
618 LayerMEMap[labelHisto].EtaPhiAllClustersMap->getTH2F()->Sumw2();
621 LayerMEMap[labelHisto].EtaDistribOnTrackClustersMap->getTH1F()->Sumw2();
622 LayerMEMap[labelHisto].PhiDistribOnTrackClustersMap->getTH1F()->Sumw2();
623 LayerMEMap[labelHisto].EtaPhiOnTrackClustersMap->getTH2F()->Sumw2();
626 LayerMEMap[labelHisto].EtaDistribL3MuTrackClustersMap->getTH1F()->Sumw2();
627 LayerMEMap[labelHisto].PhiDistribL3MuTrackClustersMap->getTH1F()->Sumw2();
628 LayerMEMap[labelHisto].EtaPhiL3MuTrackClustersMap->getTH2F()->Sumw2();
650 std::vector<std::string> v_LabelHisto;
654 for(std::vector<DetId>::iterator detid_iterator = Dets.begin(); detid_iterator!=Dets.end(); ++detid_iterator){
655 uint32_t
detid = (*detid_iterator)();
657 if ( (*detid_iterator).null() ==
true)
break;
658 if (detid == 0)
break;
678 LocalPoint clustlp = topol->localPosition (1.);
690 unsigned int count = 0;
691 while (count < v_LabelHisto.size()){
692 if (mylabelHisto == v_LabelHisto[count])
break;
695 if (count == v_LabelHisto.size()){
698 v_LabelHisto.push_back(mylabelHisto);
703 for (
int i = 0;
i < 12;
i++){
704 m_PhiStripMod_Eta[mylabelHisto].push_back(0.);
705 m_PhiStripMod_Nb[mylabelHisto].push_back(0.);
716 if (tTopo->
tecRing(detid) == 7){
726 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] + clustgp.
eta();
727 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tecRing(detid)-1]++;
739 if (tTopo->
tecRing(detid) == 1){
749 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tecRing(detid)-1] + clustgp.
eta();
750 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tecRing(detid)-1]++;
772 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)-1] + clustgp.
eta();
773 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tobModule(detid)-1]++;
776 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)+5] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tobModule(detid)+5] + clustgp.
eta();
777 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tobModule(detid)+5]++;
802 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)-1] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)-1] + clustgp.
eta();
803 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)-1]++;
806 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+2] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+2] + clustgp.
eta();
807 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+2]++;
812 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+5] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+5] + clustgp.
eta();
813 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+5]++;
816 m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+8] = m_PhiStripMod_Eta[mylabelHisto][tTopo->
tibModule(detid)+8] + clustgp.
eta();
817 m_PhiStripMod_Nb[mylabelHisto][tTopo->
tibModule(detid)+8]++;
835 std::vector<std::string> v_LabelHisto;
839 for(std::vector<DetId>::iterator detid_iterator = Dets.begin(); detid_iterator!=Dets.end(); detid_iterator++){
840 uint32_t
detid = (*detid_iterator)();
842 if ( (*detid_iterator).null() ==
true)
break;
843 if (detid == 0)
break;
871 unsigned int count = 0;
873 while (count < v_LabelHisto.size()){
874 if (mylabelHisto == v_LabelHisto[count])
break;
878 if (count == v_LabelHisto.size()){
880 v_LabelHisto.push_back(mylabelHisto);
884 for (
unsigned int i = 0;
i <
m_BinEta[mylabelHisto].size() -1;
i++){
889 for (
unsigned int i = 0;
i <
m_BinPhi[mylabelHisto].size() -1;
i++){
908 const Bounds& bound = GeomDetSurface.bounds();
911 labelHisto_ID.erase(3);
916 std::vector <GlobalPoint> v_Edge_G;
922 if (labelHisto_ID ==
"TOB" || labelHisto_ID ==
"TIB"){
924 length = rectangularBound->length();
925 width = rectangularBound->width();
926 ratio = width/length;
937 if (labelHisto_ID ==
"TEC" || labelHisto_ID ==
"TID"){
940 length = trapezoidalBound->
length();
943 ratio = width/length;
963 std::vector <bool> v_Fill;
964 v_Fill.push_back(
false);
965 v_Fill.push_back(
false);
966 v_Fill.push_back(
false);
967 v_Fill.push_back(
false);
969 for (
unsigned int i =0 ;
i< v_Edge_G.size() ;
i++){
970 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
971 if (v_Edge_G[
i].
phi() < clustgp.
phi()) {
972 bot_left_G = v_Edge_G[
i];
975 if (v_Edge_G[
i].
phi() > clustgp.
phi()){
976 top_left_G = v_Edge_G[
i];
980 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
981 if (v_Edge_G[
i].
phi() < clustgp.
phi()){
982 bot_rightG = v_Edge_G[
i];
985 if (v_Edge_G[
i].
phi() > clustgp.
phi()){
986 top_rightG = v_Edge_G[
i];
997 bool flag_border =
false;
999 if (v_Fill[0] ==
true
1000 && v_Fill[1] ==
true
1001 && v_Fill[2] ==
true
1002 && v_Fill[3] ==
true){
1005 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()) );
1008 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()) );
1017 for (
unsigned int i =0 ;
i< v_Edge_G.size() ;
i++){
1019 if (v_Edge_G[
i].
phi() > 0. ){
1020 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
1021 bot_left_G = v_Edge_G[
i];
1023 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
1024 bot_rightG = v_Edge_G[
i];
1027 if (v_Edge_G[
i].
phi() < 0. ){
1028 if (v_Edge_G[
i].
eta() < clustgp.
eta()){
1029 top_left_G = v_Edge_G[
i];
1031 if (v_Edge_G[
i].
eta() > clustgp.
eta()){
1032 top_rightG = v_Edge_G[
i];
1038 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()) );
1039 G_width = G_length*ratio;
1045 for (
unsigned int i = 0;
i <
m_BinEta[mylabelHisto].size() - 1;
i++){
1055 unsigned int LastBinPhi =
m_BinPhi[mylabelHisto].size() - 2;
1056 for (
unsigned int i = 0;
i <
m_BinPhi[mylabelHisto].size() - 1;
i++){
1064 bool offlimit_prev =
false;
1065 bool offlimit_foll =
false;
1067 if (phiMin <
m_BinPhi[mylabelHisto][
i]) offlimit_prev =
true;
1068 if (i != LastBinPhi){
1069 if (phiMax >
m_BinPhi[mylabelHisto][i+1]) offlimit_foll =
true;
1073 float MidPoint_X_prev;
1074 float MidPoint_Y_prev;
1075 float MidPoint_Z_prev;
1076 float MidPoint_X_foll;
1077 float MidPoint_Y_foll;
1078 float MidPoint_Z_foll;
1084 float tStar1 = (
m_BinPhi[mylabelHisto][
i]-bot_left_G.
phi())/(top_left_G.
phi()-bot_left_G.
phi());
1087 float tStar2 = (
m_BinPhi[mylabelHisto][
i]-bot_rightG.
phi())/(top_rightG.
phi()-bot_rightG.
phi());
1089 if (tStar1 < 0.) tStar1 = 0.;
1090 if (tStar2 < 0.) tStar2 = 0.;
1093 float xStar1 = bot_left_G.
x() + (tStar1*1.)*(top_left_G.
x()-bot_left_G.
x());
1094 float xStar2 = bot_rightG.
x() + (tStar2*1.)*(top_rightG.
x()-bot_rightG.
x());
1096 float yStar1 = bot_left_G.
y() + (tStar1*1.)*(top_left_G.
y()-bot_left_G.
y());
1097 float yStar2 = bot_rightG.
y() + (tStar2*1.)*(top_rightG.
y()-bot_rightG.
y());
1099 float zStar1 = bot_left_G.
z() + (tStar1*1.)*(top_left_G.
z()-bot_left_G.
z());
1100 float zStar2 = bot_rightG.
z() + (tStar2*1.)*(top_rightG.
z()-bot_rightG.
z());
1103 MidPoint_X_prev = (xStar1 + xStar2)/2.;
1104 MidPoint_Y_prev = (yStar1 + yStar2)/2.;
1105 MidPoint_Z_prev = (zStar1 + zStar2)/2.;
1108 if (offlimit_prev ==
false){
1109 MidPoint_X_prev = (bot_left_G.
x() + bot_rightG.
x())/2.;
1110 MidPoint_Y_prev = (bot_left_G.
y() + bot_rightG.
y())/2.;
1111 MidPoint_Z_prev = (bot_left_G.
z() + bot_rightG.
z())/2.;
1118 float tStar1 = (
m_BinPhi[mylabelHisto][i+1]-bot_left_G.
phi())/(top_left_G.
phi()-bot_left_G.
phi());
1121 float tStar2 = (
m_BinPhi[mylabelHisto][i+1]-bot_rightG.
phi())/(top_rightG.
phi()-bot_rightG.
phi());
1123 if (tStar1 > 1.) tStar1 = 1.;
1124 if (tStar2 > 1.) tStar2 = 1.;
1127 float xStar1 = bot_left_G.
x() + (tStar1*1.)*(top_left_G.
x()-bot_left_G.
x());
1128 float xStar2 = bot_rightG.
x() + (tStar2*1.)*(top_rightG.
x()-bot_rightG.
x());
1130 float yStar1 = bot_left_G.
y() + (tStar1*1.)*(top_left_G.
y()-bot_left_G.
y());
1131 float yStar2 = bot_rightG.
y() + (tStar2*1.)*(top_rightG.
y()-bot_rightG.
y());
1133 float zStar1 = bot_left_G.
z() + (tStar1*1.)*(top_left_G.
z()-bot_left_G.
z());
1134 float zStar2 = bot_rightG.
z() + (tStar2*1.)*(top_rightG.
z()-bot_rightG.
z());
1137 MidPoint_X_foll = (xStar1 + xStar2)/2.;
1138 MidPoint_Y_foll = (yStar1 + yStar2)/2.;
1139 MidPoint_Z_foll = (zStar1 + zStar2)/2.;
1142 if (offlimit_foll ==
false){
1143 MidPoint_X_foll = (top_left_G.
x() + top_rightG.
x())/2.;
1144 MidPoint_Y_foll = (top_left_G.
y() + top_rightG.
y())/2.;
1145 MidPoint_Z_foll = (top_left_G.
z() + top_rightG.
z())/2.;
1149 float EdgePoint_X_B = (bot_left_G.
x() + bot_rightG.
x())/2.;
1150 float EdgePoint_Y_B = (bot_left_G.
y() + bot_rightG.
y())/2.;
1151 float EdgePoint_Z_B = (bot_left_G.
z() + bot_rightG.
z())/2.;
1153 float EdgePoint_X_T = (top_left_G.
x() + top_rightG.
x())/2.;
1154 float EdgePoint_Y_T = (top_left_G.
y() + top_rightG.
y())/2.;
1155 float EdgePoint_Z_T = (top_left_G.
z() + top_rightG.
z())/2.;
1157 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) );
1163 if (i != 0 && i != LastBinPhi){
1168 if (i == 0 || i == LastBinPhi){
1169 float PhiBalance = 0.;
1170 if (clustgp.
phi() > 0.) PhiBalance = clustgp.
phi() -
M_PI ;
1171 if (clustgp.
phi() < 0.) PhiBalance = clustgp.
phi() +
M_PI ;
1176 float weight_FirstBin = (1.+ (PhiBalance/(Phi_Width/2.)))/2. ;
1177 float weight_LastBin = fabs(1. - weight_FirstBin);
1180 m_ModNormPhi[mylabelHisto][LastBinPhi] = m_ModNormPhi[mylabelHisto][LastBinPhi] + weight_LastBin*(factor*G_length*G_width);
1184 if (flag_border ==
false){
1187 if (offlimit_prev ==
false && offlimit_foll ==
false){
1192 if ((offlimit_prev ==
true && offlimit_foll ==
false)
1193 ||(offlimit_prev ==
false && offlimit_foll ==
true) ){
1194 float G_width_Out = fabs(G_width - G_width_Ins);
1200 if (offlimit_prev && i != 0)
m_ModNormPhi[mylabelHisto][i-1] =
m_ModNormPhi[mylabelHisto][i-1] + factor*G_width_Out*G_length;
1201 if (offlimit_foll && i != LastBinPhi)
m_ModNormPhi[mylabelHisto][i+1] =
m_ModNormPhi[mylabelHisto][i+1] + factor*G_width_Out*G_length;
1205 if (offlimit_prev ==
true && offlimit_foll ==
true){
1208 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) );
1209 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) );
1212 if (i != 0 && i != LastBinPhi){
1218 if (i != LastBinPhi)
m_ModNormPhi[mylabelHisto][i+1] =
m_ModNormPhi[mylabelHisto][i+1] + factor*G_width_T*G_length;
1232 TFile
output(
"MuonHLTDQMNormalization.root",
"recreate");
1245 std::vector <TH1F *> h_ModNorm_Eta;
1246 std::vector <TH1F *> h_ModNorm_Phi;
1248 for (
unsigned int p = 0;
p < v_LabelHisto.size();
p++){
1255 float * xbinsPhi =
new float[100];
1256 float * xbinsEta =
new float[100];
1259 unsigned int sizePhi =
m_BinPhi[labelHisto].size();
1260 for (
unsigned int i = 0;
i < sizePhi;
i++){
1264 unsigned int sizeEta =
m_BinEta[labelHisto].size();
1265 for (
unsigned int i = 0;
i < sizeEta;
i++){
1269 h_ModNorm_Eta.push_back(
new TH1F (titleHistoEta.c_str(),titleHistoEta.c_str(),sizeEta - 1,xbinsEta));
1270 h_ModNorm_Phi.push_back(
new TH1F (titleHistoPhi.c_str(),titleHistoPhi.c_str(),sizePhi - 1,xbinsPhi));
1279 (*h_ModNorm_Eta[
p]).Write();
1280 (*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
void GeometryFromTrackGeom(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)
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_
#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)
void PrintNormalization(std::vector< std::string > v_LabelHisto)
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
const Plane & surface() const
The nominal surface of the GeomDet.
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)
void Normalizer(std::vector< DetId > Dets, const TrackerGeometry &theTracker)
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) 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
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)
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_
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