ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimClusteringOfflineTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7FPGATrackSimClusteringOfflineTool::FPGATrackSimClusteringOfflineTool(const std::string& algname, const std::string &name, const IInterface *ifc) :
8 base_class(algname, name, ifc)
9{
10}
11
12
13StatusCode FPGATrackSimClusteringOfflineTool::DoClustering(FPGATrackSimLogicalEventInputHeader &header, std::vector<FPGATrackSimCluster> &clusters) const
14{
15
16 clusters = header.optional().getOfflineClusters();
17 //fill the multitruth
18 for( auto& cluster:clusters){
19 FPGATrackSimHit clusterEquiv = cluster.getClusterEquiv();
21 FPGATrackSimMultiTruth::Barcode uniquecode(clusterEquiv.getEventIndex(),clusterEquiv.getBarcode());
22 mt.maximize(uniquecode,clusterEquiv.getBarcodePt());
23 clusterEquiv.setTruth(mt);
24 cluster.setClusterEquiv(clusterEquiv);
25 }
26 return StatusCode::SUCCESS;
27}
FPGATrackSimClusteringOfflineTool(const std::string &, const std::string &, const IInterface *)
virtual StatusCode DoClustering(FPGATrackSimLogicalEventInputHeader &, std::vector< FPGATrackSimCluster > &) const override
long getEventIndex() const
float getBarcodePt() const
HepMcParticleLink::barcode_type getBarcode() const
void setTruth(const FPGATrackSimMultiTruth &v)
void maximize(const FPGATrackSimMultiTruth::Barcode &code, const FPGATrackSimMultiTruth::Weight &weight)
std::pair< unsigned long, unsigned long > Barcode