10 const std::string&
name,
31 std::ifstream input_ifstream(
32 m_finderCfg.connector_input_file.c_str(), std::ifstream::in);
34 std::unique_ptr<Acts::GbtsConnector> inputConnector =
35 std::make_unique<Acts::GbtsConnector>(input_ifstream);
37 m_gbtsGeo = std::make_unique<Acts::GbtsGeometry<ActsTrk::GbtsSeedingTool::GbtsSpacePoint>>(
40 return StatusCode::SUCCESS;
45 const Acts::SpacePointContainer<ActsTrk::SpacePointCollector, Acts::detail::RefHolder>& spContainer,
46 const Acts::Vector3& beamSpotPos,
47 const Acts::Vector3& bField,
51 Acts::SeedFinderOptions finderOpts;
52 finderOpts.beamPos = Acts::Vector2(beamSpotPos[
Amg::x],
54 finderOpts.bFieldInZ = bField[2];
55 finderOpts = finderOpts.toInternalUnits().calculateDerivedQuantities(
m_finderCfg);
62 std::vector<std::unique_ptr<GbtsSeedingTool::GbtsSpacePoint>> SeedingToolSP ;
63 SeedingToolSP.reserve(
65 std::vector<Acts::GbtsSP<GbtsSeedingTool::GbtsSpacePoint>> GbtsSpacePoints;
66 GbtsSpacePoints.reserve(
70 for (
const auto& spacePoint : spContainer) {
72 const std::vector<xAOD::DetectorIDHashType>& elementlist = spacePoint.externalSpacePoint().elementIdList() ;
83 int combined_id =
getCombinedID(eta_mod,barrel_ec,lay_id).first ;
84 int Gbts_id =
getCombinedID(eta_mod,barrel_ec,lay_id).second ;
87 auto StSp = std::make_unique<GbtsSeedingTool::GbtsSpacePoint>(spacePoint.x(), spacePoint.y(), spacePoint.z(), spacePoint.radius(), &spacePoint.externalSpacePoint());
89 GbtsSpacePoints.emplace_back(StSp.get(), Gbts_id, combined_id);
90 SeedingToolSP.emplace_back(std::move(StSp));
98 Acts::SeedFinderGbts<GbtsSeedingTool::GbtsSpacePoint>
finder = Acts::SeedFinderGbts<GbtsSeedingTool::GbtsSpacePoint>(
m_finderCfg,*
m_gbtsGeo);
100 finder.loadSpacePoints(GbtsSpacePoints);
104 std::vector<Acts::Seed<GbtsSeedingTool::GbtsSpacePoint, 3ul>> groupSeeds =
finder.createSeeds(internalRoi, *
m_gbtsGeo);
108 seedContainer.
reserve(groupSeeds.size());
109 for( Acts::Seed<GbtsSeedingTool::GbtsSpacePoint, 3ul>& seed: groupSeeds) {
112 const auto& spacepoints = seed.sp() ;
113 assert(spacepoints.size()==3) ;
118 std::unique_ptr<seed_type> to_add = std::make_unique<seed_type>(*sp1, *sp2, *sp3);
119 to_add->setVertexZ(seed.z());
120 to_add->setQuality(seed.seedQuality());
121 seedContainer.
push_back(std::move(to_add));
125 return StatusCode::SUCCESS;
129 std::vector<Acts::TrigInDetSiLayer>
131 std::vector<std::size_t> count_vector;
132 std::vector<Acts::TrigInDetSiLayer> input_vector;
140 const int combined_id =
getCombinedID(eta_mod,barrel_ec,lay_id).first ;
151 rc += std::sqrt(C(0)*C(0)+C(1)*C(1));
152 if(
p->zMin() < minBound) minBound =
p->zMin();
153 if(
p->zMax() > maxBound) maxBound =
p->zMax();
157 if(
p->rMin() < minBound) minBound =
p->rMin();
158 if(
p->rMax() > maxBound) maxBound =
p->rMax();
163 find_if(input_vector.begin(), input_vector.end(),
164 [combined_id](
auto n) { return n.m_subdet == combined_id; });
165 if (current_index != input_vector.end()) {
167 input_vector[
index].m_refCoord += rc;
168 input_vector[
index].m_minBound += minBound;
169 input_vector[
index].m_maxBound += maxBound;
170 count_vector[
index] += 1;
174 Acts::TrigInDetSiLayer new_Gbts_ID(combined_id, barrel_ec, rc, minBound,
176 input_vector.push_back(new_Gbts_ID);
177 count_vector.push_back(
182 for (std::size_t
i = 0;
i < input_vector.size(); ++
i) {
183 assert(count_vector[
i] != 0);
184 input_vector[
i].m_refCoord = input_vector[
i].m_refCoord / count_vector[
i];
195 Acts::SeedFilterConfig filterCfg;
227 m_finderCfg.seedFilter = std::make_shared<Acts::SeedFilter<GbtsSeedingTool::GbtsSpacePoint>>(filterCfg.toInternalUnits());
258 return StatusCode::SUCCESS;
263 if(barrel_ec== 0) vol_id = 8;
264 if(barrel_ec==-2) vol_id = 7;
265 if(barrel_ec== 2) vol_id = 9;
267 int new_vol=0, new_lay=0;
268 if(vol_id == 7 || vol_id == 9) {
269 new_vol = 10*vol_id + lay_id;
272 else if(vol_id == 8) {
274 new_vol = 10*vol_id + lay_id;
277 int Gbts_id = new_vol ;
278 int combined_id = new_vol * 1000 + new_lay;
280 return std::make_pair(combined_id,Gbts_id) ;