ATLAS Offline Software
Loading...
Searching...
No Matches
InDetProjFlags.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5
7// //
8// Implementation of class InDetProjFlags //
9// //
10// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11// Initial version: February 2008 //
12// //
14
16
17void InDetProjFlags::projectionPartsGivenUsedDetectors( InDetProjPartsFlags& proj_pixel,
18 InDetProjPartsFlags& proj_sct,
19 InDetProjPartsFlags& proj_trt,
20 const DetTypeFlags& useddets )
21{
22 InDetProjPartsFlags not_allbarrel = ~(BarrelPositive|BarrelNegative|BarrelCentral);
23 InDetProjPartsFlags not_allendcap = ~(EndCapOuterPositive|EndCapOuterNegative
27 InDetProjPartsFlags not_allendcappos = ~(EndCapOuterPositive|EndCapInnerPositive|TRT_EndCapZToRPositive);
28 InDetProjPartsFlags not_allendcapneg = ~(EndCapOuterNegative|EndCapInnerNegative|TRT_EndCapZToRNegative);
29
30 if (proj_pixel!=NoProjections) {
31 if (useddets&Pixel_all) {
32 if (!(useddets&(Pixel_brlpos|Pixel_brlneg))) {
33 proj_pixel &= not_allbarrel;//No pixel barrel at all:
34 } else {
35 if (!(useddets&Pixel_brlpos)) proj_pixel &= ~BarrelPositive;//No pixel pos barrel
36 if (!(useddets&Pixel_brlneg)) proj_pixel &= ~BarrelNegative;//No pixel neg barrel
37 }
38 if (!(useddets&(Pixel_ecpos|Pixel_ecneg))) {
39 proj_pixel &= not_allendcap;//No pixel endcaps at all.
40 } else {
41 if (!(useddets&Pixel_ecpos)) proj_pixel &= not_allendcappos;//No pixel pos endcap
42 if (!(useddets&Pixel_ecneg)) proj_pixel &= not_allendcapneg;//No pixel neg endcap
43 }
44 } else {
45 proj_pixel = NoProjections;
46 }
47 }
48
49 if (proj_sct!=NoProjections) {
50 if (useddets&SCT_all) {
51 if (!(useddets&(SCT_brlpos|SCT_brlneg))) {
52 proj_sct &= not_allbarrel;//No sct barrel at all:
53 } else {
54 if (!(useddets&SCT_brlpos)) proj_sct &= ~BarrelPositive;//No sct pos barrel
55 if (!(useddets&SCT_brlneg)) proj_sct &= ~BarrelNegative;//No sct neg barrel
56 }
57 if (!(useddets&(SCT_ecpos|SCT_ecneg))) {
58 proj_sct &= not_allendcap;//No sct endcaps at all.
59 } else {
60 if (!(useddets&SCT_ecpos)) proj_sct &= not_allendcappos;//No sct pos endcap
61 if (!(useddets&SCT_ecneg)) proj_sct &= not_allendcapneg;//No sct neg endcap
62 }
63 } else {
64 proj_sct = NoProjections;
65 }
66 }
67
68 if (proj_trt!=NoProjections) {
69 if (useddets&TRT_all) {
70 if (!(useddets&(TRT_brlpos|TRT_brlneg))) {
71 proj_trt &= not_allbarrel;//No trt barrel at all:
72 } else {
73 if (!(useddets&TRT_brlpos)) proj_trt &= ~BarrelPositive;//No trt pos barrel
74 if (!(useddets&TRT_brlneg)) proj_trt &= ~BarrelNegative;//No trt neg barrel
75 }
76 if (!(useddets&(TRT_ecpos|TRT_ecneg))) {
77 proj_trt &= not_allendcap;//No trt endcaps at all.
78 } else {
79 if (!(useddets&TRT_ecpos)) proj_trt &= not_allendcappos;//No trt pos endcap
80 if (!(useddets&TRT_ecneg)) proj_trt &= not_allendcapneg;//No trt neg endcap
81 }
82 } else {
83 proj_trt = NoProjections;
84 }
85 }
86}
static void projectionPartsGivenUsedDetectors(InDetProjPartsFlags &proj_pixel, InDetProjPartsFlags &proj_sct, InDetProjPartsFlags &proj_trt, const DetTypeFlags &useddets)