5 #if defined(FLATTEN) && defined(__GNUC__)
7 #pragma GCC optimize "-fno-var-tracking-assignments"
16 const std::string&
name,
40 std::ifstream input_ifstream(
41 m_finderCfg.ConnectorInputFile.c_str(), std::ifstream::in);
43 std::unique_ptr<Acts::Experimental::GbtsConnector> inputConnector =
44 std::make_unique<Acts::Experimental::GbtsConnector>(input_ifstream);
46 m_gbtsGeo = std::make_unique<Acts::Experimental::GbtsGeometry<xAOD::SpacePoint>>(
49 return StatusCode::SUCCESS;
55 const Acts::SpacePointContainer<ActsTrk::SpacePointCollector, Acts::detail::RefHolder>& spContainer,
56 const Acts::Vector3& beamSpotPos,
57 const Acts::Vector3& bField,
61 Acts::SeedFinderOptions finderOpts;
62 finderOpts.beamPos = Acts::Vector2(beamSpotPos[
Amg::x],
64 finderOpts.bFieldInZ = bField[2];
65 finderOpts = finderOpts.toInternalUnits().calculateDerivedQuantities(
m_finderCfg);
73 std::vector<Acts::Experimental::GbtsSP<xAOD::SpacePoint>> GbtsSpacePoints;
74 GbtsSpacePoints.reserve(
78 for (
const auto& spacePoint : spContainer) {
80 const std::vector<xAOD::DetectorIDHashType>& elementlist = spacePoint.externalSpacePoint().elementIdList() ;
91 int combined_id =
getCombinedID(eta_mod,barrel_ec,lay_id).first ;
92 int Gbts_id =
getCombinedID(eta_mod,barrel_ec,lay_id).second ;
95 float ClusterWidth = 0;
98 GbtsSpacePoints.emplace_back(&spacePoint.externalSpacePoint(), Gbts_id, combined_id, ClusterWidth);
107 Acts::Experimental::SeedFinderGbts<xAOD::SpacePoint>
finder = Acts::Experimental::SeedFinderGbts<xAOD::SpacePoint>(
m_finderCfg,*
m_gbtsGeo);
109 finder.loadSpacePoints(GbtsSpacePoints);
113 std::vector<Acts::Seed<xAOD::SpacePoint, 3ul>> groupSeeds =
finder.createSeeds(internalRoi, *
m_gbtsGeo);
117 seedContainer.reserve(groupSeeds.size());
118 for( Acts::Seed<xAOD::SpacePoint, 3ul>& seed: groupSeeds) {
123 return StatusCode::SUCCESS;
127 std::vector<Acts::Experimental::TrigInDetSiLayer>
129 std::vector<std::size_t> count_vector;
130 std::vector<Acts::Experimental::TrigInDetSiLayer> input_vector;
138 const int combined_id =
getCombinedID(eta_mod,barrel_ec,lay_id).first ;
149 rc += std::sqrt(C(0)*C(0)+C(1)*C(1));
150 if(
p->zMin() < minBound) minBound =
p->zMin();
151 if(
p->zMax() > maxBound) maxBound =
p->zMax();
155 if(
p->rMin() < minBound) minBound =
p->rMin();
156 if(
p->rMax() > maxBound) maxBound =
p->rMax();
161 find_if(input_vector.begin(), input_vector.end(),
162 [combined_id](
auto n) { return n.m_subdet == combined_id; });
163 if (current_index != input_vector.end()) {
165 input_vector[
index].m_refCoord += rc;
166 input_vector[
index].m_minBound += minBound;
167 input_vector[
index].m_maxBound += maxBound;
168 count_vector[
index] += 1;
172 Acts::Experimental::TrigInDetSiLayer new_Gbts_ID(combined_id, barrel_ec, rc, minBound,
174 input_vector.push_back(new_Gbts_ID);
175 count_vector.push_back(
180 for (std::size_t
i = 0;
i < input_vector.size(); ++
i) {
181 assert(count_vector[
i] != 0);
182 input_vector[
i].m_refCoord = input_vector[
i].m_refCoord / count_vector[
i];
221 return StatusCode::SUCCESS;
226 if(barrel_ec== 0) vol_id = 8;
227 if(barrel_ec==-2) vol_id = 7;
228 if(barrel_ec== 2) vol_id = 9;
230 int new_vol=0, new_lay=0;
231 if(vol_id == 7 || vol_id == 9) {
232 new_vol = 10*vol_id + lay_id;
235 else if(vol_id == 8) {
237 new_vol = 10*vol_id + lay_id;
240 int Gbts_id = new_vol ;
241 int combined_id = new_vol * 1000 + new_lay;
243 return std::make_pair(combined_id,Gbts_id) ;