ATLAS Offline Software
Loading...
Searching...
No Matches
CaloDmDescrArea.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
10#include <cmath>
11#include <iostream>
12
13
15= default;
16
17
18
19
20
21/* ****************************************************************************
22Return number of DM area for given dead material region 'key' and dead material
23calibration hit eta. They should be obtained with help of CaloDmDescrManager
24**************************************************************************** */
25int CaloDmDescrArea::getArea(const int &key, const float &xeta)
26{
27 int nsmp=DMA_UNCLASS;
28
29 float eta = std::abs(xeta);
30
31 if(key >=4101 && key <=4105) { // inner detector
32 if(eta <1.5) {
33 nsmp = DMA_EMB0;
34 } else if (eta>=1.5 && eta<1.6){
35 nsmp = DMA_SCN;
36 } else if (eta>=1.6 && eta<1.8){
37 nsmp = DMA_EME0;
38 } else if (eta>=1.8 && eta<2.5){
39 nsmp = DMA_EME13;
40 } else if (eta>=2.5 && eta<3.2){
41 nsmp = DMA_EME14;
42 } else if (eta>=3.2) {
43 nsmp = DMA_FCAL0;
44 }
45 } else if(key==4110 || key==4111 || key==4112) {
46 nsmp = DMA_EMB0;
47 } else if(key==4113) {
48 nsmp = DMA_EMB1;
49 }else if(key==4114 || key==4122 || key==4121 || key==5110 || key==5111) {
50 nsmp = DMA_SCN;
51 } else if(key==4115) {
52 nsmp = DMA_EME0;
53 } else if(key==4116) {
54 if(eta<1.5){
55 nsmp = DMA_EME11;
56 }else if(eta<1.8){
57 nsmp = DMA_EME12;
58 }else if(eta<2.5){
59 nsmp = DMA_EME13;
60 }else if(eta<3.2){
61 nsmp = DMA_EME14;
62 }
63 } else if(key==4120 || key==5100) {
64 nsmp = DMA_EMB3_TILE0;
65 } else if(key==4123) {
66 nsmp = DMA_EME3_HEC0;
67 } else if(key==4125 || key==5101) {
68 nsmp = DMA_EME_EXT;
69 } else if((key >=4130 && key<=4132) || key==5130) {
70 nsmp = DMA_LEAK;
71 } else if(key == 4202 || key == 4203 || key == 4212 || key == 4213
72 || key == 4222 || key == 4223 || key == 4232 || key == 4233 ) {
73 nsmp=DMA_HEC_AZIMUTH;
74 } else if(key == 4204 || key == 4214 || key==4224 || key == 4234) {
75 nsmp=DMA_HEC_FCAL;
76 } else if(key == 4117 || key==4205 || key==4215 ) {
77 nsmp = DMA_FCAL0;
78 } else if(key == 4225) {
79 nsmp = DMA_FCAL0_FCAL1;
80 } else if(key == 4235) {
81 nsmp = DMA_FCAL1_FCAL2;
82 }else if(key == 4100) {
83 nsmp = DMA_DEFCALC;
84 } else if(key == 4124) {
85 nsmp = DMA_HECWHEEL;
86 }else if(key == 4200 || key == 4210|| key == 4220|| key == 4230) {
87 nsmp = DMA_EMB_HALVES;
88 }else if(key == 4201 || key == 4211|| key == 4221|| key == 4231) {
90 } else if(key == 5120 || key == 5121|| key == 5122 || key == 5112) {
91 nsmp = DMA_LEAK;
92 } else if(key == 5200) {
93 nsmp = DMA_LEAK; // actually it's TILE default calculator, let it be inside DMA_LEAK
94 }
95
96 if(nsmp == DMA_UNCLASS ) {
97 std::cout << " CaloDmDescrArea::getArea() -> Warning! Can not classify dead material hit," << " key:" << key << " eta:" << eta << std::endl;
98 }
99
100 return nsmp;
101}
Scalar eta() const
pseudorapidity method
static int getArea(const int &dmkey, const float &eta)