mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-04-19 13:20:03 +02:00
WIP
This commit is contained in:
parent
5614cb4673
commit
3a987319d4
@ -422,10 +422,10 @@ Eta2 calculate_eta2(Cluster3x3 &cl) {
|
||||
Eta2 calculate_eta2(Cluster2x2 &cl) {
|
||||
Eta2 eta{};
|
||||
|
||||
eta.x = static_cast<double>(cl.data[0]) / (cl.data[0] + cl.data[1]);
|
||||
eta.y = static_cast<double>(cl.data[0]) / (cl.data[0] + cl.data[2]);
|
||||
eta.x = static_cast<double>(cl.data[1]) / (cl.data[0] + cl.data[1]);
|
||||
eta.y = static_cast<double>(cl.data[2]) / (cl.data[0] + cl.data[2]);
|
||||
eta.sum = cl.data[0] + cl.data[1] + cl.data[2]+ cl.data[3];
|
||||
eta.c = cBottomLeft; //TODO! This is not correct
|
||||
eta.c = cBottomLeft; //TODO! This is not correct, but need to put something
|
||||
return eta;
|
||||
}
|
||||
|
||||
|
@ -139,12 +139,14 @@ std::vector<Photon> Interpolator::interpolate(const ClusterVector<int32_t>& clus
|
||||
};
|
||||
auto ix = find_index(m_etabinsx, eta.x)-1;
|
||||
auto iy = find_index(m_etabinsy, eta.y)-1;
|
||||
if(ix<0) ix=0;
|
||||
if(iy<0) iy=0;
|
||||
|
||||
photon.x += (1-m_ietax(ix, iy, idx))*2; //eta goes between 0 and 1 but we could move the hit anywhere in the 2x2
|
||||
photon.y += (1-m_ietay(ix, iy, idx))*2;
|
||||
photon.x += m_ietax(ix, iy, 0)*2; //eta goes between 0 and 1 but we could move the hit anywhere in the 2x2
|
||||
photon.y += m_ietay(ix, iy, 0)*2;
|
||||
|
||||
// photon.x = ix;
|
||||
// photon.y = iy;
|
||||
// photon.y = idx;
|
||||
photons.push_back(photon);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user