48 #include "TPaveLabel.h" 49 #include "TPostScript.h" 67 "ME1/1",
"ME1/2",
"ME1/3",
"ME1/A",
"ME2/1",
"ME2/2",
68 "ME3/1",
"ME3/2",
"ME4/1",
"ME4/2"};
70 "ME+1/1",
"ME+1/2",
"ME+1/3",
"ME+1/A",
"ME+2/1",
"ME+2/2",
71 "ME+3/1",
"ME+3/2",
"ME+4/1",
"ME+4/2"};
73 "ME-1/1",
"ME-1/2",
"ME-1/3",
"ME-1/A",
"ME-2/1",
"ME-2/2",
74 "ME-3/1",
"ME-3/2",
"ME-4/1",
"ME-4/2"};
76 36, 36, 36, 36, 18, 36, 18, 36, 18, 36};
78 48, 64, 32, 48, 112, 64, 96, 64, 96, 64};
80 128, 160, 128, 96, 160, 160, 160, 160, 160, 160};
82 -999, -5, 4, -4, 3, -3, 2, -2, 1, -1, 0};
107 {0, 95},{0, 95},{0, 95},{0, 95},{0, 95},
108 {0, 95},{0, 95},{0, 95},{0, 95},{0, 95},
109 {0, 95},{0, 95},{0, 77},{0, 61},{0, 39},
110 {0, 22},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
111 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
112 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
113 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
114 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
115 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
116 {-1,-1},{-1,-1},{-1,-1} };
119 {0, 31},{0, 31},{0, 31},{0, 31},{0, 31},
120 {0, 31},{0, 31},{0, 31},{0, 31},{0, 31},
121 {0, 31},{0, 31},{0, 31},{0, 31},{0, 31},
122 {0, 22},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
123 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
124 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
125 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
126 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
127 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
128 {-1,-1},{-1,-1},{-1,-1} };
134 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
135 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
136 {100, 127},{73, 127},{47, 127},{22, 127},{0, 127},
137 {0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
138 {0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
139 {0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
140 {0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
141 {0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
142 {0, 127},{0, 127},{0, 127},{0, 127},{0, 105},
143 {0, 93},{0, 78},{0, 63} };
148 t_EventNumberAnalyzed = -1;
152 t_nStubs_readout = 0;
164 t = fs->
make<TTree>(name.c_str(), name.c_str());
166 t->Branch(
"t_EventNumberAnalyzed",&t_EventNumberAnalyzed,
"t_EventNumberAnalyzed/I");
167 t->Branch(
"t_RUN",&t_RUN,
"t_RUN/I");
168 t->Branch(
"t_Event",&t_Event,
"t_Event/I");
169 t->Branch(
"t_nStubs",&t_nStubs,
"t_nStubs/I");
170 t->Branch(
"t_nStubs_readout",&t_nStubs_readout,
"t_nStubs_readout/I");
171 t->Branch(
"t_nStubs_ME119",&t_nStubs_ME119,
"t_nStubs_ME119/I");
172 t->Branch(
"t_nStubs_ME11no911",&t_nStubs_ME11no911,
"t_nStubs_ME11no911/I");
173 t->Branch(
"t_nStubs_noMEpm11",&t_nStubs_noMEpm11,
"t_nStubs_noMEpm11/I");
175 t->Branch(
"t_chamber", &t_chamber,
"t_chamber/I");
176 t->Branch(
"t_ring", &t_ring,
"t_ring/I");
177 t->Branch(
"t_endcap", &t_endcap,
"t_endcap/I");
178 t->Branch(
"t_station", &t_station,
"t_station/I");
179 t->Branch(
"t_chambertype", &t_chambertype,
"t_chambertype/I");
194 totStubs_emul_readout = -1;
206 quality_pretrig = -1;
207 maxquality_pretrig = -1;
211 pattern_pretrig = -1;
212 maxpattern_pretrig = -1;
226 WGcrossHS_data =
false;
227 WGcrossHS_emul =
false;
242 t = fs->
make<TTree>(name.c_str(), name.c_str());
245 t->Branch(
"nRUN",&nRUN);
246 t->Branch(
"nEvent",&
nEvent);
247 t->Branch(
"firstfill",&firstfill);
248 t->Branch(
"totStubs_data",&totStubs_data);
249 t->Branch(
"totStubs_emul",&totStubs_emul);
250 t->Branch(
"totStubs_emul_readout",&totStubs_emul_readout);
251 t->Branch(
"nStub_data",&nStub_data);
252 t->Branch(
"nStub_emul",&nStub_emul);
255 t->Branch(
"ring",&
ring);
256 t->Branch(
"endcap",&
endcap);
258 t->Branch(
"chambertype",&chambertype);
259 t->Branch(
"has_data",&has_data);
260 t->Branch(
"has_emul",&has_emul);
261 t->Branch(
"quality_data",&quality_data);
262 t->Branch(
"quality_emul",&quality_emul);
263 t->Branch(
"npretrig",&npretrig);
264 t->Branch(
"quality_pretrig",&quality_pretrig);
265 t->Branch(
"maxquality_pretrig",&maxquality_pretrig);
266 t->Branch(
"pattern_data",&pattern_data);
267 t->Branch(
"pattern_emul",&pattern_emul);
268 t->Branch(
"pattern_pretrig",&pattern_pretrig);
269 t->Branch(
"maxpattern_pretrig",&maxpattern_pretrig);
270 t->Branch(
"bend_data",&bend_data);
271 t->Branch(
"bx_data",&bx_data);
272 t->Branch(
"fullbx_data",&fullbx_data);
273 t->Branch(
"bend_emul",&bend_emul);
274 t->Branch(
"bx_emul",&bx_emul);
275 t->Branch(
"fullbx_emul",&fullbx_emul);
276 t->Branch(
"bend_pretrig",&bend_pretrig);
277 t->Branch(
"bx_pretrig",&bx_pretrig);
278 t->Branch(
"bx_corr_emul",&bx_corr_emul);
279 t->Branch(
"WGcrossHS_data",&WGcrossHS_data);
280 t->Branch(
"WGcrossHS_emul",&WGcrossHS_emul);
281 t->Branch(
"key_WG_data",&key_WG_data);
282 t->Branch(
"key_WG_emul",&key_WG_emul);
283 t->Branch(
"key_hs_data",&key_hs_data);
284 t->Branch(
"key_hs_emul",&key_hs_emul);
285 t->Branch(
"key_hs_pretrig",&key_hs_pretrig);
286 t->Branch(
"trknmb_data",&trknmb_data);
287 t->Branch(
"trknmb_emul",&trknmb_emul);
288 t->Branch(
"dphi_data",&dphi_data);
289 t->Branch(
"dphi_emul",&dphi_emul);
290 t->Branch(
"eta_data",&eta_data);
291 t->Branch(
"eta_emul",&eta_emul);
292 t->Branch(
"phi_data", &phi_data);
293 t->Branch(
"phi_emul", &phi_emul);
319 gangedME1a = commonParams.getParameter<
bool>(
"gangedME1a");
329 "cscTriggerPrimitiveDigis");
350 consumesMany<edm::HepMCProduct>();
400 LogTrace(
"CSCTriggerPrimitivesReader")
401 <<
"\n** CSCTriggerPrimitivesReader: processing run #" 445 <<
"+++ Warning: Collection of ALCTs with label MuonCSCALCTDigi" 446 <<
" requested, but not found in the event... Skipping the rest +++\n";
451 <<
"+++ Warning: Collection of CLCTs with label MuonCSCCLCTDigi" 452 <<
" requested, but not found in the event... Skipping the rest +++\n";
455 if (!lcts_tmb_data.
isValid()) {
457 <<
"+++ Warning: Collection of correlated LCTs with label" 458 <<
" MuonCSCCorrelatedLCTDigi requested, but not found in the" 459 <<
" event... Skipping the rest +++\n";
486 <<
"+++ Warning: Collection of emulated ALCTs" 487 <<
" requested, but not found in the event... Skipping the rest +++\n";
492 <<
"+++ Warning: Collection of emulated CLCTs" 493 <<
" requested, but not found in the event... Skipping the rest +++\n";
496 if (!lcts_tmb_emul.
isValid()) {
498 <<
"+++ Warning: Collection of emulated correlated LCTs" 499 <<
" requested, but not found in the event... Skipping the rest +++\n";
561 <<
"\n Average number of ALCTs/event = " 564 <<
" Average number of CLCTs/event = " 567 <<
" Average number of TMB LCTs/event = " 570 <<
" Average number of MPC LCTs/event = " 575 edm::LogInfo(
"CSCTriggerPrimitivesReader") <<
"\n ALCT efficiencies:";
576 double tot_simh = 0.0, tot_alct = 0.0;
577 for (
int idh = 0; idh <
CSC_TYPES; idh++) {
581 if (simh > 0) eff = alct/simh;
584 <<
": alct = " << alct <<
", simh = " << simh <<
" eff = " << eff;
589 <<
" overall: alct = " << tot_alct <<
", simh = " << tot_simh
590 <<
" eff = " << tot_alct/tot_simh;
594 edm::LogInfo(
"CSCTriggerPrimitivesReader") <<
"\n CLCT efficiencies:";
595 double tot_simh = 0.0, tot_clct = 0.0;
596 for (
int idh = 0; idh <
CSC_TYPES; idh++) {
600 if (simh > 0.) eff = clct/simh;
603 <<
": clct = " << clct <<
", simh = " << simh <<
" eff = " << eff;
608 <<
" overall: clct = " << tot_clct <<
", simh = " << tot_simh
609 <<
" eff = " << tot_clct/tot_simh;
614 double cor = 0.0, tot = 0.0;
618 <<
"\n Correct half-strip assigned in " << cor <<
"/" << tot
619 <<
" = " << cor/tot <<
" of half-strip CLCTs";
628 <<
" Correct wire group assigned in " << cor <<
"/" << tot
629 <<
" = " << cor/tot <<
" of ALCTs";
637 TH1::AddDirectory(
false);
639 gROOT->SetStyle(
"Plain");
640 gStyle->SetFillColor(0);
641 gStyle->SetOptDate();
642 gStyle->SetOptStat(111110);
643 gStyle->SetOptFit(1111);
644 gStyle->SetPadTickX(1);
645 gStyle->SetPadTickY(1);
646 gStyle->SetMarkerSize(0.5);
647 gStyle->SetMarkerStyle(8);
648 gStyle->SetGridStyle(3);
649 gStyle->SetPaperSize(TStyle::kA4);
650 gStyle->SetStatW(0.25);
651 gStyle->SetStatH(0.10);
652 gStyle->SetStatFormat(
"6.4g");
653 gStyle->SetTitleSize(0.055,
"");
656 gStyle->SetLabelSize(0.05,
"XYZ");
657 gStyle->SetStatFontSize(0.06);
658 gStyle->SetTitleFont(32,
"XYZ");
659 gStyle->SetTitleFont(32,
"");
660 gStyle->SetLabelFont(32,
"XYZ");
661 gStyle->SetStatFont(32);
662 gStyle->SetLabelOffset(0.006,
"Y");
670 hHotWire1 = fs->
make<TH1F>(
"hHotWire1",
"hHotWire1",570*6*112,0,570*6*112);
671 hHotCham1 = fs->
make<TH1F>(
"hHotCham1",
"hHotCham1",570,0,570);
679 hAlctPerEvent = fs->
make<TH1F>(
"ALCTs_per_event",
"ALCTs per event", 31, -0.5, 30.5);
681 hAlctPerCSC = fs->
make<TH1F>(
"ALCTs_per_CSCtype",
"ALCTs per CSC type", 10, -0.5, 9.5);
686 sprintf(asdf,
"ALCTs_%i",
i*CSC_TYPES+j);
693 hAlctValid = fs->
make<TH1F>(
"ALCT_validity",
"ALCT validity", 3, -0.5, 2.5);
694 hAlctQuality = fs->
make<TH1F>(
"ALCT_quality",
"ALCT quality", 5, -0.5, 4.5);
695 hAlctAccel = fs->
make<TH1F>(
"ALCT_accel_flag",
"ALCT accel. flag", 3, -0.5, 2.5);
696 hAlctCollis = fs->
make<TH1F>(
"ALCT_collision_flag",
"ALCT collision. flag", 3, -0.5, 2.5);
697 hAlctKeyGroup = fs->
make<TH1F>(
"ALCT_key_wiregroup",
"ALCT key wiregroup", 120, -0.5, 119.5);
698 hAlctBXN = fs->
make<TH1F>(
"ALCT_bx",
"ALCT bx", 20, -0.5, 19.5);
703 std::cout <<
" bookedALCTHistos " << std::endl;
710 hClctPerEvent = fs->
make<TH1F>(
"CLCTs_per_event",
"CLCTs per event", 31, -0.5, 30.5);
712 hClctPerCSC = fs->
make<TH1F>(
"CLCTs_per_CSCtype",
"CLCTs per CSC type", 10, -0.5, 9.5);
716 sprintf(asdf,
"CLCTs_%i",
i*CSC_TYPES+j);
724 hClctValid = fs->
make<TH1F>(
"CLCT_validity",
"CLCT validity", 3, -0.5, 2.5);
725 hClctQuality = fs->
make<TH1F>(
"CLCT_layers_hit",
"CLCT layers hit", 9, -0.5, 8.5);
727 hClctSign = fs->
make<TH1F>(
"CLCT_sing_(L/R)",
"CLCT sign (L/R)", 3, -0.5, 2.5);
728 hClctCFEB = fs->
make<TH1F>(
"CLCT_cfeb_#",
"CLCT cfeb #", 6, -0.5, 5.5);
729 hClctBXN = fs->
make<TH1F>(
"CLCT_bx",
"CLCT bx", 20, -0.5, 19.5);
731 hClctKeyStrip[0] = fs->
make<TH1F>(
"CLCT_keystrip_distrips",
"CLCT keystrip, distrips", 40, -0.5, 39.5);
733 hClctKeyStrip[1] = fs->
make<TH1F>(
"CLCT_keystrip_halfstrips",
"CLCT keystrip, halfstrips",160, -0.5, 159.5);
734 hClctPattern[0] = fs->
make<TH1F>(
"CLCT_pattern_distrips",
"CLCT pattern, distrips", 13, -0.5, 12.5);
735 hClctPattern[1] = fs->
make<TH1F>(
"CLCT_pattern_halfstrips",
"CLCT pattern, halfstrips", 13, -0.5, 12.5);
740 sprintf(asdf,
"CLCT_bend0_%i",
i+1);
742 sprintf(asdf,
"CLCT_bend1_%i",
i+1);
745 sprintf(asdf,
"CLCT_keystrip_%i",
i+1);
751 hClctKeyStripME11 = fs->
make<TH1F>(
"hClctKeyStripME11",
"CLCT keystrip, halfstrips ME1/1",161, -0.5, 160.5);
754 std::cout <<
" bookedCLCTHistos " << std::endl;
763 hLctTMBPerCSC = fs->
make<TH1F>(
"LCTs_per_CSCtype",
"LCTs per CSC type", 10, -0.5, 9.5);
775 sprintf(asdf,
"LCTs_%i",
i*CSC_TYPES+j);
780 hLctTMBValid = fs->
make<TH1F>(
"LCT_validity",
"LCT validity", 3, -0.5, 2.5);
782 hLctTMBKeyGroup = fs->
make<TH1F>(
"LCT_key_wiregroup",
"LCT key wiregroup", 120, -0.5, 119.5);
786 hLctTMBBend = fs->
make<TH1F>(
"LCT_bend",
"LCT L/R bend", 3, -0.5, 2.5);
792 sprintf(histname,
"LCT_CSCId, station %d", istat+1);
800 std::cout <<
" bookedLCTTMBHistos " << std::endl;
809 ix=(
id.station()-2)*2+3;
821 ix=(
id.station()-2)*2+3+1;
831 int st =
id.station();
833 int ch =
id.chamber();
834 int ec =
id.endcap();
836 if (st == 1 && ri == 1) kSerial = ch;
837 if (st == 1 && ri == 2) kSerial = ch + 36;
838 if (st == 1 && ri == 3) kSerial = ch + 72;
839 if (st == 1 && ri == 4) kSerial = ch;
840 if (st == 2 && ri == 1) kSerial = ch + 108;
841 if (st == 2 && ri == 2) kSerial = ch + 126;
842 if (st == 3 && ri == 1) kSerial = ch + 162;
843 if (st == 3 && ri == 2) kSerial = ch + 180;
844 if (st == 4 && ri == 1) kSerial = ch + 216;
845 if (st == 4 && ri == 2) kSerial = ch + 234;
846 if (ec == 2) kSerial = kSerial + 300;
854 hLctMPCPerCSC = fs->
make<TH1F>(
"MPC_per_CSCtype",
"LCTs per CSC type", 10, -0.5, 9.5);
861 hLctMPCValid = fs->
make<TH1F>(
"MPC_validity",
"LCT validity", 3, -0.5, 2.5);
863 hLctMPCKeyGroup = fs->
make<TH1F>(
"MPC_key_wiregroup",
"LCT key wiregroup", 120, -0.5, 119.5);
867 hLctMPCBend = fs->
make<TH1F>(
"MPC_bend",
"LCT L/R bend", 3, -0.5, 2.5);
873 sprintf(histname,
"MPC_CSCId, station %d", istat+1);
882 <<
"bookedLCTMPCHistos ";
883 std::cout <<
" bookedLCTMPCHistos " << std::endl;
930 hLCTCompFound2 = fs->
make<TH2F>(
"h_LCT_found2",
"h_LCT_found2",19,-9.5,9.5,36,0.5,36.5);
934 hLCTCompSameN2 = fs->
make<TH2F>(
"h_LCT_SameN2",
"h_LCT_SameN2",19,-9.5,9.5,36,0.5,36.5);
938 hLCTCompMatch2 = fs->
make<TH2F>(
"h_LCT_match2",
"h_LCT_match2",19,-9.5,9.5,36,0.5,36.5);
942 hLCTCompTotal2 = fs->
make<TH2F>(
"h_LCT_total2",
"h_LCT_total2",19,-9.5,9.5,36,0.5,36.5);
969 sprintf(asdf,
"Comp_ALCTsFound_%i",
i*CSC_TYPES+j);
972 sprintf(asdf,
"Comp_ALCTsSame_%i",
i*CSC_TYPES+j);
975 sprintf(asdf,
"Comp_ALCTsTotal_%i",
i*CSC_TYPES+j);
978 sprintf(asdf,
"Comp_ALCTsMatch_%i",
i*CSC_TYPES+j);
995 sprintf(asdf,
"Comp_CLCTsFound_%i",
i*CSC_TYPES+j);
998 sprintf(asdf,
"Comp_CLCTsSame_%i",
i*CSC_TYPES+j);
1000 fs->
make<TH1F>(asdf, s.c_str(),
NCHAMBERS[j], 0.5, csc_max);
1001 sprintf(asdf,
"Comp_CLCTsTotal_%i",
i*CSC_TYPES+j);
1003 fs->
make<TH1F>(asdf, s.c_str(),
NCHAMBERS[j], 0.5, csc_max);
1004 sprintf(asdf,
"Comp_CLCTsMatch_%i",
i*CSC_TYPES+j);
1006 fs->
make<TH1F>(asdf, s.c_str(),
NCHAMBERS[j], 0.5, csc_max);
1021 sprintf(asdf,
"LCTs_CompFound_%i",
i*CSC_TYPES+j);
1023 fs->
make<TH1F>(asdf, s.c_str(),
NCHAMBERS[j], 0.5, csc_max);
1024 sprintf(asdf,
"LCTs_CompSame_%i",
i*CSC_TYPES+j);
1026 fs->
make<TH1F>(asdf, s.c_str(),
NCHAMBERS[j], 0.5, csc_max);
1027 sprintf(asdf,
"LCTs_CompTotal_%i",
i*CSC_TYPES+j);
1029 fs->
make<TH1F>(asdf, s.c_str(),
NCHAMBERS[j], 0.5, csc_max);
1030 sprintf(asdf,
"LCTs_CompMatch_%i",
i*CSC_TYPES+j);
1032 fs->
make<TH1F>(asdf, s.c_str(),
NCHAMBERS[j], 0.5, csc_max);
1042 <<
"bookedCompHistos ";
1043 std::cout <<
"bookCompHistos "<< std::endl;
1050 const double EDMIN = -0.05;
1051 const double EDMAX = 0.05;
1052 const double PDMIN = -5.0;
1053 const double PDMAX = 5.0;
1065 hEtaRecVsSim = fs->
make<TH2F>(
"",
"#eta_rec vs #eta_sim", 64, 0.9, 2.5, 64, 0.9, 2.5);
1071 sprintf(histname,
"ALCTs vs eta, station %d",
i+1);
1074 sprintf(histname,
"CLCTs vs phi, station %d",
i+1);
1077 sprintf(histname,
"#LT#eta_rec-#eta_sim#GT, station %d",
i+1);
1080 sprintf(histname,
"#LT#phi_rec-#phi_sim#GT, station %d",
i+1);
1087 string t1 = t0 +
", endcap1";
1089 string t2 = t0 +
", endcap2";
1092 string t4 =
"#eta_rec-#eta_sim vs wiregroup, " +
csc_type[
i];
1096 string u0 =
"#phi_rec-#phi_sim, " +
csc_type[
i];
1098 string u1 = u0 +
", endcap1";
1100 string u2 = u0 +
", endcap2";
1103 hPhiDiffCsc[
i][4] = fs->
make<TH1F>(
"", u0.c_str(), 100, PDMIN, PDMAX);
1106 string u5 =
"#phi_rec-#phi_sim (mrad) vs distrip, " +
csc_type[
i];
1108 fs->
make<TH2F>(
"", u5.c_str(), MAX_DS, 0., MAX_DS, 100, PDMIN, PDMAX);
1109 string u6 =
"#phi_rec-#phi_sim (mrad) vs halfstrip, " +
csc_type[
i];
1113 string u7 =
"#phi(layer 1)-#phi(layer 6), mrad, " +
csc_type[
i];
1117 int max_patterns, phibend;
1119 for (
int i = 0;
i < max_patterns;
i++) {
1121 sprintf(histname,
"#phi_rec-#phi_sim, bend = %d", phibend);
1127 <<
"bookedResolHistos ";
1136 sprintf(histname,
"SimHits vs eta, station %d",
i+1);
1139 sprintf(histname,
"ALCTs vs eta, station %d",
i+1);
1142 sprintf(histname,
"CLCTs vs eta, station %d",
i+1);
1150 string t1 =
"ALCTs vs eta, " +
csc_type[
i];
1152 string t2 =
"CLCTs vs eta, " +
csc_type[
i];
1158 <<
"bookedEfficHistos ";
1159 std::cout <<
" bookedEfficHistos " << std::endl;
1166 int nValidALCTs = 0;
1167 for (
auto detUnitIt = alcts->begin(); detUnitIt != alcts->end(); detUnitIt++) {
1168 int nValidALCTsPerCSC = 0;
1169 const CSCDetId&
id = (*detUnitIt).first;
1171 const auto& range = (*detUnitIt).second;
1172 for (
auto digiIt = range.first;
1173 digiIt != range.second; digiIt++) {
1175 bool alct_valid = (*digiIt).isValid();
1179 hAlctAccel->Fill((*digiIt).getAccelerator());
1191 nValidALCTsPerCSC++;
1194 << (*digiIt) <<
" found in ME" << ((
id.endcap() == 1) ?
"+" :
"-")
1195 <<
id.station() <<
"/" <<
id.ring() <<
"/" <<
id.chamber()
1196 <<
" (sector " <<
id.triggerSector()
1197 <<
" trig id. " <<
id.triggerCscId() <<
")";
1205 << nValidALCTs <<
" valid ALCTs found in this event";
1213 int nValidCLCTs = 0;
1214 for (
auto detUnitIt = clcts->begin(); detUnitIt != clcts->end(); detUnitIt++) {
1215 int nValidCLCTsPerCSC = 0;
1216 const CSCDetId&
id = (*detUnitIt).first;
1218 const auto& range = (*detUnitIt).second;
1219 for (
auto digiIt = range.first;
1220 digiIt != range.second; digiIt++) {
1222 bool clct_valid = (*digiIt).isValid();
1225 int striptype = (*digiIt).getStripType();
1226 int keystrip = (*digiIt).getKeyStrip();
1227 if (striptype == 0) keystrip /= 4;
1243 int pattern = (*digiIt).getPattern();
1251 nValidCLCTsPerCSC++;
1254 << (*digiIt) <<
" found in ME" << ((
id.endcap() == 1) ?
"+" :
"-")
1255 <<
id.station() <<
"/" <<
id.ring() <<
"/" <<
id.chamber()
1256 <<
" (sector " <<
id.triggerSector()
1257 <<
" trig id. " <<
id.triggerCscId() <<
")";
1264 << nValidCLCTs <<
" valid CLCTs found in this event";
1273 bool alct_valid, clct_valid;
1275 for (
auto detUnitIt = lcts->begin(); detUnitIt != lcts->end(); detUnitIt++) {
1276 int nValidLCTsPerCSC = 0;
1277 const CSCDetId&
id = (*detUnitIt).first;
1279 const auto& range = (*detUnitIt).second;
1280 for (
auto digiIt = range.first;
1281 digiIt != range.second; digiIt++) {
1283 bool lct_valid = (*digiIt).isValid();
1292 int quality = (*digiIt).getQuality();
1296 alct_valid = (quality != 0 && quality != 2);
1301 clct_valid = (quality != 0 && quality != 1);
1315 if (alct_valid && csctype==0) {
1318 if (clct_valid && csctype==0) {
1326 << (*digiIt) <<
" found in ME" << ((
id.endcap() == 1) ?
"+" :
"-")
1327 <<
id.station() <<
"/" <<
id.ring() <<
"/" <<
id.chamber()
1328 <<
" (sector " <<
id.triggerSector()
1329 <<
" trig id. " <<
id.triggerCscId() <<
")";
1336 << nValidLCTs <<
" valid LCTs found in this event";
1345 bool alct_valid, clct_valid;
1347 for (
auto detUnitIt = lcts->begin(); detUnitIt != lcts->end(); detUnitIt++) {
1348 const CSCDetId&
id = (*detUnitIt).first;
1350 const auto& range = (*detUnitIt).second;
1351 for (
auto digiIt = range.first;
1352 digiIt != range.second; digiIt++) {
1354 bool lct_valid = (*digiIt).isValid();
1363 int quality = (*digiIt).getQuality();
1367 alct_valid = (quality != 0 && quality != 2);
1372 clct_valid = (quality != 0 && quality != 1);
1386 if (alct_valid && csctype==0) {
1389 if (clct_valid && csctype==0) {
1397 << (*digiIt) <<
" found in ME" << ((
id.endcap() == 1) ?
"+" :
"-")
1398 <<
id.station() <<
"/" <<
id.ring() <<
"/" <<
id.chamber()
1399 <<
" (sector " <<
id.triggerSector()
1400 <<
" trig id. " <<
id.triggerCscId() <<
")";
1406 << nValidLCTs <<
" MPC LCTs found in this event";
1424 compareLCTs(lcts_data, lcts_emul, alcts_data, clcts_data);
1433 int fifo_pretrig = 10;
1434 int fpga_latency = 6;
1435 int l1a_window_width = 7;
1437 int rawhit_tbin_offset =
1438 (fifo_pretrig - fpga_latency) + (l1a_window_width-1)/2;
1441 int register_delay = 2;
1443 std::vector<CSCALCTDigi>::const_iterator pd, pe;
1444 for (
int endc = 1; endc <= 2; endc++) {
1453 std::vector<CSCALCTDigi> alctV_data, alctV_emul;
1454 const auto& drange = alcts_data->get(detid);
1455 for (
auto digiIt = drange.first; digiIt != drange.second; digiIt++) {
1456 if ((*digiIt).isValid()) {
1457 alctV_data.push_back(*digiIt);
1461 const auto& erange = alcts_emul->get(detid);
1462 std::vector<bool> bookedalctV_emul;
1463 for (
auto digiIt = erange.first; digiIt != erange.second; digiIt++) {
1464 if ((*digiIt).isValid()) {
1465 alctV_emul.push_back(*digiIt);
1466 bookedalctV_emul.push_back(
false);
1470 int ndata = alctV_data.size();
1471 int nemul = alctV_emul.size();
1473 if (ndata == 0 && nemul == 0)
continue;
1474 bool firstfill =
true;
1477 ostringstream strstrm;
1478 strstrm <<
"\n--- ME" << ((detid.
endcap() == 1) ?
"+" :
"-")
1483 strstrm <<
" **** " << ndata <<
" valid data ALCTs found:\n";
1484 for (pd = alctV_data.begin(); pd != alctV_data.end(); pd++) {
1485 strstrm <<
" " << (*pd)
1486 <<
" Full BX = " << (*pd).getFullBX() <<
"\n";
1488 strstrm <<
" **** " << nemul <<
" valid emul ALCTs found:\n";
1489 for (pe = alctV_emul.begin(); pe != alctV_emul.end(); pe++) {
1490 strstrm <<
" " << (*pe);
1491 for (pd = alctV_data.begin(); pd != alctV_data.end(); pd++) {
1492 if ((*pd).getTrknmb() == (*pe).getTrknmb()) {
1493 int emul_bx = (*pe).getBX();
1495 emul_bx - rawhit_tbin_offset + register_delay;
1496 strstrm <<
" Corr BX = " << emul_corr_bx;
1502 LogTrace(
"CSCTriggerPrimitivesReader") << strstrm.str();
1508 int perEv_nStub_data = 0;
1509 int perEv_nStub_emul = 0;
1512 for (pd = alctV_data.begin(); pd != alctV_data.end(); pd++){
1524 for (pe = alctV_emul.begin(); pe != alctV_emul.end(); pe++){
1552 if (ndata != nemul) {
1553 LogTrace(
"CSCTriggerPrimitivesReader")
1554 <<
" +++ Different numbers of ALCTs found in ME" 1555 << ((endc == 1) ?
"+" :
"-") <<
stat <<
"/" 1557 <<
": data = " << ndata <<
" emulator = " << nemul <<
" +++\n";
1570 for (
int i = 0;
i < ndata;
i++) {
1571 if (alctV_data[
i].isValid() == 0)
continue;
1572 int data_trknmb = alctV_data[
i].getTrknmb();
1576 int data_wiregroup = alctV_data[
i].getKeyWG();
1577 int data_bx = alctV_data[
i].getBX();
1581 if (firstfill) firstfill =
false;
1600 for (
int j=0; j<nemul; j++){
1601 if (alctV_emul[j].isValid() == 0)
continue;
1602 if (bookedalctV_emul[j])
continue;
1604 int emul_trknmb = alctV_emul[j].getTrknmb();
1608 int emul_wiregroup = alctV_emul[j].getKeyWG();
1609 int emul_bx = alctV_emul[j].getBX();
1611 emul_corr_bx = emul_bx - rawhit_tbin_offset + register_delay;
1613 emul_corr_bx = emul_bx;
1615 if (ndata == nemul) {
1626 if (data_trknmb == emul_trknmb ) {
1627 if (
abs(data_wiregroup - emul_wiregroup) <= 2){
1639 <<
" Identical ALCTs #" << data_trknmb;
1649 bookedalctV_emul[j] =
true;
1653 LogTrace(
"CSCTriggerPrimitivesReader")
1654 <<
" Different ALCTs #" << data_trknmb <<
" in ME" 1655 << ((endc == 1) ?
"+" :
"-") <<
stat <<
"/" 1661 LogTrace(
"CSCTriggerPrimitivesReader")
1662 <<
" not matched ALCT from data "<< alctV_data[
i]
1668 for (
int i = 0;
i<nemul;
i++){
1669 if (alctV_emul[
i].isValid() == 0
or bookedalctV_emul[
i])
continue;
1670 int emul_bx = alctV_emul[
i].getBX();
1673 if (firstfill) firstfill =
false;
1695 emul_corr_bx = emul_bx - rawhit_tbin_offset + register_delay;
1697 emul_corr_bx = emul_bx;
1701 LogTrace(
"CSCTriggerPrimitivesReader")
1702 <<
"not matched ALCT from emulation "<< alctV_emul[
i];
1715 const int tbin_cathode_offset = 7;
1717 const int pretrig_trig_zone = 5;
1720 std::vector<CSCCLCTDigi>::const_iterator pd, pe;
1721 std::vector<CSCCLCTPreTriggerDigi>::const_iterator pretrig;
1724 for (
int endc = 1; endc <= 2; endc++) {
1734 std::vector<CSCCLCTDigi> clctV_data, clctV_emul;
1735 const auto& drange = clcts_data->get(detid);
1736 for (
auto digiIt = drange.first; digiIt != drange.second; digiIt++) {
1737 if ((*digiIt).isValid()) {
1738 clctV_data.push_back(*digiIt);
1742 const auto& erange = clcts_emul->get(detid);
1743 std::vector<bool> bookedclctV_emul;
1744 for (
auto digiIt = erange.first; digiIt != erange.second; digiIt++) {
1745 if ((*digiIt).isValid()) {
1746 for (
auto pclct : clctV_emul){
1747 if (digiIt->getBX() != pclct.getBX() and
abs(digiIt->getBX() - pclct.getBX())< 5)
1748 LogTrace(
"CSCTriggerPrimitivesReader") <<
"Two CLCTs very close in timing!!! Special event: first clct "<< pclct <<
" second clct "<<*digiIt << std::endl;
1750 clctV_emul.push_back(*digiIt);
1751 bookedclctV_emul.push_back(
false);
1755 std::vector<CSCCLCTPreTriggerDigi> pretrigV_emul;
1756 const auto& pretrigrange = pretrigs_emul->
get(detid);
1757 for (
auto pretrigIt = pretrigrange.first; pretrigIt != pretrigrange.second; pretrigIt++){
1758 if ((*pretrigIt).isValid()){
1759 pretrigV_emul.push_back(*pretrigIt);
1763 int ndata = clctV_data.size();
1764 int nemul = clctV_emul.size();
1765 if (ndata == 0 && nemul == 0)
continue;
1766 bool firstfill =
true;
1767 int nemul_readout = 0;
1768 for (pe = clctV_emul.begin(); pe != clctV_emul.end(); pe++) {
1769 for (pd = clctV_data.begin(); pd != clctV_data.end(); pd++) {
1770 int emul_bx = (*pe).getBX();
1772 ((*pd).getFullBX() + emul_bx - tbin_cathode_offset) & 0x03;
1773 int bx_data = pd->getBX();
1775 if (corr_bx == bx_data){
1782 if (
debug or nemul>ndata
or (ndata != nemul)
or ndata != nemul_readout) {
1783 LogTrace(
"CSCTriggerPrimitivesReader") <<
" CLCTs from data "<< ndata <<
" CLCTs from emul "<< nemul <<
" readout "<< nemul_readout;
1784 ostringstream strstrm;
1785 strstrm <<
"\n--- ME" << ((detid.
endcap() == 1) ?
"+" :
"-")
1790 strstrm <<
" **** " << ndata <<
" valid data CLCTs found:\n";
1791 for (pd = clctV_data.begin(); pd != clctV_data.end(); pd++) {
1792 strstrm <<
" " << (*pd)
1793 <<
" Full BX = " << (*pd).getFullBX() <<
"\n";
1795 strstrm <<
" **** " << nemul <<
" valid emul CLCTs found:\n";
1796 for (pe = clctV_emul.begin(); pe != clctV_emul.end(); pe++) {
1797 strstrm <<
" " << (*pe);
1798 for (pd = clctV_data.begin(); pd != clctV_data.end(); pd++) {
1799 if ((*pd).getTrknmb() == (*pe).getTrknmb()
or abs((*pe).getKeyStrip() - (*pd).getKeyStrip())<5) {
1800 int emul_bx = (*pe).getBX();
1802 ((*pd).getFullBX() + emul_bx - tbin_cathode_offset) & 0x03;
1803 strstrm <<
" Corr BX = " << corr_bx;
1809 LogTrace(
"CSCTriggerPrimitivesReader") << strstrm.str();
1811 if (nemul_readout > 2){
1819 int perEv_nStub_data = 0;
1820 int perEv_nStub_emul = 0;
1823 for (pd = clctV_data.begin(); pd != clctV_data.end(); pd++){
1835 for (pe = clctV_emul.begin(); pe != clctV_emul.end(); pe++){
1859 if (ndata != nemul) {
1860 LogTrace(
"CSCTriggerPrimitivesReader")
1862 <<
" +++ Different numbers of CLCTs found in ME" 1863 << ((endc == 1) ?
"+" :
"-") <<
stat <<
"/" 1865 <<
": data = " << ndata <<
" emulator = " << nemul <<
" +++\n";
1879 for (pd = clctV_data.begin(); pd != clctV_data.end(); pd++) {
1881 if ((*pd).isValid() == 0)
continue;
1882 int data_trknmb = (*pd).getTrknmb();
1883 int data_quality = (*pd).getQuality();
1884 int data_pattern = (*pd).getPattern();
1885 int data_striptype = (*pd).getStripType();
1886 int data_bend = (*pd).getBend();
1887 int data_keystrip = (*pd).getKeyStrip();
1888 int data_cfeb = (*pd).getCFEB();
1889 int data_bx = (*pd).getBX();
1890 int fullBX = (*pd).getFullBX();
1892 if (data_keystrip >= 128 and
stat == 1 and
ring == 1) testwg=5;
1897 if (firstfill) firstfill =
false;
1920 for (pe = clctV_emul.begin(); pe != clctV_emul.end(); pe++) {
1922 if ((*pe).isValid() == 0)
continue;
1923 if (bookedclctV_emul[j])
continue;
1924 int emul_trknmb = (*pe).getTrknmb();
1925 int emul_quality = (*pe).getQuality();
1926 int emul_pattern = (*pe).getPattern();
1927 int emul_striptype = (*pe).getStripType();
1928 int emul_bend = (*pe).getBend();
1929 int emul_keystrip = (*pe).getKeyStrip();
1930 int emul_cfeb = (*pe).getCFEB();
1931 int emul_bx = (*pe).getBX();
1933 if (
abs(data_keystrip - emul_keystrip) <= 2){
1937 (fullBX + emul_bx - tbin_cathode_offset) & 0x03;
1940 emul_corr_bx = (emul_bx & 0x03);
1941 if (ndata == nemul) {
1951 if (data_quality == emul_quality &&
1952 data_pattern == emul_pattern &&
1953 data_striptype == emul_striptype &&
1954 data_bend == emul_bend &&
1955 data_keystrip == emul_keystrip &&
1956 data_cfeb == emul_cfeb ){
1957 if (ndata == nemul) {
1968 <<
" Identical CLCTs #" << data_trknmb;
1971 LogTrace(
"CSCTriggerPrimitivesReader")
1972 <<
" Different CLCTs #" << data_trknmb <<
" in ME" 1973 << ((endc == 1) ?
"+" :
"-") <<
stat <<
"/" 1974 <<
ring <<
"/" <<
cham <<
" data_bx "<< data_bx <<
" emul_corr_bx "<< emul_corr_bx;
1987 bookedclctV_emul[j] =
true;
1990 int num_pretrig = 0;
1991 for (pretrig = pretrigV_emul.begin(); pretrig != pretrigV_emul.end(); pretrig++){
1992 if ((*pretrig).getBX() != (*pe).getBX())
continue;
1993 int hsgap =
std::abs((*pretrig).getKeyStrip() - (*pe).getKeyStrip());
1994 bool samechamber =
true;
1996 samechamber = (((*pretrig).getKeyStrip() <128 and (*pe).getKeyStrip() <128 ) || ((*pretrig).getKeyStrip() >= 128 and (*pe).getKeyStrip() >=128 ));
1997 if (not samechamber)
2000 if (hsgap <= pretrig_trig_zone)
2019 LogTrace(
"CSCTriggerPrimitivesReader")
2020 <<
"CSCDetid "<< detid <<
" not matched CLCT from data "<< (*pd)
2025 for (
int k=0;
k<nemul;
k++){
2026 if (clctV_emul[i].isValid() == 0)
continue;
2027 if (bookedclctV_emul[
k])
continue;
2030 if (firstfill) firstfill =
false;
2051 if (clctV_emul[k].getKeyStrip()>= 128 and
stat == 1 and
ring == 1) testwg=5;
2056 bookedclctV_emul[
k] =
true;
2072 std::vector<CSCCorrelatedLCTDigi>::const_iterator pd, pe;
2073 for (
int endc = 1; endc <= 2; endc++) {
2083 std::vector<CSCCorrelatedLCTDigi> lctV_data, lctV_emul;
2084 std::vector<bool> bookedlctV_emul;
2085 const auto& drange = lcts_data->get(detid);
2086 for (
auto digiIt = drange.first; digiIt != drange.second; digiIt++) {
2087 if ((*digiIt).isValid()) {
2088 lctV_data.push_back(*digiIt);
2092 const auto& erange = lcts_emul->get(detid);
2093 for (
auto digiIt = erange.first; digiIt != erange.second; digiIt++) {
2094 if ((*digiIt).isValid()) {
2095 lctV_emul.push_back(*digiIt);
2096 bookedlctV_emul.push_back(
false);
2100 int ndata = lctV_data.size();
2101 int nemul = lctV_emul.size();
2102 if (ndata == 0 && nemul == 0)
continue;
2103 bool firstfill =
true;
2104 int nemul_readout = 0;
2105 for (pe = lctV_emul.begin(); pe != lctV_emul.end(); pe++) {
2106 for (pd = lctV_data.begin(); pd != lctV_data.end(); pd++) {
2107 int bx_data = pd->getBX();
2109 alcts_data, clcts_data);
2110 if ((bx_data == bx_corr)
or (
abs(pe->getKeyWG() - pd->getKeyWG())<=2 ) ){
2118 if (
debug or nemul>ndata
or (nemul_readout != ndata)
or nemul != ndata) {
2120 LogTrace(
"CSCTriggerPrimitivesReader") <<
" LCTs from data "<< ndata <<
" LCTs from emul "<< nemul <<
" readout "<< nemul_readout;
2121 ostringstream strstrm;
2122 strstrm <<
"\n--- ME" << ((detid.
endcap() == 1) ?
"+" :
"-")
2127 strstrm <<
" **** " << ndata <<
" valid data LCTs found:\n";
2128 for (pd = lctV_data.begin(); pd != lctV_data.end(); pd++) {
2129 strstrm <<
" " << (*pd);
2131 strstrm <<
"\n **** " << nemul <<
" valid emul LCTs found:\n";
2132 for (pe = lctV_emul.begin(); pe != lctV_emul.end(); pe++) {
2133 strstrm <<
" " << (*pe);
2134 strstrm <<
" corr BX = " 2136 alcts_data, clcts_data);
2137 strstrm <<
" LCT pattern = " << (*pe).getPattern();
2141 LogTrace(
"CSCTriggerPrimitivesReader") << strstrm.str();
2144 if (nemul_readout > 2){
2151 int perEv_nStub_data = 0;
2152 int perEv_nStub_emul = 0;
2155 for (pd = lctV_data.begin(); pd != lctV_data.end(); pd++){
2167 for (pe = lctV_emul.begin(); pe != lctV_emul.end(); pe++){
2190 if (ndata != nemul) {
2191 LogTrace(
"CSCTriggerPrimitivesReader")
2193 <<
" +++ Different numbers of LCTs found in ME" 2194 << ((endc == 1) ?
"+" :
"-") <<
stat <<
"/" 2196 <<
": data = " << ndata <<
" emulator = " << nemul <<
" +++\n";
2209 for (pd = lctV_data.begin(); pd != lctV_data.end(); pd++) {
2211 if ((*pd).isValid() == 0)
continue;
2212 int data_trknmb = (*pd).getTrknmb();
2213 int data_quality = (*pd).getQuality();
2214 int data_wiregroup = (*pd).getKeyWG();
2215 int data_keystrip = (*pd).getStrip();
2216 int data_pattern = (*pd).getCLCTPattern();
2217 int data_striptype = (*pd).getStripType();
2218 int data_bend = (*pd).getBend();
2219 int data_bx = (*pd).getBX();
2223 if (firstfill) firstfill =
false;
2248 for (pe = lctV_emul.begin(); pe != lctV_emul.end(); pe++) {
2250 if ((*pe).isValid() == 0)
continue;
2251 if (bookedlctV_emul[j])
continue;
2252 int emul_trknmb = (*pe).getTrknmb();
2253 int emul_quality = (*pe).getQuality();
2254 int emul_wiregroup = (*pe).getKeyWG();
2255 int emul_keystrip = (*pe).getStrip();
2256 int emul_pattern = (*pe).getCLCTPattern();
2257 int emul_striptype = (*pe).getStripType();
2258 int emul_bend = (*pe).getBend();
2259 int emul_bx = (*pe).getBX();
2260 if (
abs(data_keystrip - emul_keystrip) <= 2 ||
abs(data_wiregroup - emul_wiregroup) <= 2){
2264 alcts_data, clcts_data);
2267 emul_corr_bx = (emul_bx & 0x01);
2269 if (ndata == nemul) {
2279 if (data_quality == emul_quality &&
2280 data_wiregroup == emul_wiregroup &&
2281 data_keystrip == emul_keystrip &&
2282 data_pattern == emul_pattern &&
2283 data_striptype == emul_striptype &&
2284 data_bend == emul_bend ){
2285 if (ndata == nemul) {
2296 <<
" Identical LCTs #" << data_trknmb;
2299 LogTrace(
"CSCTriggerPrimitivesReader")
2300 <<
" Different LCTs #" << data_trknmb <<
" in ME" 2301 << ((endc == 1) ?
"+" :
"-") <<
stat <<
"/" 2302 <<
ring <<
"/" <<
cham <<
" data_lct bx "<< data_bx<<
" emul bx "<< emul_corr_bx;
2319 bookedlctV_emul[j] =
true;
2324 LogTrace(
"CSCTriggerPrimitivesReader")
2325 <<
"CSCDetid "<< detid <<
" not matched LCT from Data "<< (*pd)
2329 for (
int k=0;
k<nemul;
k++){
2330 if (bookedlctV_emul[
k])
continue;
2331 if (lctV_emul[i].isValid() == 0)
continue;
2359 bookedlctV_emul[
k] =
true;
2379 std::vector<CSCCorrelatedLCTDigi>::const_iterator pd, pe;
2380 for (
int endc = 1; endc <= 2; endc++) {
2390 std::vector<CSCCorrelatedLCTDigi> lctV_data, lctV_emul;
2391 std::vector<bool> bookedlctV_emul;
2392 const auto& drange = lcts_data->get(detid);
2393 for (
auto digiIt = drange.first; digiIt != drange.second; digiIt++) {
2394 if ((*digiIt).isValid()) {
2395 lctV_data.push_back(*digiIt);
2399 const auto& erange = lcts_emul->get(detid);
2400 for (
auto digiIt = erange.first; digiIt != erange.second; digiIt++) {
2401 if ((*digiIt).isValid()) {
2402 lctV_emul.push_back(*digiIt);
2403 bookedlctV_emul.push_back(
false);
2407 int ndata = lctV_data.size();
2408 int nemul = lctV_emul.size();
2409 if (ndata == 0 && nemul == 0)
continue;
2410 bool firstfill =
true;
2413 ostringstream strstrm;
2414 strstrm <<
"\n--- ME" << ((detid.
endcap() == 1) ?
"+" :
"-")
2419 strstrm <<
" **** " << ndata <<
" valid data LCTs found:\n";
2420 for (pd = lctV_data.begin(); pd != lctV_data.end(); pd++) {
2421 strstrm <<
" " << (*pd);
2423 strstrm <<
"\n **** " << nemul <<
" valid emul LCTs found:\n";
2424 for (pe = lctV_emul.begin(); pe != lctV_emul.end(); pe++) {
2425 strstrm <<
" " << (*pe);
2426 strstrm <<
" corr BX = " 2428 alcts_data, clcts_data);
2429 strstrm <<
" LCT pattern = " << (*pe).getPattern();
2432 LogTrace(
"CSCTriggerPrimitivesReader") << strstrm.str();
2438 if (ndata != nemul) {
2439 LogTrace(
"CSCTriggerPrimitivesReader")
2440 <<
" +++ Different numbers of MPC LCTs found in ME" 2441 << ((endc == 1) ?
"+" :
"-") <<
stat <<
"/" 2443 <<
": data = " << ndata <<
" emulator = " << nemul <<
" +++\n";
2456 for (pd = lctV_data.begin(); pd != lctV_data.end(); pd++) {
2458 if ((*pd).isValid() == 0)
continue;
2459 int data_trknmb = (*pd).getTrknmb();
2460 int data_quality = (*pd).getQuality();
2461 int data_wiregroup = (*pd).getKeyWG();
2462 int data_keystrip = (*pd).getStrip();
2463 int data_pattern = (*pd).getCLCTPattern();
2464 int data_striptype = (*pd).getStripType();
2465 int data_bend = (*pd).getBend();
2466 int data_bx = (*pd).getBX();
2470 if (firstfill) firstfill =
false;
2493 for (pe = lctV_emul.begin(); pe != lctV_emul.end(); pe++) {
2495 if ((*pe).isValid() == 0)
continue;
2496 int emul_trknmb = (*pe).getTrknmb();
2497 int emul_quality = (*pe).getQuality();
2498 int emul_wiregroup = (*pe).getKeyWG();
2499 int emul_keystrip = (*pe).getStrip();
2500 int emul_pattern = (*pe).getCLCTPattern();
2501 int emul_striptype = (*pe).getStripType();
2502 int emul_bend = (*pe).getBend();
2503 int emul_bx = (*pe).getBX();
2504 if (data_trknmb == emul_trknmb) {
2508 alcts_data, clcts_data);
2511 emul_corr_bx = (emul_bx & 0x01);
2523 if (data_quality == emul_quality &&
2524 data_wiregroup == emul_wiregroup &&
2525 data_keystrip == emul_keystrip &&
2526 data_pattern == emul_pattern &&
2527 data_striptype == emul_striptype &&
2528 data_bend == emul_bend ){
2541 <<
" Identical LCTs #" << data_trknmb;
2556 bookedlctV_emul[j] =
true;
2560 LogTrace(
"CSCTriggerPrimitivesReader")
2562 <<
" Different LCTs #" << data_trknmb <<
" in ME" 2563 << ((endc == 1) ?
"+" :
"-") <<
stat <<
"/" 2564 <<
ring <<
"/" <<
cham <<
" data_lct bx "<< data_bx<<
" emul bx "<< emul_corr_bx;
2569 LogTrace(
"CSCTriggerPrimitivesReader")
2574 for (
int k=0;
k<nemul;
k++){
2575 if (bookedlctV_emul[
k])
continue;
2578 if (firstfill) firstfill =
false;
2604 bookedlctV_emul[
k] =
true;
2618 const int emul_bx,
const CSCDetId& detid,
2621 int full_anode_bx = -999;
2624 int tbin_anode_offset = 5;
2627 const auto& arange = alcts_data->get(detid);
2628 for (
auto digiIt = arange.first; digiIt != arange.second; digiIt++) {
2629 if ((*digiIt).isValid()) {
2630 full_anode_bx = (*digiIt).getFullBX();
2636 const auto& crange = clcts_data->get(detid);
2637 for (
auto digiIt = crange.first; digiIt != crange.second; digiIt++) {
2638 if ((*digiIt).isValid()) {
2645 if (full_anode_bx == -999) {
2648 <<
"+++ Warning in convertBXofLCT(): full anode BX is not available!" 2655 lct_bx = (full_anode_bx + emul_bx - tbin_anode_offset) & 0x01;
2672 for (
auto dWDiter=wires->begin(); dWDiter!=wires->end(); dWDiter++) {
2676 std::vector<CSCWireDigi>::const_iterator wireIter = (*dWDiter).second.first;
2677 std::vector<CSCWireDigi>::const_iterator lWire = (*dWDiter).second.second;
2678 bool has_layer=
false;
2679 for( ; wireIter != lWire; ++wireIter) {
2681 int i_layer=
id.layer()-1;
2682 int i_wire = wireIter->getWireGroup()-1;
2683 int nbins = wireIter->getTimeBinsOn().size();
2684 int serial2=serial*(6*112)+i_layer*112+i_wire;
2696 if(serial_old!=serial && has_layer) {
2712 vector<edm::Handle<edm::HepMCProduct> > allhepmcp;
2717 if (allhepmcp.size() > 0) {
2720 for (HepMC::GenEvent::particle_const_iterator
p = mc.particles_begin();
2721 p != mc.particles_end(); ++
p) {
2722 int id = (*p)->pdg_id();
2723 double phitmp = (*p)->momentum().phi();
2724 if (phitmp < 0) phitmp += 2.*
M_PI;
2726 <<
"MC part #" << ++i <<
": id = " <<
id 2727 <<
", status = " << (*p)->status()
2728 <<
"\n pX = " << (*p)->momentum().x()
2729 <<
", pY = " << (*p)->momentum().y()
2730 <<
", pT = " << (*p)->momentum().perp() <<
" GeV" 2731 <<
", p = " << (*p)->momentum().rho() <<
" GeV" 2732 <<
"\n eta = " << (*p)->momentum().pseudoRapidity()
2733 <<
", phi = " << phitmp <<
" (" << phitmp*180./
M_PI <<
" deg)";
2754 <<
"+++ Warning: Collection of wire digis with label" 2756 <<
" requested, but not found in the event... Skipping the rest +++\n";
2761 <<
"+++ Warning: Collection of comparator digis with label" 2763 <<
" requested, but not found in the event... Skipping the rest +++\n";
2768 <<
"+++ Warning: Collection of SimHits with label" 2770 <<
" requested, but not found in the event... Skipping the rest +++\n";
2776 <<
" #CSC SimHits: " << simHits.size();
2799 for (
auto adetUnitIt = alcts->begin(); adetUnitIt != alcts->end(); adetUnitIt++) {
2800 const CSCDetId&
id = (*adetUnitIt).first;
2802 const auto& range = (*adetUnitIt).second;
2803 for (
auto digiIt = range.first;
2804 digiIt != range.second; digiIt++) {
2806 bool alct_valid = (*digiIt).isValid();
2808 vector<CSCAnodeLayerInfo> alctInfo =
2809 alct_analyzer.
getSimInfo(*digiIt,
id, wiredc, &allSimHits);
2811 double hitPhi = -999.0, hitEta = -999.0;
2812 int hitWG = alct_analyzer.
nearestWG(alctInfo, hitPhi, hitEta);
2815 int wiregroup = (*digiIt).getKeyWG();
2819 int endc =
id.endcap();
2820 int stat =
id.station();
2823 double alctEta = alct_analyzer.
getWGEta(layerId, wiregroup);
2824 double deltaEta = alctEta - hitEta;
2827 double deltaWG = wiregroup - hitWG;
2829 <<
"WG: MC = " << hitWG <<
" rec = " << wiregroup
2830 <<
" delta = " << deltaWG;
2855 for (
auto cdetUnitIt = clcts->begin(); cdetUnitIt != clcts->end(); cdetUnitIt++) {
2856 const CSCDetId&
id = (*cdetUnitIt).first;
2858 const auto& range = (*cdetUnitIt).second;
2859 for (
auto digiIt = range.first;
2860 digiIt != range.second; digiIt++) {
2862 bool clct_valid = (*digiIt).isValid();
2864 vector<CSCCathodeLayerInfo> clctInfo =
2865 clct_analyzer.
getSimInfo(*digiIt,
id, compdc, &allSimHits);
2867 double hitPhi = -999.0, hitEta = -999.0, deltaStrip = -999.0;
2868 int hitHS = clct_analyzer.
nearestHS(clctInfo, hitPhi, hitEta);
2871 int halfstrip = (*digiIt).getKeyStrip();
2872 int strip = halfstrip/2;
2873 int distrip = halfstrip/4;
2874 int stripType = (*digiIt).getStripType();
2878 int endc =
id.endcap();
2879 int stat =
id.station();
2885 float fstrip = -999.;
2886 if (stripType == 0) {
2887 fstrip = strip + 1.;
2890 fstrip = strip + 0.5*(halfstrip%2) + 0.25;
2892 double clctPhi = clct_analyzer.
getStripPhi(layerId, fstrip);
2893 double deltaPhi = clctPhi - hitPhi;
2894 if (deltaPhi < -
M_PI) deltaPhi += 2.*
M_PI;
2895 else if (deltaPhi >
M_PI) deltaPhi -= 2.*
M_PI;
2897 if (hitPhi < 0) hitPhi += 2.*
M_PI;
2898 if (clctPhi < 0) clctPhi += 2.*
M_PI;
2900 <<
" clctPhi = " << clctPhi <<
" hitPhi = " << hitPhi
2904 if (stripType == 0) {
2905 deltaStrip = distrip - hitHS/4;
2911 deltaStrip = halfstrip - hitHS;
2917 <<
"Half-strip: MC = " << hitHS <<
" rec = " << halfstrip
2918 <<
" pattern type = " << stripType <<
" delta = " << deltaStrip;
2923 hPhiDiffCsc[csctype][stripType+3]->Fill(deltaPhi);
2928 if (stripType == 1) {
2930 if((endc == 1 && (stat == 1 || stat == 2)) ||
2931 (endc == 2 && (stat == 3 || stat == 4))) {
2932 hPhiDiffPattern[(*digiIt).getPattern()]->Fill(deltaPhi/1000*hsperrad);
2945 double phi1 = -999.0, phi6 = -999.0;
2946 vector<CSCCathodeLayerInfo>::const_iterator pli;
2947 for (pli = clctInfo.begin(); pli != clctInfo.end(); pli++) {
2949 int layer = layerId.
layer();
2950 if (layer == 1 || layer == 6) {
2952 for (
const auto& psh : allSimHits) {
2955 if (hitId == layerId &&
2956 abs(psh.particleType()) == 13) {
2958 const auto& thisPoint = csclayer->
toGlobal(psh.localPosition());
2959 double phi = thisPoint.phi();
2960 if (layer == 1) phi1 =
phi;
2961 else if (layer == 6) phi6 =
phi;
2967 if (phi1 > -99. && phi6 > -99.) {
2969 if (deltaPhi >
M_PI) deltaPhi -= 2.*
M_PI;
2970 else if (deltaPhi < -
M_PI) deltaPhi += 2.*
M_PI;
2987 vector<CSCDetId> chamberIds;
2988 vector<CSCDetId>::const_iterator chamberIdIt;
2989 for (
const auto& simHitIt : allSimHits) {
2991 bool sameId =
false;
2997 for (
const auto& chamberId : chamberIds) {
2998 if (chamberId.endcap() == hitId.
endcap() &&
2999 chamberId.station() == hitId.
station() &&
3000 chamberId.ring() == hitId.
ring() &&
3001 chamberId.chamber() == hitId.
chamber()) {
3009 chamberIds.push_back(newChamberId);
3012 LogTrace(
"CSCTriggerPrimitivesReader")
3013 <<
"Found SimHits in " << chamberIds.size() <<
" CSCs";
3017 for (
const auto& chamberId : chamberIds) {
3021 used[ilayer] =
false;
3022 simHitsV[ilayer].clear();
3025 int endcap = chamberId.endcap();
3026 int station = chamberId.station();
3027 int ring = chamberId.ring();
3028 int chamber = chamberId.chamber();
3029 for (
const auto& simHitIt : allSimHits) {
3031 if (hitId.
endcap() == endcap && hitId.
station() == station &&
3033 int layer = hitId.
layer() - 1;
3034 if (!used[layer] &&
abs(simHitIt.particleType()) == 13) {
3037 simHitsV[layer].push_back(simHitIt);
3041 LogTrace(
"CSCTriggerPrimitivesReader")
3042 <<
"CSC in ME" << ((endcap == 1) ?
"+" :
"-")
3043 << station <<
"/" << ring <<
"/" << chamber
3044 <<
" has muon hits in " << nLayers <<
" layers";
3051 double hitEta = -999.;
3053 vector<PSimHit> layerSimHitsV = simHitsV[ilayer];
3054 if (layerSimHitsV.size() > 0) {
3055 LocalPoint hitLP = layerSimHitsV[0].localPosition();
3059 hitEta = hitGP.
eta();
3065 <<
"+++ Warning in calcEfficiency(): no SimHit found" 3066 <<
" where there must be at least " << nLayers <<
"! +++\n";
3073 bool isALCT =
false;
3074 for (
auto adetUnitIt = alcts->begin(); adetUnitIt != alcts->end();
3076 const CSCDetId&
id = (*adetUnitIt).first;
3077 if (
id == (*chamberIdIt)) {
3078 const auto& range = (*adetUnitIt).second;
3079 for (
auto digiIt = range.first;
3080 digiIt != range.second; digiIt++) {
3081 if (digiIt->isValid()) {
3083 LogTrace(
"CSCTriggerPrimitivesReader") <<
"ALCT was found";
3096 LogTrace(
"CSCTriggerPrimitivesReader") <<
"ALCT was not found";
3099 bool isCLCT =
false;
3100 for (
auto cdetUnitIt = clcts->begin(); cdetUnitIt != clcts->end();
3102 const CSCDetId&
id = (*cdetUnitIt).first;
3103 if (
id == (*chamberIdIt)) {
3104 const auto& range = (*cdetUnitIt).second;
3105 for (
auto digiIt = range.first;
3106 digiIt != range.second; digiIt++) {
3107 if (digiIt->isValid()) {
3109 LogTrace(
"CSCTriggerPrimitivesReader") <<
"CLCT was found";
3122 LogTrace(
"CSCTriggerPrimitivesReader") <<
"CLCT was not found";
3130 TCanvas *
c1 =
new TCanvas(
"c1",
"", 0, 0, 500, 640);
3132 TPostScript *ps =
new TPostScript(fname.c_str(), 111);
3135 for (
int i_page = 0; i_page <
MAXPAGES; i_page++) {
3136 pad[i_page] =
new TPad(
"",
"", .05, .05, .93, .93);
3142 t.SetTextSize(0.025);
3143 char pagenum[7], titl[50];
3149 c1->Clear(); c1->cd(0);
3150 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"Number of ALCTs");
3151 title->SetFillColor(10); title->Draw();
3152 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3153 gStyle->SetOptStat(111110);
3155 pad[
page]->Divide(1,3);
3163 page++; c1->Update();
3167 c1->Clear(); c1->cd(0);
3168 sprintf(titl,
"ALCTs per chamber, endcap %d", endc+1);
3169 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98, titl);
3170 title->SetFillColor(10); title->Draw();
3171 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3172 gStyle->SetOptStat(10);
3174 pad[
page]->Divide(2,5);
3175 for (
int idh = 0; idh < max_idh; idh++) {
3176 if (!
plotME1A && idh == 3)
continue;
3177 hAlctCsc[endc][idh]->SetMinimum(0.0);
3180 page++; c1->Update();
3184 c1->Clear(); c1->cd(0);
3185 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"ALCT quantities");
3186 title->SetFillColor(10); title->Draw();
3187 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3188 gStyle->SetOptStat(111110);
3190 pad[
page]->Divide(2,3);
3197 page++; c1->Update();
3204 TCanvas *
c1 =
new TCanvas(
"c1",
"", 0, 0, 500, 640);
3206 TPostScript *ps =
new TPostScript(fname.c_str(), 111);
3209 for (
int i_page = 0; i_page <
MAXPAGES; i_page++) {
3210 pad[i_page] =
new TPad(
"",
"", .05, .05, .93, .93);
3216 t.SetTextSize(0.025);
3217 char pagenum[7], titl[50];
3221 c1->Clear(); c1->cd(0);
3222 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"Number of CLCTs");
3223 title->SetFillColor(10); title->Draw();
3224 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3225 gStyle->SetOptStat(111110);
3227 pad[
page]->Divide(1,3);
3234 for (
int ibin = 1; ibin <=
nbins; ibin++) {
3237 <<
" # CLCTs/chamber: " << ibin-1 <<
"; events: " << f_bin << endl;
3246 page++; c1->Update();
3250 c1->Clear(); c1->cd(0);
3251 sprintf(titl,
"CLCTs per chamber, endcap %d", endc+1);
3252 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98, titl);
3253 title->SetFillColor(10); title->Draw();
3254 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3255 gStyle->SetOptStat(10);
3257 pad[
page]->Divide(2,5);
3258 for (
int idh = 0; idh < max_idh; idh++) {
3259 if (!
plotME1A && idh == 3)
continue;
3260 hClctCsc[endc][idh]->SetMinimum(0.0);
3263 page++; c1->Update();
3267 c1->Clear(); c1->cd(0);
3268 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"CLCT quantities");
3269 title->SetFillColor(10); title->Draw();
3270 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3271 gStyle->SetOptStat(111110);
3273 pad[
page]->Divide(2,4);
3282 page++; c1->Update();
3285 c1->Clear(); c1->cd(0);
3286 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
3287 "CLCT bend for various chamber types, halfstrips");
3288 title->SetFillColor(10); title->Draw();
3289 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3290 gStyle->SetOptStat(110);
3292 pad[
page]->Divide(2,5);
3293 for (
int idh = 0; idh < max_idh; idh++) {
3294 if (!
plotME1A && idh == 3)
continue;
3295 pad[
page]->cd(idh+1);
3296 hClctBendCsc[idh][1]->GetXaxis()->SetTitle(
"Pattern bend");
3297 hClctBendCsc[idh][1]->GetYaxis()->SetTitle(
"Number of LCTs");
3300 page++; c1->Update();
3307 TCanvas *
c1 =
new TCanvas(
"c1",
"", 0, 0, 500, 640);
3309 TPostScript *ps =
new TPostScript(fname.c_str(), 111);
3312 for (
int i_page = 0; i_page <
MAXPAGES; i_page++) {
3313 pad[i_page] =
new TPad(
"",
"", .05, .05, .93, .93);
3319 t.SetTextSize(0.025);
3320 char pagenum[7], titl[50];
3326 c1->Clear(); c1->cd(0);
3327 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"Number of LCTs");
3328 title->SetFillColor(10); title->Draw();
3329 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3330 gStyle->SetOptStat(111110);
3332 pad[
page]->Divide(2,2);
3343 gStyle->SetOptStat(1110);
3344 page++; c1->Update();
3347 c1->Clear(); c1->cd(0);
3348 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"LCT geometry");
3349 title->SetFillColor(10); title->Draw();
3350 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3351 gStyle->SetOptStat(110110);
3353 pad[
page]->Divide(2,4);
3361 page++; c1->Update();
3365 c1->Clear(); c1->cd(0);
3366 sprintf(titl,
"LCTs per chamber, endcap %d", endc+1);
3367 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98, titl);
3368 title->SetFillColor(10); title->Draw();
3369 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3370 gStyle->SetOptStat(10);
3372 pad[
page]->Divide(2,5);
3373 for (
int idh = 0; idh < max_idh; idh++) {
3374 if (!
plotME1A && idh == 3)
continue;
3378 page++; c1->Update();
3382 c1->Clear(); c1->cd(0);
3383 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"LCT quantities");
3384 title->SetFillColor(10); title->Draw();
3385 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3386 gStyle->SetOptStat(110110);
3388 pad[
page]->Divide(2,4);
3397 page++; c1->Update();
3404 TCanvas *
c1 =
new TCanvas(
"c1",
"", 0, 0, 500, 640);
3406 TPostScript *ps =
new TPostScript(fname.c_str(), 111);
3409 for (
int i_page = 0; i_page <
MAXPAGES; i_page++) {
3410 pad[i_page] =
new TPad(
"",
"", .05, .05, .93, .93);
3416 t.SetTextSize(0.025);
3421 c1->Clear(); c1->cd(0);
3422 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"Number of LCTs");
3423 title->SetFillColor(10); title->Draw();
3424 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3425 gStyle->SetOptStat(111110);
3427 pad[
page]->Divide(1,3);
3436 page++; c1->Update();
3439 c1->Clear(); c1->cd(0);
3440 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"LCT geometry");
3441 title->SetFillColor(10); title->Draw();
3442 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3443 gStyle->SetOptStat(110110);
3445 pad[
page]->Divide(2,4);
3453 page++; c1->Update();
3456 c1->Clear(); c1->cd(0);
3457 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"LCT quantities");
3458 title->SetFillColor(10); title->Draw();
3459 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3461 pad[
page]->Divide(2,4);
3470 page++; c1->Update();
3477 TCanvas *
c1 =
new TCanvas(
"c1",
"", 0, 0, 500, 640);
3479 TPostScript *ps =
new TPostScript(fname.c_str(), 111);
3482 for (
int i_page = 0; i_page <
MAXPAGES; i_page++) {
3483 pad[i_page] =
new TPad(
"",
"", .05, .05, .93, .93);
3489 t.SetTextSize(0.025);
3495 teff.SetTextFont(32);
3496 teff.SetTextSize(0.08);
3497 char eff[25], titl[60];
3503 c1->Clear(); c1->cd(0);
3504 sprintf(titl,
"ALCT firmware-emulator: match in number found, endcap %d",
3506 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98, titl);
3507 title->SetFillColor(10); title->Draw();
3508 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3510 gStyle->SetOptStat(0);
3512 pad[
page]->Divide(2,5);
3514 for (
int idh = 0; idh < max_idh; idh++) {
3515 if (!
plotME1A && idh == 3)
continue;
3516 hAlctFoundEffVsCsc[endc][idh] =
3522 for (Int_t ibin = 1; ibin <=
nbins; ibin++) {
3524 hAlctFoundEffVsCsc[endc][idh]->SetBinContent(ibin, -1.);
3525 hAlctFoundEffVsCsc[endc][idh]->SetBinError(ibin, 0.);
3528 gPad->Update(); gStyle->SetStatX(0.65);
3529 hAlctFoundEffVsCsc[endc][idh]->SetMinimum(-0.05);
3530 hAlctFoundEffVsCsc[endc][idh]->SetMaximum(1.05);
3531 hAlctFoundEffVsCsc[endc][idh]->GetXaxis()->SetTitleOffset(0.7);
3532 hAlctFoundEffVsCsc[endc][idh]->GetYaxis()->SetTitleOffset(0.8);
3533 hAlctFoundEffVsCsc[endc][idh]->GetXaxis()->SetLabelSize(0.06);
3534 hAlctFoundEffVsCsc[endc][idh]->GetYaxis()->SetLabelSize(0.06);
3535 hAlctFoundEffVsCsc[endc][idh]->GetXaxis()->SetTitleSize(0.07);
3536 hAlctFoundEffVsCsc[endc][idh]->GetYaxis()->SetTitleSize(0.07);
3537 hAlctFoundEffVsCsc[endc][idh]->GetXaxis()->SetTitle(
"CSC id");
3538 hAlctFoundEffVsCsc[endc][idh]->GetYaxis()->SetTitle(
"% of same number found");
3539 pad[
page]->cd(idh+1); hAlctFoundEffVsCsc[endc][idh]->Draw(
"e");
3544 ratio = numer/denom;
3547 sprintf(eff,
"eff = (%4.1f +/- %4.1f)%%", ratio*100.,
error*100.);
3548 teff.DrawTextNDC(0.3, 0.5, eff);
3550 page++; c1->Update();
3555 c1->Clear(); c1->cd(0);
3556 sprintf(titl,
"ALCT firmware-emulator: exact match, endcap %d", endc+1);
3557 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98, titl);
3558 title->SetFillColor(10); title->Draw();
3559 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3561 gStyle->SetOptStat(0);
3563 pad[
page]->Divide(2,5);
3565 for (
int idh = 0; idh < max_idh; idh++) {
3566 if (!
plotME1A && idh == 3)
continue;
3567 hAlctMatchEffVsCsc[endc][idh] =
3573 for (Int_t ibin = 1; ibin <=
nbins; ibin++) {
3575 hAlctMatchEffVsCsc[endc][idh]->SetBinContent(ibin, -1.);
3576 hAlctMatchEffVsCsc[endc][idh]->SetBinError(ibin, 0.);
3579 gPad->Update(); gStyle->SetStatX(0.65);
3580 hAlctMatchEffVsCsc[endc][idh]->SetMinimum(-0.05);
3581 hAlctMatchEffVsCsc[endc][idh]->SetMaximum(1.05);
3582 hAlctMatchEffVsCsc[endc][idh]->GetXaxis()->SetTitleOffset(0.7);
3583 hAlctMatchEffVsCsc[endc][idh]->GetYaxis()->SetTitleOffset(0.8);
3584 hAlctMatchEffVsCsc[endc][idh]->GetXaxis()->SetLabelSize(0.06);
3585 hAlctMatchEffVsCsc[endc][idh]->GetYaxis()->SetLabelSize(0.06);
3586 hAlctMatchEffVsCsc[endc][idh]->GetXaxis()->SetTitleSize(0.07);
3587 hAlctMatchEffVsCsc[endc][idh]->GetYaxis()->SetTitleSize(0.07);
3588 hAlctMatchEffVsCsc[endc][idh]->GetXaxis()->SetTitle(
"CSC id");
3589 hAlctMatchEffVsCsc[endc][idh]->GetYaxis()->SetTitle(
"% of exact match");
3590 pad[
page]->cd(idh+1); hAlctMatchEffVsCsc[endc][idh]->Draw(
"e");
3595 ratio = numer/denom;
3598 sprintf(eff,
"eff = (%4.1f +/- %4.1f)%%", ratio*100.,
error*100.);
3599 teff.DrawTextNDC(0.3, 0.5, eff);
3601 page++; c1->Update();
3606 c1->Clear(); c1->cd(0);
3607 sprintf(titl,
"CLCT firmware-emulator: match in number found, endcap %d",
3609 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98, titl);
3610 title->SetFillColor(10); title->Draw();
3611 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3613 gStyle->SetOptStat(0);
3615 pad[
page]->Divide(2,5);
3617 for (
int idh = 0; idh < max_idh; idh++) {
3618 if (!
plotME1A && idh == 3)
continue;
3619 hClctFoundEffVsCsc[endc][idh] =
3625 for (Int_t ibin = 1; ibin <=
nbins; ibin++) {
3627 hClctFoundEffVsCsc[endc][idh]->SetBinContent(ibin, -1.);
3628 hClctFoundEffVsCsc[endc][idh]->SetBinError(ibin, 0.);
3631 gPad->Update(); gStyle->SetStatX(0.65);
3632 hClctFoundEffVsCsc[endc][idh]->SetMinimum(-0.05);
3633 hClctFoundEffVsCsc[endc][idh]->SetMaximum(1.05);
3634 hClctFoundEffVsCsc[endc][idh]->GetXaxis()->SetTitleOffset(0.7);
3635 hClctFoundEffVsCsc[endc][idh]->GetYaxis()->SetTitleOffset(0.8);
3636 hClctFoundEffVsCsc[endc][idh]->GetXaxis()->SetLabelSize(0.06);
3637 hClctFoundEffVsCsc[endc][idh]->GetYaxis()->SetLabelSize(0.06);
3638 hClctFoundEffVsCsc[endc][idh]->GetXaxis()->SetTitleSize(0.07);
3639 hClctFoundEffVsCsc[endc][idh]->GetYaxis()->SetTitleSize(0.07);
3640 hClctFoundEffVsCsc[endc][idh]->GetXaxis()->SetTitle(
"CSC id");
3641 hClctFoundEffVsCsc[endc][idh]->GetYaxis()->SetTitle(
"% of same number found");
3642 pad[
page]->cd(idh+1); hClctFoundEffVsCsc[endc][idh]->Draw(
"e");
3647 ratio = numer/denom;
3650 sprintf(eff,
"eff = (%4.1f +/- %4.1f)%%", ratio*100.,
error*100.);
3651 teff.DrawTextNDC(0.3, 0.5, eff);
3653 page++; c1->Update();
3658 c1->Clear(); c1->cd(0);
3659 sprintf(titl,
"CLCT firmware-emulator: exact match, endcap %d", endc+1);
3660 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98, titl);
3661 title->SetFillColor(10); title->Draw();
3662 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3664 gStyle->SetOptStat(0);
3666 pad[
page]->Divide(2,5);
3668 for (
int idh = 0; idh < max_idh; idh++) {
3669 if (!
plotME1A && idh == 3)
continue;
3670 hClctMatchEffVsCsc[endc][idh] =
3676 for (Int_t ibin = 1; ibin <=
nbins; ibin++) {
3678 hClctMatchEffVsCsc[endc][idh]->SetBinContent(ibin, -1.);
3679 hClctMatchEffVsCsc[endc][idh]->SetBinError(ibin, 0.);
3682 gPad->Update(); gStyle->SetStatX(0.65);
3683 hClctMatchEffVsCsc[endc][idh]->SetMinimum(-0.05);
3684 hClctMatchEffVsCsc[endc][idh]->SetMaximum(1.05);
3685 hClctMatchEffVsCsc[endc][idh]->GetXaxis()->SetTitleOffset(0.7);
3686 hClctMatchEffVsCsc[endc][idh]->GetYaxis()->SetTitleOffset(0.8);
3687 hClctMatchEffVsCsc[endc][idh]->GetXaxis()->SetLabelSize(0.06);
3688 hClctMatchEffVsCsc[endc][idh]->GetYaxis()->SetLabelSize(0.06);
3689 hClctMatchEffVsCsc[endc][idh]->GetXaxis()->SetTitleSize(0.07);
3690 hClctMatchEffVsCsc[endc][idh]->GetYaxis()->SetTitleSize(0.07);
3691 hClctMatchEffVsCsc[endc][idh]->GetXaxis()->SetTitle(
"CSC id");
3692 hClctMatchEffVsCsc[endc][idh]->GetYaxis()->SetTitle(
"% of exact match");
3693 pad[
page]->cd(idh+1); hClctMatchEffVsCsc[endc][idh]->Draw(
"e");
3698 ratio = numer/denom;
3701 sprintf(eff,
"eff = (%4.1f +/- %4.1f)%%", ratio*100.,
error*100.);
3702 teff.DrawTextNDC(0.3, 0.5, eff);
3704 page++; c1->Update();
3709 c1->Clear(); c1->cd(0);
3710 sprintf(titl,
"LCT firmware-emulator: match in number found, endcap %d",
3712 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98, titl);
3713 title->SetFillColor(10); title->Draw();
3714 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3716 gStyle->SetOptStat(0);
3718 pad[
page]->Divide(2,5);
3720 for (
int idh = 0; idh < max_idh; idh++) {
3721 if (!
plotME1A && idh == 3)
continue;
3722 hLctFoundEffVsCsc[endc][idh] =
3728 for (Int_t ibin = 1; ibin <=
nbins; ibin++) {
3730 hLctFoundEffVsCsc[endc][idh]->SetBinContent(ibin, -1.);
3731 hLctFoundEffVsCsc[endc][idh]->SetBinError(ibin, 0.);
3734 gPad->Update(); gStyle->SetStatX(0.65);
3735 hLctFoundEffVsCsc[endc][idh]->SetMinimum(-0.05);
3736 hLctFoundEffVsCsc[endc][idh]->SetMaximum(1.05);
3737 hLctFoundEffVsCsc[endc][idh]->GetXaxis()->SetTitleOffset(0.7);
3738 hLctFoundEffVsCsc[endc][idh]->GetYaxis()->SetTitleOffset(0.8);
3739 hLctFoundEffVsCsc[endc][idh]->GetXaxis()->SetLabelSize(0.06);
3740 hLctFoundEffVsCsc[endc][idh]->GetYaxis()->SetLabelSize(0.06);
3741 hLctFoundEffVsCsc[endc][idh]->GetXaxis()->SetTitleSize(0.07);
3742 hLctFoundEffVsCsc[endc][idh]->GetYaxis()->SetTitleSize(0.07);
3743 hLctFoundEffVsCsc[endc][idh]->GetXaxis()->SetTitle(
"CSC id");
3744 hLctFoundEffVsCsc[endc][idh]->GetYaxis()->SetTitle(
"% of same number found");
3745 pad[
page]->cd(idh+1); hLctFoundEffVsCsc[endc][idh]->Draw(
"e");
3750 ratio = numer/denom;
3753 sprintf(eff,
"eff = (%4.1f +/- %4.1f)%%", ratio*100.,
error*100.);
3754 teff.DrawTextNDC(0.3, 0.5, eff);
3756 page++; c1->Update();
3761 c1->Clear(); c1->cd(0);
3762 sprintf(titl,
"LCT firmware-emulator: exact match, endcap %d", endc+1);
3763 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98, titl);
3764 title->SetFillColor(10); title->Draw();
3765 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3767 gStyle->SetOptStat(0);
3769 pad[
page]->Divide(2,5);
3771 for (
int idh = 0; idh < max_idh; idh++) {
3772 if (!
plotME1A && idh == 3)
continue;
3773 hLctMatchEffVsCsc[endc][idh] =
3779 for (Int_t ibin = 1; ibin <=
nbins; ibin++) {
3781 hLctMatchEffVsCsc[endc][idh]->SetBinContent(ibin, -1.);
3782 hLctMatchEffVsCsc[endc][idh]->SetBinError(ibin, 0.);
3785 gPad->Update(); gStyle->SetStatX(0.65);
3786 hLctMatchEffVsCsc[endc][idh]->SetMinimum(-0.05);
3787 hLctMatchEffVsCsc[endc][idh]->SetMaximum(1.05);
3788 hLctMatchEffVsCsc[endc][idh]->GetXaxis()->SetTitleOffset(0.7);
3789 hLctMatchEffVsCsc[endc][idh]->GetYaxis()->SetTitleOffset(0.8);
3790 hLctMatchEffVsCsc[endc][idh]->GetXaxis()->SetLabelSize(0.06);
3791 hLctMatchEffVsCsc[endc][idh]->GetYaxis()->SetLabelSize(0.06);
3792 hLctMatchEffVsCsc[endc][idh]->GetXaxis()->SetTitleSize(0.07);
3793 hLctMatchEffVsCsc[endc][idh]->GetYaxis()->SetTitleSize(0.07);
3794 hLctMatchEffVsCsc[endc][idh]->GetXaxis()->SetTitle(
"CSC id");
3795 hLctMatchEffVsCsc[endc][idh]->GetYaxis()->SetTitle(
"% of exact match");
3796 pad[
page]->cd(idh+1); hLctMatchEffVsCsc[endc][idh]->Draw(
"e");
3801 ratio = numer/denom;
3804 sprintf(eff,
"eff = (%4.1f +/- %4.1f)%%", ratio*100.,
error*100.);
3805 teff.DrawTextNDC(0.3, 0.5, eff);
3807 page++; c1->Update();
3815 TCanvas *
c1 =
new TCanvas(
"c1",
"", 0, 0, 500, 640);
3817 TPostScript *ps =
new TPostScript(fname.c_str(), 111);
3820 for (
int i_page = 0; i_page <
MAXPAGES; i_page++) {
3821 pad[i_page] =
new TPad(
"",
"", .05, .05, .93, .93);
3827 t.SetTextSize(0.025);
3834 c1->Clear(); c1->cd(0);
3835 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"ALCT resolution");
3836 title->SetFillColor(10); title->Draw();
3837 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3838 gStyle->SetOptStat(111110);
3840 pad[
page]->Divide(2,2);
3841 gStyle->SetStatX(1.00); gStyle->SetStatY(0.65);
3843 gPad->Update(); gStyle->SetStatX(1.00); gStyle->SetStatY(0.995);
3855 page++; c1->Update();
3858 c1->Clear(); c1->cd(0);
3859 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"#eta_rec-#eta_sim");
3860 title->SetFillColor(10); title->Draw();
3861 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3863 pad[
page]->Divide(2,5);
3864 for (
int idh = 0; idh < max_idh; idh++) {
3865 if (!
plotME1A && idh == 3)
continue;
3866 hEtaDiffCsc[idh][0]->GetXaxis()->SetLabelSize(0.07);
3867 hEtaDiffCsc[idh][0]->GetYaxis()->SetLabelSize(0.07);
3872 page++; c1->Update();
3875 c1->Clear(); c1->cd(0);
3876 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"#eta_rec-#eta_sim, endcap1");
3877 title->SetFillColor(10); title->Draw();
3878 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3880 pad[
page]->Divide(2,5);
3881 for (
int idh = 0; idh < max_idh; idh++) {
3882 if (!
plotME1A && idh == 3)
continue;
3883 hEtaDiffCsc[idh][1]->GetXaxis()->SetLabelSize(0.07);
3884 hEtaDiffCsc[idh][1]->GetYaxis()->SetLabelSize(0.07);
3889 page++; c1->Update();
3892 c1->Clear(); c1->cd(0);
3893 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"#eta_rec-#eta_sim, endcap2");
3894 title->SetFillColor(10); title->Draw();
3895 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3897 pad[
page]->Divide(2,5);
3898 for (
int idh = 0; idh < max_idh; idh++) {
3899 if (!
plotME1A && idh == 3)
continue;
3900 hEtaDiffCsc[idh][2]->GetXaxis()->SetLabelSize(0.07);
3901 hEtaDiffCsc[idh][2]->GetYaxis()->SetLabelSize(0.07);
3906 page++; c1->Update();
3909 c1->Clear(); c1->cd(0);
3910 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
3911 "#LT#eta_rec-#eta_sim#GT vs #eta_rec");
3912 title->SetFillColor(10); title->Draw();
3913 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3916 pad[
page]->Divide(2,2);
3918 for (
int istation = 0; istation <
MAX_STATIONS; istation++) {
3919 hMeanEtaDiffVsEta[istation] = (TH1F*)
hEtaDiffVsEta[istation]->Clone();
3920 hMeanEtaDiffVsEta[istation]->Divide(
hEtaDiffVsEta[istation],
3922 hMeanEtaDiffVsEta[istation]->GetXaxis()->SetTitleOffset(1.2);
3923 hMeanEtaDiffVsEta[istation]->GetXaxis()->SetTitle(
"#eta");
3924 hMeanEtaDiffVsEta[istation]->SetMaximum(0.05);
3925 pad[
page]->cd(istation+1); hMeanEtaDiffVsEta[istation]->Draw();
3927 page++; c1->Update();
3929 c1->Clear(); c1->cd(0);
3930 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
3931 "#eta_rec-#eta_sim vs wiregroup");
3932 title->SetFillColor(10); title->Draw();
3933 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3935 pad[
page]->Divide(2,5);
3936 for (
int idh = 0; idh < max_idh; idh++) {
3937 if (!
plotME1A && idh == 3)
continue;
3948 page++; c1->Update();
3951 c1->Clear(); c1->cd(0);
3952 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"#phi resolution");
3953 title->SetFillColor(10); title->Draw();
3954 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3955 gStyle->SetOptStat(111110);
3957 pad[
page]->Divide(2,2);
3958 gStyle->SetStatX(1.00); gStyle->SetStatY(0.65);
3960 gPad->Update(); gStyle->SetStatX(1.00); gStyle->SetStatY(0.995);
3978 page++; c1->Update();
3981 c1->Clear(); c1->cd(0);
3982 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"#phi_rec-#phi_sim (mrad)");
3983 title->SetFillColor(10); title->Draw();
3984 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
3986 pad[
page]->Divide(2,5);
3987 for (
int idh = 0; idh < max_idh; idh++) {
3988 if (!
plotME1A && idh == 3)
continue;
3989 hPhiDiffCsc[idh][0]->GetXaxis()->SetLabelSize(0.07);
3990 hPhiDiffCsc[idh][0]->GetYaxis()->SetLabelSize(0.07);
3995 page++; c1->Update();
3998 c1->Clear(); c1->cd(0);
3999 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
4000 "#phi_rec-#phi_sim (mrad), endcap1");
4001 title->SetFillColor(10); title->Draw();
4002 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
4004 pad[
page]->Divide(2,5);
4005 for (
int idh = 0; idh < max_idh; idh++) {
4006 if (!
plotME1A && idh == 3)
continue;
4007 hPhiDiffCsc[idh][1]->GetXaxis()->SetLabelSize(0.07);
4008 hPhiDiffCsc[idh][1]->GetYaxis()->SetLabelSize(0.07);
4013 page++; c1->Update();
4016 c1->Clear(); c1->cd(0);
4017 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
4018 "#phi_rec-#phi_sim (mrad), endcap2");
4019 title->SetFillColor(10); title->Draw();
4020 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
4022 pad[
page]->Divide(2,5);
4023 for (
int idh = 0; idh < max_idh; idh++) {
4024 if (!
plotME1A && idh == 3)
continue;
4025 hPhiDiffCsc[idh][2]->GetXaxis()->SetLabelSize(0.07);
4026 hPhiDiffCsc[idh][2]->GetYaxis()->SetLabelSize(0.07);
4031 page++; c1->Update();
4034 c1->Clear(); c1->cd(0);
4035 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
4036 "#LT#phi_rec-#phi_sim#GT (mrad) vs #phi_rec");
4037 title->SetFillColor(10); title->Draw();
4038 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
4039 gStyle->SetOptStat(0);
4041 pad[
page]->Divide(2,2);
4043 for (
int istation = 0; istation <
MAX_STATIONS; istation++) {
4044 hMeanPhiDiffVsPhi[istation] = (TH1F*)
hPhiDiffVsPhi[istation]->Clone();
4045 hMeanPhiDiffVsPhi[istation]->Divide(
hPhiDiffVsPhi[istation],
4047 hMeanPhiDiffVsPhi[istation]->GetXaxis()->SetTitleOffset(1.2);
4048 hMeanPhiDiffVsPhi[istation]->GetYaxis()->SetTitleOffset(1.7);
4049 hMeanPhiDiffVsPhi[istation]->GetXaxis()->SetTitle(
"#phi");
4050 hMeanPhiDiffVsPhi[istation]->GetYaxis()->SetTitle(
"#LT#phi_rec-#phi_sim#GT (mrad)");
4051 hMeanPhiDiffVsPhi[istation]->SetMaximum(5.);
4052 pad[
page]->cd(istation+1); hMeanPhiDiffVsPhi[istation]->Draw();
4054 page++; c1->Update();
4056 c1->Clear(); c1->cd(0);
4057 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
4058 "#phi_rec-#phi_sim (mrad) vs halfstrip #");
4059 title->SetFillColor(10); title->Draw();
4060 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
4061 gStyle->SetOptStat(0);
4063 pad[
page]->Divide(2,5);
4064 for (
int idh = 0; idh < max_idh; idh++) {
4065 if (!
plotME1A && idh == 3)
continue;
4074 page++; c1->Update();
4076 c1->Clear(); c1->cd(0);
4077 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
4078 "#phi_rec-#phi_sim, halfstrips only, different patterns");
4079 title->SetFillColor(10); title->Draw();
4080 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
4081 gStyle->SetOptStat(111110);
4083 pad[
page]->Divide(3,3);
4084 int min_pattern, max_pattern;
4087 for (
int idh = min_pattern; idh < max_pattern; idh++) {
4094 page++; c1->Update();
4097 c1->Clear(); c1->cd(0);
4098 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
4099 "#phi_1-#phi_6 (mrad), muon SimHits");
4100 title->SetFillColor(10); title->Draw();
4101 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
4103 pad[
page]->Divide(2,5);
4104 for (
int idh = 0; idh < max_idh; idh++) {
4105 if (!
plotME1A && idh == 3)
continue;
4112 page++; c1->Update();
4119 TCanvas *
c1 =
new TCanvas(
"c1",
"", 0, 0, 500, 700);
4121 TPostScript *ps =
new TPostScript(fname.c_str(), 111);
4124 for (
int i_page = 0; i_page <
MAXPAGES; i_page++) {
4125 pad[i_page] =
new TPad(
"",
"", .05, .05, .93, .93);
4131 t.SetTextSize(0.025);
4136 gStyle->SetOptDate(0);
4137 gStyle->SetTitleSize(0.1,
"");
4142 c1->Clear(); c1->cd(0);
4143 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"ALCT efficiency vs #eta");
4144 title->SetFillColor(10); title->Draw();
4145 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
4146 gStyle->SetOptStat(0);
4148 pad[
page]->Divide(2,2);
4150 for (
int istation = 0; istation <
MAX_STATIONS; istation++) {
4151 hALCTEffVsEta[istation] = (TH1F*)
hEfficHitsEta[istation]->Clone();
4154 hALCTEffVsEta[istation]->GetXaxis()->SetTitleOffset(1.2);
4155 hALCTEffVsEta[istation]->GetXaxis()->SetTitle(
"#eta");
4156 hALCTEffVsEta[istation]->SetMaximum(1.05);
4157 sprintf(histtitle,
"ALCT efficiency vs #eta, station %d", istation+1);
4158 hALCTEffVsEta[istation]->SetTitle(histtitle);
4159 pad[
page]->cd(istation+1); hALCTEffVsEta[istation]->Draw();
4161 page++; c1->Update();
4163 c1->Clear(); c1->cd(0);
4164 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"ALCT efficiency vs #eta");
4165 title->SetFillColor(10); title->Draw();
4166 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
4167 gStyle->SetOptStat(11111);
4169 pad[
page]->Divide(2,5);
4171 for (
int idh = 0; idh < max_idh; idh++) {
4172 if (!
plotME1A && idh == 3)
continue;
4176 if (idh == 3 || idh == 4 || idh == 6 || idh == 8) {
4177 gPad->Update(); gStyle->SetStatX(0.43);
4180 gPad->Update(); gStyle->SetStatX(1.00);
4182 hALCTEffVsEtaCsc[idh]->GetXaxis()->SetTitle(
"#eta");
4183 hALCTEffVsEtaCsc[idh]->GetXaxis()->SetTitleOffset(0.8);
4184 hALCTEffVsEtaCsc[idh]->GetXaxis()->SetTitleSize(0.07);
4185 hALCTEffVsEtaCsc[idh]->GetXaxis()->SetLabelSize(0.10);
4186 hALCTEffVsEtaCsc[idh]->GetYaxis()->SetLabelSize(0.10);
4187 hALCTEffVsEtaCsc[idh]->SetLabelOffset(0.012,
"XY");
4188 hALCTEffVsEtaCsc[idh]->SetMinimum(0.50);
4189 hALCTEffVsEtaCsc[idh]->SetMaximum(1.05);
4190 hALCTEffVsEtaCsc[idh]->SetTitle(
csc_type[idh].c_str());
4191 hALCTEffVsEtaCsc[idh]->SetTitleSize(0.1,
"");
4192 hALCTEffVsEtaCsc[idh]->SetLineWidth(2);
4193 hALCTEffVsEtaCsc[idh]->SetLineColor(4);
4194 pad[
page]->cd(idh+1); gPad->SetGrid(1); hALCTEffVsEtaCsc[idh]->Draw();
4196 page++; c1->Update();
4199 c1->Clear(); c1->cd(0);
4200 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"CLCT efficiency vs #eta");
4201 title->SetFillColor(10); title->Draw();
4202 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
4203 gStyle->SetOptStat(0);
4205 pad[
page]->Divide(2,2);
4207 for (
int istation = 0; istation <
MAX_STATIONS; istation++) {
4208 hCLCTEffVsEta[istation] = (TH1F*)
hEfficHitsEta[istation]->Clone();
4211 hCLCTEffVsEta[istation]->GetXaxis()->SetTitleOffset(1.2);
4212 hCLCTEffVsEta[istation]->GetXaxis()->SetTitle(
"#eta");
4213 hCLCTEffVsEta[istation]->SetMaximum(1.05);
4214 sprintf(histtitle,
"CLCT efficiency vs #eta, station %d", istation+1);
4215 hCLCTEffVsEta[istation]->SetTitle(histtitle);
4216 pad[
page]->cd(istation+1); hCLCTEffVsEta[istation]->Draw();
4218 page++; c1->Update();
4220 c1->Clear(); c1->cd(0);
4221 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"CLCT efficiency vs #eta");
4222 title->SetFillColor(10); title->Draw();
4223 sprintf(pagenum,
"- %d -", page); t.DrawText(0.9, 0.02, pagenum);
4224 gStyle->SetOptStat(111110);
4226 pad[
page]->Divide(2,5);
4228 for (
int idh = 0; idh < max_idh; idh++) {
4229 if (!
plotME1A && idh == 3)
continue;
4233 if (idh == 3 || idh == 4 || idh == 6 || idh == 8) {
4234 gPad->Update(); gStyle->SetStatX(0.43);
4237 gPad->Update(); gStyle->SetStatX(1.00);
4239 hCLCTEffVsEtaCsc[idh]->GetXaxis()->SetTitle(
"#eta");
4240 hCLCTEffVsEtaCsc[idh]->GetXaxis()->SetTitleOffset(0.8);
4241 hCLCTEffVsEtaCsc[idh]->GetXaxis()->SetTitleSize(0.07);
4242 hCLCTEffVsEtaCsc[idh]->GetXaxis()->SetLabelSize(0.10);
4243 hCLCTEffVsEtaCsc[idh]->GetYaxis()->SetLabelSize(0.10);
4244 hCLCTEffVsEtaCsc[idh]->SetLabelOffset(0.012,
"XY");
4245 hCLCTEffVsEtaCsc[idh]->SetMinimum(0.50);
4246 hCLCTEffVsEtaCsc[idh]->SetMaximum(1.05);
4247 hCLCTEffVsEtaCsc[idh]->SetTitle(
csc_type[idh].c_str());
4248 hCLCTEffVsEtaCsc[idh]->SetLineWidth(2);
4249 hCLCTEffVsEtaCsc[idh]->SetLineColor(4);
4250 pad[
page]->cd(idh+1); gPad->SetGrid(1); hCLCTEffVsEtaCsc[idh]->Draw();
4252 page++; c1->Update();
4259 TCanvas *
c1 =
new TCanvas(
"c1",
"", 0, 0, 500, 640);
4260 TCanvas *c2 =
new TCanvas(
"c2",
"", 0, 0, 540, 540);
4263 for (
int i_page = 0; i_page <
MAXPAGES; i_page++) {
4264 pad[i_page] =
new TPad(
"",
"", .07, .07, .93, .93);
4269 gStyle->SetOptDate(0);
4273 TPostScript *eps1 =
new TPostScript(
"clcts.eps", 113);
4275 c1->Clear(); c1->cd(0);
4276 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"CLCT quantities");
4277 title->SetFillColor(10); title->Draw();
4279 pad[
page]->Divide(2,3);
4282 TH1F* hClctPatternTot = (TH1F*)
hClctPattern[0]->Clone();
4283 hClctPatternTot->SetTitle(
"CLCT pattern #");
4285 pad[
page]->cd(3); hClctPatternTot->Draw();
4291 hClctKeyStripTot->SetTitle(
"CLCT key strip #");
4293 pad[
page]->cd(6); hClctKeyStripTot->Draw();
4294 page++; c1->Update();
4295 c1->Print(
"asdf.png");
4300 gStyle->SetTitleSize(0.055,
"");
4302 TPostScript *eps2 =
new TPostScript(
"alct_deltaWG.eps", 113);
4304 c2->Clear(); c2->cd(0);
4305 gStyle->SetOptStat(0);
4307 pad[
page]->Divide(1,1);
4315 page++; c2->Update();
4318 TPostScript *eps3 =
new TPostScript(
"clct_deltaHS.eps", 113);
4320 c2->Clear(); c2->cd(0);
4322 pad[
page]->Divide(1,1);
4330 page++; c2->Update();
4333 TPostScript *eps4 =
new TPostScript(
"clct_deltaDS.eps", 113);
4335 c2->Clear(); c2->cd(0);
4336 gStyle->SetOptStat(0);
4338 pad[
page]->Divide(1,1);
4346 page++; c2->Update();
4349 TPostScript *eps5 =
new TPostScript(
"clct_deltaPhi_hs.eps", 113);
4351 c1->Clear(); c1->cd(0);
4352 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
4353 "#phi_rec-#phi_sim (mrad), halfstrips only");
4354 title->SetFillColor(10); title->Draw();
4355 gStyle->SetTitleSize(0.1,
"");
4356 gStyle->SetOptStat(111110);
4358 pad[
page]->Divide(2,5);
4359 for (
int idh = 0; idh < max_idh; idh++) {
4360 if (!
plotME1A && idh == 3)
continue;
4367 hPhiDiffCsc[idh][4]->GetYaxis()->SetTitle(
"Entries ");
4368 hPhiDiffCsc[idh][4]->GetYaxis()->SetTitleSize(0.07);
4369 hPhiDiffCsc[idh][4]->GetYaxis()->SetTitleOffset(1.0);
4370 hPhiDiffCsc[idh][4]->GetXaxis()->SetLabelSize(0.10);
4371 hPhiDiffCsc[idh][4]->GetYaxis()->SetLabelSize(0.10);
4374 page++; c1->Update();
4380 TPostScript *eps6 =
new TPostScript(
"alct_effic.eps", 113);
4382 c1->Clear(); c1->cd(0);
4383 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"ALCT efficiency vs #eta");
4384 title->SetFillColor(10); title->Draw();
4385 gStyle->SetOptStat(0);
4387 pad[
page]->Divide(2,5);
4389 for (
int idh = 0; idh < max_idh; idh++) {
4390 if (!
plotME1A && idh == 3)
continue;
4394 hALCTEffVsEtaCsc[idh]->GetXaxis()->SetTitle(
"#eta");
4395 hALCTEffVsEtaCsc[idh]->GetXaxis()->SetTitleOffset(0.8);
4396 hALCTEffVsEtaCsc[idh]->GetXaxis()->SetTitleSize(0.07);
4397 hALCTEffVsEtaCsc[idh]->GetXaxis()->SetLabelSize(0.10);
4398 hALCTEffVsEtaCsc[idh]->GetYaxis()->SetLabelSize(0.10);
4399 hALCTEffVsEtaCsc[idh]->SetLabelOffset(0.012,
"XY");
4400 hALCTEffVsEtaCsc[idh]->SetMinimum(0.50);
4401 hALCTEffVsEtaCsc[idh]->SetMaximum(1.05);
4402 hALCTEffVsEtaCsc[idh]->SetTitle(
csc_type[idh].c_str());
4403 hALCTEffVsEtaCsc[idh]->SetTitleSize(0.1,
"");
4404 hALCTEffVsEtaCsc[idh]->SetLineWidth(2);
4405 hALCTEffVsEtaCsc[idh]->SetLineColor(4);
4406 hALCTEffVsEtaCsc[idh]->SetLineColor(4);
4407 pad[
page]->cd(idh+1); gPad->SetGrid(1); hALCTEffVsEtaCsc[idh]->Draw();
4409 page++; c1->Update();
4412 TPostScript *eps7 =
new TPostScript(
"clct_effic.eps", 113);
4414 c1->Clear(); c1->cd(0);
4415 title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"CLCT efficiency vs #eta");
4416 title->SetFillColor(10); title->Draw();
4417 gStyle->SetOptStat(0);
4419 pad[
page]->Divide(2,5);
4421 for (
int idh = 0; idh < max_idh; idh++) {
4422 if (!
plotME1A && idh == 3)
continue;
4426 hCLCTEffVsEtaCsc[idh]->GetXaxis()->SetTitle(
"#eta");
4427 hCLCTEffVsEtaCsc[idh]->GetXaxis()->SetTitleOffset(0.8);
4428 hCLCTEffVsEtaCsc[idh]->GetXaxis()->SetTitleSize(0.07);
4429 hCLCTEffVsEtaCsc[idh]->GetXaxis()->SetLabelSize(0.10);
4430 hCLCTEffVsEtaCsc[idh]->GetYaxis()->SetLabelSize(0.10);
4431 hCLCTEffVsEtaCsc[idh]->SetLabelOffset(0.012,
"XY");
4432 hCLCTEffVsEtaCsc[idh]->SetMinimum(0.50);
4433 hCLCTEffVsEtaCsc[idh]->SetMaximum(1.05);
4434 hCLCTEffVsEtaCsc[idh]->SetTitle(
csc_type[idh].c_str());
4435 hCLCTEffVsEtaCsc[idh]->SetLineWidth(2);
4436 hCLCTEffVsEtaCsc[idh]->SetLineColor(4);
4437 pad[
page]->cd(idh+1); gPad->SetGrid(1); hCLCTEffVsEtaCsc[idh]->Draw();
4439 page++; c1->Update();
4461 float fractional_strip = 0.5 * (keyHS + 1) - 0.25;
4465 LocalPoint csc_intersect = layer_geo->intersectionOfStripAndWire(fractional_strip, wire);
4475 bool isME11 = (
id.station() ==1 and (
id.
ring()==1
or id.
ring()==4));
4476 if (not isME11)
return true;
4478 int theEndcap = (
id.endcap() == 1)?1 : 2;
4516 type = (
id.triggerCscId()-1)/3;
4517 if (
id.
ring() == 4) {
4522 type = 3 +
id.ring() + 2*(
id.station()-2);
TH1F * hClctCompTotalCsc[MAX_ENDCAPS][CSC_TYPES]
TH1F * hPhiDiffCsc[CSC_TYPES][5]
TH1F * hLctTMBKeyGroupME11
const CSCBadChambers * badChambers_
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
int getCSCType(const CSCDetId &id)
virtual ~CSCTriggerPrimitivesReader()
Destructor.
GlobalPoint getGlobalPosition(unsigned int rawId, int keWg, int keyHS) const
static const int NCHAMBERS[CSC_TYPES]
TH1F * hEfficHitsEtaCsc[CSC_TYPES]
int convertBXofLCT(const int emul_bx, const CSCDetId &detid, const CSCALCTDigiCollection *alcts_data, const CSCCLCTDigiCollection *clcts_data)
TH1F * hLctCompFoundCsc[MAX_ENDCAPS][CSC_TYPES]
void fillLCTTMBHistos(const CSCCorrelatedLCTDigiCollection *lcts)
static const double TWOPI
TH1F * hClctCompFoundCsc[MAX_ENDCAPS][CSC_TYPES]
TH1F * hAlctCompSameNCsc[MAX_ENDCAPS][CSC_TYPES]
int chamberIX(CSCDetId id)
static const std::string csc_type_minus[CSC_TYPES]
double getHsPerRad(const int idh)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static bool bookedLCTMPCHistos
const GeomDet * idToDet(DetId) const override
TH1F * hLctMPCKeyGroupME11
static bool bookedHotWireHistos
static bool bookedCLCTHistos
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
TH1F * hEfficALCTEta[MAX_STATIONS]
Range get(const IndexType &index) const
return the digis for a given DetUnit
bool doesALCTCrossCLCT(CSCDetId id, int key_wg, int key_hs) const
Geom::Phi< T > phi() const
edm::EDGetTokenT< CSCALCTDigiCollection > alcts_e_token_
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > lcts_tmb_e_token_
constexpr uint32_t rawId() const
get the raw id
void drawHistosForTalks()
edm::EDGetTokenT< CSCWireDigiCollection > wireDigi_token_
edm::InputTag wireDigiProducer_
int nearestWG(const std::vector< CSCAnodeLayerInfo > &allLayerInfo, double &closestPhi, double &closestEta)
int chamberSerial(CSCDetId id)
void compare(const CSCALCTDigiCollection *alcts_data, const CSCALCTDigiCollection *alcts_emul, const CSCCLCTDigiCollection *clcts_data, const CSCCLCTDigiCollection *clcts_emul, const CSCCLCTPreTriggerDigiCollection *pretrigs_emul, const CSCCorrelatedLCTDigiCollection *lcts_data, const CSCCorrelatedLCTDigiCollection *lcts_emul)
def setup(process, global_tag, zero_tesla=False)
TH1F * hEfficALCTEtaCsc[CSC_TYPES]
static const int MAX_HS[CSC_TYPES]
static const int lut_wg_vs_hs_me1a[48][2]
void compareLCTs(const CSCCorrelatedLCTDigiCollection *lcts_data, const CSCCorrelatedLCTDigiCollection *lcts_emul, const CSCALCTDigiCollection *alcts_data, const CSCCLCTDigiCollection *clcts_data)
CSCTriggerPrimitivesReader(const edm::ParameterSet &conf)
Constructor.
void compareCLCTs(const CSCCLCTDigiCollection *clcts_data, const CSCCLCTDigiCollection *clcts_emul, const CSCCLCTPreTriggerDigiCollection *pretrigs_emul)
T * make(const Args &...args) const
make new ROOT object
TH1F * hClctVsPhi[MAX_STATIONS]
void init(int run, int event)
void getManyByType(std::vector< Handle< PROD >> &results) const
edm::EDGetTokenT< CSCCLCTDigiCollection > clcts_e_token_
TH2F * hPhiDiffVsStripCsc[CSC_TYPES][2]
Int_t t_EventNumberAnalyzed
TH1F * hPhiDiffVsPhi[MAX_STATIONS]
const Plane & surface() const
The nominal surface of the GeomDet.
void setGeometry(const CSCGeometry *geom)
TH1F * hAlctCompTotalCsc[MAX_ENDCAPS][CSC_TYPES]
std::vector< CSCAnodeLayerInfo > getSimInfo(const CSCALCTDigi &alct, const CSCDetId &alctId, const CSCWireDigiCollection *wiredc, const edm::PSimHitContainer *allSimHits)
static const double deltaEta
static bool bookedLCTTMBHistos
bool isInBadChamber(IndexType ichamber) const
Is the chamber with index 'ichamber' flagged as bad?
void compareALCTs(const CSCALCTDigiCollection *alcts_data, const CSCALCTDigiCollection *alcts_emul)
std::string resultsFileNamesPrefix_
void fillLCTMPCHistos(const CSCCorrelatedLCTDigiCollection *lcts)
#define DEFINE_FWK_MODULE(type)
void MCStudies(const edm::Event &ev, const CSCALCTDigiCollection *alcts, const CSCCLCTDigiCollection *clcts)
void calcResolution(const CSCALCTDigiCollection *alcts, const CSCCLCTDigiCollection *clcts, const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const edm::PSimHitContainer &allSimHits)
static const std::string csc_type[CSC_TYPES]
TH1F * hClctCompSameNCsc[MAX_ENDCAPS][CSC_TYPES]
edm::InputTag simHitProducer_
void calcEfficiency(const CSCALCTDigiCollection *alcts, const CSCCLCTDigiCollection *clcts, const edm::PSimHitContainer &allSimHits)
void analyze(const edm::Event &event, const edm::EventSetup &setup)
Does the job.
TH1F * hAlctCompFoundCsc[MAX_ENDCAPS][CSC_TYPES]
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
TH1F * hLctCompMatchCsc[MAX_ENDCAPS][CSC_TYPES]
float middleWireOfGroup(int wireGroup) const
TTree * bookTree(TTree *t, const std::string &name="Stub_compare")
static bool bookedEfficHistos
TH1F * hClctBendCsc[CSC_TYPES][2]
Abs< T >::type abs(const T &t)
TH1F * hEfficCLCTEta[MAX_STATIONS]
TH1F * hLctMPCChamber[MAX_STATIONS]
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
static const int lut_wg_vs_hs_me1b[48][2]
std::string lctProducerEmul_
int nearestHS(const std::vector< CSCCathodeLayerInfo > &allLayerInfo, double &closestPhi, double &closestEta)
int chamberIXi(CSCDetId id)
TTree * bookTree(TTree *t, const std::string &name="TreePerStub")
Int_t totStubs_emul_readout
unsigned short iChamberType() const
edm::EDGetTokenT< CSCALCTDigiCollection > alcts_d_token_
TH1F * hLctCompSameNCsc[MAX_ENDCAPS][CSC_TYPES]
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
double getWGEta(const CSCDetId &layerId, const int wiregroup)
void endJob()
Write to ROOT file, make plots, etc.
TH1F * hEfficHitsEta[MAX_STATIONS]
TH1F * hLctMPCKeyStripME11
static bool bookedCompHistos
TH1F * hLctTMBKeyStripME11
TH1F * hAlctCsc[MAX_ENDCAPS][CSC_TYPES]
TH1F * hPhiDiffPattern[CSCConstants::NUM_CLCT_PATTERNS]
MyStubComparison stubs_comparison[4]
void setGeometry(const CSCGeometry *geom)
void compareMPCLCTs(const CSCCorrelatedLCTDigiCollection *lcts_data, const CSCCorrelatedLCTDigiCollection *lcts_emul, const CSCALCTDigiCollection *alcts_data, const CSCCLCTDigiCollection *clcts_data)
T const * product() const
TH1F * hLctTMBChamber[MAX_STATIONS]
TH1F * hClctCsc[MAX_ENDCAPS][CSC_TYPES]
TH1F * hAlctVsEta[MAX_STATIONS]
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
const CSCGeometry * geom_
int triggerSector() const
static bool bookedResolHistos
edm::EDGetTokenT< CSCComparatorDigiCollection > compDigi_token_
static bool bookedALCTHistos
double getStripPhi(const CSCDetId &layerId, const float strip)
std::string lctProducerData_
TH1F * hAlctCompMatchCsc[MAX_ENDCAPS][CSC_TYPES]
edm::InputTag compDigiProducer_
static const int ptype_TMB07[CSCConstants::NUM_CLCT_PATTERNS]
std::string mpclctProducerData_
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
TH1F * hClctKeyStripCsc[CSC_TYPES]
TH1F * hClctCompMatchCsc[MAX_ENDCAPS][CSC_TYPES]
std::vector< CSCCathodeLayerInfo > getSimInfo(const CSCCLCTDigi &clct, const CSCDetId &clctId, const CSCComparatorDigiCollection *compdc, const edm::PSimHitContainer *allSimHits)
edm::EDGetTokenT< CSCCLCTDigiCollection > clcts_d_token_
void fillCLCTHistos(const CSCCLCTDigiCollection *clcts)
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > lcts_mpc_e_token_
TH1F * hTrueBendCsc[CSC_TYPES]
edm::EDGetTokenT< edm::PSimHitContainer > simHit_token_
std::vector< PSimHit > PSimHitContainer
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > lcts_mpc_d_token_
static const int lut_wg_vs_hs_me1ag[48][2]
void init(int run, int event)
TH1F * hLctTMBCsc[MAX_ENDCAPS][CSC_TYPES]
TH1F * hEtaDiffCsc[CSC_TYPES][3]
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > lcts_tmb_d_token_
void fillALCTHistos(const CSCALCTDigiCollection *alcts)
Int_t triggerSector(Int_t station, Int_t ring, Int_t chamber) const
T const * product() const
TH1F * hEfficCLCTEtaCsc[CSC_TYPES]
TH1F * hEtaDiffVsEta[MAX_STATIONS]
const CSCLayerGeometry * geometry() const
Int_t triggerCscId(Int_t station, Int_t ring, Int_t chamber) const
TH1F * hLctCompTotalCsc[MAX_ENDCAPS][CSC_TYPES]
void HotWires(const edm::Event &iEvent)
edm::EDGetTokenT< CSCCLCTPreTriggerDigiCollection > pretrigs_e_token_
TH2F * hEtaDiffVsWireCsc[CSC_TYPES]
static const int MAX_WG[CSC_TYPES]
static const std::string csc_type_plus[CSC_TYPES]
A container for a generic type of digis indexed by some index, implemented with a map<IndexType...