ATLAS Offline Software
Loading...
Searching...
No Matches
MissingEtRegions.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5/********************************************************************
6
7NAME: MissingEtRegions.cxx
8PACKAGE: offline/Reconstruction/MissingETEvent
9
10AUTHORS: S. Resconi
11CREATED: Oct 2004
12
13PURPOSE: Calculate Ex,Ey and Sumet in Eta Regions
14********************************************************************/
15
17#include <math.h>
18
19// default contructor
25
26
27// destructor
30/*
31// addReg method
32void MissingEtRegions::addReg(const CaloCell* aCell, double &weight)
33{
34
35 double theEx=0.;
36 double theEy=0.;
37 Calc_Ecellxy(aCell, theEx, theEy);
38
39 double theEta = aCell->eta();
40
41 //summing on all eta regions
42 int theReg = EndCap;
43 if ( fabs(theEta) <= 1.5 ) theReg = Central ;
44 if ( fabs(theEta) >= 3.2 ) theReg = Forward ;
45
46 // changed sign to ex and ey sum as in Atrecon
47
48 m_exReg[(size_t)theReg] -= weight * theEx;
49 m_eyReg[(size_t)theReg] -= weight * theEy;
50
51 // Sumet for each region
52 m_etReg[(size_t)theReg] += weight * aCell->et() ;
53
54} */
55
56// addReg method
57void MissingEtRegions::addReg(double theEx, double theEy, double theEt,
58 double theEta, double weight)
59{
60 // Summing on all eta regions
61 size_t theReg(Forward);
62 theEta=fabs(theEta);
63 if ( theEta <= 1.5 ) theReg = Central ;
64 else {
65 if ( theEta <3.2 ) theReg = EndCap ;
66 else {
67 if ( fabs(theEta) > 4.5 )
68 return;
69 }
70 }
71
72 m_exReg[theReg] -= weight * theEx;
73 m_eyReg[theReg] -= weight * theEy;
74 m_etReg[theReg] += weight * theEt ;
75
76}
77
78
79
80// retrieve the eta regions
85
92
93// set methods
94
96 double theEx)
97{
98 if ( theReg < Size ) m_exReg[(size_t)theReg] = theEx;
99}
100
102 double theEy)
103{
104 if ( theReg < Size ) m_eyReg[(size_t)theReg] = theEy;
105}
106
108 double theEtSum)
109{
110 if ( theReg < Size ) m_etReg[(size_t)theReg] = theEtSum;
111}
112
113
114void MissingEtRegions::setExRegVec(std::vector<double>&& exVec)
115{
116 assert (exVec.size() == Size);
117 m_exReg = std::move (exVec);
118}
119
120
121void MissingEtRegions::setEyRegVec(std::vector<double>&& eyVec)
122{
123 assert (eyVec.size() == Size);
124 m_eyReg = std::move (eyVec);
125}
126
127
128void MissingEtRegions::setEtSumRegVec(std::vector<double>&& etSumVec)
129{
130 assert (etSumVec.size() == Size);
131 m_etReg = std::move (etSumVec);
132}
133
134
135// get methods
136
138{
139 return m_exReg[theReg] ;
140}
141
143{
144 return m_eyReg[theReg] ;
145}
146
148{
149 return m_etReg[theReg] ;
150}
151
152
153const std::vector<double>&
155{
156 return m_exReg;
157}
158
159
160const std::vector<double>&
162{
163 return m_eyReg;
164}
165
166
167const std::vector<double>&
169{
170 return m_etReg;
171}
172
173
void setEyReg(RegionIndex aRegion, double theEy)
double exReg(RegionIndex aRegion) const
const std::vector< double > & etSumRegVec() const
std::vector< double > m_eyReg
const std::vector< double > & exRegVec() const
void setExReg(RegionIndex aRegion, double theEx)
void setExRegVec(std::vector< double > &&exVec)
void setEtSumRegVec(std::vector< double > &&etSumVec)
void setEyRegVec(std::vector< double > &&eyVec)
void setEtSumReg(RegionIndex aRegion, double theEtSum)
std::vector< double > m_exReg
virtual RegionIndex getRegions()
std::vector< double > m_etReg
double eyReg(RegionIndex aRegion) const
const std::vector< double > & eyRegVec() const
double etSumReg(RegionIndex aRegion) const
virtual void addReg(double theEx, double theEy, double theEt, double theEta, double weight)