68 h_fitres1 = _ibooker.
book1D(
"Gaussian mean WP80 EB-EB",
"Gaussian mean WP80 EB-EB", 1, 0, 1);
69 h_fitres1bis = _ibooker.
book1D(
"Gaussian sigma WP80 EB-EB",
"Gaussian sigma WP80 EB-EB", 1, 0, 1);
70 h_fitres1Chi2 = _ibooker.
book1D(
71 "Gaussian Chi2 result over NDF WP80 EB-EB",
"Gaussian Chi2 result over NDF WP80 EB-EB", 1, 0, 1);
73 h_fitres3 = _ibooker.
book1D(
"Gaussian mean WP80 EB-EE",
"Gaussian mean result WP80 EB-EE", 1, 0, 1);
74 h_fitres3bis = _ibooker.
book1D(
"Gaussian sigma WP80 EB-EE",
"Gaussian sigma WP80 EB-EE", 1, 0, 1);
76 _ibooker.
book1D(
"Gaussian Chi2 result over NDF WP80 EB-EE",
"Gaussian Chi2 result over NDF WP80 EB-EE", 1, 0, 1);
78 h_fitres2 = _ibooker.
book1D(
"Gaussian mean WP80 EE-EE",
"Gaussian mean WP80 EE-EE", 1, 0, 1);
79 h_fitres2bis = _ibooker.
book1D(
"Gaussian sigma WP80 EE-EE",
"Gaussian sigma WP80 EE-EE", 1, 0, 1);
81 _ibooker.
book1D(
"Gaussian Chi2 result over NDF WP80 EE-EE",
"Gaussian Chi2 result over NDF WP80 EE-EE", 1, 0, 1);
83 LogTrace(
"EwkAnalyzer") <<
"Parameters initialization";
91 TH1F *R1 = h_fitres1->
getTH1F();
92 int division = B->GetNbinsX();
93 float massMIN = B->GetBinLowEdge(1);
94 float massMAX = B->GetBinLowEdge(division + 1);
97 TF1 *
func =
new TF1(
"mygauss",
mygauss, massMIN, massMAX, 3);
98 func->SetParameter(0, 1.0);
99 func->SetParName(0,
"const");
100 func->SetParameter(1, 95.0);
101 func->SetParName(1,
"mean");
102 func->SetParameter(2, 5.0);
103 func->SetParName(2,
"sigma");
114 B->Fit(
"mygauss",
"QR");
115 mean =
std::abs(func->GetParameter(1));
116 sigma =
std::abs(func->GetParError(1));
119 if (N == 0 || mean < 50 || mean > 100 || sigma <= 0 || sigma > 20) {
135 stats[3] = sigma * sigma * N + mean * mean *
N;
141 if (me1 !=
nullptr) {
143 TH1F *R1bis = h_fitres1bis->
getTH1F();
144 int division = Bbis->GetNbinsX();
145 float massMIN = Bbis->GetBinLowEdge(1);
146 float massMAX = Bbis->GetBinLowEdge(division + 1);
149 TF1 *func =
new TF1(
"mygauss",
mygauss, massMIN, massMAX, 3);
150 func->SetParameter(0, 1.0);
151 func->SetParName(0,
"const");
152 func->SetParameter(1, 95.0);
153 func->SetParName(1,
"mean");
154 func->SetParameter(2, 5.0);
155 func->SetParName(2,
"sigma");
158 R1bis->GetStats(stats);
162 N = Bbis->GetEntries();
166 Bbis->Fit(
"mygauss",
"QR");
167 rms =
std::abs(func->GetParameter(2));
168 rmsErr =
std::abs(func->GetParError(2));
171 if (N == 0 || rms < 0 || rms > 50 || rmsErr <= 0 || rmsErr > 50) {
187 stats[3] = rmsErr * rmsErr * N + rms * rms *
N;
189 R1bis->SetEntries(N);
190 R1bis->PutStats(stats);
194 if (me2 !=
nullptr) {
196 TH1F *R2 = h_fitres2->
getTH1F();
197 int division = E->GetNbinsX();
198 float massMIN = E->GetBinLowEdge(1);
199 float massMAX = E->GetBinLowEdge(division + 1);
202 TF1 *func =
new TF1(
"mygauss",
mygauss, massMIN, massMAX, 3);
203 func->SetParameter(0, 1.0);
204 func->SetParName(0,
"const");
205 func->SetParameter(1, 95.0);
206 func->SetParName(1,
"mean");
207 func->SetParameter(2, 5.0);
208 func->SetParName(2,
"sigma");
219 E->Fit(
"mygauss",
"QR");
220 mean =
std::abs(func->GetParameter(1));
221 sigma =
std::abs(func->GetParError(1));
224 if (N == 0 || mean < 50 || mean > 100 || sigma <= 0 || sigma > 20) {
240 stats[3] = sigma * sigma * N + mean * mean *
N;
247 if (me2 !=
nullptr) {
249 TH1F *R2bis = h_fitres2bis->
getTH1F();
250 int division = Ebis->GetNbinsX();
251 float massMIN = Ebis->GetBinLowEdge(1);
252 float massMAX = Ebis->GetBinLowEdge(division + 1);
255 TF1 *func =
new TF1(
"mygauss",
mygauss, massMIN, massMAX, 3);
256 func->SetParameter(0, 1.0);
257 func->SetParName(0,
"const");
258 func->SetParameter(1, 95.0);
259 func->SetParName(1,
"mean");
260 func->SetParameter(2, 5.0);
261 func->SetParName(2,
"sigma");
264 R2bis->GetStats(stats);
268 N = Ebis->GetEntries();
272 Ebis->Fit(
"mygauss",
"QR");
273 rms =
std::abs(func->GetParameter(2));
274 rmsErr =
std::abs(func->GetParError(2));
277 if (N == 0 || rms < 0 || rms > 50 || rmsErr <= 0 || rmsErr > 50) {
293 stats[3] = rmsErr * rmsErr * N + rms * rms *
N;
295 R2bis->SetEntries(N);
296 R2bis->PutStats(stats);
300 if (me3 !=
nullptr) {
301 TH1F *R3 = h_fitres3->
getTH1F();
303 int division = M->GetNbinsX();
304 float massMIN = M->GetBinLowEdge(1);
305 float massMAX = M->GetBinLowEdge(division + 1);
308 TF1 *func =
new TF1(
"mygauss",
mygauss, massMIN, massMAX, 3);
309 func->SetParameter(0, 1.0);
310 func->SetParName(0,
"const");
311 func->SetParameter(1, 95.0);
312 func->SetParName(1,
"mean");
313 func->SetParameter(2, 5.0);
314 func->SetParName(2,
"sigma");
325 M->Fit(
"mygauss",
"QR");
326 mean =
std::abs(func->GetParameter(1));
327 sigma =
std::abs(func->GetParError(1));
329 if (N == 0 || mean < 50 || mean > 100 || sigma <= 0 || sigma > 20) {
345 stats[3] = sigma * sigma * N + mean * mean *
N;
352 if (me3 !=
nullptr) {
354 TH1F *R3bis = h_fitres3bis->
getTH1F();
355 int division = Mbis->GetNbinsX();
356 float massMIN = Mbis->GetBinLowEdge(1);
357 float massMAX = Mbis->GetBinLowEdge(division + 1);
360 TF1 *func =
new TF1(
"mygauss",
mygauss, massMIN, massMAX, 3);
361 func->SetParameter(0, 1.0);
362 func->SetParName(0,
"const");
363 func->SetParameter(1, 95.0);
364 func->SetParName(1,
"mean");
365 func->SetParameter(2, 5.0);
366 func->SetParName(2,
"sigma");
369 R3bis->GetStats(stats);
373 N = Mbis->GetEntries();
377 Mbis->Fit(
"mygauss",
"QR");
378 rms =
std::abs(func->GetParameter(2));
379 rmsErr =
std::abs(func->GetParError(2));
382 if (N == 0 || rms < 0 || rms > 50 || rmsErr <= 0 || rmsErr > 50) {
398 stats[3] = rmsErr * rmsErr * N + rms * rms *
N;
400 R3bis->SetEntries(N);
401 R3bis->PutStats(stats);
406 if (me1 !=
nullptr) {
408 TH1F *S1 = h_fitres1Chi2->
getTH1F();
409 int division = C1->GetNbinsX();
410 float massMIN = C1->GetBinLowEdge(1);
411 float massMAX = C1->GetBinLowEdge(division + 1);
414 TF1 *func =
new TF1(
"mygauss",
mygauss, massMIN, massMAX, 3);
415 func->SetParameter(0, 1.0);
416 func->SetParName(0,
"const");
417 func->SetParameter(1, 95.0);
418 func->SetParName(1,
"mean");
419 func->SetParameter(2, 5.0);
420 func->SetParName(2,
"sigma");
427 N = C1->GetEntries();
431 C1->Fit(
"mygauss",
"QR");
432 if ((func->GetNDF() != 0)) {
438 if (N == 0 || Chi2 < 0 || NDF < 0) {
454 stats[3] = NDF * NDF * N + Chi2 * Chi2 *
N;
461 if (me2 !=
nullptr) {
463 TH1F *S2 = h_fitres2Chi2->
getTH1F();
464 int division = C2->GetNbinsX();
465 float massMIN = C2->GetBinLowEdge(1);
466 float massMAX = C2->GetBinLowEdge(division + 1);
469 TF1 *func =
new TF1(
"mygauss",
mygauss, massMIN, massMAX, 3);
470 func->SetParameter(0, 1.0);
471 func->SetParName(0,
"const");
472 func->SetParameter(1, 95.0);
473 func->SetParName(1,
"mean");
474 func->SetParameter(2, 5.0);
475 func->SetParName(2,
"sigma");
482 N = C2->GetEntries();
486 C2->Fit(
"mygauss",
"QR");
487 if (func->GetNDF() != 0) {
493 if (N == 0 || Chi2 < 0 || NDF < 0) {
509 stats[3] = NDF * NDF * N + Chi2 * Chi2 *
N;
515 if (me3 !=
nullptr) {
517 TH1F *S3 = h_fitres3Chi2->
getTH1F();
518 int division = C3->GetNbinsX();
519 float massMIN = C3->GetBinLowEdge(1);
520 float massMAX = C3->GetBinLowEdge(division + 1);
523 TF1 *func =
new TF1(
"mygauss",
mygauss, massMIN, massMAX, 3);
524 func->SetParameter(0, 1.0);
525 func->SetParName(0,
"const");
526 func->SetParameter(1, 95.0);
527 func->SetParName(1,
"mean");
528 func->SetParameter(2, 5.0);
529 func->SetParName(2,
"sigma");
536 N = C3->GetEntries();
540 C3->Fit(
"mygauss",
"QR");
541 if ((func->GetNDF() != 0)) {
547 if (N == 0 || Chi2 < 0 || NDF < 0) {
563 stats[3] = NDF * NDF * N + Chi2 * Chi2 *
N;
virtual void setCurrentFolder(std::string const &fullpath)
virtual TH1F * getTH1F() const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
Log< level::Error, false > LogError
virtual MonitorElement * get(std::string const &fullpath) const
char const * what() const noexceptoverride
Abs< T >::type abs(const T &t)
static const std::string B
Double_t mygauss(Double_t *, Double_t *)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())