#include <MapEta.h>
Definition at line 12 of file MapEta.h.
◆ ~MapEta()
◆ MapEta()
| MapEta::MapEta |
( |
int | isampling | ) |
|
Definition at line 15 of file MapEta.cxx.
16 :
m_directory (
"/afs/cern.ch/atlas/offline/data/lar/calo_data"),
24{
26}
void Initialize(int isampling)
◆ GetData()
| void MapEta::GetData |
( |
double | x, |
|
|
double | y, |
|
|
double * | resp, |
|
|
double * | xt0, |
|
|
double * | xt1, |
|
|
double * | xt2 ) const |
Definition at line 105 of file MapEta.cxx.
106{
107 *resp=1;
108 *xt0=1;
109 *xt1=0;
110 *xt2=0;
116
117 int ix,iy;
124
125
126 if (ix<0 || ix+1 >=
m_nx || iy<0 || iy+1 >=
m_ny) {
127 std::cout << "MapEta: Out of range " << ix << " " << iy << std::endl;
128 return;
129 }
135
137 *resp=0;
138 *xt0=0;
139 for (
int i=0;
i<2;
i++) {
140 for (int j=0;j<2;j++) {
148 }
149 }
150 const double inv_sumw = 1. /
sumw;
151 if (sumw>0.) {
152 *resp = *resp*inv_sumw;
153 *xt0 = *xt0*inv_sumw;
154 *xt1 = *xt1*inv_sumw;
155 *xt2 = *xt2*inv_sumw;
156 }
157
158}
◆ GetData0()
| void MapEta::GetData0 |
( |
double | x, |
|
|
double | y, |
|
|
double * | resp ) const |
Definition at line 159 of file MapEta.cxx.
160{
161 *resp=1;
167
168 int ix,iy;
175
176 if (ix<0 || ix+1 >=
m_nx || iy<0 || iy+1 >=
m_ny) {
177 std::cout << "MapEta: Out of range " << ix << " " << iy << std::endl;
178 return;
179 }
185
187 *resp = 0;
188 for (
int i=0;
i<2;
i++) {
189 for (int j=0;j<2;j++) {
194 }
195 }
196 if (sumw>0.) *resp = *resp/
sumw;
197 else *resp = 1;
198
199}
◆ Initialize()
| void MapEta::Initialize |
( |
int | isampling | ) |
|
Definition at line 42 of file MapEta.cxx.
43{
45 if (isampling < 1 || isampling >3) return;
47 if (isampling==1)
filename =
"deta_strip.map";
48 if (isampling==2)
filename =
"deta_middle.map";
49 if (isampling==3)
filename =
"eta_trans.map";
50 std::string fileLocation;
51#ifdef LARG4_STAND_ALONE
52
54#else
55
56 std::cout <<
"filename " <<
filename << std::endl;
57
58
60 fileLocation=larLocation+
"/"+
filename;
61 std::cout << "fileLocation " << fileLocation << std::endl;
62#endif
63
64 std::ifstream in(fileLocation);
65 if (in)
66 {
71
72
73
80 int ii,jj;
81 for (
int ix=0;ix<
m_nx;ix++) {
82 for (
int iy=0;iy<
m_ny;iy++) {
84 if (ii != ix || jj != iy) std::cout << "MapEta: inconsistency when reading map..." << std::endl;
85 }
86 }
87
88 std::cout <<
"Eta Map read " <<
" Nbins " <<
m_nx <<
" " <<
m_ny
93 }
94 else{
95 std::cout << "Error in MapEta::Initialize: nx or ny out of limits." << std::endl;
96 return;
97 }
98 }
99 else{
100 std::cout << "Error in MapEta::Initialize: The file could not be open." << std::endl;
101 return;
102 }
103}
static std::string find_directory(const std::string &logical_file_name, const std::string &search_path)
◆ Nx()
◆ Ny()
◆ SetDirectory()
| void MapEta::SetDirectory |
( |
const std::string & | dir | ) |
|
◆ Xmax()
| float MapEta::Xmax |
( |
| ) |
const |
|
inline |
◆ Xmin()
| float MapEta::Xmin |
( |
| ) |
const |
|
inline |
◆ Ymax()
| float MapEta::Ymax |
( |
| ) |
const |
|
inline |
◆ Ymin()
| float MapEta::Ymin |
( |
| ) |
const |
|
inline |
◆ m_deltax
| float MapEta::m_deltax = 0.0F |
|
private |
◆ m_deltay
| float MapEta::m_deltay = 0.0F |
|
private |
◆ m_directory
| std::string MapEta::m_directory |
|
private |
◆ m_init
◆ m_nx
◆ m_ny
◆ m_resp
◆ m_xmax
| float MapEta::m_xmax = 0.0F |
|
private |
◆ m_xmin
| float MapEta::m_xmin = 0.0F |
|
private |
◆ m_xt0
◆ m_xt1
◆ m_xt2
◆ m_ymax
| float MapEta::m_ymax = 0.0F |
|
private |
◆ m_ymin
| float MapEta::m_ymin = 0.0F |
|
private |
The documentation for this class was generated from the following files: