8 #include "CLHEP/Random/RandGauss.h"
43 dbe_->
open(inputFile_);
48 edm::LogInfo(
"SiStripCalibLorentzAngle") <<
"### DIR-NAME = " << Dir_Name_;
50 std::vector<MonitorElement*>::iterator
histo;
55 Rootple = LorentzAngle_Plots->mkdir(
"Rootple");
56 MuH = LorentzAngle_Plots->mkdir(
"MuH");
59 MuH_vs_Phi = LorentzAngle_Plots->mkdir(
"MuH_vs_Phi");
62 MuH_vs_Eta = LorentzAngle_Plots->mkdir(
"MuH_vs_Eta");
75 TH1Ds[
"LA_TIB"] =
new TH1D(
"TanLAPerTesla TIB",
"TanLAPerTesla TIB", 1000, -0.5, 0.5);
77 TH1Ds[
"LA_TOB"] =
new TH1D(
"TanLAPerTesla TOB",
"TanLAPerTesla TOB", 1000, -0.5, 0.5);
79 TH1Ds[
"LA_err_TIB"] =
new TH1D(
"TanLAPerTesla Error TIB",
"TanLAPerTesla Error TIB", 1000, 0, 1);
80 TH1Ds[
"LA_err_TIB"]->SetDirectory(
MuH);
81 TH1Ds[
"LA_err_TOB"] =
new TH1D(
"TanLAPerTesla Error TOB",
"TanLAPerTesla Error TOB", 1000, 0, 1);
82 TH1Ds[
"LA_err_TOB"]->SetDirectory(
MuH);
83 TH1Ds[
"LA_chi2norm_TIB"] =
new TH1D(
"TanLAPerTesla Chi2norm TIB",
"TanLAPerTesla Chi2norm TIB", 2000, 0, 10);
84 TH1Ds[
"LA_chi2norm_TIB"]->SetDirectory(
MuH);
85 TH1Ds[
"LA_chi2norm_TOB"] =
new TH1D(
"TanLAPerTesla Chi2norm TOB",
"TanLAPerTesla Chi2norm TOB", 2000, 0, 10);
86 TH1Ds[
"LA_chi2norm_TOB"]->SetDirectory(
MuH);
87 TH1Ds[
"MagneticField"] =
new TH1D(
"MagneticField",
"MagneticField", 500, 0, 5);
88 TH1Ds[
"MagneticField"]->SetDirectory(
MuH);
90 TH2Ds[
"LA_TIB_graph"] =
new TH2D(
"TanLAPerTesla TIB Layers",
"TanLAPerTesla TIB Layers", 60, 0, 5, 1000, -0.3, 0.3);
91 TH2Ds[
"LA_TIB_graph"]->SetDirectory(
MuH);
92 TH2Ds[
"LA_TIB_graph"]->SetNdivisions(6);
93 TH2Ds[
"LA_TOB_graph"] =
new TH2D(
"TanLAPerTesla TOB Layers",
"TanLAPerTesla TOB Layers", 80, 0, 7, 1000, -0.3, 0.3);
94 TH2Ds[
"LA_TOB_graph"]->SetDirectory(
MuH);
95 TH2Ds[
"LA_TOB_graph"]->SetNdivisions(8);
97 TH1Ds[
"LA_TIB_1"] =
new TH1D(
"TanLAPerTesla TIB1",
"TanLAPerTesla TIB1", 2000, -0.5, 0.5);
99 TH1Ds[
"LA_TIB_1_mono"] =
new TH1D(
"TanLAPerTesla TIB1 MONO",
"TanLAPerTesla TIB1 MONO", 2000, -0.5, 0.5);
101 TH1Ds[
"LA_TIB_1_stereo"] =
new TH1D(
"TanLAPerTesla TIB1 STEREO",
"TanLAPerTesla TIB1 STEREO", 2000, -0.5, 0.5);
103 TH1Ds[
"LA_TIB_2"] =
new TH1D(
"TanLAPerTesla TIB2",
"TanLAPerTesla TIB2", 2000, -0.5, 0.5);
105 TH1Ds[
"LA_TIB_2_mono"] =
new TH1D(
"TanLAPerTesla TIB2 MONO",
"TanLAPerTesla TIB2 MONO", 2000, -0.5, 0.5);
107 TH1Ds[
"LA_TIB_2_stereo"] =
new TH1D(
"TanLAPerTesla TIB2 STEREO",
"TanLAPerTesla TIB2 STEREO", 2000, -0.5, 0.5);
109 TH1Ds[
"LA_TIB_3"] =
new TH1D(
"TanLAPerTesla_TIB 3",
"TanLAPerTesla TIB3", 2000, -0.5, 0.5);
111 TH1Ds[
"LA_TIB_4"] =
new TH1D(
"TanLAPerTesla_TIB 4",
"TanLAPerTesla TIB4", 2000, -0.5, 0.5);
114 TH1Ds[
"LA_TOB_1"] =
new TH1D(
"TanLAPerTesla TOB1",
"TanLAPerTesla TOB1", 2000, -0.5, 0.5);
116 TH1Ds[
"LA_TOB_1_mono"] =
new TH1D(
"TanLAPerTesla TOB1 MONO",
"TanLAPerTesla TOB1 MONO", 2000, -0.5, 0.5);
118 TH1Ds[
"LA_TOB_1_stereo"] =
new TH1D(
"TanLAPerTesla TOB1 STEREO",
"TanLAPerTesla TOB1 STEREO", 2000, -0.5, 0.5);
120 TH1Ds[
"LA_TOB_2"] =
new TH1D(
"TanLAPerTesla TOB2",
"TanLAPerTesla TOB2", 2000, -0.5, 0.5);
122 TH1Ds[
"LA_TOB_2_mono"] =
new TH1D(
"TanLAPerTesla TOB2 MONO",
"TanLAPerTesla TOB2 MONO", 2000, -0.5, 0.5);
124 TH1Ds[
"LA_TOB_2_stereo"] =
new TH1D(
"TanLAPerTesla TOB2 STEREO",
"TanLAPerTesla TOB2 STEREO", 2000, -0.5, 0.5);
126 TH1Ds[
"LA_TOB_3"] =
new TH1D(
"TanLAPerTesla TOB3",
"TanLAPerTesla TOB3", 2000, -0.5, 0.5);
128 TH1Ds[
"LA_TOB_4"] =
new TH1D(
"TanLAPerTesla TOB4",
"TanLAPerTesla TOB4", 2000, -0.5, 0.5);
130 TH1Ds[
"LA_TOB_5"] =
new TH1D(
"TanLAPerTesla TOB5",
"TanLAPerTesla TOB5", 2000, -0.5, 0.5);
132 TH1Ds[
"LA_TOB_6"] =
new TH1D(
"TanLAPerTesla TOB6",
"TanLAPerTesla TOB6", 2000, -0.5, 0.5);
135 TH2Ds[
"LA_phi_TIB"] =
new TH2D(
"TanLAPerTesla vs Phi TIB",
"TanLAPerTesla vs Phi TIB", 800, -4, 4, 600, -0.3, 0.3);
137 TH2Ds[
"LA_phi_TOB"] =
new TH2D(
"TanLAPerTesla vs Phi TOB",
"TanLAPerTesla vs Phi TOB", 800, -4, 4, 600, -0.3, 0.3);
140 TH2Ds[
"LA_phi_TIB1"] =
new TH2D(
"TanLAPerTesla vs Phi TIB1",
"TanLAPerTesla vs Phi TIB1", 800, -4, 4, 600, -0.3, 0.3);
142 TH2Ds[
"LA_phi_TIB1_mono"] =
143 new TH2D(
"TanLAPerTesla vs Phi TIB1 MONO",
"TanLAPerTesla vs Phi TIB1 MONO", 800, -4, 4, 600, -0.3, 0.3);
145 TH2Ds[
"LA_phi_TIB1_stereo"] =
146 new TH2D(
"TanLAPerTesla vs Phi TIB1 STEREO",
"TanLAPerTesla vs Phi TIB1 STEREO", 800, -4, 4, 600, -0.3, 0.3);
148 TH2Ds[
"LA_phi_TIB2"] =
new TH2D(
"TanLAPerTesla vs Phi TIB2",
"TanLAPerTesla vs Phi TIB2", 800, -4, 4, 600, -0.3, 0.3);
150 TH2Ds[
"LA_phi_TIB2_mono"] =
151 new TH2D(
"TanLAPerTesla vs Phi TIB2 MONO",
"TanLAPerTesla vs Phi TIB2 MONO", 800, -4, 4, 600, -0.3, 0.3);
153 TH2Ds[
"LA_phi_TIB2_stereo"] =
154 new TH2D(
"TanLAPerTesla vs Phi TIB2 STEREO",
"TanLAPerTesla vs Phi TIB2 STEREO", 800, -4, 4, 600, -0.3, 0.3);
156 TH2Ds[
"LA_phi_TIB3"] =
new TH2D(
"TanLAPerTesla vs Phi TIB3",
"TanLAPerTesla vs Phi TIB3", 800, -4, 4, 600, -0.3, 0.3);
158 TH2Ds[
"LA_phi_TIB4"] =
new TH2D(
"TanLAPerTesla vs Phi TIB4",
"TanLAPerTesla vs Phi TIB4", 800, -4, 4, 600, -0.3, 0.3);
161 TH2Ds[
"LA_phi_TOB1"] =
new TH2D(
"TanLAPerTesla vs Phi TOB1",
"TanLAPerTesla vs Phi TOB1", 800, -4, 4, 600, -0.3, 0.3);
163 TH2Ds[
"LA_phi_TOB1_mono"] =
164 new TH2D(
"TanLAPerTesla vs Phi TOB1 MONO",
"TanLAPerTesla vs Phi TOB1 MONO", 800, -4, 4, 600, -0.3, 0.3);
166 TH2Ds[
"LA_phi_TOB1_stereo"] =
167 new TH2D(
"TanLAPerTesla vs Phi TOB1 STEREO",
"TanLAPerTesla vs Phi TOB1 STEREO", 800, -4, 4, 600, -0.3, 0.3);
169 TH2Ds[
"LA_phi_TOB2"] =
new TH2D(
"TanLAPerTesla vs Phi TOB2",
"TanLAPerTesla vs Phi TOB2", 800, -4, 4, 600, -0.3, 0.3);
171 TH2Ds[
"LA_phi_TOB2_mono"] =
172 new TH2D(
"TanLAPerTesla vs Phi TOB2 MONO",
"TanLAPerTesla vs Phi TOB2 MONO", 800, -4, 4, 600, -0.3, 0.3);
174 TH2Ds[
"LA_phi_TOB2_stereo"] =
175 new TH2D(
"TanLAPerTesla vs Phi TOB2 STEREO",
"TanLAPerTesla vs Phi TOB2 STEREO", 800, -4, 4, 600, -0.3, 0.3);
177 TH2Ds[
"LA_phi_TOB3"] =
new TH2D(
"TanLAPerTesla vs Phi TOB3",
"TanLAPerTesla vs Phi TOB3", 800, -4, 4, 600, -0.3, 0.3);
179 TH2Ds[
"LA_phi_TOB4"] =
new TH2D(
"TanLAPerTesla vs Phi TOB4",
"TanLAPerTesla vs Phi TOB4", 800, -4, 4, 600, -0.3, 0.3);
181 TH2Ds[
"LA_phi_TOB5"] =
new TH2D(
"TanLAPerTesla vs Phi TOB5",
"TanLAPerTesla vs Phi TOB5", 800, -4, 4, 600, -0.3, 0.3);
183 TH2Ds[
"LA_phi_TOB6"] =
new TH2D(
"TanLAPerTesla vs Phi TOB6",
"TanLAPerTesla vs Phi TOB6", 800, -4, 4, 600, -0.3, 0.3);
186 TH2Ds[
"LA_eta_TIB"] =
187 new TH2D(
"TanLAPerTesla vs Eta TIB",
"TanLAPerTesla vs Eta TIB", 800, -2.6, 2.6, 600, -0.3, 0.3);
189 TH2Ds[
"LA_eta_TOB"] =
190 new TH2D(
"TanLAPerTesla vs Eta TOB",
"TanLAPerTesla vs Eta TOB", 800, -2.6, 2.6, 600, -0.3, 0.3);
193 TH2Ds[
"LA_eta_TIB1"] =
194 new TH2D(
"TanLAPerTesla vs Eta TIB1",
"TanLAPerTesla vs Eta TIB1", 800, -2.6, 2.6, 600, -0.3, 0.3);
196 TH2Ds[
"LA_eta_TIB1_mono"] =
197 new TH2D(
"TanLAPerTesla vs Eta TIB1 MONO",
"TanLAPerTesla vs Eta TIB1 MONO", 800, -2.6, 2.6, 600, -0.3, 0.3);
199 TH2Ds[
"LA_eta_TIB1_stereo"] =
200 new TH2D(
"TanLAPerTesla vs Eta TIB1 STEREO",
"TanLAPerTesla vs Eta TIB1 STEREO", 800, -2.6, 2.6, 600, -0.3, 0.3);
202 TH2Ds[
"LA_eta_TIB2"] =
203 new TH2D(
"TanLAPerTesla vs Eta TIB2",
"TanLAPerTesla vs Eta TIB2", 800, -2.6, 2.6, 600, -0.3, 0.3);
205 TH2Ds[
"LA_eta_TIB2_mono"] =
206 new TH2D(
"TanLAPerTesla vs Eta TIB2 MONO",
"TanLAPerTesla vs Eta TIB2 MONO", 800, -2.6, 2.6, 600, -0.3, 0.3);
208 TH2Ds[
"LA_eta_TIB2_stereo"] =
209 new TH2D(
"TanLAPerTesla vs Eta TIB2 STEREO",
"TanLAPerTesla vs Eta TIB2 STEREO", 800, -2.6, 2.6, 600, -0.3, 0.3);
211 TH2Ds[
"LA_eta_TIB3"] =
212 new TH2D(
"TanLAPerTesla vs Eta TIB3",
"TanLAPerTesla vs Eta TIB3", 800, -2.6, 2.6, 600, -0.3, 0.3);
214 TH2Ds[
"LA_eta_TIB4"] =
215 new TH2D(
"TanLAPerTesla vs Eta TIB4",
"TanLAPerTesla vs Eta TIB4", 800, -2.6, 2.6, 600, -0.3, 0.3);
218 TH2Ds[
"LA_eta_TOB1"] =
219 new TH2D(
"TanLAPerTesla vs Eta TOB1",
"TanLAPerTesla vs Eta TOB1", 800, -2.6, 2.6, 600, -0.3, 0.3);
221 TH2Ds[
"LA_eta_TOB1_mono"] =
222 new TH2D(
"TanLAPerTesla vs Eta TOB1 MONO",
"TanLAPerTesla vs Eta TOB1 MONO", 800, -2.6, 2.6, 600, -0.3, 0.3);
224 TH2Ds[
"LA_eta_TOB1_stereo"] =
225 new TH2D(
"TanLAPerTesla vs Eta TOB1 STEREO",
"TanLAPerTesla vs Eta TOB1 STEREO", 800, -2.6, 2.6, 600, -0.3, 0.3);
227 TH2Ds[
"LA_eta_TOB2"] =
228 new TH2D(
"TanLAPerTesla vs Eta TOB2",
"TanLAPerTesla vs Eta TOB2", 800, -2.6, 2.6, 600, -0.3, 0.3);
230 TH2Ds[
"LA_eta_TOB2_mono"] =
231 new TH2D(
"TanLAPerTesla vs Eta TOB2 MONO",
"TanLAPerTesla vs Eta TOB2 MONO", 800, -2.6, 2.6, 600, -0.3, 0.3);
233 TH2Ds[
"LA_eta_TOB2_stereo"] =
234 new TH2D(
"TanLAPerTesla vs Eta TOB2 STEREO",
"TanLAPerTesla vs Eta TOB2 STEREO", 800, -2.6, 2.6, 600, -0.3, 0.3);
236 TH2Ds[
"LA_eta_TOB3"] =
237 new TH2D(
"TanLAPerTesla vs Eta TOB3",
"TanLAPerTesla vs Eta TOB3", 800, -2.6, 2.6, 600, -0.3, 0.3);
239 TH2Ds[
"LA_eta_TOB4"] =
240 new TH2D(
"TanLAPerTesla vs Eta TOB4",
"TanLAPerTesla vs Eta TOB4", 800, -2.6, 2.6, 600, -0.3, 0.3);
242 TH2Ds[
"LA_eta_TOB5"] =
243 new TH2D(
"TanLAPerTesla vs Eta TOB5",
"TanLAPerTesla vs Eta TOB5", 800, -2.6, 2.6, 600, -0.3, 0.3);
245 TH2Ds[
"LA_eta_TOB6"] =
246 new TH2D(
"TanLAPerTesla vs Eta TOB6",
"TanLAPerTesla vs Eta TOB6", 800, -2.6, 2.6, 600, -0.3, 0.3);
249 ModuleTree =
new TTree(
"ModuleTree",
"ModuleTree");
269 int histocounter = 0;
270 int NotEnoughEntries = 0;
273 int FirstIT_goodfit = 0;
274 int FirstIT_badfit = 0;
275 int SecondIT_badfit = 0;
276 int SecondIT_goodfit = 0;
277 int no_mod_histo = 0;
295 double TIB1calib = 1.;
296 double TIB2calib = 1.;
297 double TIB3calib = 1.;
298 double TIB4calib = 1.;
299 double TOB1calib = 1.;
300 double TOB2calib = 1.;
301 double TOB3calib = 1.;
302 double TOB4calib = 1.;
303 double TOB5calib = 1.;
304 double TOB6calib = 1.;
306 if (CalibByMC ==
true) {
320 auto fitfunc = std::make_unique<TF1>(
"fitfunc",
"([4]/[3])*[1]*(TMath::Abs(x-[0]))+[2]", -1, 1);
321 auto fitfunc2IT = std::make_unique<TF1>(
"fitfunc2IT",
"([4]/[3])*[1]*(TMath::Abs(x-[0]))+[2]", -1, 1);
323 std::ofstream NoEntries;
324 NoEntries.open(NoEntriesHisto_.c_str());
326 Rep.open(LAreport_.c_str());
328 gStyle->SetOptStat(1110);
333 bool Good2ITFit =
false;
334 bool ModuleHisto =
true;
361 edm::LogInfo(
"SiStripCalibLorentzAngle") <<
"### NO MODULE HISTOGRAM";
364 if (stripdet !=
nullptr && ModuleHisto ==
true) {
387 if (det ==
nullptr) {
388 edm::LogError(
"SiStripCalibLorentzAngle") <<
"[SiStripCalibLorentzAngle::getNewObject] the detID " <<
id
389 <<
" doesn't seem to belong to Tracker" << std::endl;
397 if (stripdet ==
nullptr)
400 if (((*histo)->getEntries() <= FitCuts_Entries) && ModuleHisto ==
true) {
401 if (((*histo)->getEntries() == 0) && ModuleHisto ==
true) {
402 NoEntries <<
"NO ENTRIES MODULE, ID = " <<
id << std::endl;
403 edm::LogInfo(
"SiStripCalibLorentzAngle") <<
"### HISTOGRAM WITH 0 ENTRIES => TYPE:" << subid.
subdetId();
407 <<
"### HISTOGRAM WITH NR. ENTRIES <= ENTRIES_CUT => TYPE:" << subid.
subdetId();
418 std::stringstream LayerStream;
419 LayerStream <<
Layer;
420 name += LayerStream.str();
421 std::stringstream idnum;
426 gStyle->SetOptFit(111);
434 if (((*histo)->getEntries() > FitCuts_Entries) && ModuleHisto ==
true) {
448 fitfunc->SetParameter(0, p0_guess);
449 fitfunc->SetParameter(1, p1_guess);
450 fitfunc->SetParameter(2, p2_guess);
451 fitfunc->FixParameter(3, pitch);
452 fitfunc->FixParameter(4, thickness);
460 FitFunction->GetParameter(2) < FitCuts_p2 || chi2norm > FitCuts_chi2 ||
464 fitfunc2IT->SetParameter(0, p0_guess);
465 fitfunc2IT->SetParameter(1, p1_guess);
466 fitfunc2IT->SetParameter(2, p2_guess);
467 fitfunc2IT->FixParameter(3, pitch);
468 fitfunc2IT->FixParameter(4, thickness);
471 Profiles[
name]->Fit(fitfunc2IT.get(),
"E",
"", ModuleRangeMin2IT, ModuleRangeMax2IT);
479 FitFunction->GetParameter(2) < FitCuts_p2 || chi2norm > FitCuts_chi2 ||
494 FitFunction->GetParameter(2) > FitCuts_p2 && chi2norm < FitCuts_chi2 &&
508 FitFunction->GetParameter(2) > FitCuts_p2 && chi2norm < FitCuts_chi2 &&
510 if (Good2ITFit ==
false) {
524 LorentzAngle_Plots->cd();
560 TH1Ds[
"LA_chi2norm_TIB"]->Fill(chi2norm);
563 TH2Ds[
"LA_TIB_graph"]->Fill(Layer,
muH);
575 TH1Ds[
"LA_TIB_1_stereo"]->Fill(
muH);
591 TH1Ds[
"LA_TIB_2_stereo"]->Fill(
muH);
613 TH1Ds[
"LA_chi2norm_TOB"]->Fill(chi2norm);
616 TH2Ds[
"LA_TOB_graph"]->Fill(Layer,
muH);
628 TH1Ds[
"LA_TOB_1_stereo"]->Fill(
muH);
644 TH1Ds[
"LA_TOB_2_stereo"]->Fill(
muH);
681 auto gaus = std::make_unique<TF1>(
"gaus",
"gaus");
683 TH1Ds[
"LA_TIB_1"]->Fit(gaus.get(),
"",
"", -GaussFitRange, GaussFitRange);
685 float err_mean_TIB1 = gaus->GetParError(1);
686 float rms_TIB1 = gaus->GetParameter(2);
687 TH1Ds[
"LA_TIB_2"]->Fit(gaus.get(),
"",
"", -GaussFitRange, GaussFitRange);
689 float err_mean_TIB2 = gaus->GetParError(1);
690 float rms_TIB2 = gaus->GetParameter(2);
691 TH1Ds[
"LA_TIB_3"]->Fit(gaus.get(),
"",
"", -GaussFitRange, GaussFitRange);
693 float err_mean_TIB3 = gaus->GetParError(1);
694 float rms_TIB3 = gaus->GetParameter(2);
695 TH1Ds[
"LA_TIB_4"]->Fit(gaus.get(),
"",
"", -GaussFitRange, GaussFitRange);
697 float err_mean_TIB4 = gaus->GetParError(1);
698 float rms_TIB4 = gaus->GetParameter(2);
700 TH1Ds[
"LA_TOB_1"]->Fit(gaus.get(),
"",
"", -GaussFitRange, GaussFitRange);
702 float err_mean_TOB1 = gaus->GetParError(1);
703 float rms_TOB1 = gaus->GetParameter(2);
704 TH1Ds[
"LA_TOB_2"]->Fit(gaus.get(),
"",
"", -GaussFitRange, GaussFitRange);
706 float err_mean_TOB2 = gaus->GetParError(1);
707 float rms_TOB2 = gaus->GetParameter(2);
708 TH1Ds[
"LA_TOB_3"]->Fit(gaus.get(),
"",
"", -GaussFitRange, GaussFitRange);
710 float err_mean_TOB3 = gaus->GetParError(1);
711 float rms_TOB3 = gaus->GetParameter(2);
712 TH1Ds[
"LA_TOB_4"]->Fit(gaus.get(),
"",
"", -GaussFitRange, GaussFitRange);
714 float err_mean_TOB4 = gaus->GetParError(1);
715 float rms_TOB4 = gaus->GetParameter(2);
716 TH1Ds[
"LA_TOB_5"]->Fit(gaus.get(),
"",
"", -GaussFitRange, GaussFitRange);
718 float err_mean_TOB5 = gaus->GetParError(1);
719 float rms_TOB5 = gaus->GetParameter(2);
720 TH1Ds[
"LA_TOB_6"]->Fit(gaus.get(),
"",
"", -GaussFitRange, GaussFitRange);
722 float err_mean_TOB6 = gaus->GetParError(1);
723 float rms_TOB6 = gaus->GetParameter(2);
726 float TIBx[4] = {1, 2, 3, 4};
727 float TIBex[4] = {0, 0, 0, 0};
729 float TIBey[4] = {err_mean_TIB1, err_mean_TIB2, err_mean_TIB3, err_mean_TIB4};
732 float TOBx[6] = {1, 2, 3, 4, 5, 6};
733 float TOBex[6] = {0, 0, 0, 0, 0, 0};
735 float TOBey[6] = {err_mean_TOB1, err_mean_TOB2, err_mean_TOB3, err_mean_TOB4, err_mean_TOB5, err_mean_TOB6};
737 TIB_graph =
new TGraphErrors(nlayersTIB, TIBx, TIBy, TIBex, TIBey);
738 TOB_graph =
new TGraphErrors(nlayersTOB, TOBx, TOBy, TOBex, TOBey);
743 gStyle->SetOptFit(111);
744 gStyle->SetOptStat(111);
746 TIB_graph->SetTitle(
"TIB Layers #mu_{H}");
747 TIB_graph->GetXaxis()->SetTitle(
"Layers");
749 TIB_graph->GetYaxis()->SetTitle(
"#mu_{H}");
751 TIB_graph->GetYaxis()->SetTitleOffset(1.3);
752 TIB_graph->Fit(
"fit_TIB",
"E",
"", 1, 4);
755 TOB_graph->SetTitle(
"TOB Layers #mu_{H}");
756 TOB_graph->GetXaxis()->SetTitle(
"Layers");
758 TOB_graph->GetYaxis()->SetTitle(
"#mu_{H}");
760 TOB_graph->GetYaxis()->SetTitleOffset(1.3);
761 TOB_graph->Fit(
"fit_TOB",
"E",
"", 1, 6);
767 Rep <<
"- NR.OF TIB AND TOB MODULES = 7932" << std::endl << std::endl << std::endl;
768 Rep <<
"- NO MODULE HISTOS FOUND = " << no_mod_histo << std::endl << std::endl;
769 Rep <<
"- NR.OF HISTOS WITH ENTRIES > " << FitCuts_Entries <<
" = " << histocounter << std::endl << std::endl;
770 Rep <<
"- NR.OF HISTOS WITH ENTRIES <= " << FitCuts_Entries <<
" (!=0) = " << NotEnoughEntries << std::endl
772 Rep <<
"- NR.OF HISTOS WITH 0 ENTRIES = " << ZeroEntries << std::endl << std::endl << std::endl;
773 Rep <<
"- NR.OF GOOD FIT (FIRST IT + SECOND IT GOOD FIT)= " << GoodFit << std::endl << std::endl;
774 Rep <<
"- NR.OF FIRST IT GOOD FIT = " << FirstIT_goodfit << std::endl << std::endl;
775 Rep <<
"- NR.OF SECOND IT GOOD FIT = " << SecondIT_goodfit << std::endl << std::endl;
776 Rep <<
"- NR.OF FIRST IT BAD FIT = " << FirstIT_badfit << std::endl << std::endl;
777 Rep <<
"- NR.OF SECOND IT BAD FIT = " << SecondIT_badfit << std::endl << std::endl << std::endl;
779 Rep <<
"--------------- Mean MuH values per Layer -------------------" << std::endl << std::endl << std::endl;
780 Rep <<
"TIB1 = " <<
mean_TIB1 <<
" +- " << err_mean_TIB1 <<
" RMS = " << rms_TIB1 << std::endl;
781 Rep <<
"TIB2 = " <<
mean_TIB2 <<
" +- " << err_mean_TIB2 <<
" RMS = " << rms_TIB2 << std::endl;
782 Rep <<
"TIB3 = " <<
mean_TIB3 <<
" +- " << err_mean_TIB3 <<
" RMS = " << rms_TIB3 << std::endl;
783 Rep <<
"TIB4 = " <<
mean_TIB4 <<
" +- " << err_mean_TIB4 <<
" RMS = " << rms_TIB4 << std::endl;
784 Rep <<
"TOB1 = " <<
mean_TOB1 <<
" +- " << err_mean_TOB1 <<
" RMS = " << rms_TOB1 << std::endl;
785 Rep <<
"TOB2 = " <<
mean_TOB2 <<
" +- " << err_mean_TOB2 <<
" RMS = " << rms_TOB2 << std::endl;
786 Rep <<
"TOB3 = " <<
mean_TOB3 <<
" +- " << err_mean_TOB3 <<
" RMS = " << rms_TOB3 << std::endl;
787 Rep <<
"TOB4 = " <<
mean_TOB4 <<
" +- " << err_mean_TOB4 <<
" RMS = " << rms_TOB4 << std::endl;
788 Rep <<
"TOB5 = " <<
mean_TOB5 <<
" +- " << err_mean_TOB5 <<
" RMS = " << rms_TOB5 << std::endl;
789 Rep <<
"TOB6 = " <<
mean_TOB6 <<
" +- " << err_mean_TOB6 <<
" RMS = " << rms_TOB6 << std::endl << std::endl;
811 auto LorentzAngle = std::make_unique<SiStripLorentzAngle>();
814 for (std::map<uint32_t, float>::iterator it =
detid_la.begin(); it !=
detid_la.end(); it++) {
815 float langle = it->second;
816 if (!LorentzAngle->putLorentzAngle(it->first, langle))
818 <<
"[SiStripCalibLorentzAngle::analyze] detid already exists" << std::endl;
824 TrackerGeometry::DetIdContainer::const_iterator
Iditer;
826 for (Iditer = Id.begin(); Iditer != Id.end(); Iditer++) {
845 if (!LorentzAngle->putLorentzAngle(Iditer->rawId(),
hallMobility))
846 edm::LogError(
"SiStripLorentzAngleGenerator") <<
" detid already exists" << std::endl;
869 if (!LorentzAngle->putLorentzAngle(Iditer->rawId(),
hallMobility))
870 edm::LogError(
"SiStripLorentzAngleGenerator") <<
" detid already exists" << std::endl;
875 if (!LorentzAngle->putLorentzAngle(Iditer->rawId(),
hallMobility))
876 edm::LogError(
"SiStripLorentzAngleGenerator") <<
" detid already exists" << std::endl;
885 if (!LorentzAngle->putLorentzAngle(Iditer->rawId(),
hallMobility))
886 edm::LogError(
"SiStripLorentzAngleGenerator") <<
" detid already exists" << std::endl;
TDirectory * SecondIT_BadFit_Histos
static constexpr auto TEC
T getUntrackedParameter(std::string const &, T const &) const
TDirectory * FirstIT_GoodFit_Histos
const GlobalPoint gposition
const edm::EventSetup & c
Point3DBase< Scalar, LocalTag > LocalPoint
TDirectory * TIB_2IT_GoodFit
unsigned int tibLayer(const DetId &id) const
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
uint16_t *__restrict__ id
virtual const Topology & topology() const
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
unsigned int tecRing(const DetId &id) const
ring id
TDirectory * TOB_2IT_GoodFit
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
Geom::Phi< T > phi() const
SiStripCalibLorentzAngle(const edm::ParameterSet &conf)
const Bounds & bounds() const
Log< level::Error, false > LogError
TrackerGeometry::DetIdContainer::const_iterator Iditer
const Plane & surface() const
The nominal surface of the GeomDet.
virtual std::vector< dqm::harvesting::MonitorElement * > getAllContents(std::string const &path) const
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
uint32_t getComponentId(std::string histoid)
TDirectory * TIB_1IT_GoodFit
virtual float thickness() const =0
bool getData(T &iHolder) const
virtual float localPitch(const LocalPoint &) const =0
TDirectory * LorentzAngle_Plots
std::vector< MonitorElement * > histolist
TDirectory * TIB_2IT_BadFit
TDirectory * TOB_1IT_GoodFit
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static constexpr auto TOB
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
TDirectory * SecondIT_GoodFit_Histos
int extract(std::vector< int > *output, const std::string &dati)
SiStripHistoId hidmanager
Log< level::Info, false > LogInfo
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
unsigned int stereo() const
stereo
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleRcd > lorentzAngleToken_
static constexpr auto TIB
const TrackerGeometry * tkGeom_
void algoBeginJob(const edm::EventSetup &) override
~SiStripCalibLorentzAngle() override
T getParameter(std::string const &) const
std::vector< DetId > DetIdContainer
TDirectory * TOB_2IT_BadFit
std::unique_ptr< SiStripLorentzAngle > getNewObject() override
const PositionType & position() const
static constexpr auto TID
Power< A, B >::type pow(const A &a, const B &b)
DQM_DEPRECATED bool open(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
std::map< uint32_t, float > detid_la
const TrackerTopology * tTopo_
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
unsigned int tobLayer(const DetId &id) const