ATLAS Offline Software
Loading...
Searching...
No Matches
collSet.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "FPTracker/collSet.h"
9#include <algorithm>
10namespace FPTracker{
11
13
14 Collimator::Container_t collimators;
15 int ncoll = CollimatorData::ncoll;
16 double zsign = side == beam2 ? -1.:1.;
17 for(int i =0; i<ncoll; ++i){
18
19 double zpos = zsign*cData.coll_z[side][i];
20 Collimator::Ptr_t col(new Collimator(zpos, cData.coll_xap[side][i], side));
21 collimators.push_back(std::move(col));
22
23 }
24
25 std::sort(collimators.begin(), collimators.end(), absZGreater<Collimator::ConstPtr_t>);
26 return collimators;
27 }
28
29}
std::vector< std::vector< double > > coll_z
std::vector< std::vector< double > > coll_xap
std::shared_ptr< Collimator > Ptr_t
Collimator::Container_t collSet(const CollimatorData &, Side)
Definition collSet.cxx:12
bool absZGreater(const PtrType rhs, const PtrType lhs)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.