22 #include <calobase/RawCluster.h>
23 #include <calobase/RawClusterContainer.h>
24 #include <calobase/RawClusterUtility.h>
25 #include <calobase/TowerInfo.h>
26 #include <calobase/TowerInfoContainerv1.h>
27 #include <calobase/RawTowerGeomContainer.h>
28 #include <phgeom/PHGeomUtility.h>
35 #include <CLHEP/Vector/ThreeVector.h>
60 std::cout <<
"PHActsTrackProjection begin Init" << std::endl;
75 std::cout <<
"PHActsTrackProjection finished Init" << std::endl;
85 std::cout <<
"PHActsTrackProjection : Starting process_event event "
93 std::cout <<
"Processing calo layer "
116 std::cout <<
"PHActsTrackProjection : Finished process_event event "
164 auto params = parameters.second;
169 const auto momentum = params.momentum();
179 std::cout <<
"Adding track state for caloLayer " << caloLayer
180 <<
" at pathlength " << pathlength <<
" with position " << projectionPos.transpose() << std::endl;
185 for (
int i = 0;
i < 6; ++
i)
187 for (
int j = 0;
j < 6; ++
j)
204 double minR = DBL_MAX;
206 for (
const auto& [key, cluster] : clusterMap)
210 CLHEP::Hep3Vector(0, 0, 0));
213 const auto r = sqrt(pow(
dphi, 2) + pow(deta, 2));
221 minE = cluster->get_energy();
233 for (
int iphi = phiBin - 2; iphi <= phiBin + 2; ++iphi)
235 for (
int ieta = etaBin - 2; ieta <= etaBin + 2; ++ieta)
248 unsigned int towerkey = (ieta << 16U) + wrapPhi;
254 energy5x5 +=
tower->get_energy();
255 if (abs(iphi - phiBin) <= 1 and abs(ieta - etaBin) <= 1)
256 energy3x3 +=
tower->get_energy();
284 m_towerGeomContainer = findNode::getClass<RawTowerGeomContainer>(topNode, towerGeoNodeName.c_str());
286 m_towerContainer = findNode::getClass<TowerInfoContainerv1>(topNode, towerNodeName.c_str());
288 m_clusterContainer = findNode::getClass<RawClusterContainer>(topNode, clusterNodeName.c_str());
294 m_clusterContainer = findNode::getClass<RawClusterContainer>(topNode, nodeName.c_str());
302 <<
"Calo geometry and/or cluster container for " <<
m_caloNames.at(caloLayer)
303 <<
"not found on node tree. Track projections to calos won't be filled."
315 for (
int caloLayer = 0; caloLayer <
m_nCaloLayers; caloLayer++)
350 const auto eta = 2.5;
351 const auto theta = 2. * atan(exp(-
eta));
356 auto transform = Acts::Transform3::Identity();
358 std::shared_ptr<Acts::CylinderSurface>
surf =
359 Acts::Surface::makeShared<Acts::CylinderSurface>(
transform,
362 std::shared_ptr<Acts::CylinderSurface> outer_surf =
363 Acts::Surface::makeShared<Acts::CylinderSurface>(
transform,
368 std::cout <<
"Creating cylindrical surface at " << caloRadius << std::endl;
369 std::cout <<
"Creating cylindrical surface at " << caloOuterRadius << std::endl;
379 std::cout <<
"Cylinder " <<
name <<
" has center "
390 m_vertexMap = findNode::getClass<SvtxVertexMap>(topNode,
"SvtxVertexMap");
393 std::cout <<
PHWHERE <<
"No vertex map on node tree, bailing."
399 topNode,
"ActsGeometry");
402 std::cout <<
"ActsTrackingGeometry not on node tree. Exiting."
408 m_trackMap = findNode::getClass<SvtxTrackMap>(topNode,
"SvtxTrackMap");
411 std::cout <<
PHWHERE <<
"No SvtxTrackMap on node tree. Bailing."
422 return phi - 2. * M_PI;
423 else if (phi <= -M_PI)
424 return phi + 2. * M_PI;