 |
ATLAS Offline Software
|
#include <FPGAActsTrkConverter.h>
|
| FPGAActsTrkConverter (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~FPGAActsTrkConverter ()=default |
|
virtual StatusCode | initialize () override final |
|
virtual StatusCode | findProtoTracks (const EventContext &ctx, const xAOD::PixelClusterContainer &pixelContainer, const xAOD::StripClusterContainer &stripContainer, std::vector< ActsTrk::ProtoTrack > &foundProtoTracks, const std::vector< std::vector< FPGATrackSimHit >> &hitsInRoads, const std::vector< FPGATrackSimRoad > &roads) const override final |
|
virtual StatusCode | findProtoTracks (const EventContext &ctx, const xAOD::PixelClusterContainer &pixelContainer, const xAOD::StripClusterContainer &stripContainer, std::vector< ActsTrk::ProtoTrack > &foundProtoTracks, const std::vector< FPGATrackSimTrack > &tracks) const override final |
|
|
std::unique_ptr< Acts::BoundTrackParameters > | makeParams (const FPGATrackSimRoad &road) const |
|
std::unique_ptr< Acts::BoundTrackParameters > | makeParams (const FPGATrackSimTrack &track) const |
|
std::vector< Identifier > | getRdoIdList (const FPGATrackSimHit &hit) const |
|
template<typename XAOD_CLUSTER > |
StatusCode | matchTrackMeasurements (const EventContext &ctx, const XAOD_CLUSTER &cluster, const FPGATrackSimHit &trackHit, std::vector< ActsTrk::ATLASUncalibSourceLink > &measurements, const DataVector< XAOD_CLUSTER > &clusterContainer) const |
|
StatusCode | findPrototrackMeasurements (const EventContext &ctx, const xAOD::PixelClusterContainer &pixelClusterContainer, const xAOD::StripClusterContainer &stripClusterContainer, const std::multimap< xAOD::DetectorIDHashType, const xAOD::PixelCluster * > &pixelClusterMap, const std::multimap< IdentifierHash, const xAOD::StripCluster * > &stripClusterMap, std::vector< ActsTrk::ATLASUncalibSourceLink > &measurements, const std::vector< FPGATrackSimHit > &hits) const |
|
Definition at line 17 of file FPGAActsTrkConverter.h.
◆ FPGAActsTrkConverter()
FPGAActsTrkConverter::FPGAActsTrkConverter |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~FPGAActsTrkConverter()
virtual FPGAActsTrkConverter::~FPGAActsTrkConverter |
( |
| ) |
|
|
virtualdefault |
◆ findPrototrackMeasurements()
Definition at line 95 of file FPGAActsTrkConverter.cxx.
104 return StatusCode::FAILURE;
111 auto range = pixelClusterMap.equal_range(
h.getIdentifierHash());
116 else if (
h.isStrip()) {
118 auto range = stripClusterMap.equal_range(
h.getIdentifierHash());
125 return StatusCode::FAILURE;
132 return StatusCode::SUCCESS;
◆ findProtoTracks() [1/2]
Definition at line 64 of file FPGAActsTrkConverter.cxx.
70 ATH_MSG_INFO(
"Creating Acts proto-tracks from FPGA tracks...");
72 std::multimap<xAOD::DetectorIDHashType, const xAOD::PixelCluster*> pixelClusterMap;
74 pixelClusterMap.emplace(cluster->identifierHash(), cluster);
77 std::multimap<IdentifierHash, const xAOD::StripCluster*> stripClusterMap;
79 stripClusterMap.emplace(cluster->identifierHash(), cluster);
82 if (not
track.passedOR())
continue;
83 std::vector<ActsTrk::ATLASUncalibSourceLink>
points;
84 const std::vector <FPGATrackSimHit>&
hits =
track.getFPGATrackSimHits();
88 std::unique_ptr<Acts::BoundTrackParameters> inputPerigee =
makeParams(
track);
89 foundProtoTracks.emplace_back(
points, std::move(inputPerigee));
92 return StatusCode::SUCCESS;
◆ findProtoTracks() [2/2]
Definition at line 30 of file FPGAActsTrkConverter.cxx.
37 ATH_MSG_INFO(
"Creating Acts proto-tracks from FPGA roads...");
39 if (hitsInRoads.size() > 0) {
40 std::multimap<xAOD::DetectorIDHashType, const xAOD::PixelCluster*> pixelClusterMap;
42 pixelClusterMap.emplace(cluster->identifierHash(), cluster);
45 std::multimap<IdentifierHash, const xAOD::StripCluster*> stripClusterMap;
47 stripClusterMap.emplace(cluster->identifierHash(), cluster);
50 for(
size_t roadIndex=0; roadIndex<=hitsInRoads.size()-1;roadIndex++) {
51 std::vector<ActsTrk::ATLASUncalibSourceLink>
points;
54 std::unique_ptr<Acts::BoundTrackParameters> inputPerigee =
makeParams(roads.at(roadIndex));
55 foundProtoTracks.emplace_back(
points, std::move(inputPerigee));
61 return StatusCode::SUCCESS;
◆ getRdoIdList()
Definition at line 135 of file FPGAActsTrkConverter.cxx.
137 std::vector<Identifier>
ids;
142 ids.reserve(idHashVec.size());
146 for (
size_t i = 0;
i < idHashVec.size(); ++
i)
157 for (
size_t i = 0;
i < idHashVec.size(); ++
i)
◆ initialize()
StatusCode FPGAActsTrkConverter::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ makeParams() [1/2]
std::unique_ptr< Acts::BoundTrackParameters > FPGAActsTrkConverter::makeParams |
( |
const FPGATrackSimRoad & |
road | ) |
const |
|
protected |
Definition at line 204 of file FPGAActsTrkConverter.cxx.
205 using namespace Acts::UnitLiterals;
207 std::shared_ptr<const Acts::Surface> actsSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3(0., 0., 0.));
210 constexpr
double GeVToMeV = 1000;
216 double qop = (std::abs(road.
getY()) > 1
E-9) ? road.
getY()/GeVToMeV : 1
E-12;
223 Acts::BoundSquareMatrix
cov = Acts::BoundSquareMatrix::Identity();
224 cov *= (GeVToMeV*GeVToMeV);
229 Acts::PdgParticle absPdg = Acts::makeAbsolutePdgParticle(Acts::ePionPlus);
231 absPdg,
mass, Acts::AnyCharge{1.0f}};
233 return std::make_unique<Acts::BoundTrackParameters>(actsSurface,
params,
234 cov, actsHypothesis);
◆ makeParams() [2/2]
std::unique_ptr< Acts::BoundTrackParameters > FPGAActsTrkConverter::makeParams |
( |
const FPGATrackSimTrack & |
track | ) |
const |
|
protected |
Definition at line 239 of file FPGAActsTrkConverter.cxx.
241 using namespace Acts::UnitLiterals;
242 std::shared_ptr<const Acts::Surface> actsSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3(0., 0., 0.));
245 constexpr
double GeVToMeV = 1000.;
251 double qopt=
track.getQOverPt()*GeVToMeV;
252 double pt=
track.getPt()/GeVToMeV;
257 double qop=((
p > 1
e-10) ? (1/
p) : 1e10);
258 if (qopt < 0) qop *= -1;
265 Acts::BoundSquareMatrix
cov = Acts::BoundSquareMatrix::Identity();
269 (
cov)(2,2) *= 0.0008;
270 (
cov)(3,3) *= 0.0008;
278 Acts::PdgParticle absPdg = Acts::makeAbsolutePdgParticle(Acts::ePionPlus);
280 absPdg,
mass, Acts::AnyCharge{1.0f}};
282 return std::make_unique<Acts::BoundTrackParameters>(actsSurface,
params,
283 cov, actsHypothesis);
◆ matchTrackMeasurements()
template<typename XAOD_CLUSTER >
Definition at line 170 of file FPGAActsTrkConverter.cxx.
176 std::vector<Identifier> rdoIDs;
182 const auto& rdoList = cluster.rdoList();
183 if (rdoIDs.size() != rdoList.size())
return StatusCode::SUCCESS;
184 size_t matchedCounter = 0;
186 if (
std::find(rdoList.begin(), rdoList.end(),
id) != rdoList.end()) matchedCounter++;
189 if (matchedCounter == rdoList.size()) {
192 else if (matchedCounter > 0) {
193 std::stringstream
ss;
194 ss <<
"List of xAOD cluster rdoIDs:\n";
197 ATH_MSG_ERROR(
std::format(
"Noticed rdoID mismatch: commonHits = {} | xAODClusterHits = {} | FPGAClusterHits = {}\n{}",
198 matchedCounter, rdoList.size(), rdoIDs.size(),
ss.str()));
199 return StatusCode::SUCCESS;
201 return StatusCode::SUCCESS;
◆ m_pixelId
◆ m_SCTId
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const std::vector< int > & getEtaIndexVec() const
Scalar phi() const
phi method
std::string find(const std::string &s)
return a remapped string
std::vector< Identifier > getRdoIdList(const FPGATrackSimHit &hit) const
Scalar eta() const
pseudorapidity method
Scalar theta() const
theta method
const std::vector< int > & getPhiIndexVec() const
const std::vector< unsigned > & getIDHashVec() const
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
ATLASUncalibSourceLink makeATLASUncalibSourceLink(const xAOD::UncalibratedMeasurementContainer *container, std::size_t index, [[maybe_unused]] const EventContext &ctx)
const FPGATrackSimHit getOriginalHit() const
const PixelID * m_pixelId
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses
StatusCode findPrototrackMeasurements(const EventContext &ctx, const xAOD::PixelClusterContainer &pixelClusterContainer, const xAOD::StripClusterContainer &stripClusterContainer, const std::multimap< xAOD::DetectorIDHashType, const xAOD::PixelCluster * > &pixelClusterMap, const std::multimap< IdentifierHash, const xAOD::StripCluster * > &stripClusterMap, std::vector< ActsTrk::ATLASUncalibSourceLink > &measurements, const std::vector< FPGATrackSimHit > &hits) const
Identifier pixel_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int phi_index, int eta_index) const
For an individual pixel.
std::unique_ptr< Acts::BoundTrackParameters > makeParams(const FPGATrackSimRoad &road) const
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
HitType getHitType() const
Identifier strip_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side, int strip) const
For an individual strip.