forked from stremreich/CSCefficiency
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCSCEffFast.h
More file actions
2333 lines (2188 loc) · 121 KB
/
Copy pathCSCEffFast.h
File metadata and controls
2333 lines (2188 loc) · 121 KB
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
//////////////////////////////////////////////////////////
// This class has been automatically generated on
// Fri Oct 18 10:59:44 2019 by ROOT/version 6.18/00
// from TTree Fraction//Fraction
// found on file: /hdfs/store/user/strembat/TnPFiles_May-16-2019/2018D/afterHV/PV/SEG/Tmp_NtupleAnzScripts.root
//////////////////////////////////////////////////////////
#ifndef CSCEffFast_h
#define CSCEffFast_h
#include <TSystem.h>
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
#include "stdio.h"
#include <iostream>
// Header file for the classes stored in the TTree if any.
#include <vector>
#define newData true
class CSCEffFast {
public :
// Define dataset run ranges
typedef struct {
Int_t firstRun;
Int_t lastRun;
Text_t id[10];
} dataset;
static constexpr dataset d2022all = {355000, 362760, "2022"};
static constexpr dataset d2023all = {367100, 370790, "2023"};
static constexpr dataset d2023Cv1 = {367100, 367515, "2023Cv1"};
static constexpr dataset d2023Cv2 = {367516, 367758, "2023Cv2"};
static constexpr dataset d2023Cv4 = {367765, 369694, "2023Cv4"};
static constexpr dataset d2023Dv1 = {369803, 370580, "2023Dv1"};
static constexpr dataset d2023Dv2 = {370603, 370790, "2023Dv2"};
static constexpr dataset d2024all = {379412, 387000, "2024"};
//static constexpr dataset d2024Bv1 = {378900, 379400, "2024Bv1"};// this data is pretty much all bad
static constexpr dataset d2024Cv1 = {379412, 380252, "2024Cv1"};
static constexpr dataset d2024Dv1 = {380253, 380947, "2024Dv1"};
static constexpr dataset d2024Ev1 = {380948, 381383, "2024Ev1"};
static constexpr dataset d2024Ev2 = {381384, 381600, "2024Ev2"};
static constexpr dataset d2024Fv1 = {381944, 383779, "2024Fv1"};
static constexpr dataset d2024Gv1 = {383780, 385813, "2024Gv1"};
static constexpr dataset d2024Gv1r = {383780, 385813, "2024Gv1"};
//static constexpr dataset d2024HIv12 = {385814, 387000, "2024HIv12"};
static constexpr dataset d2024Hv1 = {385814, 386408, "2024Hv1"};
static constexpr dataset d2024Iv1 = {386409, 386797, "2024Iv1"};
static constexpr dataset d2024Iv2 = {386798, 387000, "2024Iv2"};
static constexpr dataset d2025all = {391658, 395899, "2025"};
static constexpr dataset d2025Bv1 = {391658, 392112, "2025Bv1"};
static constexpr dataset d2025Cv1 = {392175, 393087, "2025Cv1"};
static constexpr dataset d2025Cv2 = {393111, 393516, "2025Cv2"};
static constexpr dataset d2025Dv1 = {394637, 395899, "2025Dv1"};
static constexpr dataset d2025Ev1 = {395982, 396422, "2025Ev1"};
static constexpr dataset d2025Fv1 = {396725, 397596, "2025Fv1"};
static constexpr dataset d2025Fv2 = {397619, 397817, "2025Fv2"};
static constexpr dataset d2025Gv1 = {397954, 398903, "2025Gv1"};
static constexpr dataset d2025Gv1test = {397954, 398903, "2025Gv1t"};
#if newData
//static constexpr dataset firstSet = d2025all;
//static constexpr dataset lastSet = d2025all;
static constexpr dataset firstSet = d2025Gv1;
static constexpr dataset lastSet = d2025Gv1;
#else
static const Int_t firstSet = d2022all;
static const Int_t lastSet = d2022all;
#endif
// These can be different from the sets' run ranges.
// If specified, any datasets within the run range will have
// their full set of files included for the script, but only
// those in the run range will be included in the efficiency
// calculation.
static const Int_t firstRun = firstSet.firstRun;
static const Int_t lastRun = lastSet.lastRun;
TNamed *setName, *setRuns, *setRunsTrue;
TTree *fChain; //!pointer to the analyzed TTree or TChain
Int_t fCurrent; //!current Tree number in a TChain
// Fixed size dimensions of array or collections stored in the TTree if any.
// Fixed size dimensions of array or collections stored in the TTree if any.
// Declaration of leaf types
Int_t run_number;
Int_t event_number;
Int_t LumiBlock;
Int_t LumiSection;
std::vector<float> *LumiInst;
std::vector<float> *LumiInstErr;
std::vector<float> *LumiInstQlty;
std::vector<float> *LumiEtInst;
std::vector<float> *LumiEtInstErr;
std::vector<float> *LumiEtInstQlty;
std::vector<float> *LumiStartOrbit;
std::vector<float> *LumiNumOrbits;
Int_t bunchX;
Int_t orbitNumb;
Float_t mcweight;
UInt_t numberOfPUVertices;
Float_t numberOfPUVerticesMixingTruth;
UInt_t numberOfPUVerticesTot;
UInt_t numberOfPrimaryVertices;
Bool_t trgSingle;
Int_t nTrkCountCSCSeg;
Int_t nTotalTrks;
Bool_t trackVeto_strict;
Bool_t trackVeto_isClosestToLCT;
Int_t myRegion;
Float_t MuTagPt;
Float_t MuTagEta;
Float_t MuTagPhi;
Float_t MuTagIsoR03Ratio;
Float_t MuTagIsoR05Ratio;
Float_t MuTagPFIsoR04Ratio;
Int_t MuTagPromt;
Int_t MuTagnSegTrkArb;
Bool_t MuTagCaloL;
Bool_t MuTagCaloT;
Float_t MuTagtracktruth_pt;
Float_t MuTagtracktruth_p;
Float_t MuTagtracktruth_id;
ULong64_t MuTagtracktruth_type;
Bool_t MuTagtracktruth_isPileup;
Int_t MuTagtracktruth_thesamewith;
Float_t vtx_r;
Float_t vtx_z;
Float_t vtx_rError;
Float_t vtx_zError;
Float_t vtx_normChi2;
Int_t vtx_size;
Bool_t iSameVtx;
Float_t invMass;
Float_t tracks_e;
Float_t tracks_pt;
Float_t tracks_eta;
Float_t tracks_phi;
Int_t tracks_charge;
Int_t tracks_id;
Float_t tracks_normchi2;
Float_t tracks_dxy;
Float_t tracks_dz;
Float_t tracks_vx;
Float_t tracks_vy;
Float_t tracks_vz;
Float_t tracks_IsoR03Ratio;
Float_t tracks_IsoR05Ratio;
Float_t tracks_qoverp;
Float_t tracks_lambda;
Int_t tracks_recHitsSize;
Int_t tracks_numberOfValidHits;
Int_t tracks_numberOfLostHits;
Float_t tracks_qoverpError;
Float_t tracks_ptError;
Float_t tracks_thetaError;
Float_t tracks_lambdaError;
Float_t tracks_etaError;
Float_t tracks_phiError;
Float_t tracks_dxyError;
Float_t tracks_d0Error;
Float_t tracks_dszError;
Float_t tracks_dzError;
Bool_t tracks_isCaloMuTrk;
Bool_t tracks_isTrackerMuTrk;
Int_t tracks_numberOfMatches;
Float_t tracktruth_pt;
Float_t tracktruth_p;
Float_t tracktruth_e;
Float_t tracktruth_id;
ULong64_t tracktruth_type;
Bool_t tracktruth_isPileup;
Int_t tracktruth_thesamewith;
Bool_t CSCEndCapPlus;
UChar_t CSCRg1;
UChar_t CSCCh1;
Bool_t CSCCBad1;
Float_t CSCDyProjHVGap1;
Float_t CSCDyErrProjHVGap1;
Float_t CSCProjDistEdge1;
Float_t CSCProjDistErrEdge1;
Float_t CSCTTxLc1;
Float_t CSCTTwLc1;
Float_t CSCTTyLc1;
Float_t CSCTTsLc1;
Float_t CSCTTwSegxLc1;
Float_t CSCTTwSegyLc1;
Float_t CSCTT3xLc1;
Float_t CSCTT3wLc1;
Float_t CSCTT3yLc1;
Float_t CSCTT3sLc1;
Float_t CSCTT3wLCTxLc1;
Float_t CSCTT3wLCTyLc1;
Float_t CSCTTxGc1;
Float_t CSCTTyGc1;
Float_t CSCTTzGc1;
Float_t CSCTTetaGc1;
Float_t CSCTT3xGc1;
Float_t CSCTT3yGc1;
Float_t CSCTT3zGc1;
Float_t CSCTT3etaGc1;
Float_t CSCSegNumber1;
Float_t DTSegNumber1;
Float_t RPCSegNumber1;
Float_t CSCSegxLc1;
Float_t CSCSegyLc1;
Float_t CSCSegxErrLc1;
Float_t CSCSegyErrLc1;
Float_t CSCdXdZTTSeg1;
Float_t CSCdYdZTTSeg1;
Float_t CSCSegChisqProb1;
Int_t CSCnSegHits1;
Float_t CSCDxTTSeg1;
Float_t CSCDxErrTTSeg1;
Float_t CSCDyTTSeg1;
Float_t CSCDyErrTTSeg1;
Float_t CSCDxyTTSeg1;
Float_t CSCDxyErrTTSeg1;
Float_t CSCLCTxLc1;
Float_t CSCLCTyLc1;
Int_t CSCLCTbx1;
Int_t N_seg_inChamber1;
Float_t CSCDxTTLCT1;
Float_t CSCDxErrTTLCT1;
Float_t CSCDyTTLCT1;
Float_t CSCDyErrTTLCT1;
Float_t CSCDxyTTLCT1;
Float_t CSCDxyErrTTLCT1;
Float_t dRTkMu1;
UChar_t CSCRg2;
UChar_t CSCCh2;
Bool_t CSCCBad2;
Float_t CSCDyProjHVGap2;
Float_t CSCDyErrProjHVGap2;
Float_t CSCProjDistEdge2;
Float_t CSCProjDistErrEdge2;
Float_t CSCTTxLc2;
Float_t CSCTTwLc2;
Float_t CSCTTyLc2;
Float_t CSCTTsLc2;
Float_t CSCTTwSegxLc2;
Float_t CSCTTwSegyLc2;
Float_t CSCTT3xLc2;
Float_t CSCTT3wLc2;
Float_t CSCTT3yLc2;
Float_t CSCTT3sLc2;
Float_t CSCTT3wLCTxLc2;
Float_t CSCTT3wLCTyLc2;
Float_t CSCTTxGc2;
Float_t CSCTTyGc2;
Float_t CSCTTzGc2;
Float_t CSCTTetaGc2;
Float_t CSCTT3xGc2;
Float_t CSCTT3yGc2;
Float_t CSCTT3zGc2;
Float_t CSCTT3etaGc2;
Float_t CSCSegNumber2;
Float_t DTSegNumber2;
Float_t RPCSegNumber2;
Float_t CSCSegxLc2;
Float_t CSCSegyLc2;
Float_t CSCSegxErrLc2;
Float_t CSCSegyErrLc2;
Float_t CSCdXdZTTSeg2;
Float_t CSCdYdZTTSeg2;
Float_t CSCSegChisqProb2;
Int_t CSCnSegHits2;
Float_t CSCDxTTSeg2;
Float_t CSCDxErrTTSeg2;
Float_t CSCDyTTSeg2;
Float_t CSCDyErrTTSeg2;
Float_t CSCDxyTTSeg2;
Float_t CSCDxyErrTTSeg2;
Float_t CSCLCTxLc2;
Float_t CSCLCTyLc2;
Int_t CSCLCTbx2;
Int_t N_seg_inChamber2;
Float_t CSCDxTTLCT2;
Float_t CSCDxErrTTLCT2;
Float_t CSCDyTTLCT2;
Float_t CSCDyErrTTLCT2;
Float_t CSCDxyTTLCT2;
Float_t CSCDxyErrTTLCT2;
Float_t dRTkMu2;
UChar_t CSCRg3;
UChar_t CSCCh3;
Bool_t CSCCBad3;
Float_t CSCDyProjHVGap3;
Float_t CSCDyErrProjHVGap3;
Float_t CSCProjDistEdge3;
Float_t CSCProjDistErrEdge3;
Float_t CSCTTxLc3;
Float_t CSCTTwLc3;
Float_t CSCTTyLc3;
Float_t CSCTTsLc3;
Float_t CSCTTwSegxLc3;
Float_t CSCTTwSegyLc3;
Float_t CSCTT3xLc3;
Float_t CSCTT3wLc3;
Float_t CSCTT3yLc3;
Float_t CSCTT3sLc3;
Float_t CSCTT3wLCTxLc3;
Float_t CSCTT3wLCTyLc3;
Float_t CSCTTxGc3;
Float_t CSCTTyGc3;
Float_t CSCTTzGc3;
Float_t CSCTTetaGc3;
Float_t CSCTT3xGc3;
Float_t CSCTT3yGc3;
Float_t CSCTT3zGc3;
Float_t CSCTT3etaGc3;
Float_t CSCSegNumber3;
Float_t DTSegNumber3;
Float_t RPCSegNumber3;
Float_t CSCSegxLc3;
Float_t CSCSegyLc3;
Float_t CSCSegxErrLc3;
Float_t CSCSegyErrLc3;
Float_t CSCdXdZTTSeg3;
Float_t CSCdYdZTTSeg3;
Float_t CSCSegChisqProb3;
Int_t CSCnSegHits3;
Float_t CSCDxTTSeg3;
Float_t CSCDxErrTTSeg3;
Float_t CSCDyTTSeg3;
Float_t CSCDyErrTTSeg3;
Float_t CSCDxyTTSeg3;
Float_t CSCDxyErrTTSeg3;
Float_t CSCLCTxLc3;
Float_t CSCLCTyLc3;
Int_t CSCLCTbx3;
Int_t N_seg_inChamber3;
Float_t CSCDxTTLCT3;
Float_t CSCDxErrTTLCT3;
Float_t CSCDyTTLCT3;
Float_t CSCDyErrTTLCT3;
Float_t CSCDxyTTLCT3;
Float_t CSCDxyErrTTLCT3;
Float_t dRTkMu3;
UChar_t CSCRg4;
UChar_t CSCCh4;
Bool_t CSCCBad4;
Float_t CSCDyProjHVGap4;
Float_t CSCDyErrProjHVGap4;
Float_t CSCProjDistEdge4;
Float_t CSCProjDistErrEdge4;
Float_t CSCTTxLc4;
Float_t CSCTTwLc4;
Float_t CSCTTyLc4;
Float_t CSCTTsLc4;
Float_t CSCTTwSegxLc4;
Float_t CSCTTwSegyLc4;
Float_t CSCTT3xLc4;
Float_t CSCTT3wLc4;
Float_t CSCTT3yLc4;
Float_t CSCTT3sLc4;
Float_t CSCTT3wLCTxLc4;
Float_t CSCTT3wLCTyLc4;
Float_t CSCTTxGc4;
Float_t CSCTTyGc4;
Float_t CSCTTzGc4;
Float_t CSCTTetaGc4;
Float_t CSCTT3xGc4;
Float_t CSCTT3yGc4;
Float_t CSCTT3zGc4;
Float_t CSCTT3etaGc4;
Float_t CSCSegNumber4;
Float_t DTSegNumber4;
Float_t RPCSegNumber4;
Float_t CSCSegxLc4;
Float_t CSCSegyLc4;
Float_t CSCSegxErrLc4;
Float_t CSCSegyErrLc4;
Float_t CSCdXdZTTSeg4;
Float_t CSCdYdZTTSeg4;
Float_t CSCSegChisqProb4;
Int_t CSCnSegHits4;
Float_t CSCDxTTSeg4;
Float_t CSCDxErrTTSeg4;
Float_t CSCDyTTSeg4;
Float_t CSCDyErrTTSeg4;
Float_t CSCDxyTTSeg4;
Float_t CSCDxyErrTTSeg4;
Float_t CSCLCTxLc4;
Float_t CSCLCTyLc4;
Int_t CSCLCTbx4;
Int_t N_seg_inChamber4;
Float_t CSCDxTTLCT4;
Float_t CSCDxErrTTLCT4;
Float_t CSCDyTTLCT4;
Float_t CSCDyErrTTLCT4;
Float_t CSCDxyTTLCT4;
Float_t CSCDxyErrTTLCT4;
Float_t dRTkMu4;
std::vector<bool> *HLTMuAcceptance;
Float_t HLTDiMuAcceptance;
std::vector<float> *minDRHLTMu;
Float_t minDRHLTDiMu;
Float_t minDRHLTAllSingleMu;
// List of branches
TBranch *b_run_number; //!
TBranch *b_event_number; //!
TBranch *b_LumiBlock; //!
TBranch *b_LumiSection; //!
TBranch *b_LumiInst; //!
TBranch *b_LumiInstErr; //!
TBranch *b_LumiInstQlty; //!
TBranch *b_LumiEtInst; //!
TBranch *b_LumiEtInstErr; //!
TBranch *b_LumiEtInstQlty; //!
TBranch *b_LumiStartOrbit; //!
TBranch *b_LumiNumOrbits; //!
TBranch *b_bunchX; //!
TBranch *b_orbitNumb; //!
TBranch *b_mcweight; //!
TBranch *b_numberOfPUVertices; //!
TBranch *b_numberOfPUVerticesMixingTruth; //!
TBranch *b_numberOfPUVerticesTot; //!
TBranch *b_numberOfPrimaryVertices; //!
TBranch *b_trgSingle; //!
TBranch *b_nTrkCountCSCSeg; //!
TBranch *b_nTotalTrks; //!
TBranch *b_trackVeto_strict; //!
TBranch *b_trackVeto_isClosestToLCT; //!
TBranch *b_myRegion; //!
TBranch *b_MuTagPt; //!
TBranch *b_MuTagEta; //!
TBranch *b_MuTagPhi; //!
TBranch *b_MuTagIsoR03Ratio; //!
TBranch *b_MuTagIsoR05Ratio; //!
TBranch *b_MuTagPFIsoR04Ratio; //!
TBranch *b_MuTagPromt; //!
TBranch *b_MuTagnSegTrkArb; //!
TBranch *b_MuTagCaloL; //!
TBranch *b_MuTagCaloT; //!
TBranch *b_MuTagtracktruth_pt; //!
TBranch *b_MuTagtracktruth_p; //!
TBranch *b_MuTagtracktruth_id; //!
TBranch *b_MuTagtracktruth_type; //!
TBranch *b_MuTagtracktruth_isPileup; //!
TBranch *b_MuTagtracktruth_thesamewith; //!
TBranch *b_vtx_r; //!
TBranch *b_vtx_z; //!
TBranch *b_vtx_rError; //!
TBranch *b_vtx_zError; //!
TBranch *b_vtx_normChi2; //!
TBranch *b_vtx_size; //!
TBranch *b_iSameVtx; //!
TBranch *b_invMass; //!
TBranch *b_tracks_e; //!
TBranch *b_tracks_pt; //!
TBranch *b_tracks_eta; //!
TBranch *b_tracks_phi; //!
TBranch *b_tracks_charge; //!
TBranch *b_tracks_id; //!
TBranch *b_tracks_normchi2; //!
TBranch *b_tracks_dxy; //!
TBranch *b_tracks_dz; //!
TBranch *b_tracks_vx; //!
TBranch *b_tracks_vy; //!
TBranch *b_tracks_vz; //!
TBranch *b_tracks_IsoR03Ratio; //!
TBranch *b_tracks_IsoR05Ratio; //!
TBranch *b_tracks_qoverp; //!
TBranch *b_tracks_lambda; //!
TBranch *b_tracks_recHitsSize; //!
TBranch *b_tracks_numberOfValidHits; //!
TBranch *b_tracks_numberOfLostHits; //!
TBranch *b_tracks_qoverpError; //!
TBranch *b_tracks_ptError; //!
TBranch *b_tracks_thetaError; //!
TBranch *b_tracks_lambdaError; //!
TBranch *b_tracks_etaError; //!
TBranch *b_tracks_phiError; //!
TBranch *b_tracks_dxyError; //!
TBranch *b_tracks_d0Error; //!
TBranch *b_tracks_dszError; //!
TBranch *b_tracks_dzError; //!
TBranch *b_tracks_isCaloMuTrk; //!
TBranch *b_tracks_isTrackerMuTrk; //!
TBranch *b_tracks_numberOfMatches; //!
TBranch *b_tracktruth_pt; //!
TBranch *b_tracktruth_p; //!
TBranch *b_tracktruth_e; //!
TBranch *b_tracktruth_id; //!
TBranch *b_tracktruth_type; //!
TBranch *b_tracktruth_isPileup; //!
TBranch *b_tracktruth_thesamewith; //!
TBranch *b_CSCEndCapPlus; //!
TBranch *b_CSCRg1; //!
TBranch *b_CSCCh1; //!
TBranch *b_CSCCBad1; //!
TBranch *b_CSCDyProjHVGap1; //!
TBranch *b_CSCDyErrProjHVGap1; //!
TBranch *b_CSCProjDistEdge1; //!
TBranch *b_CSCProjDistErrEdge1; //!
TBranch *b_CSCTTxLc1; //!
TBranch *b_CSCTTwLc1; //!
TBranch *b_CSCTTyLc1; //!
TBranch *b_CSCTTsLc1; //!
TBranch *b_CSCTTwSegxLc1; //!
TBranch *b_CSCTTwSegyLc1; //!
TBranch *b_CSCTT3xLc1; //!
TBranch *b_CSCTT3wLc1; //!
TBranch *b_CSCTT3yLc1; //!
TBranch *b_CSCTT3sLc1; //!
TBranch *b_CSCTT3wLCTxLc1; //!
TBranch *b_CSCTT3wLCTyLc1; //!
TBranch *b_CSCTTxGc1; //!
TBranch *b_CSCTTyGc1; //!
TBranch *b_CSCTTzGc1; //!
TBranch *b_CSCTTetaGc1; //!
TBranch *b_CSCTT3xGc1; //!
TBranch *b_CSCTT3yGc1; //!
TBranch *b_CSCTT3zGc1; //!
TBranch *b_CSCTT3etaGc1; //!
TBranch *b_CSCSegNumber1; //!
TBranch *b_DTSegNumber1; //!
TBranch *b_RPCSegNumber1; //!
TBranch *b_CSCSegxLc1; //!
TBranch *b_CSCSegyLc1; //!
TBranch *b_CSCSegxErrLc1; //!
TBranch *b_CSCSegyErrLc1; //!
TBranch *b_CSCdXdZTTSeg1; //!
TBranch *b_CSCdYdZTTSeg1; //!
TBranch *b_CSCSegChisqProb1; //!
TBranch *b_CSCnSegHits1; //!
TBranch *b_CSCDxTTSeg1; //!
TBranch *b_CSCDxErrTTSeg1; //!
TBranch *b_CSCDyTTSeg1; //!
TBranch *b_CSCDyErrTTSeg1; //!
TBranch *b_CSCDxyTTSeg1; //!
TBranch *b_CSCDxyErrTTSeg1; //!
TBranch *b_CSCLCTxLc1; //!
TBranch *b_CSCLCTyLc1; //!
TBranch *b_CSCLCTbx1; //!
TBranch *b_N_seg_inChamber1; //!
TBranch *b_CSCDxTTLCT1; //!
TBranch *b_CSCDxErrTTLCT1; //!
TBranch *b_CSCDyTTLCT1; //!
TBranch *b_CSCDyErrTTLCT1; //!
TBranch *b_CSCDxyTTLCT1; //!
TBranch *b_CSCDxyErrTTLCT1; //!
TBranch *b_dRTkMu1; //!
TBranch *b_CSCRg2; //!
TBranch *b_CSCCh2; //!
TBranch *b_CSCCBad2; //!
TBranch *b_CSCDyProjHVGap2; //!
TBranch *b_CSCDyErrProjHVGap2; //!
TBranch *b_CSCProjDistEdge2; //!
TBranch *b_CSCProjDistErrEdge2; //!
TBranch *b_CSCTTxLc2; //!
TBranch *b_CSCTTwLc2; //!
TBranch *b_CSCTTyLc2; //!
TBranch *b_CSCTTsLc2; //!
TBranch *b_CSCTTwSegxLc2; //!
TBranch *b_CSCTTwSegyLc2; //!
TBranch *b_CSCTT3xLc2; //!
TBranch *b_CSCTT3wLc2; //!
TBranch *b_CSCTT3yLc2; //!
TBranch *b_CSCTT3sLc2; //!
TBranch *b_CSCTT3wLCTxLc2; //!
TBranch *b_CSCTT3wLCTyLc2; //!
TBranch *b_CSCTTxGc2; //!
TBranch *b_CSCTTyGc2; //!
TBranch *b_CSCTTzGc2; //!
TBranch *b_CSCTTetaGc2; //!
TBranch *b_CSCTT3xGc2; //!
TBranch *b_CSCTT3yGc2; //!
TBranch *b_CSCTT3zGc2; //!
TBranch *b_CSCTT3etaGc2; //!
TBranch *b_CSCSegNumber2; //!
TBranch *b_DTSegNumber2; //!
TBranch *b_RPCSegNumber2; //!
TBranch *b_CSCSegxLc2; //!
TBranch *b_CSCSegyLc2; //!
TBranch *b_CSCSegxErrLc2; //!
TBranch *b_CSCSegyErrLc2; //!
TBranch *b_CSCdXdZTTSeg2; //!
TBranch *b_CSCdYdZTTSeg2; //!
TBranch *b_CSCSegChisqProb2; //!
TBranch *b_CSCnSegHits2; //!
TBranch *b_CSCDxTTSeg2; //!
TBranch *b_CSCDxErrTTSeg2; //!
TBranch *b_CSCDyTTSeg2; //!
TBranch *b_CSCDyErrTTSeg2; //!
TBranch *b_CSCDxyTTSeg2; //!
TBranch *b_CSCDxyErrTTSeg2; //!
TBranch *b_CSCLCTxLc2; //!
TBranch *b_CSCLCTyLc2; //!
TBranch *b_CSCLCTbx2; //!
TBranch *b_N_seg_inChamber2; //!
TBranch *b_CSCDxTTLCT2; //!
TBranch *b_CSCDxErrTTLCT2; //!
TBranch *b_CSCDyTTLCT2; //!
TBranch *b_CSCDyErrTTLCT2; //!
TBranch *b_CSCDxyTTLCT2; //!
TBranch *b_CSCDxyErrTTLCT2; //!
TBranch *b_dRTkMu2; //!
TBranch *b_CSCRg3; //!
TBranch *b_CSCCh3; //!
TBranch *b_CSCCBad3; //!
TBranch *b_CSCDyProjHVGap3; //!
TBranch *b_CSCDyErrProjHVGap3; //!
TBranch *b_CSCProjDistEdge3; //!
TBranch *b_CSCProjDistErrEdge3; //!
TBranch *b_CSCTTxLc3; //!
TBranch *b_CSCTTwLc3; //!
TBranch *b_CSCTTyLc3; //!
TBranch *b_CSCTTsLc3; //!
TBranch *b_CSCTTwSegxLc3; //!
TBranch *b_CSCTTwSegyLc3; //!
TBranch *b_CSCTT3xLc3; //!
TBranch *b_CSCTT3wLc3; //!
TBranch *b_CSCTT3yLc3; //!
TBranch *b_CSCTT3sLc3; //!
TBranch *b_CSCTT3wLCTxLc3; //!
TBranch *b_CSCTT3wLCTyLc3; //!
TBranch *b_CSCTTxGc3; //!
TBranch *b_CSCTTyGc3; //!
TBranch *b_CSCTTzGc3; //!
TBranch *b_CSCTTetaGc3; //!
TBranch *b_CSCTT3xGc3; //!
TBranch *b_CSCTT3yGc3; //!
TBranch *b_CSCTT3zGc3; //!
TBranch *b_CSCTT3etaGc3; //!
TBranch *b_CSCSegNumber3; //!
TBranch *b_DTSegNumber3; //!
TBranch *b_RPCSegNumber3; //!
TBranch *b_CSCSegxLc3; //!
TBranch *b_CSCSegyLc3; //!
TBranch *b_CSCSegxErrLc3; //!
TBranch *b_CSCSegyErrLc3; //!
TBranch *b_CSCdXdZTTSeg3; //!
TBranch *b_CSCdYdZTTSeg3; //!
TBranch *b_CSCSegChisqProb3; //!
TBranch *b_CSCnSegHits3; //!
TBranch *b_CSCDxTTSeg3; //!
TBranch *b_CSCDxErrTTSeg3; //!
TBranch *b_CSCDyTTSeg3; //!
TBranch *b_CSCDyErrTTSeg3; //!
TBranch *b_CSCDxyTTSeg3; //!
TBranch *b_CSCDxyErrTTSeg3; //!
TBranch *b_CSCLCTxLc3; //!
TBranch *b_CSCLCTyLc3; //!
TBranch *b_CSCLCTbx3; //!
TBranch *b_N_seg_inChamber3; //!
TBranch *b_CSCDxTTLCT3; //!
TBranch *b_CSCDxErrTTLCT3; //!
TBranch *b_CSCDyTTLCT3; //!
TBranch *b_CSCDyErrTTLCT3; //!
TBranch *b_CSCDxyTTLCT3; //!
TBranch *b_CSCDxyErrTTLCT3; //!
TBranch *b_dRTkMu3; //!
TBranch *b_CSCRg4; //!
TBranch *b_CSCCh4; //!
TBranch *b_CSCCBad4; //!
TBranch *b_CSCDyProjHVGap4; //!
TBranch *b_CSCDyErrProjHVGap4; //!
TBranch *b_CSCProjDistEdge4; //!
TBranch *b_CSCProjDistErrEdge4; //!
TBranch *b_CSCTTxLc4; //!
TBranch *b_CSCTTwLc4; //!
TBranch *b_CSCTTyLc4; //!
TBranch *b_CSCTTsLc4; //!
TBranch *b_CSCTTwSegxLc4; //!
TBranch *b_CSCTTwSegyLc4; //!
TBranch *b_CSCTT3xLc4; //!
TBranch *b_CSCTT3wLc4; //!
TBranch *b_CSCTT3yLc4; //!
TBranch *b_CSCTT3sLc4; //!
TBranch *b_CSCTT3wLCTxLc4; //!
TBranch *b_CSCTT3wLCTyLc4; //!
TBranch *b_CSCTTxGc4; //!
TBranch *b_CSCTTyGc4; //!
TBranch *b_CSCTTzGc4; //!
TBranch *b_CSCTTetaGc4; //!
TBranch *b_CSCTT3xGc4; //!
TBranch *b_CSCTT3yGc4; //!
TBranch *b_CSCTT3zGc4; //!
TBranch *b_CSCTT3etaGc4; //!
TBranch *b_CSCSegNumber4; //!
TBranch *b_DTSegNumber4; //!
TBranch *b_RPCSegNumber4; //!
TBranch *b_CSCSegxLc4; //!
TBranch *b_CSCSegyLc4; //!
TBranch *b_CSCSegxErrLc4; //!
TBranch *b_CSCSegyErrLc4; //!
TBranch *b_CSCdXdZTTSeg4; //!
TBranch *b_CSCdYdZTTSeg4; //!
TBranch *b_CSCSegChisqProb4; //!
TBranch *b_CSCnSegHits4; //!
TBranch *b_CSCDxTTSeg4; //!
TBranch *b_CSCDxErrTTSeg4; //!
TBranch *b_CSCDyTTSeg4; //!
TBranch *b_CSCDyErrTTSeg4; //!
TBranch *b_CSCDxyTTSeg4; //!
TBranch *b_CSCDxyErrTTSeg4; //!
TBranch *b_CSCLCTxLc4; //!
TBranch *b_CSCLCTyLc4; //!
TBranch *b_CSCLCTbx4; //!
TBranch *b_N_seg_inChamber4; //!
TBranch *b_CSCDxTTLCT4; //!
TBranch *b_CSCDxErrTTLCT4; //!
TBranch *b_CSCDyTTLCT4; //!
TBranch *b_CSCDyErrTTLCT4; //!
TBranch *b_CSCDxyTTLCT4; //!
TBranch *b_CSCDxyErrTTLCT4; //!
TBranch *b_dRTkMu4; //!
TBranch *b_HLTMuAcceptance; //!
TBranch *b_HLTDiMuAcceptance; //!
TBranch *b_minDRHLTMu; //!
TBranch *b_minDRHLTDiMu; //!
TBranch *b_minDRHLTAllSingleMu; //!
CSCEffFast();
virtual ~CSCEffFast();
virtual Int_t Cut(Long64_t entry);
virtual Int_t GetEntry(Long64_t entry);
virtual Long64_t LoadTree(Long64_t entry);
virtual void Init(TTree *tree);
virtual void Loop();
virtual Bool_t Notify();
virtual void Show(Long64_t entry = -1);
};
#endif
#ifdef CSCEffFast_cxx
CSCEffFast::CSCEffFast() : fChain(0)
{
Int_t numberFiles = 0;
TChain *chain = new TChain("aodDump/Fraction");
//std::cout << "Analyzing " << (newData? "2023 or 2024" : "2022") << " data." << std::endl;
std::string name = "";
std::cout << "Analyzing ";
if (firstSet.firstRun <= firstRun && lastSet.lastRun >= lastRun){
TString first(firstSet.id), last(lastSet.id), period = first(0,first.First('v'));
char v1 = first[first.Length()-1], v2 = last[last.Length()-1];
if (last.BeginsWith(period)){
if (v1==v2) name = first;
else name = period + "v" + v1 + "-" + v2;
}
else name = first + "-" + last;
std::cout << name << " data." << std::endl;
}
else std::cout << "runs " << firstRun << "-" << lastRun << "." << std::endl;
setName = new TNamed("setName", name.c_str());
setRuns = new TNamed("setRuns", TString::Format("%i %i", firstRun, lastRun).Data());
if (newData){
// chain->Add("/afs/hep.wisc.edu/home/herndon/software/cscEffRun3_2023/CMSSW_13_0_3/src/CSCEfficiency/CSCEfficiency/test_2023_7.root");
// numberFiles++;
// 2023B
// for (int fileNum=0;fileNum < 260;fileNum++) {
// if ((!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2023B0_2023_0426_11/230508_133443/0000/CSCeff_Muon_2023B0_%d.root",fileNum)))&&fileNum!=88) {
// chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2023B0_2023_0426_11/230508_133443/0000/CSCeff_Muon_2023B0_%d.root",fileNum));
// numberFiles++;
// }
// }
// for (int fileNum=0;fileNum < 260;fileNum++) {
// if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon1/CSCEff2023B1_20231_0426_11/230508_134923/0000/CSCeff_Muon_2023B1_%d.root",fileNum))) {
// chain->Add(Form("/hdfs/store/user/herndon/Muon1/CSCEff2023B1_20231_0426_11/230508_134923/0000/CSCeff_Muon_2023B1_%d.root",fileNum));
// numberFiles++;
// }
// }
// for (int fileNum=0;fileNum < 40;fileNum++) {
// if ((!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2023B0_2023_0426_12/230512_142707/0000/CSCeff_Muon_2023B0_%d.root",fileNum)))&&fileNum!=88) {
// chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2023B0_2023_0426_12/230512_142707/0000/CSCeff_Muon_2023B0_%d.root",fileNum));
// numberFiles++;
// }
// }
// for (int fileNum=0;fileNum < 40;fileNum++) {
// if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon1/CSCEff2023B1_20231_0426_12/230512_142748/0000/CSCeff_Muon_2023B1_%d.root",fileNum))) {
// chain->Add(Form("/hdfs/store/user/herndon/Muon1/CSCEff2023B1_20231_0426_12/230512_142748/0000/CSCeff_Muon_2023B1_%d.root",fileNum));
// numberFiles++;
// }
// }
// 2023C old
// for (int fileNum=0;fileNum < 380;fileNum++) {
// if ((!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2023C0_2023_0512_1/230513_012701/0000/CSCeff_Muon_2023C0_%d.root",fileNum)))&&fileNum!=88) {
// chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2023C0_2023_0512_1/230513_012701/0000/CSCeff_Muon_2023C0_%d.root",fileNum));
// numberFiles++;
// }
// }
// for (int fileNum=0;fileNum < 380;fileNum++) {
// if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon1/CSCEff2023C1_2023_0512_1/230513_012833/0000/CSCeff_Muon_2023C1_%d.root",fileNum))) {
// chain->Add(Form("/hdfs/store/user/herndon/Muon1/CSCEff2023C1_2023_0512_1/230513_012833/0000/CSCeff_Muon_2023C1_%d.root",fileNum));
// numberFiles++;
// }
// }
// 2024B, this data is pretty much all bad
// if (firstRun <= d2024Bv1.lastRun && d2024Bv1.firstRun <= lastRun){
// for (int fileNum=0; fileNum<140; fileNum++){//Muon0
// if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2024B0_1_240417_8/240417_104015/0000/CSCeff_Muon_2024B_1_%d.root",fileNum))){
// chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2024B0_1_240417_8/240417_104015/0000/CSCeff_Muon_2024B_1_%d.root",fileNum));
// numberFiles++;
// }
// }
// for (int fileNum=0; fileNum<140; fileNum++){//Muon1
// if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon1/CSCEff2024B1_1_240415_8/240417_104156/0000/CSCeff_Muon_2024B_1_%d.root",fileNum))){
// chain->Add(Form("/hdfs/store/user/herndon/Muon1/CSCEff2024B1_1_240415_8/240417_104156/0000/CSCeff_Muon_2024B_1_%d.root",fileNum));
// numberFiles++;
// }
// }
// }
// 2025B v1
if (firstRun <= d2025Bv1.lastRun && d2025Bv1.firstRun <= lastRun){
for (int fileNum=0; fileNum<1000; fileNum++){//Muon0
if (!gSystem->AccessPathName(Form("/hdfs/store/user/marquez/Muon0/CSCEff2025B0v1/250521_171915/0000/CSCEff2025B0v1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/marquez/Muon0/CSCEff2025B0v1/250521_171915/0000/CSCEff2025B0v1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=0; fileNum<1000; fileNum++){//Muon1
if (!gSystem->AccessPathName(Form("/hdfs/store/user/marquez/Muon1/CSCEff2025B1v1/250521_190332/0000/CSCEff2025B1v1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/marquez/Muon1/CSCEff2025B1v1/250521_190332/0000/CSCEff2025B1v1_%d.root",fileNum));
numberFiles++;
}
}
}
// 2025C v1
if (firstRun <= d2025Cv1.lastRun && d2025Cv1.firstRun <= lastRun){
// Repladced older files with full 202C processing
for (int fileNum=0; fileNum<1000; fileNum++){//Muon0
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_1_250521_15/250623_224153/0000/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_1_250521_15/250623_224153/0000/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=1000; fileNum<2000; fileNum++){//Muon0
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_1_250521_15/250623_224153/0001/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_1_250521_15/250623_224153/0001/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=2000; fileNum<3000; fileNum++){//Muon0
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_1_250521_15/250623_224153/0002/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_1_250521_15/250623_224153/0002/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=3000; fileNum<4000; fileNum++){//Muon0
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_1_250521_15/250623_224153/0003/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_1_250521_15/250623_224153/0003/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=0; fileNum<1000; fileNum++){//Muon1
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_1_250521_15/250623_224249/0000/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_1_250521_15/250623_224249/0000/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=1000; fileNum<2000; fileNum++){//Muon1
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_1_250521_15/250623_224249/0001/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_1_250521_15/250623_224249/0001/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=2000; fileNum<3000; fileNum++){//Muon1
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_1_250521_15/250623_224249/0002/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_1_250521_15/250623_224249/0002/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=3000; fileNum<4000; fileNum++){//Muon1
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_1_250521_15/250623_224249/0003/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_1_250521_15/250623_224249/0003/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
}
// 2025C v2
if (firstRun <= d2025Cv2.lastRun && d2025Cv2.firstRun <= lastRun){
// Repladced older files with full 202C processing
for (int fileNum=0; fileNum<1000; fileNum++){//Muon0
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_2_250707_2/250707_195128/0000/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_2_250707_2/250707_195128/0000/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=1000; fileNum<2000; fileNum++){//Muon0
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_2_250707_2/250707_195128/0001/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_2_250707_2/250707_195128/0001/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=2000; fileNum<3000; fileNum++){//Muon0
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_2_250707_2/250707_195128/0002/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2025C0_2_250707_2/250707_195128/0002/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=0; fileNum<1000; fileNum++){//Muon1
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_2_250707_2/250707_195405/0000/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_2_250707_2/250707_195405/0000/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=1000; fileNum<2000; fileNum++){//Muon1
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_2_250707_2/250707_195405/0001/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_2_250707_2/250707_195405/0001/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=2000; fileNum<3000; fileNum++){//Muon1
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_2_250707_2/250707_195405/0002/CSCeff_Muon_2025C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon1/CSCEff2025C1_2_250707_2/250707_195405/0002/CSCeff_Muon_2025C_1_%d.root",fileNum));
numberFiles++;
}
}
}
// 2025D v1
if (firstRun <= d2025Dv1.lastRun && d2025Dv1.firstRun <= lastRun){
numberFiles += chain->Add("/hdfs/store/user/marquez/Muon0/CSCEff2025D0v1/250819_163115/*/*.root");
numberFiles += chain->Add("/hdfs/store/user/marquez/Muon1/CSCEff2025D1v1/250819_163143/*/*.root");
}
// 2025E v1
if (firstRun <= d2025Ev1.lastRun && d2025Ev1.firstRun <= lastRun){
numberFiles += chain->Add("/hdfs/store/user/marquez/Muon0/CSCEff2025E0v1/250909_161359/*/*.root");
numberFiles += chain->Add("/hdfs/store/user/marquez/Muon1/CSCEff2025E1v1/250909_161425/*/*.root");
}
// 2025F v1
if (firstRun <= d2025Fv1.lastRun && d2025Fv1.firstRun <= lastRun){
numberFiles += chain->Add("/hdfs/store/user/marquez/Muon0/CSCEff2025F0v1/251008_175444/*/*.root");
numberFiles += chain->Add("/hdfs/store/user/marquez/Muon1/CSCEff2025F1v1/251008_175506/*/*.root");
}
// 2025F v2
if (firstRun <= d2025Fv2.lastRun && d2025Fv2.firstRun <= lastRun){
numberFiles += chain->Add("/hdfs/store/user/marquez/Muon0/CSCEff2025F0v2/251013_214811/*/*.root");
numberFiles += chain->Add("/hdfs/store/user/marquez/Muon1/CSCEff2025F1v2/251013_214837/*/*.root");
}
//2025G v1
if (firstRun <= d2025Gv1.lastRun && d2025Gv1.firstRun <= lastRun){
numberFiles += chain->Add("/hdfs/store/user/herndon/Muon0/CSCEff2025G0_1_251219_6/260102_150033/*/*.root");
numberFiles += chain->Add("/hdfs/store/user/herndon/Muon1/CSCEff2025G1_1_251219_6/260102_150116/*/*.root");
}
// if (firstRun <= d2025Gv1test.lastRun && d2025Gv1test.firstRun <= lastRun){
// numberFiles += chain->Add("/hdfs/store/user/herndon/Muon0/CSCEff2025G0_1_251219_5/260101_165019/*/*.root");
// numberFiles += chain->Add("/hdfs/store/user/herndon/Muon1/CSCEff2025G1_1_251219_5/260101_165157/*/*.root");
// }
// if (firstRun <= d2025Gv1test.lastRun && d2025Gv1test.firstRun <= lastRun){
// numberFiles += chain->Add("/hdfs/store/user/herndon/Muon0/CSCEff2025G0_1_251219_7/260105_183127/*/*.root");
// numberFiles += chain->Add("/hdfs/store/user/herndon/Muon1/CSCEff2025G1_1_251219_7/260105_185907/*/*.root");
// }
// 2024C v1
if (firstRun <= d2024Cv1.lastRun && d2024Cv1.firstRun <= lastRun){
for (int fileNum=0; fileNum<1000; fileNum++){//Muon0
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2024C0_1_240430_11/240430_151603/0000/CSCeff_Muon_2024C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2024C0_1_240430_11/240430_151603/0000/CSCeff_Muon_2024C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=0; fileNum<1000; fileNum++){//Muon1
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon1/CSCEff2024C1_1_240430_11/240430_151643/0000/CSCeff_Muon_2024C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon1/CSCEff2024C1_1_240430_11/240430_151643/0000/CSCeff_Muon_2024C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=1000; fileNum<2000; fileNum++){//Muon0
if (!gSystem->AccessPathName(Form("/hdfs/store/user/herndon/Muon0/CSCEff2024C0_1_240430_11/240430_151603/0001/CSCeff_Muon_2024C_1_%d.root",fileNum))){
chain->Add(Form("/hdfs/store/user/herndon/Muon0/CSCEff2024C0_1_240430_11/240430_151603/0001/CSCeff_Muon_2024C_1_%d.root",fileNum));
numberFiles++;
}
}
for (int fileNum=1000; fileNum<2000; fileNum++){//Muon1