-
Notifications
You must be signed in to change notification settings - Fork 2
/
ra2bRoostatsClass5.c
1914 lines (1388 loc) · 90.7 KB
/
ra2bRoostatsClass5.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// Owen Long, UCR
// Harrison Prosper, FSU
// Sezen Sekmen, FSU
//
//
#include "ra2bRoostatsClass5.h"
#include <iostream>
#include <string.h>
#include "TCanvas.h"
#include "TStyle.h"
#include "THStack.h"
#include "TLegend.h"
#include "TText.h"
#include "TFile.h"
#include "TTree.h"
#include "TRandom1.h"
#include "TRandom2.h"
#include "TH2F.h"
#include "TGaxis.h"
#include "TLine.h"
#include "TStringLong.h"
#include "RooArgSet.h"
#include "RooConstVar.h"
#include "RooTrace.h"
#include "RooUniform.h"
#include "RooStats/ProfileLikelihoodCalculator.h"
#include "RooStats/LikelihoodInterval.h"
#include "RooStats/LikelihoodIntervalPlot.h"
#include "RooStats/HypoTestResult.h"
#include "LikelihoodIntervalPlot.cxx"
using namespace RooFit ;
using namespace RooStats ;
//=====================================================================================================
ra2bRoostatsClass5::ra2bRoostatsClass5( bool ArgUseSigTtwjVar, bool ArgUseLdpVars, int ArgznnModel ) {
gStyle->SetOptStat(0) ;
useSigTtwjVar = ArgUseSigTtwjVar ;
useLdpVars = ArgUseLdpVars ;
znnModel = ArgznnModel ;
if ( znnModel > 2 ) {
printf("\n\n\n *** Unrecognized znn model number %d. Should be 1 or 2.\n\n\n", znnModel ) ;
}
//--- Tell RooFit to shut up about anything less important than an ERROR.
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
/// RooMsgService::instance().addStream(DEBUG,Topic(Tracing),OutputFile("debug.log")) ;
printf("\n\n ==== RooFit output configuration ===============\n") ;
RooMsgService::instance().Print("v") ;
printf("\n\n ================================================\n") ;
varsAtFitVals = false ;
initialized = false ;
//--- CLs stuff below here
tt_bgonly = 0x0 ;
tt_splusb = 0x0 ;
toymean_n_sig = 0. ;
toymean_n_sb = 0. ;
toymean_n_sig_ldp = 0. ;
toymean_n_sb_ldp = 0. ;
toymean_n_sig_sl = 0. ;
toymean_n_sb_sl = 0. ;
toymean_n_lsb_0b = 0. ;
toymean_n_lsb_0b_ldp = 0. ;
//-- Znn model 1
toymean_n_sig_ee = 0. ;
toymean_n_sb_ee = 0. ;
toymean_n_sig_mm = 0. ;
toymean_n_sb_mm = 0. ;
//-- Znn model 2
toymean_n_sigsb_ee = 0. ;
toymean_n_sigsb_mm = 0. ;
trandom_cls = new TRandom2(12345) ;
}
//===================================================================
ra2bRoostatsClass5::~ra2bRoostatsClass5() {
if ( !initialized ) return ;
// delete dsObserved ;
// //delete plinterval_susy_sig ;
// delete rv_Nsig ;
// delete rv_Na ;
// delete rv_Nd ;
// delete rv_Nsb1 ;
// delete rv_Nsb2 ;
// delete rv_Nsb3 ;
// delete rv_Nsb4 ;
// delete rv_Nsb5 ;
// delete rv_Nlsb1 ;
// delete rv_Nlsb2 ;
// delete rv_Nlsb3 ;
// delete rv_Nlsb4 ;
// delete rv_Nlsb5 ;
// delete rv_Nslsig1 ;
// delete rv_Nslsig2 ;
// delete rv_Nslsig3 ;
// delete rv_Nslsig4 ;
// delete rv_Nslsig5 ;
// delete rv_Nslsb1 ;
// delete rv_Nslsb2 ;
// delete rv_Nslsb3 ;
// delete rv_Nslsb4 ;
// delete rv_Nslsb5 ;
// delete rv_Nslmsb1 ;
// delete rv_Nslmsb2 ;
// delete rv_Nslmsb3 ;
// delete rv_Nslmsb4 ;
// delete rv_Nslmsb5 ;
// delete rv_mu_ttbar_sig ;
// delete rv_mu_qcd_sig ;
// delete rv_mu_ttbar_sb ;
// delete rv_mu_qcd_sb ;
// delete rv_mu_ew_sig ;
// delete rv_mu_susy_sig ;
// delete rv_mu_ew_sb1 ;
// delete rv_mu_ew_sb2 ;
// delete rv_mu_ew_sb3 ;
// delete rv_mu_ew_sb4 ;
// delete rv_mu_ew_sb5 ;
// delete rv_mu_susy_sb1 ;
// delete rv_mu_susy_sb2 ;
// delete rv_mu_susy_sb3 ;
// delete rv_mu_susy_sb4 ;
// delete rv_mu_susy_sb5 ;
// delete rv_mu_ttbar_a ;
// delete rv_mu_qcd_a ;
// delete rv_mu_ew_a ;
// delete rv_mu_susy_a ;
// delete rv_mu_ttbar_d ;
// delete rv_mu_qcd_d ;
// delete rv_mu_ew_d ;
// delete rv_mu_susy_d ;
// delete rv_mu_qcd_lsb1 ;
// delete rv_mu_qcd_lsb2 ;
// delete rv_mu_qcd_lsb3 ;
// delete rv_mu_qcd_lsb4 ;
// delete rv_mu_qcd_lsb5 ;
// delete rv_mu_qcdmc_sig ;
// delete rv_mu_qcdmc_sb ;
// delete rv_mu_qcdmc_a ;
// delete rv_mu_qcdmc_d ;
// delete rv_mu_sl_ttbar_sig1 ;
// delete rv_mu_sl_ttbar_sig2 ;
// delete rv_mu_sl_ttbar_sig3 ;
// delete rv_mu_sl_ttbar_sig4 ;
// delete rv_mu_sl_ttbar_sig5 ;
// delete rv_mu_sl_ttbar_sb1 ;
// delete rv_mu_sl_ttbar_sb2 ;
// delete rv_mu_sl_ttbar_sb3 ;
// delete rv_mu_sl_ttbar_sb4 ;
// delete rv_mu_sl_ttbar_sb5 ;
// delete rv_mu_sl_ttbar_msb1 ;
// delete rv_mu_sl_ttbar_msb2 ;
// delete rv_mu_sl_ttbar_msb3 ;
// delete rv_mu_sl_ttbar_msb4 ;
// delete rv_mu_sl_ttbar_msb5 ;
// delete rv_mu_sl_ew_sig1 ;
// delete rv_mu_sl_ew_sig2 ;
// delete rv_mu_sl_ew_sig3 ;
// delete rv_mu_sl_ew_sig4 ;
// delete rv_mu_sl_ew_sig5 ;
// delete rv_mu_sl_ew_sb1 ;
// delete rv_mu_sl_ew_sb2 ;
// delete rv_mu_sl_ew_sb3 ;
// delete rv_mu_sl_ew_sb4 ;
// delete rv_mu_sl_ew_sb5 ;
// delete rv_mu_sl_ew_msb1 ;
// delete rv_mu_sl_ew_msb2 ;
// delete rv_mu_sl_ew_msb3 ;
// delete rv_mu_sl_ew_msb4 ;
// delete rv_mu_sl_ew_msb5 ;
// delete rv_mu_sl_susy_sig1 ;
// delete rv_mu_sl_susy_sig2 ;
// delete rv_mu_sl_susy_sig3;
// delete rv_mu_sl_susy_sig4 ;
// delete rv_mu_sl_susy_sig5 ;
// delete rv_mu_sl_susy_sb1 ;
// delete rv_mu_sl_susy_sb2 ;
// delete rv_mu_sl_susy_sb3 ;
// delete rv_mu_sl_susy_sb4 ;
// delete rv_mu_sl_susy_sb5 ;
// delete rv_mu_sl_susy_msb1 ;
// delete rv_mu_sl_susy_msb2 ;
// delete rv_mu_sl_susy_msb3 ;
// delete rv_mu_sl_susy_msb4 ;
// delete rv_mu_sl_susy_msb5 ;
// delete rv_mu_sl_ttbar_sb ;
// delete rv_mu_sl_ttbar_sig ;
// delete rv_mu_qcd_lsb ;
// delete rv_f_qcd_lsb1 ;
// delete rv_f_qcd_lsb2 ;
// delete rv_f_qcd_lsb3 ;
// delete rv_f_qcd_lsb4 ;
// delete rv_f_qcd_lsb5 ;
// delete rv_mu_qcd_sb1 ;
// delete rv_mu_qcd_sb2 ;
// delete rv_mu_qcd_sb3 ;
// delete rv_mu_qcd_sb4 ;
// delete rv_mu_qcd_sb5 ;
// delete rv_mu_sl_ttbar1 ;
// delete rv_mu_sl_ttbar2 ;
// delete rv_mu_sl_ttbar3 ;
// delete rv_mu_sl_ttbar4 ;
// delete rv_mu_sl_ttbar5 ;
// delete rv_mu_sl_ttbar ;
// delete rv_f_sl_ttbar1 ;
// delete rv_f_sl_ttbar2 ;
// delete rv_f_sl_ttbar3 ;
// delete rv_f_sl_ttbar4 ;
// delete rv_f_sl_ttbar5 ;
// delete rv_mu_ttbar_sb1 ;
// delete rv_mu_ttbar_sb2 ;
// delete rv_mu_ttbar_sb3 ;
// delete rv_mu_ttbar_sb4 ;
// delete rv_mu_ttbar_sb5 ;
// delete rv_n_sig ;
// delete rv_n_sb1 ;
// delete rv_n_sb2 ;
// delete rv_n_sb3 ;
// delete rv_n_sb4 ;
// delete rv_n_sb5 ;
// delete rv_n_a ;
// delete rv_n_d ;
// delete rv_n_lsb1 ;
// delete rv_n_lsb2 ;
// delete rv_n_lsb3 ;
// delete rv_n_lsb4 ;
// delete rv_n_lsb5 ;
// delete rv_n_sl_sig1 ;
// delete rv_n_sl_sig2 ;
// delete rv_n_sl_sig3 ;
// delete rv_n_sl_sig4 ;
// delete rv_n_sl_sig5 ;
// delete rv_n_sl_sb1 ;
// delete rv_n_sl_sb2 ;
// delete rv_n_sl_sb3 ;
// delete rv_n_sl_sb4 ;
// delete rv_n_sl_sb5 ;
// delete rv_n_sl_msb1 ;
// delete rv_n_sl_msb2 ;
// delete rv_n_sl_msb3 ;
// delete rv_n_sl_msb4 ;
// delete rv_n_sl_msb5 ;
// delete pdf_Nsig ;
// delete pdf_Na ;
// delete pdf_Nd ;
// delete pdf_Nsb1 ;
// delete pdf_Nsb2 ;
// delete pdf_Nsb3 ;
// delete pdf_Nsb4 ;
// delete pdf_Nsb5 ;
// delete pdf_Nlsb1 ;
// delete pdf_Nlsb2 ;
// delete pdf_Nlsb3 ;
// delete pdf_Nlsb4 ;
// delete pdf_Nlsb5 ;
// delete pdf_Nsl_sig1 ;
// delete pdf_Nsl_sig2 ;
// delete pdf_Nsl_sig3 ;
// delete pdf_Nsl_sig4 ;
// delete pdf_Nsl_sig5 ;
// delete pdf_Nsl_sb1 ;
// delete pdf_Nsl_sb2 ;
// delete pdf_Nsl_sb3 ;
// delete pdf_Nsl_sb4 ;
// delete pdf_Nsl_sb5 ;
// delete pdf_Nsl_msb1 ;
// delete pdf_Nsl_msb2 ;
// delete pdf_Nsl_msb3 ;
// delete pdf_Nsl_msb4 ;
// delete pdf_Nsl_msb5 ;
// delete pdf_Nqcdmc_sig ;
// delete pdf_Nqcdmc_sb ;
// delete pdf_Nqcdmc_a ;
// delete pdf_Nqcdmc_d ;
// delete likelihood ;
// delete workspace ;
}
//===================================================================
bool ra2bRoostatsClass5::initialize( const char* infile ) {
printf( "\n\n Opening input file : %s\n\n", infile ) ;
FILE* infp ;
if ( (infp=fopen( infile,"r"))==NULL ) {
printf("\n\n *** Problem opening input file: %s.\n\n", infile ) ;
return false ;
}
sprintf( initializeFile, "%s", infile ) ;
int Nsig ;
int Nsb ;
int Nsig_sl ;
int Nsb_sl ;
int Nsig_ldp ;
int Nsb_ldp ;
int Nlsb ;
int Nlsb_ldp ;
int Nlsb_0b ;
int Nlsb_0b_ldp ;
float Nqcdmc_sig ;
float Nqcdmc_sig_err ;
float Nqcdmc_sb ;
float Nqcdmc_sb_err ;
float Nqcdmc_sig_sl ;
float Nqcdmc_sig_sl_err ;
float Nqcdmc_sb_sl ;
float Nqcdmc_sb_sl_err ;
float Nqcdmc_sig_ldp ;
float Nqcdmc_sig_ldp_err ;
float Nqcdmc_sb_ldp ;
float Nqcdmc_sb_ldp_err ;
float Nqcdmc_lsb ;
float Nqcdmc_lsb_err ;
float Nqcdmc_lsb_ldp ;
float Nqcdmc_lsb_ldp_err ;
float Nqcdmc_lsb_0b ;
float Nqcdmc_lsb_0b_err ;
float Nqcdmc_lsb_0b_ldp ;
float Nqcdmc_lsb_0b_ldp_err ;
float Nttbarmc_sig ;
float Nttbarmc_sb ;
float Nttbarmc_sig_sl ;
float Nttbarmc_sb_sl ;
float Nttbarmc_sig_ldp ;
float Nttbarmc_sb_ldp ;
float Nttbarmc_lsb ;
float Nttbarmc_lsb_ldp ;
float NWJmc_sig ;
float NWJmc_sb ;
float NWJmc_sig_sl ;
float NWJmc_sb_sl ;
float NWJmc_sig_ldp ;
float NWJmc_sb_ldp ;
float NWJmc_lsb ;
float NWJmc_lsb_ldp ;
float NZnnmc_sig ;
float NZnnmc_sb ;
float NZnnmc_sig_sl ;
float NZnnmc_sb_sl ;
float NZnnmc_sig_ldp ;
float NZnnmc_sb_ldp ;
float NZnnmc_lsb ;
float NZnnmc_lsb_ldp ;
float NEwomc_sig ;
float NEwomc_sb ;
float NEwomc_sig_sl ;
float NEwomc_sb_sl ;
float NEwomc_sig_ldp ;
float NEwomc_sb_ldp ;
float NEwomc_lsb ;
float NEwomc_lsb_ldp ;
float Nsusymc_sig ;
float Nsusymc_sb ;
float Nsusymc_sig_sl ;
float Nsusymc_sb_sl ;
float Nsusymc_sig_ldp ;
float Nsusymc_sb_ldp ;
float Nsusymc_lsb ;
float Nsusymc_lsb_ldp ;
float Nsusymc_lsb_0b ;
float Nsusymc_lsb_0b_ldp ;
int Nhtonlytrig_lsb_0b ;
int Nhtonlytrig_lsb_0b_ldp ;
int Nsb_ee ;
int Nsig_ee ;
int Nsb_mm ;
int Nsig_mm ;
float sf_mc ;
float sf_mc_err ;
float sf_qcd_sb ;
float sf_qcd_sb_err ;
float sf_qcd_sig ;
float sf_qcd_sig_err ;
float sf_ttwj_sig ;
float sf_ttwj_sig_err ;
float sf_ee ;
float sf_ee_err ;
float sf_mm ;
float sf_mm_err ;
//--- read in description line.
printf("\n\n") ;
char c(0) ;
while ( c!=10 ) { c = fgetc( infp ) ; printf("%c", c ) ; }
printf("\n\n") ;
char label[1000] ;
//--- Inputs generated with gen_roostats_input4.c
// The order here must be consistent with the order there!
fscanf( infp, "%s %g", label, &EffScaleFactor ) ; printf( "%s %g\n", label, EffScaleFactor ) ;
fscanf( infp, "%s %g", label, &EffScaleFactorErr ) ; printf( "%s %g\n", label, EffScaleFactorErr ) ;
fscanf( infp, "%s %d", label, &Nsig ) ; printf( "%s %d\n", label, Nsig ) ;
fscanf( infp, "%s %d", label, &Nsb ) ; printf( "%s %d\n", label, Nsb ) ;
fscanf( infp, "%s %d", label, &Nsig_sl ) ; printf( "%s %d\n", label, Nsig_sl ) ;
fscanf( infp, "%s %d", label, &Nsb_sl ) ; printf( "%s %d\n", label, Nsb_sl ) ;
fscanf( infp, "%s %d", label, &Nsig_ldp ) ; printf( "%s %d\n", label, Nsig_ldp ) ;
fscanf( infp, "%s %d", label, &Nsb_ldp ) ; printf( "%s %d\n", label, Nsb_ldp ) ;
fscanf( infp, "%s %d", label, &Nlsb ) ; printf( "%s %d\n", label, Nlsb ) ;
fscanf( infp, "%s %d", label, &Nlsb_ldp ) ; printf( "%s %d\n", label, Nlsb_ldp ) ;
fscanf( infp, "%s %d", label, &Nlsb_0b ) ; printf( "%s %d\n", label, Nlsb_0b ) ;
fscanf( infp, "%s %d", label, &Nlsb_0b_ldp ) ; printf( "%s %d\n", label, Nlsb_0b_ldp ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_sig ) ; printf( "%s %g\n", label, Nqcdmc_sig ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_sig_err ) ; printf( "%s %g\n", label, Nqcdmc_sig_err ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_sb ) ; printf( "%s %g\n", label, Nqcdmc_sb ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_sb_err ) ; printf( "%s %g\n", label, Nqcdmc_sb_err ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_sig_sl ) ; printf( "%s %g\n", label, Nqcdmc_sig_sl ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_sig_sl_err ) ; printf( "%s %g\n", label, Nqcdmc_sig_sl_err ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_sb_sl ) ; printf( "%s %g\n", label, Nqcdmc_sb_sl ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_sb_sl_err ) ; printf( "%s %g\n", label, Nqcdmc_sb_sl_err ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_sig_ldp ) ; printf( "%s %g\n", label, Nqcdmc_sig_ldp ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_sig_ldp_err ) ; printf( "%s %g\n", label, Nqcdmc_sig_ldp_err ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_sb_ldp ) ; printf( "%s %g\n", label, Nqcdmc_sb_ldp ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_sb_ldp_err ) ; printf( "%s %g\n", label, Nqcdmc_sb_ldp_err ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_lsb ) ; printf( "%s %g\n", label, Nqcdmc_lsb ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_lsb_err ) ; printf( "%s %g\n", label, Nqcdmc_lsb_err ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_lsb_ldp ) ; printf( "%s %g\n", label, Nqcdmc_lsb_ldp ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_lsb_ldp_err ) ; printf( "%s %g\n", label, Nqcdmc_lsb_ldp_err ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_lsb_0b ) ; printf( "%s %g\n", label, Nqcdmc_lsb_0b ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_lsb_0b_err ) ; printf( "%s %g\n", label, Nqcdmc_lsb_0b_err ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_lsb_0b_ldp ) ; printf( "%s %g\n", label, Nqcdmc_lsb_0b_ldp ) ;
fscanf( infp, "%s %g", label, &Nqcdmc_lsb_0b_ldp_err ) ; printf( "%s %g\n", label, Nqcdmc_lsb_0b_ldp_err ) ;
fscanf( infp, "%s %g", label, &Nttbarmc_sig ) ; printf( "%s %g\n", label, Nttbarmc_sig ) ;
fscanf( infp, "%s %g", label, &Nttbarmc_sb ) ; printf( "%s %g\n", label, Nttbarmc_sb ) ;
fscanf( infp, "%s %g", label, &Nttbarmc_sig_sl ) ; printf( "%s %g\n", label, Nttbarmc_sig_sl ) ;
fscanf( infp, "%s %g", label, &Nttbarmc_sb_sl ) ; printf( "%s %g\n", label, Nttbarmc_sb_sl ) ;
fscanf( infp, "%s %g", label, &Nttbarmc_sig_ldp ) ; printf( "%s %g\n", label, Nttbarmc_sig_ldp ) ;
fscanf( infp, "%s %g", label, &Nttbarmc_sb_ldp ) ; printf( "%s %g\n", label, Nttbarmc_sb_ldp ) ;
fscanf( infp, "%s %g", label, &Nttbarmc_lsb ) ; printf( "%s %g\n", label, Nttbarmc_lsb ) ;
fscanf( infp, "%s %g", label, &Nttbarmc_lsb_ldp ) ; printf( "%s %g\n", label, Nttbarmc_lsb_ldp ) ;
fscanf( infp, "%s %g", label, &NWJmc_sig ) ; printf( "%s %g\n", label, NWJmc_sig ) ;
fscanf( infp, "%s %g", label, &NWJmc_sb ) ; printf( "%s %g\n", label, NWJmc_sb ) ;
fscanf( infp, "%s %g", label, &NWJmc_sig_sl ) ; printf( "%s %g\n", label, NWJmc_sig_sl ) ;
fscanf( infp, "%s %g", label, &NWJmc_sb_sl ) ; printf( "%s %g\n", label, NWJmc_sb_sl ) ;
fscanf( infp, "%s %g", label, &NWJmc_sig_ldp ) ; printf( "%s %g\n", label, NWJmc_sig_ldp ) ;
fscanf( infp, "%s %g", label, &NWJmc_sb_ldp ) ; printf( "%s %g\n", label, NWJmc_sb_ldp ) ;
fscanf( infp, "%s %g", label, &NWJmc_lsb ) ; printf( "%s %g\n", label, NWJmc_lsb ) ;
fscanf( infp, "%s %g", label, &NWJmc_lsb_ldp ) ; printf( "%s %g\n", label, NWJmc_lsb_ldp ) ;
fscanf( infp, "%s %g", label, &NZnnmc_sig ) ; printf( "%s %g\n", label, NZnnmc_sig ) ;
fscanf( infp, "%s %g", label, &NZnnmc_sb ) ; printf( "%s %g\n", label, NZnnmc_sb ) ;
fscanf( infp, "%s %g", label, &NZnnmc_sig_sl ) ; printf( "%s %g\n", label, NZnnmc_sig_sl ) ;
fscanf( infp, "%s %g", label, &NZnnmc_sb_sl ) ; printf( "%s %g\n", label, NZnnmc_sb_sl ) ;
fscanf( infp, "%s %g", label, &NZnnmc_sig_ldp ) ; printf( "%s %g\n", label, NZnnmc_sig_ldp ) ;
fscanf( infp, "%s %g", label, &NZnnmc_sb_ldp ) ; printf( "%s %g\n", label, NZnnmc_sb_ldp ) ;
fscanf( infp, "%s %g", label, &NZnnmc_lsb ) ; printf( "%s %g\n", label, NZnnmc_lsb ) ;
fscanf( infp, "%s %g", label, &NZnnmc_lsb_ldp ) ; printf( "%s %g\n", label, NZnnmc_lsb_ldp ) ;
fscanf( infp, "%s %g", label, &NEwomc_sig ) ; printf( "%s %g\n", label, NEwomc_sig ) ;
fscanf( infp, "%s %g", label, &NEwomc_sb ) ; printf( "%s %g\n", label, NEwomc_sb ) ;
fscanf( infp, "%s %g", label, &NEwomc_sig_sl ) ; printf( "%s %g\n", label, NEwomc_sig_sl ) ;
fscanf( infp, "%s %g", label, &NEwomc_sb_sl ) ; printf( "%s %g\n", label, NEwomc_sb_sl ) ;
fscanf( infp, "%s %g", label, &NEwomc_sig_ldp ) ; printf( "%s %g\n", label, NEwomc_sig_ldp ) ;
fscanf( infp, "%s %g", label, &NEwomc_sb_ldp ) ; printf( "%s %g\n", label, NEwomc_sb_ldp ) ;
fscanf( infp, "%s %g", label, &NEwomc_lsb ) ; printf( "%s %g\n", label, NEwomc_lsb ) ;
fscanf( infp, "%s %g", label, &NEwomc_lsb_ldp ) ; printf( "%s %g\n", label, NEwomc_lsb_ldp ) ;
fscanf( infp, "%s %g", label, &Nsusymc_sig ) ; printf( "%s %g\n", label, Nsusymc_sig ) ;
fscanf( infp, "%s %g", label, &Nsusymc_sb ) ; printf( "%s %g\n", label, Nsusymc_sb ) ;
fscanf( infp, "%s %g", label, &Nsusymc_sig_sl ) ; printf( "%s %g\n", label, Nsusymc_sig_sl ) ;
fscanf( infp, "%s %g", label, &Nsusymc_sb_sl ) ; printf( "%s %g\n", label, Nsusymc_sb_sl ) ;
fscanf( infp, "%s %g", label, &Nsusymc_sig_ldp ) ; printf( "%s %g\n", label, Nsusymc_sig_ldp ) ;
fscanf( infp, "%s %g", label, &Nsusymc_sb_ldp ) ; printf( "%s %g\n", label, Nsusymc_sb_ldp ) ;
fscanf( infp, "%s %g", label, &Nsusymc_lsb ) ; printf( "%s %g\n", label, Nsusymc_lsb ) ;
fscanf( infp, "%s %g", label, &Nsusymc_lsb_ldp ) ; printf( "%s %g\n", label, Nsusymc_lsb_ldp ) ;
fscanf( infp, "%s %g", label, &Nsusymc_lsb_0b ) ; printf( "%s %g\n", label, Nsusymc_lsb_0b ) ;
fscanf( infp, "%s %g", label, &Nsusymc_lsb_0b_ldp ) ; printf( "%s %g\n", label, Nsusymc_lsb_0b_ldp ) ;
fscanf( infp, "%s %d", label, &Nhtonlytrig_lsb_0b ) ; printf( "%s %d\n", label, Nhtonlytrig_lsb_0b ) ;
fscanf( infp, "%s %d", label, &Nhtonlytrig_lsb_0b_ldp ) ; printf( "%s %d\n", label, Nhtonlytrig_lsb_0b_ldp ) ;
fscanf( infp, "%s %g", label, &DataLumi ) ; printf( "%s %g\n", label, DataLumi ) ;
fscanf( infp, "%s %d", label, &Nsb_ee ) ; printf( "%s %d\n", label, Nsb_ee ) ;
fscanf( infp, "%s %d", label, &Nsig_ee ) ; printf( "%s %d\n", label, Nsig_ee ) ;
fscanf( infp, "%s %d", label, &Nsb_mm ) ; printf( "%s %d\n", label, Nsb_mm ) ;
fscanf( infp, "%s %d", label, &Nsig_mm ) ; printf( "%s %d\n", label, Nsig_mm ) ;
fscanf( infp, "%s %g", label, &acc_ee_mean ) ; printf( "%s %g\n", label, acc_ee_mean ) ;
fscanf( infp, "%s %g", label, &acc_ee_err ) ; printf( "%s %g\n", label, acc_ee_err ) ;
fscanf( infp, "%s %g", label, &acc_mm_mean ) ; printf( "%s %g\n", label, acc_mm_mean ) ;
fscanf( infp, "%s %g", label, &acc_mm_err ) ; printf( "%s %g\n", label, acc_mm_err ) ;
fscanf( infp, "%s %g", label, &eff_ee_mean ) ; printf( "%s %g\n", label, eff_ee_mean ) ;
fscanf( infp, "%s %g", label, &eff_ee_err ) ; printf( "%s %g\n", label, eff_ee_err ) ;
fscanf( infp, "%s %g", label, &eff_mm_mean ) ; printf( "%s %g\n", label, eff_mm_mean ) ;
fscanf( infp, "%s %g", label, &eff_mm_err ) ; printf( "%s %g\n", label, eff_mm_err ) ;
fscanf( infp, "%s %g", label, &Ztoll_lumi ) ; printf( "%s %g\n", label, Ztoll_lumi ) ;
fscanf( infp, "%s %g", label, &knn_sig_mean ) ; printf( "%s %g\n", label, knn_sig_mean ) ;
fscanf( infp, "%s %g", label, &knn_sig_err ) ; printf( "%s %g\n", label, knn_sig_err ) ;
fscanf( infp, "%s %g", label, &knn_sb_mean ) ; printf( "%s %g\n", label, knn_sb_mean ) ;
fscanf( infp, "%s %g", label, &knn_sb_err ) ; printf( "%s %g\n", label, knn_sb_err ) ;
fscanf( infp, "%s %g", label, &fsig_ee_mean ) ; printf( "fsig_ee_mean %s %g\n", label, fsig_ee_mean ) ;
fscanf( infp, "%s %g", label, &fsig_ee_err ) ; printf( "fsig_ee_err %s %g\n", label, fsig_ee_err ) ;
fscanf( infp, "%s %g", label, &fsig_mm_mean ) ; printf( "fsig_mm_mean %s %g\n", label, fsig_mm_mean ) ;
fscanf( infp, "%s %g", label, &fsig_mm_err ) ; printf( "fsig_mm_err %s %g\n", label, fsig_mm_err ) ;
fscanf( infp, "%s %g", label, &sf_mc ) ; printf( "sf_mc %s %g\n", label, sf_mc ) ;
fscanf( infp, "%s %g", label, &sf_mc_err ) ; printf( "sf_mc_err %s %g\n", label, sf_mc_err ) ;
fscanf( infp, "%s %g", label, &sf_qcd_sb ) ; printf( "sf_qcd_sb %s %g\n", label, sf_qcd_sb ) ;
fscanf( infp, "%s %g", label, &sf_qcd_sb_err ) ; printf( "sf_qcd_sb_err %s %g\n", label, sf_qcd_sb_err ) ;
fscanf( infp, "%s %g", label, &sf_qcd_sig ) ; printf( "sf_qcd_sig%s %g\n", label, sf_qcd_sig ) ;
fscanf( infp, "%s %g", label, &sf_qcd_sig_err ) ; printf( "sf_qcd_sig_err%s %g\n", label, sf_qcd_sig_err ) ;
fscanf( infp, "%s %g", label, &sf_ttwj_sig ) ; printf( "sf_ttwj_sig%s %g\n", label, sf_ttwj_sig ) ;
fscanf( infp, "%s %g", label, &sf_ttwj_sig_err ) ; printf( "sf_ttwj_sig_err%s %g\n", label, sf_ttwj_sig_err ) ;
fscanf( infp, "%s %g", label, &sf_ee ) ; printf( "sf_ee%s %g\n", label, sf_ee ) ;
fscanf( infp, "%s %g", label, &sf_ee_err ) ; printf( "sf_ee_err%s %g\n", label, sf_ee_err ) ;
fscanf( infp, "%s %g", label, &sf_mm ) ; printf( "sf_mm%s %g\n", label, sf_mm ) ;
fscanf( infp, "%s %g", label, &sf_mm_err ) ; printf( "sf_mm_err%s %g\n", label, sf_mm_err ) ;
printf("\n Done reading in %s\n\n", infile ) ;
fclose( infp ) ;
//+++++ Owen, Aug 6. set all lsf_ factors to 1. Input MC counts are now all weighted.
// Calculations of stat errors below are now wrong. Fix later.
lsf_WJmc = 1.0 ;
lsf_Znnmc = 1.0 ;
lsf_Ewomc = 0.0 ; // don't use ewo.
sf_ttbarmc = 1.0 ;
//--- Print out a nice summary of the inputs.
float Nsm_sig = Nttbarmc_sig + lsf_WJmc*NWJmc_sig + Nqcdmc_sig + lsf_Znnmc*NZnnmc_sig + lsf_Ewomc*NEwomc_sig ;
float Nsm_sb = Nttbarmc_sb + lsf_WJmc*NWJmc_sb + Nqcdmc_sb + lsf_Znnmc*NZnnmc_sb + lsf_Ewomc*NEwomc_sb ;
float Nsm_sig_sl = Nttbarmc_sig_sl + lsf_WJmc*NWJmc_sig_sl + Nqcdmc_sig_sl + lsf_Znnmc*NZnnmc_sig_sl + lsf_Ewomc*NEwomc_sig_sl ;
float Nsm_sb_sl = Nttbarmc_sb_sl + lsf_WJmc*NWJmc_sb_sl + Nqcdmc_sb_sl + lsf_Znnmc*NZnnmc_sb_sl + lsf_Ewomc*NEwomc_sb_sl ;
float Nsm_sig_ldp = Nttbarmc_sig_ldp + lsf_WJmc*NWJmc_sig_ldp + Nqcdmc_sig_ldp + lsf_Znnmc*NZnnmc_sig_ldp + lsf_Ewomc*NEwomc_sig_ldp ;
float Nsm_sb_ldp = Nttbarmc_sb_ldp + lsf_WJmc*NWJmc_sb_ldp + Nqcdmc_sb_ldp + lsf_Znnmc*NZnnmc_sb_ldp + lsf_Ewomc*NEwomc_sb_ldp ;
float Nsm_lsb = Nttbarmc_lsb + lsf_WJmc*NWJmc_lsb + Nqcdmc_lsb + lsf_Znnmc*NZnnmc_lsb + lsf_Ewomc*NEwomc_lsb ;
float Nsm_lsb_ldp = Nttbarmc_lsb_ldp + lsf_WJmc*NWJmc_lsb_ldp + Nqcdmc_lsb_ldp + lsf_Znnmc*NZnnmc_lsb_ldp + lsf_Ewomc*NEwomc_lsb_ldp ;
float Nsm_lsb_0b = Nqcdmc_lsb_0b ;
float Nsm_lsb_0b_ldp = Nqcdmc_lsb_0b_ldp ;
//--- QCD min Delta phi N pass / fail ratios.
float Rqcd_sig = 0. ;
if ( Nqcdmc_sig_ldp > 0. ) { Rqcd_sig = Nqcdmc_sig / Nqcdmc_sig_ldp ; }
float Rqcd_sig_err = 0. ;
if ( Nqcdmc_sig > 0. && Nqcdmc_sig_ldp > 0. ) { Rqcd_sig_err = Rqcd_sig * sqrt( pow(Nqcdmc_sig_err/Nqcdmc_sig,2) + pow(Nqcdmc_sig_ldp_err/Nqcdmc_sig_ldp,2) ) ; }
float Rqcd_sb = 0. ;
if ( Nqcdmc_sb_ldp > 0. ) { Rqcd_sb = Nqcdmc_sb / Nqcdmc_sb_ldp ; }
float Rqcd_sb_err = 0. ;
if ( Nqcdmc_sb > 0. && Nqcdmc_sb_ldp > 0. ) { Rqcd_sb_err = Rqcd_sb * sqrt( pow(Nqcdmc_sb_err/Nqcdmc_sb,2) + pow(Nqcdmc_sb_ldp_err/Nqcdmc_sb_ldp,2) ) ; }
float Rqcd_lsb = 0. ;
if ( Nqcdmc_lsb_ldp > 0. ) { Rqcd_lsb = Nqcdmc_lsb / Nqcdmc_lsb_ldp ; }
float Rqcd_lsb_err = 0. ;
if ( Nqcdmc_lsb > 0. && Nqcdmc_lsb_ldp > 0. ) { Rqcd_lsb_err = Rqcd_lsb * sqrt( pow(Nqcdmc_lsb_err/Nqcdmc_lsb,2) + pow(Nqcdmc_lsb_ldp_err/Nqcdmc_lsb_ldp,2) ) ; }
float Nlsb_corrected = Nlsb - Nttbarmc_lsb - lsf_WJmc*NWJmc_lsb - lsf_Znnmc*NZnnmc_lsb - lsf_Ewomc*NEwomc_lsb ;
float Nlsb_ldp_corrected = Nlsb_ldp - Nttbarmc_lsb_ldp - lsf_WJmc*NWJmc_lsb_ldp - lsf_Znnmc*NZnnmc_lsb_ldp - lsf_Ewomc*NEwomc_lsb_ldp ;
float Rdata_lsb = 0. ;
if ( Nlsb_ldp_corrected > 0 ) { Rdata_lsb = (Nlsb_corrected) / (Nlsb_ldp_corrected) ; }
float Rdata_lsb_err = 0. ;
if ( Nlsb_corrected > 0 && Nlsb_ldp_corrected > 0 ) { Rdata_lsb_err = Rdata_lsb * sqrt( 1.0/(Nlsb_corrected) + 1.0/(Nlsb_ldp_corrected) ) ; }
float RdataHTOT_lsb_0b = 0. ;
if ( Nhtonlytrig_lsb_0b_ldp > 0 ) { RdataHTOT_lsb_0b = (1.0*Nhtonlytrig_lsb_0b) / (1.0*Nhtonlytrig_lsb_0b_ldp) ; }
float RdataHTOT_lsb_0b_err = 0. ;
if ( Nhtonlytrig_lsb_0b_ldp > 0 && Nhtonlytrig_lsb_0b > 0 ) { RdataHTOT_lsb_0b_err = RdataHTOT_lsb_0b * sqrt( 1.0/(1.0*Nhtonlytrig_lsb_0b) + 1.0/(1.0*Nhtonlytrig_lsb_0b_ldp) ) ; }
float Rqcd_lsb_0b = 0. ;
if ( Nqcdmc_lsb_0b_ldp > 0. ) { Rqcd_lsb_0b = Nqcdmc_lsb_0b / Nqcdmc_lsb_0b_ldp ; }
float Rqcd_lsb_0b_err = 0. ;
if ( Nqcdmc_lsb_0b > 0. && Nqcdmc_lsb_0b_ldp > 0. ) { Rqcd_lsb_0b_err = Rqcd_lsb_0b * sqrt( pow(Nqcdmc_lsb_0b_err/Nqcdmc_lsb_0b,2) + pow(Nqcdmc_lsb_0b_ldp_err/Nqcdmc_lsb_0b_ldp,2) ) ; }
float Rdata_lsb_0b = 0. ;
if ( Nlsb_0b_ldp > 0 ) { Rdata_lsb_0b = (1.0*Nlsb_0b) / (1.0*Nlsb_0b_ldp) ; }
float Rdata_lsb_0b_err = 0. ;
if ( Nlsb_0b > 0 && Nlsb_0b_ldp > 0 ) { Rdata_lsb_0b_err = Rdata_lsb_0b * sqrt( 1.0/(1.0*Nlsb_0b) + 1.0/(1.0*Nlsb_0b_ldp) ) ; }
//--- ttbar + Wjets MET SIG / SB ratios
float Rttwj = 0. ;
if ( (Nttbarmc_sb+lsf_WJmc*NWJmc_sb) > 0. ) { Rttwj = (Nttbarmc_sig+lsf_WJmc*NWJmc_sig) / (Nttbarmc_sb+lsf_WJmc*NWJmc_sb) ; }
float Rttwj_err2 = pow( lsf_WJmc/ (Nttbarmc_sb+lsf_WJmc*NWJmc_sb),2)*NWJmc_sig
+ pow( (Nttbarmc_sig+lsf_WJmc*NWJmc_sig) * lsf_WJmc / pow((Nttbarmc_sb+lsf_WJmc*NWJmc_sb),2), 2)*NWJmc_sb ;
float Rttwj_err = sqrt(Rttwj_err2) ;
float Rttwj_sl = 0. ;
if ( (Nttbarmc_sb_sl+lsf_WJmc*NWJmc_sb_sl) > 0. ) { Rttwj_sl = (Nttbarmc_sig_sl+lsf_WJmc*NWJmc_sig_sl) / (Nttbarmc_sb_sl+lsf_WJmc*NWJmc_sb_sl) ; }
float Rttwj_sl_err2 = pow( lsf_WJmc / (Nttbarmc_sb_sl+lsf_WJmc*NWJmc_sb_sl), 2) * NWJmc_sig_sl
+ pow( lsf_WJmc * (Nttbarmc_sig_sl+lsf_WJmc*NWJmc_sig_sl) / pow((Nttbarmc_sb_sl+lsf_WJmc*NWJmc_sb_sl),2), 2)*NWJmc_sb_sl ;
float Rttwj_sl_err = sqrt(Rttwj_sl_err2) ;
float Rdata_sl = 0. ;
if ( Nsb_sl > 0 ) { Rdata_sl = (1.0*Nsig_sl)/(1.0*Nsb_sl) ; }
float Rdata_sl_err = 0. ;
if ( Nsig_sl>0 && Nsb_sl>0 ) { Rdata_sl_err = Rdata_sl * sqrt( 1.0/(1.0*Nsig_sl) + 1.0/(1.0*Nsb_sl) ) ; }
//--- Simple MC closure tests.
float comp_mc_qcd_sb = Nqcdmc_sb_ldp * ( Nqcdmc_lsb_0b / Nqcdmc_lsb_0b_ldp ) ;
float comp_mc_qcd_sb_err = Nqcdmc_sb_ldp_err * ( Nqcdmc_lsb_0b / Nqcdmc_lsb_0b_ldp ) ;
float comp_mc_qcd_sig = Nqcdmc_sig_ldp * ( Nqcdmc_lsb_0b / Nqcdmc_lsb_0b_ldp ) ;
float comp_mc_qcd_sig_err = Nqcdmc_sig_ldp_err * ( Nqcdmc_lsb_0b / Nqcdmc_lsb_0b_ldp ) ;
float comp_mc_ttwj_sig = (Nttbarmc_sb + lsf_WJmc*NWJmc_sb) * ( (Nttbarmc_sig_sl + lsf_WJmc*NWJmc_sig_sl) / (Nttbarmc_sb_sl + lsf_WJmc*NWJmc_sb_sl) ) ;
//--- below ignores ttbar errors, uses sqrt(N) on raw WJ counts.
float comp_mc_ttwj_sig_err2 = pow( lsf_WJmc*( (Nttbarmc_sig_sl + lsf_WJmc*NWJmc_sig_sl) / (Nttbarmc_sb_sl + lsf_WJmc*NWJmc_sb_sl) ),2)*NWJmc_sb
+ pow( (Nttbarmc_sb + lsf_WJmc*NWJmc_sb) *(lsf_WJmc/ (Nttbarmc_sb_sl + lsf_WJmc*NWJmc_sb_sl) ), 2)*NWJmc_sig_sl
+ pow( (Nttbarmc_sb + lsf_WJmc*NWJmc_sb) * (Nttbarmc_sig_sl + lsf_WJmc*NWJmc_sig_sl) / pow((Nttbarmc_sb_sl + lsf_WJmc*NWJmc_sb_sl) ,2)*lsf_WJmc, 2 )*NWJmc_sb_sl ;
float comp_mc_ttwj_sig_err = sqrt(comp_mc_ttwj_sig_err2) ;
//--- Simple data calculations.
float Nsb_ldp_corrected = Nsb_ldp - (Nttbarmc_sb_ldp + lsf_WJmc*NWJmc_sb_ldp + lsf_Znnmc*NZnnmc_sb_ldp + lsf_Ewomc*NEwomc_sb_ldp ) ;
float comp_data_qcd_sb = Nsb_ldp_corrected * ( (1.0*Nlsb_0b)/(1.0*Nlsb_0b_ldp) ) ;
float comp_data_qcd_sb_err = sqrt( Nsb_ldp + Nttbarmc_sb_ldp + lsf_WJmc*NWJmc_sb_ldp + lsf_Znnmc*NZnnmc_sb_ldp + lsf_Ewomc*NEwomc_sb_ldp ) * ( (1.0*Nlsb_0b)/(1.0*Nlsb_0b_ldp) ) ;
float Nsig_ldp_corrected = Nsig_ldp - (Nttbarmc_sig_ldp + lsf_WJmc*NWJmc_sig_ldp + lsf_Znnmc*NZnnmc_sig_ldp + lsf_Ewomc*NEwomc_sig_ldp ) ;
float comp_data_qcd_sig = Nsig_ldp_corrected * ( (1.0*Nlsb_0b)/(1.0*Nlsb_0b_ldp) ) ;
float comp_data_qcd_sig_err = sqrt( Nsig_ldp + Nttbarmc_sig_ldp + lsf_WJmc*NWJmc_sig_ldp + lsf_Znnmc*NZnnmc_sig_ldp + lsf_Ewomc*NEwomc_sig_ldp ) * ( (1.0*Nlsb_0b)/(1.0*Nlsb_0b_ldp) ) ;
float comp_data_ttwj_sig = (Nsb - (comp_data_qcd_sb + lsf_Znnmc*NZnnmc_sb + lsf_Ewomc*NEwomc_sb)) * ( (1.0*Nsig_sl) / (1.0*Nsb_sl) ) ;
float comp_data_ttwj_sig_err2 = pow( ( (1.0*Nsig_sl) / (1.0*Nsb_sl) ), 2)*Nsb
+ pow( ( (1.0*Nsig_sl) / (1.0*Nsb_sl) ), 2)*pow(comp_data_qcd_sb_err,2)
+ pow( (Nsb - (comp_data_qcd_sb + lsf_Znnmc*NZnnmc_sb + lsf_Ewomc*NEwomc_sb)) / (1.0*Nsb_sl), 2 )*Nsig_sl
+ pow( (Nsb - (comp_data_qcd_sb + lsf_Znnmc*NZnnmc_sb + lsf_Ewomc*NEwomc_sb)) * (1.0*Nsig_sl) / pow(1.0*Nsb_sl,2), 2 ) * Nsb_sl ;
float comp_data_ttwj_sig_err = sqrt(comp_data_ttwj_sig_err2) ;
float comp_znn_sig_ee(2.) ;
float comp_znn_sig_mm(2.) ;
float comp_znn_sig(2.) ;
float comp_znn_sb_ee(2.) ;
float comp_znn_sb_mm(2.) ;
float comp_znn_sb(2.) ;
float comp_znn_sig_ee_err(0.) ;
float comp_znn_sig_mm_err(0.) ;
float comp_znn_sig_err(0.) ;
float comp_znn_sb_ee_err(0.) ;
float comp_znn_sb_mm_err(0.) ;
float comp_znn_sb_err(0.) ;
if ( znnModel == 1 ) {
comp_znn_sig_ee = Nsig_ee * ( 5.95 * DataLumi * fsig_ee_mean ) / ( acc_ee_mean * eff_ee_mean * Ztoll_lumi ) ;
comp_znn_sb_ee = Nsb_ee * ( 5.95 * DataLumi * fsig_ee_mean ) / ( acc_ee_mean * eff_ee_mean * Ztoll_lumi ) ;
comp_znn_sig_mm = Nsig_mm * ( 5.95 * DataLumi * fsig_mm_mean ) / ( acc_mm_mean * eff_mm_mean * Ztoll_lumi ) ;
comp_znn_sb_mm = Nsb_mm * ( 5.95 * DataLumi * fsig_mm_mean ) / ( acc_mm_mean * eff_mm_mean * Ztoll_lumi ) ;
if ( Nsig_ee > 0 ) { comp_znn_sig_ee_err = comp_znn_sig_ee * sqrt( 1.0/(1.0*Nsig_ee) + pow(fsig_ee_err/fsig_ee_mean,2) + pow(acc_ee_err/acc_ee_mean,2) + pow(eff_ee_err/eff_ee_mean,2) ) ; }
if ( Nsb_ee > 0 ) { comp_znn_sb_ee_err = comp_znn_sb_ee * sqrt( 1.0/(1.0*Nsb_ee) + pow(fsig_ee_err/fsig_ee_mean,2) + pow(acc_ee_err/acc_ee_mean,2) + pow(eff_ee_err/eff_ee_mean,2) ) ; }
if ( Nsig_mm > 0 ) { comp_znn_sig_mm_err = comp_znn_sig_mm * sqrt( 1.0/(1.0*Nsig_mm) + pow(fsig_mm_err/fsig_mm_mean,2) + pow(acc_mm_err/acc_mm_mean,2) + pow(eff_mm_err/eff_mm_mean,2) ) ; }
if ( Nsb_mm > 0 ) { comp_znn_sb_mm_err = comp_znn_sb_mm * sqrt( 1.0/(1.0*Nsb_mm) + pow(fsig_mm_err/fsig_mm_mean,2) + pow(acc_mm_err/acc_mm_mean,2) + pow(eff_mm_err/eff_mm_mean,2) ) ; }
} else if ( znnModel == 2 ) {
comp_znn_sig_ee = (Nsig_ee + Nsb_ee) * ( 5.95 * DataLumi * fsig_ee_mean * knn_sig_mean ) / ( acc_ee_mean * eff_ee_mean * Ztoll_lumi ) ;
comp_znn_sb_ee = (Nsig_ee + Nsb_ee) * ( 5.95 * DataLumi * fsig_ee_mean * knn_sb_mean ) / ( acc_ee_mean * eff_ee_mean * Ztoll_lumi ) ;
comp_znn_sig_mm = (Nsig_mm + Nsb_mm) * ( 5.95 * DataLumi * fsig_mm_mean * knn_sig_mean ) / ( acc_mm_mean * eff_mm_mean * Ztoll_lumi ) ;
comp_znn_sb_mm = (Nsig_mm + Nsb_mm) * ( 5.95 * DataLumi * fsig_mm_mean * knn_sb_mean ) / ( acc_mm_mean * eff_mm_mean * Ztoll_lumi ) ;
if ( (Nsig_ee+Nsb_ee) > 0 ) { comp_znn_sig_ee_err = comp_znn_sig_ee * sqrt( 1.0/(1.0*(Nsig_ee+Nsb_ee)) + pow(fsig_ee_err/fsig_ee_mean,2) + pow(acc_ee_err/acc_ee_mean,2) + pow(eff_ee_err/eff_ee_mean,2) + pow(knn_sig_err/knn_sig_mean,2) ) ; }
if ( (Nsig_ee+Nsb_ee) > 0 ) { comp_znn_sb_ee_err = comp_znn_sb_ee * sqrt( 1.0/(1.0*(Nsig_ee+Nsb_ee)) + pow(fsig_ee_err/fsig_ee_mean,2) + pow(acc_ee_err/acc_ee_mean,2) + pow(eff_ee_err/eff_ee_mean,2) + pow(knn_sig_err/knn_sig_mean,2) ) ; }
if ( (Nsig_mm+Nsb_mm) > 0 ) { comp_znn_sig_mm_err = comp_znn_sig_mm * sqrt( 1.0/(1.0*(Nsig_mm+Nsb_mm)) + pow(fsig_mm_err/fsig_mm_mean,2) + pow(acc_mm_err/acc_mm_mean,2) + pow(eff_mm_err/eff_mm_mean,2) + pow(knn_sig_err/knn_sig_mean,2) ) ; }
if ( (Nsig_mm+Nsb_mm) > 0 ) { comp_znn_sb_mm_err = comp_znn_sb_mm * sqrt( 1.0/(1.0*(Nsig_mm+Nsb_mm)) + pow(fsig_mm_err/fsig_mm_mean,2) + pow(acc_mm_err/acc_mm_mean,2) + pow(eff_mm_err/eff_mm_mean,2) + pow(knn_sig_err/knn_sig_mean,2) ) ; }
}
//-- really dumb ave.
comp_znn_sig = 0.5 * ( comp_znn_sig_ee + comp_znn_sig_mm ) ;
comp_znn_sig_err = comp_znn_sig_ee_err ;
if ( comp_znn_sig_mm_err > comp_znn_sig_ee_err ) comp_znn_sig_err = comp_znn_sig_mm_err ;
comp_znn_sb = 0.5 * ( comp_znn_sb_ee + comp_znn_sb_mm ) ;
comp_znn_sb_err = comp_znn_sb_ee_err ;
if ( comp_znn_sb_mm_err > comp_znn_sb_ee_err ) comp_znn_sb_err = comp_znn_sb_mm_err ;
printf("\n\n\n") ;
printf("------------+----------+----------+------------------------+----------+----------+------------+------------+---------------\n") ;
printf(" Sample | ttbar | W+jets | QCD | Z to nn | other | All SM | Data | SUSY \n") ;
printf("------------+----------+----------+------------------------+----------+----------+------------+------------+---------------\n") ;
printf(" | | | | | | | | \n") ;
printf(" %10s | %8.1f | %8.1f | %10.1f +/- %7.1f | %8.1f | %8.1f | %10.1f | %10d | %8.1f\n",
"sig", Nttbarmc_sig, (lsf_WJmc*NWJmc_sig), Nqcdmc_sig, Nqcdmc_sig_err, lsf_Znnmc*NZnnmc_sig, lsf_Ewomc*NEwomc_sig, Nsm_sig, Nsig, Nsusymc_sig ) ;
printf(" %10s | %8.1f | %8.1f | %10.1f +/- %7.1f | %8.1f | %8.1f | %10.1f | %10d | %8.1f\n",
"sb", Nttbarmc_sb, (lsf_WJmc*NWJmc_sb), Nqcdmc_sb, Nqcdmc_sb_err, lsf_Znnmc*NZnnmc_sb, lsf_Ewomc*NEwomc_sb, Nsm_sb, Nsb, Nsusymc_sb ) ;
printf(" | | | | | | | | \n") ;
printf(" %10s | %8.1f | %8.1f | %10.1f +/- %7.1f | %8.1f | %8.1f | %10.1f | %10d | %8.1f\n",
"sig_sl", Nttbarmc_sig_sl, (lsf_WJmc*NWJmc_sig_sl), Nqcdmc_sig_sl, Nqcdmc_sig_sl_err, lsf_Znnmc*NZnnmc_sig_sl, lsf_Ewomc*NEwomc_sig_sl, Nsm_sig_sl, Nsig_sl, Nsusymc_sig_sl ) ;
printf(" %10s | %8.1f | %8.1f | %10.1f +/- %7.1f | %8.1f | %8.1f | %10.1f | %10d | %8.1f\n",
"sb_sl", Nttbarmc_sb_sl, (lsf_WJmc*NWJmc_sb_sl), Nqcdmc_sb_sl, Nqcdmc_sb_sl_err, lsf_Znnmc*NZnnmc_sb_sl, lsf_Ewomc*NEwomc_sb_sl, Nsm_sb_sl, Nsb_sl, Nsusymc_sb_sl ) ;
printf(" | | | | | | | | \n") ;
printf(" %10s | %8.1f | %8.1f | %10.1f +/- %7.1f | %8.1f | %8.1f | %10.1f | %10d | %8.1f\n",
"sig_ldp", Nttbarmc_sig_ldp, (lsf_WJmc*NWJmc_sig_ldp), Nqcdmc_sig_ldp, Nqcdmc_sig_ldp_err, lsf_Znnmc*NZnnmc_sig_ldp, lsf_Ewomc*NEwomc_sig_ldp, Nsm_sig_ldp, Nsig_ldp, Nsusymc_sig_ldp ) ;
printf(" %10s | %8.1f | %8.1f | %10.1f +/- %7.1f | %8.1f | %8.1f | %10.1f | %10d | %8.1f\n",
"sb_ldp", Nttbarmc_sb_ldp, (lsf_WJmc*NWJmc_sb_ldp), Nqcdmc_sb_ldp, Nqcdmc_sb_ldp_err, lsf_Znnmc*NZnnmc_sb_ldp, lsf_Ewomc*NEwomc_sb_ldp, Nsm_sb_ldp, Nsb_ldp, Nsusymc_sb_ldp ) ;
printf(" | | | | | | | | \n") ;
printf(" %10s | %8.1f | %8.1f | %10.1f +/- %7.1f | %8.1f | %8.1f | %10.1f | %10d | %8.1f\n",
"lsb", Nttbarmc_lsb, (lsf_WJmc*NWJmc_lsb), Nqcdmc_lsb, Nqcdmc_lsb_err, lsf_Znnmc*NZnnmc_lsb, lsf_Ewomc*NEwomc_lsb, Nsm_lsb, Nlsb, Nsusymc_lsb ) ;
printf(" %10s | %8.1f | %8.1f | %10.1f +/- %7.1f | %8.1f | %8.1f | %10.1f | %10d | %8.1f\n",
"lsb_ldp", Nttbarmc_lsb_ldp, (lsf_WJmc*NWJmc_lsb_ldp), Nqcdmc_lsb_ldp, Nqcdmc_lsb_ldp_err, lsf_Znnmc*NZnnmc_lsb_ldp, lsf_Ewomc*NEwomc_lsb_ldp, Nsm_lsb_ldp, Nlsb_ldp, Nsusymc_lsb_ldp ) ;
printf(" | | | | | | | | \n") ;
printf(" %10s | -------- | -------- | %10.1f +/- %7.1f | -------- | -------- | %10.1f | %10d | %8.1f\n",
"lsb_0b", Nqcdmc_lsb_0b, Nqcdmc_lsb_0b_err, Nsm_lsb_0b, Nlsb_0b, Nsusymc_lsb_0b ) ;
printf(" %10s | -------- | -------- | %10.1f +/- %7.1f | -------- | -------- | %10.1f | %10d | %8.1f\n",
"lsb_0b_ldp", Nqcdmc_lsb_0b_ldp, Nqcdmc_lsb_0b_ldp_err, Nsm_lsb_0b_ldp, Nlsb_0b_ldp, Nsusymc_lsb_0b_ldp ) ;
printf(" | | | | | | | | \n") ;
printf("------------+----------+----------+------------------------+----------+----------+------------+------------+---------------\n") ;
printf("\n\n\n") ;
printf(" R QCD : sig / sig_ldp : ( %10.1f +/- %6.1f ) / ( %10.1f +/- %7.1f ) = %5.3f +/- %5.3f\n",
Nqcdmc_sig, Nqcdmc_sig_err, Nqcdmc_sig_ldp, Nqcdmc_sig_ldp_err, Rqcd_sig, Rqcd_sig_err ) ;
printf(" R QCD : sb / sb_ldp : ( %10.1f +/- %6.1f ) / ( %10.1f +/- %7.1f ) = %5.3f +/- %5.3f\n",
Nqcdmc_sb, Nqcdmc_sb_err, Nqcdmc_sb_ldp, Nqcdmc_sb_ldp_err, Rqcd_sb, Rqcd_sb_err ) ;
printf(" R QCD : lsb / lsb_ldp : ( %10.1f +/- %6.1f ) / ( %10.1f +/- %7.1f ) = %5.3f +/- %5.3f\n",
Nqcdmc_lsb, Nqcdmc_lsb_err, Nqcdmc_lsb_ldp, Nqcdmc_lsb_ldp_err, Rqcd_lsb, Rqcd_lsb_err ) ;
printf(" R data : lsb / lsb_ldp : ( %10.1f ) / ( %10.1f ) = %5.3f +/- %5.3f\n",
Nlsb_corrected, Nlsb_ldp_corrected, Rdata_lsb, Rdata_lsb_err ) ;
printf(" R QCD : lsb_0b / lsb_0b_ldp : ( %10.1f +/- %6.1f ) / ( %10.1f +/- %7.1f ) = %5.3f +/- %5.3f\n",
Nqcdmc_lsb_0b, Nqcdmc_lsb_0b_err, Nqcdmc_lsb_0b_ldp, Nqcdmc_lsb_0b_ldp_err, Rqcd_lsb_0b, Rqcd_lsb_0b_err ) ;
printf(" R data : lsb_0b / lsb_0b_ldp : ( %8d ) / ( %8d ) = %5.3f +/- %5.3f\n",
Nlsb_0b, Nlsb_0b_ldp, Rdata_lsb_0b, Rdata_lsb_0b_err ) ;
printf(" R data : lsb_0b / lsb_0b_ldp : ( %8d ) / ( %8d ) = %5.3f +/- %5.3f (HT-only trigger)\n",
Nhtonlytrig_lsb_0b, Nhtonlytrig_lsb_0b_ldp, RdataHTOT_lsb_0b, RdataHTOT_lsb_0b_err ) ;
printf("\n\n\n") ;
printf(" R ttwj : sig / sb : ( %5.1f +/- %4.1f ) / ( %5.1f +/- %4.1f ) = %5.3f +/- %5.3f\n",
(Nttbarmc_sig+lsf_WJmc*NWJmc_sig), lsf_WJmc*sqrt(NWJmc_sig),
(Nttbarmc_sb+lsf_WJmc*NWJmc_sb), lsf_WJmc*sqrt(NWJmc_sb),
Rttwj, Rttwj_err ) ;
printf(" R ttwj : sig_sl / sb_sl : ( %5.1f +/- %4.1f ) / ( %5.1f +/- %4.1f ) = %5.3f +/- %5.3f\n",
(Nttbarmc_sig_sl+lsf_WJmc*NWJmc_sig_sl), lsf_WJmc*sqrt(NWJmc_sig_sl),
(Nttbarmc_sb_sl+lsf_WJmc*NWJmc_sb_sl), lsf_WJmc*sqrt(NWJmc_sb_sl),
Rttwj_sl, Rttwj_sl_err ) ;
printf(" R data : sig_sl / sb_sl : %3d / %3d = %5.3f +/- %5.3f\n",
Nsig_sl, Nsb_sl, Rdata_sl, Rdata_sl_err ) ;
printf("\n\n\n") ;
printf(" ----- Simple MC closure tests\n\n") ;
printf(" QCD : sb = sb_ldp * (lsb_0b/lsb_0b_ldp) : ( %6.1f +/- %4.1f ) * ( %8.1f / %10.1f ) = %8.1f +/- %6.1f\n",
Nqcdmc_sb_ldp, Nqcdmc_sb_ldp_err, Nqcdmc_lsb_0b, Nqcdmc_lsb_0b_ldp, comp_mc_qcd_sb, comp_mc_qcd_sb_err ) ;
printf(" MC truth value : %8.1f +/- %6.1f\n",
Nqcdmc_sb, Nqcdmc_sb_err ) ;
printf("\n") ;
printf(" QCD : sig = sig_ldp * (lsb_0b/lsb_0b_ldp) : ( %6.1f +/- %4.1f ) * ( %8.1f / %10.1f ) = %8.1f +/- %6.1f\n",
Nqcdmc_sig_ldp, Nqcdmc_sig_ldp_err, Nqcdmc_lsb_0b, Nqcdmc_lsb_0b_ldp, comp_mc_qcd_sig, comp_mc_qcd_sig_err ) ;
printf(" MC truth value : %8.1f +/- %6.1f\n",
Nqcdmc_sig, Nqcdmc_sig_err ) ;
printf("\n") ;
printf(" ttwj : sig = ttwj_sb * ( ttwj_sig_sl / ttwj_sb_sl ) : %6.1f * ( %6.1f / %6.1f ) = %6.1f +/- %4.1f\n",
(Nttbarmc_sb + lsf_WJmc*NWJmc_sb), (Nttbarmc_sig_sl + lsf_WJmc*NWJmc_sig_sl), (Nttbarmc_sb_sl + lsf_WJmc*NWJmc_sb_sl),
comp_mc_ttwj_sig, comp_mc_ttwj_sig_err ) ;
printf(" MC truth value : %6.1f +/- %4.1f\n",
(Nttbarmc_sig + lsf_WJmc*NWJmc_sig), lsf_WJmc*sqrt(NWJmc_sig) ) ;
printf("\n\n\n") ;
printf(" ----- Simple Data calculations\n\n") ;
printf(" QCD : sb = ( sb_ldp - (ttwj+znn+other)_ldp_mc ) * (lsb_0b/lsb_0b_ldp) : ( %4d - %5.1f ) * ( %5d / %7d ) = %6.1f +/- %4.1f\n",
Nsb_ldp, (Nttbarmc_sb_ldp + lsf_WJmc*NWJmc_sb_ldp + lsf_Znnmc*NZnnmc_sb_ldp + lsf_Ewomc*NEwomc_sb_ldp ),
Nlsb_0b, Nlsb_0b_ldp, comp_data_qcd_sb, comp_data_qcd_sb_err ) ;
printf(" MC truth value : %8.1f +/- %4.1f\n",
Nqcdmc_sb, Nqcdmc_sb_err ) ;
printf("\n") ;
printf(" QCD : sig = ( sig_ldp - (ttwj+znn+other)_ldp_mc ) * (lsb_0b/lsb_0b_ldp) : ( %4d - %5.1f ) * ( %5d / %7d ) = %6.1f +/- %4.1f\n",
Nsig_ldp, (Nttbarmc_sig_ldp + lsf_WJmc*NWJmc_sig_ldp + lsf_Znnmc*NZnnmc_sig_ldp + lsf_Ewomc*NEwomc_sig_ldp ),
Nlsb_0b, Nlsb_0b_ldp, comp_data_qcd_sig, comp_data_qcd_sig_err ) ;
printf(" MC truth value : %8.1f +/- %4.1f\n",
Nqcdmc_sig, Nqcdmc_sig_err ) ;
printf("\n") ;
printf(" ttwj : sig = ( sb - (qcd_sb + (znn+other)_sb_mc) ) * (sig_sl/sb_sl) : ( %5d - ( %5.1f + %5.1f))*(%3d/%3d) = %5.1f +/- %4.1f\n",
Nsb, comp_data_qcd_sb, (lsf_Znnmc*NZnnmc_sb + lsf_Ewomc*NEwomc_sb), Nsig_sl, Nsb_sl, comp_data_ttwj_sig, comp_data_ttwj_sig_err ) ;
printf(" MC truth value : %5.1f +/- %4.1f\n",
(Nttbarmc_sig + lsf_WJmc*NWJmc_sig), lsf_WJmc*sqrt(NWJmc_sig) ) ;
printf("\n\n\n") ;
printf(" ---- Z to nunu calculations\n\n" ) ;
printf(" Znn SIG : %6.1f +/- %5.1f\n", comp_znn_sig, comp_znn_sig_err ) ;
printf(" Znn SB : %6.1f +/- %5.1f\n", comp_znn_sb , comp_znn_sb_err ) ;
printf("\n\n\n") ;
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
printf(" --- Defining observables.\n" ) ;
rv_Nsig = new RooRealVar( "Nsig" , "Nsig" , 0.0, 1000000. ) ;
rv_Nsb = new RooRealVar( "Nsb" , "Nsb" , 0.0, 1000000. ) ;
rv_Nsig_sl = new RooRealVar( "Nsig_sl" , "Nsig_sl" , 0.0, 1000000. ) ;
rv_Nsb_sl = new RooRealVar( "Nsb_sl" , "Nsb_sl" , 0.0, 1000000. ) ;
rv_Nsig_ldp = new RooRealVar( "Nsig_ldp" , "Nsig_ldp" , 0.0, 1000000. ) ;
rv_Nsb_ldp = new RooRealVar( "Nsb_ldp" , "Nsb_ldp" , 0.0, 1000000. ) ;
rv_Nlsb_0b = new RooRealVar( "Nlsb_0b" , "Nlsb_0b" , 0.0, 1000000. ) ;
rv_Nlsb_0b_ldp = new RooRealVar( "Nlsb_0b_ldp" , "Nlsb_0b_ldp" , 0.0, 1000000. ) ;
if ( znnModel == 1 ) {
rv_Nsb_ee = new RooRealVar( "Nsb_ee" ,"Nsb_ee" , 0., 100. ) ;
rv_Nsig_ee = new RooRealVar( "Nsig_ee" ,"Nsig_ee" , 0., 100. ) ;
rv_Nsb_mm = new RooRealVar( "Nsb_mm" ,"Nsb_mm" , 0., 100. ) ;
rv_Nsig_mm = new RooRealVar( "Nsig_mm" ,"Nsig_mm" , 0., 100. ) ;
} else if ( znnModel == 2 ) {
rv_Nsigsb_ee = new RooRealVar( "Nsigsb_ee" ,"Nsigsb_ee" , 0., 100. ) ;
rv_Nsigsb_mm = new RooRealVar( "Nsigsb_mm" ,"Nsigsb_mm" , 0., 100. ) ;
}
if ( Nsig < 0 ) {
printf("\n\n *** Negative value for Nsig in input file. Will set Nsig to MC expectation, which is %d.\n\n",
TMath::Nint( Nsm_sig ) ) ;
Nsig = TMath::Nint( Nsm_sig ) ;
}
rv_Nsig -> setVal( Nsig ) ;
rv_Nsb -> setVal( Nsb ) ;
rv_Nsig_sl -> setVal( Nsig_sl ) ;
rv_Nsb_sl -> setVal( Nsb_sl ) ;
rv_Nsig_ldp -> setVal( Nsig_ldp ) ;
rv_Nsb_ldp -> setVal( Nsb_ldp ) ;
rv_Nlsb_0b -> setVal( Nhtonlytrig_lsb_0b ) ;
rv_Nlsb_0b_ldp -> setVal( Nhtonlytrig_lsb_0b_ldp ) ;
if ( znnModel == 1 ) {
rv_Nsb_ee -> setVal( Nsb_ee ) ;
rv_Nsig_ee -> setVal( Nsig_ee ) ;
rv_Nsb_mm -> setVal( Nsb_mm ) ;
rv_Nsig_mm -> setVal( Nsig_mm ) ;
} else if ( znnModel == 2 ) {
rv_Nsigsb_ee -> setVal( Nsig_ee + Nsb_ee ) ;
rv_Nsigsb_mm -> setVal( Nsig_mm + Nsb_mm ) ;
}
//++++++++ Parameters of the likelihood +++++++++++++++++++++++++++++++++++++++++
printf(" --- Defining parameters.\n" ) ;
//____ Counts in SIG ______________________
if ( useSigTtwjVar ) {
rrv_mu_ttwj_sig = new RooRealVar( "mu_ttwj_sig" , "mu_ttwj_sig" , 0.0, 10000. ) ;
rv_mu_ttwj_sig = rrv_mu_ttwj_sig ;
rrv_mu_ttwj_sig -> setVal( Nttbarmc_sig + lsf_WJmc*NWJmc_sig ) ; //-- this is a starting value only.
}
if ( !useLdpVars ) {
rrv_mu_qcd_sig = new RooRealVar( "mu_qcd_sig" , "mu_qcd_sig" , 0.0, 50. ) ;
rv_mu_qcd_sig = rrv_mu_qcd_sig ;
rrv_mu_qcd_sig -> setVal( Nqcdmc_sig ) ; //-- this is a starting value only.
}
//-- Note: Ewo is rfv
rv_mu_znn_sig = new RooRealVar( "mu_znn_sig" , "mu_znn_sig" , 0.0, 80. ) ;
float maxSusySig = 4.0*Nsig ;
rv_mu_susy_sig = new RooRealVar( "mu_susy_sig" , "mu_susy_sig" , 0.0, maxSusySig ) ;