293{
294
295
296 bool doenergysplit = false;
297
298
299 bool validcell = true;
300
301
302 int towereta = -99;
303 int towerphi = -99;
304 int iJTower = -99;
305 int iCell = -1;
306 int towerID_Modifier = -999999999;
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 switch (sample) {
393
394 case CaloSampling::PreSamplerB: {
395
396
397
398
400
403
404 if(eta_index == 14) {
405 if(pos_neg < 0) {
406 towerID_Modifier = 300000;
407 }
408 else if(pos_neg > 0) {
409 towerID_Modifier = 400000;
410 }
411 iCell = 0;
412 }
413 else {
414 if(pos_neg < 0) {
415 towerID_Modifier = 100000;
416 }
417 else if(pos_neg > 0) {
418 towerID_Modifier = 200000;
419 }
420 iCell = 0;
421 }
422
423 break;
424 }
425 case CaloSampling::EMB1:
426 case CaloSampling::EMB2: {
427
428
429
430
431
432
433
434
435 if (region == 0) {
438 if(pos_neg < 0) {
439 towerID_Modifier = 100000;
440 }
441 else if(pos_neg > 0) {
442 towerID_Modifier = 200000;
443 }
444 }
445 else if (region == 1) {
446 towereta = 14;
448 if(pos_neg < 0) {
449 towerID_Modifier = 300000;
450 }
451 else if(pos_neg > 0) {
452 towerID_Modifier = 400000;
453 }
454 }
455 else {
456 ATH_MSG_DEBUG(
"[CaloSampling::EMB1 or CaloSampling::EMB2] -> invalid 'region' value: " << region <<
" (Under investigation) ");
457 }
458
459 switch(sample) {
460 case CaloSampling::EMB1: {
461 iCell = 0;
463 break;
464 }
465 case CaloSampling::EMB2: {
466
467
468 iCell = 0;
470 break;
471 }
472 default: {
473 ATH_MSG_DEBUG(
"CaloSampling::EMBX -> invalid sample for assigning iCell value! " << sample <<
" (Under investigation) ");
474 break;
475 }
476 }
477
478 break;
479 }
480 case CaloSampling::EMB3: {
481
482
483
484
488
489 iCell = 0;
490
491 if(pos_neg < 0) {
492 towerID_Modifier = 100000;
493 }
494 else if(pos_neg > 0) {
495 towerID_Modifier = 200000;
496 }
497
498 break;
499 }
500
501 case CaloSampling::PreSamplerE: {
502
503
504
506
509
510 iCell = 0;
511
512 if(pos_neg < 0) {
513 towerID_Modifier = 500000;
514 }
515 else if(pos_neg > 0) {
516 towerID_Modifier = 600000;
517 }
518
519 break;
520 }
521 case CaloSampling::EME1: {
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
541
542 switch (region) {
543 case 0: {
544
547
548 iCell = 0;
549 break;
550 }
551 case 2: {
552
555
556
557 iCell = 0;
558 break;
559 }
560 case 3: {
561
562
565
566
567 iCell = 0;
568
569
570
571
572
573
574
575
576
577
578 break;
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597 }
598 case 4: {
599
602
603
604 iCell = 0;
605 break;
606 }
607 case 5: {
608
611
612
613 iCell = 0;
614 break;
615 }
616 default: {
617 ATH_MSG_DEBUG(
"CaloSampling::EME1 -> invalid 'region' value: " << region <<
" (Under investigation) ");
618 break;
619 }
620 break;
621 }
622
623 if(region != 0) {
624 if(pos_neg < 0) {
625 towerID_Modifier = 500000;
626 }
627 else if(pos_neg > 0) {
628 towerID_Modifier = 600000;
629 }
630 }
631 else if(region == 0) {
632
633 if(pos_neg < 0) {
634 towerID_Modifier = 300000;
635 }
636 else if(pos_neg > 0) {
637 towerID_Modifier = 400000;
638 }
639 }
640
641 break;
642 }
643 case CaloSampling::EME2: {
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
670
671 switch (region) {
672 case 0: {
673
674
676
677 switch (std::abs(pos_neg)) {
678 case 2: {
681 break;
682 }
683 case 3: {
686 break;
687 }
688 default: {
689 ATH_MSG_DEBUG(
"CaloSampling::EME2 -> invalid 'pos_neg' value: " << pos_neg <<
" (Under investigation) ");
690 break;
691 }
692 }
693
694 iCell = 0;
695
696 break;
697 }
698 case 1: {
699
700 switch (std::abs(pos_neg)) {
701 case 2: {
704 break;
705 }
706 case 3: {
709 break;
710 }
711 default: {
712 ATH_MSG_DEBUG(
"CaloSampling::EME2 -> invalid 'pos_neg' value: " << pos_neg <<
" (Under investigation) ");
713 break;
714 }
715 }
716
717
718 iCell = 0;
719
720 break;
721 }
722 default: {
723 ATH_MSG_DEBUG(
"CaloSampling::EME2 -> invalid 'region' value: " << region <<
" (Under investigation) ");
724 break;
725 }
726 break;
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 if(region == 0) {
773 if(eta0 < 2.5) {
774 if(pos_neg < 0) {
775 towerID_Modifier = 300000;
776 }
777 else if(pos_neg > 0) {
778 towerID_Modifier = 400000;
779 }
780 }
781 else {
782 if(pos_neg < 0) {
783 towerID_Modifier = 500000;
784 }
785 else if(pos_neg > 0) {
786 towerID_Modifier = 600000;
787 }
788 }
789 }
790 else {
791 if(eta0 <= 1.5) {
792 if(towereta < 15) {
793 if(pos_neg < 0 && pos_neg > -3) {
794 towerID_Modifier = 300000;
795 }
796 else if(pos_neg > 0 && pos_neg < 3) {
797 towerID_Modifier = 400000;
798 }
799 }
800 else {
801 if(pos_neg < 0 && pos_neg >= -3) {
802 towerID_Modifier = 500000;
803 }
804 else if(pos_neg > 0 && pos_neg <= 3) {
805 towerID_Modifier = 600000;
806 }
807 }
808 }
809 else {
810 if(pos_neg < 0) {
811 towerID_Modifier = 500000;
812 }
813 else if(pos_neg > 0) {
814 towerID_Modifier = 600000;
815 }
816 }
817 }
818
819
820 break;
821 }
822 case CaloSampling::EME3: {
823
824
825
826
827
828
829
831
832
833
834
835
836
837
838
839
840
841
842
843
845
846 switch (region) {
847 case 0: {
848
851
852 iCell = 0;
853
854 break;
855 }
856 case 1: {
859 iCell = 0;
860 break;
861 }
862 default: {
863 ATH_MSG_DEBUG(
"CaloSampling::EME3 -> invalid 'region' value: " << region <<
" (Under investigation) ");
864 break;
865 }
866 break;
867 }
868
869 if(pos_neg < 0) {
870 towerID_Modifier = 500000;
871 }
872 else if(pos_neg > 0) {
873 towerID_Modifier = 600000;
874 }
875
876 break;
877 }
878
879 case CaloSampling::HEC0:
880 case CaloSampling::HEC1:
881 case CaloSampling::HEC2:
882 case CaloSampling::HEC3: {
883
884
885
886
887
888
891
893 iCell = 1;
894 switch(region) {
895 case 0: {
896
899
901 iCell = 1;
902
903 break;
904
905 }
906 case 1: {
907
910
912 iCell = 1;
913
914 break;
915
916 }
917 default: {
918 break;
919 }
920 }
921
922 if(pos_neg < 0) {
923 towerID_Modifier = 500000;
924 }
925 else if(pos_neg > 0) {
926 towerID_Modifier = 600000;
927 }
928
929 break;
930 }
931 case CaloSampling::TileBar0:
932 case CaloSampling::TileBar1:
933 case CaloSampling::TileBar2: {
934
935 validcell = false;
936
937 ATH_MSG_DEBUG(
"\n==== jSuperCellTowerMapper ============ Supercell is from Tile Barrel - it will be ignored.");
938 break;
939 }
940 case CaloSampling::TileGap1:
941 case CaloSampling::TileGap2:
942 case CaloSampling::TileGap3: {
943 ATH_MSG_DEBUG(
"\n==== jSuperCellTowerMapper ============ Supercell is from Tile Gap (ITC and scintillator) - it will be ignored.");
944
945 validcell = false;
946 break;
947 }
948 case CaloSampling::TileExt0:
949 case CaloSampling::TileExt1:
950 case CaloSampling::TileExt2: {
951 ATH_MSG_DEBUG(
"\n==== jSuperCellTowerMapper ============ Supercell is from Tile Extended Barrel - it will be ignored.");
952
953 validcell = false;
954 break;
955 }
956 case CaloSampling::FCAL0:
957 case CaloSampling::FCAL1:
958 case CaloSampling::FCAL2: {
959
960
961
962
963 switch (sample) {
964 case CaloSampling::FCAL0: {
965 if(pos_neg < 0) {
966 towerID_Modifier = 700000;
967 }
968 else if(pos_neg > 0) {
969 towerID_Modifier = 800000;
970 }
971 iCell = 0;
973 break;
974 }
975 case CaloSampling::FCAL1: {
976 if(pos_neg < 0) {
977 towerID_Modifier = 900000;
978 }
979 else if(pos_neg > 0) {
980 towerID_Modifier = 1000000;
981 }
982 iCell = 1;
984 break;
985 }
986 case CaloSampling::FCAL2: {
987 if(pos_neg < 0) {
988 towerID_Modifier = 1100000;
989 }
990 else if(pos_neg > 0) {
991 towerID_Modifier = 1200000;
992 }
993 iCell = 1;
995 break;
996 }
997
998 default: {
999 break;
1000 }
1001 }
1002
1005
1006 break;
1007
1008 }
1009 case CaloSampling::MINIFCAL0:
1010 case CaloSampling::MINIFCAL1:
1011 case CaloSampling::MINIFCAL2:
1012 case CaloSampling::MINIFCAL3: {
1013 ATH_MSG_DEBUG(
"\n==== jSuperCellTowerMapper ============ Supercells is from MiniFCAL - it will be ignored.");
1014 validcell = false;
1015 break;
1016 }
1017 case CaloSampling::Unknown: {
1018 ATH_MSG_WARNING(
"\n==== jSuperCellTowerMapper ============ Supercell sampling is officially unknown - it will be ignored. (Needs investigation). Please report this!");
1019 validcell = false;
1020 break;
1021 }
1022 default: {
1023 ATH_MSG_DEBUG(
"\n==== jSuperCellTowerMapper ============ Supercell has invalid CaloSampling value: " << sample <<
" (Needs investigation). Please report this!");
1024 validcell = false;
1025 break;
1026 }
1027 }
1028
1029
1030 if(validcell) {
1032
1033
1035
1037 }
1038 if(doPrint) {
1039 PrintCellSpec(sample, layer, region, eta_index, phi_index, pos_neg, iJTower, iCell, prov, ID, doenergysplit, eta_min, eta_max, eta0, phi_min, phi_max, phi0);
1040 }
1042
1043
1044 }
1045 else {
1046 PrintCellSpec(sample, layer, region, eta_index, phi_index, pos_neg, iJTower, iCell, prov, ID, doenergysplit, eta_min, eta_max, eta0, phi_min, phi_max, phi0,
false);
1047 }
1048
1049
1050
1051 return 1;
1052}
virtual void PrintCellSpec(const CaloSampling::CaloSample sample, int layer, const int region, const int eta_index, const int phi_index, const int pos_neg, int iETower, int iCell, int prov, Identifier ID, bool doenergysplit, float eta_min, float eta_max, float eta0, float phi_min, float phi_max, float phi0, bool cellValid=true) const override
virtual void ConnectSuperCellToTower(std::unique_ptr< jTowerContainer > &my_jTowerContainerRaw, int iETower, Identifier ID, int iCell, float et, int layer) const override
Gaudi::Property< bool > m_apply_masking