25 inline constexpr
T r(
T&
x,
T&
y)
51 _cluster_map = findNode::getClass<TrkrClusterContainer>(topNode,
"TRKR_CLUSTER");
54 std::cerr <<
PHWHERE <<
" ERROR: Can't find node TRKR_CLUSTER" << std::endl;
58 _tgeometry = findNode::getClass<ActsGeometry>(topNode,
"ActsGeometry");
61 std::cout <<
"No Acts tracking geometry, exiting." << std::endl;
64 _tpc_seeds = findNode::getClass<TrackSeedContainer>(topNode,
"TpcTrackSeedContainer");
67 std::cout <<
"No TpcTrackSeedContainer, exiting." << std::endl;
70 _si_seeds = findNode::getClass<TrackSeedContainer>(topNode,
"SiliconTrackSeedContainer");
73 std::cout <<
"No SiliconTrackSeedContainer, creating..." << std::endl;
76 std::cout <<
"Cannot create, exiting." << std::endl;
83 std::cout <<
"No " <<
_track_map_name <<
" found, creating..." << std::endl;
86 std::cout <<
"Cannot create, exiting." << std::endl;
110 std::cout <<
"Tpc seed to start out is " << std::endl;
113 std::vector<Acts::Vector3> tpcClusPos;
114 std::vector<TrkrDefs::cluskey> tpcClusKeys;
116 std::copy(tpcseed->begin_cluster_keys(), tpcseed->end_cluster_keys(),
117 std::back_inserter(tpcClusKeys));
120 tpcClusPos, tpcClusKeys);
121 std::vector<TrkrDefs::cluskey> newClusKeys;
122 std::vector<Acts::Vector3> newClusPos;
123 unsigned int nClusters = 0;
129 for (
auto& globPos : tpcClusPos)
131 xypoints.push_back(std::make_pair(globPos.x(), globPos.y()));
132 float clusr =
r(globPos.x(), globPos.y());
133 if (globPos.y() < 0) clusr *= -1;
134 rzpoints.push_back(std::make_pair(globPos.z(), clusr));
140 std::vector<TrkrDefs::cluskey> newClusKeysrz;
141 std::vector<Acts::Vector3> newClusPosrz;
142 std::vector<TrkrDefs::cluskey> newClusKeysxy;
143 std::vector<Acts::Vector3> newClusPosxy;
164 std::cout <<
"nrz clus " << nrzClusters <<
" and nxy clusters " << nClusters
167 std::set_intersection(newClusKeysxy.begin(), newClusKeysxy.end(),
168 newClusKeysrz.begin(), newClusKeysrz.end(), std::back_inserter(newClusKeys));
171 for (
auto& keys : {newClusKeysxy, newClusKeysrz})
173 for (
auto& key : keys)
177 newClusKeys.push_back(key);
185 for (
auto key : newClusKeysxy)
189 std::cout <<
"Found key " << key <<
" for xy cosmic in layer " << (
unsigned int)
TrkrDefs::getLayer(key)
190 <<
" with pos " << clusglob.transpose() << std::endl;
192 for (
auto key : newClusKeysrz)
196 std::cout <<
"Found key " << key <<
" for rz cosmic in layer " << (
unsigned int)
TrkrDefs::getLayer(key)
197 <<
" with pos " << clusglob.transpose() << std::endl;
205 if (fitparams.size() == 0)
210 std::vector<TrkrDefs::cluskey> ckeys;
212 newClusPos, ckeys, 0, 56);
214 for (
auto& key : ckeys)
219 float dcaz = (pca - clusglob).
z();
223 newClusKeys.push_back(key);
229 if ((tpcClusKeys.size() + newClusKeys.size() > 25))
231 std::unique_ptr<TrackSeed_v1> si_seed = std::make_unique<TrackSeed_v1>();
232 for (
auto& key : newClusKeys)
234 bool isTpcKey =
false;
246 tpcseed->insert_cluster_key(key);
255 std::unique_ptr<SvtxTrackSeed_v1> full_seed = std::make_unique<SvtxTrackSeed_v1>();
256 int tpcind = _tpc_seeds->find(tpcseed);
266 std::cout <<
"final seeds" << std::endl;
275 std::cout <<
"svtx seed map size is " <<
_svtx_seeds->
size() << std::endl;
279 std::cout <<
"seed " << i <<
" is composed of " << std::endl;
280 _tpc_seeds->get(
seed->get_tpc_seed_index())->
identify();
305 std::cerr <<
"DST node is missing, quitting" << std::endl;
306 throw std::runtime_error(
"Failed to find DST node in PHSiliconHelicalPropagator::createNodes");
318 container = findNode::getClass<TrackSeedContainer>(topNode, container_name);