ATLAS Offline Software
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 
17 void 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 }
InDetProjFlags::EndCapOuterNegative
@ EndCapOuterNegative
Definition: InDetProjFlags.h:54
InDetProjFlags::SCT_all
@ SCT_all
Definition: InDetProjFlags.h:33
InDetProjFlags::Pixel_ecpos
@ Pixel_ecpos
Definition: InDetProjFlags.h:36
InDetProjFlags::BarrelPositive
@ BarrelPositive
Definition: InDetProjFlags.h:50
InDetProjFlags::TRT_ecpos
@ TRT_ecpos
Definition: InDetProjFlags.h:41
InDetProjFlags::projectionPartsGivenUsedDetectors
static void projectionPartsGivenUsedDetectors(InDetProjPartsFlags &proj_pixel, InDetProjPartsFlags &proj_sct, InDetProjPartsFlags &proj_trt, const DetTypeFlags &useddets)
Definition: InDetProjFlags.cxx:17
InDetProjFlags::Pixel_brlpos
@ Pixel_brlpos
Definition: InDetProjFlags.h:34
InDetProjFlags::TRT_EndCapZToRCentral
@ TRT_EndCapZToRCentral
Definition: InDetProjFlags.h:60
InDetProjFlags::SCT_brlpos
@ SCT_brlpos
Definition: InDetProjFlags.h:29
InDetProjFlags::SCT_ecpos
@ SCT_ecpos
Definition: InDetProjFlags.h:31
InDetProjFlags::EndCapInnerPositive
@ EndCapInnerPositive
Definition: InDetProjFlags.h:55
InDetProjFlags::SCT_ecneg
@ SCT_ecneg
Definition: InDetProjFlags.h:32
InDetProjFlags::EndCapInnerNegative
@ EndCapInnerNegative
Definition: InDetProjFlags.h:56
InDetProjFlags::BarrelCentral
@ BarrelCentral
Definition: InDetProjFlags.h:52
InDetProjFlags::Pixel_ecneg
@ Pixel_ecneg
Definition: InDetProjFlags.h:37
InDetProjFlags::TRT_all
@ TRT_all
Definition: InDetProjFlags.h:43
InDetProjFlags::Pixel_all
@ Pixel_all
Definition: InDetProjFlags.h:38
InDetProjFlags::TRT_brlpos
@ TRT_brlpos
Definition: InDetProjFlags.h:39
InDetProjFlags::Pixel_brlneg
@ Pixel_brlneg
Definition: InDetProjFlags.h:35
InDetProjFlags.h
InDetProjFlags::TRT_brlneg
@ TRT_brlneg
Definition: InDetProjFlags.h:40
InDetProjFlags::TRT_ecneg
@ TRT_ecneg
Definition: InDetProjFlags.h:42
InDetProjFlags::NoProjections
@ NoProjections
Definition: InDetProjFlags.h:49
InDetProjFlags::TRT_EndCapZToRPositive
@ TRT_EndCapZToRPositive
Definition: InDetProjFlags.h:58
InDetProjFlags::BarrelNegative
@ BarrelNegative
Definition: InDetProjFlags.h:51
InDetProjFlags::EndCapOuterPositive
@ EndCapOuterPositive
Definition: InDetProjFlags.h:53
InDetProjFlags::SCT_brlneg
@ SCT_brlneg
Definition: InDetProjFlags.h:30
InDetProjFlags::TRT_EndCapZToRNegative
@ TRT_EndCapZToRNegative
Definition: InDetProjFlags.h:59