Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion offline/packages/calovtxreco/CaloVtxAlgoCNN.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace
const std::string GeomNodeIhc = "TOWERGEOM_HCALIN";
} // namespace

// onnxruntime session (pImpl, keeps Ort types out of the header)
// onnxruntime session (pImpl)
struct CaloVtxAlgoCNN::OnnxSession
{
Ort::Env env{ORT_LOGGING_LEVEL_WARNING, "CaloVtxAlgoCNN"};
Expand All @@ -44,6 +44,7 @@ struct CaloVtxAlgoCNN::OnnxSession
}
};

CaloVtxAlgoCNN::CaloVtxAlgoCNN() = default;
CaloVtxAlgoCNN::~CaloVtxAlgoCNN() = default;

int CaloVtxAlgoCNN::Init(PHCompositeNode * /*topNode*/)
Expand Down
4 changes: 2 additions & 2 deletions offline/packages/calovtxreco/CaloVtxAlgoCNN.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class CaloVtxAlgoCNN : public CaloVtxAlgo
kOHC = 2
};

explicit CaloVtxAlgoCNN() = default;
~CaloVtxAlgoCNN() override;
CaloVtxAlgoCNN(); // defined in the .cc, where OnnxSession is complete
~CaloVtxAlgoCNN() override; // (required for the unique_ptr pImpl member)

int Init(PHCompositeNode *topNode) override;
int CalculateVertex(PHCompositeNode *topNode, float &zvtx) override;
Expand Down
8 changes: 8 additions & 0 deletions offline/packages/calovtxreco/CaloVtxAlgoMLP.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <phool/getClass.h>

#include <array>
#include <limits>

int CaloVtxAlgoMLP::Init(PHCompositeNode *topNode)
{
Expand Down Expand Up @@ -49,6 +50,8 @@ int CaloVtxAlgoMLP::Init(PHCompositeNode *topNode)

int CaloVtxAlgoMLP::CalculateVertex(PHCompositeNode *topNode, float &zvtx)
{
zvtx = std::numeric_limits<float>::quiet_NaN();

TowerInfoContainer *emcalre_towers = findNode::getClass<TowerInfoContainer>(topNode, "TOWERINFO_CALIB_CEMC_RETOWER");
TowerInfoContainer *hcalin_towers = findNode::getClass<TowerInfoContainer>(topNode, "TOWERINFO_CALIB_HCALIN");
TowerInfoContainer *hcalout_towers = findNode::getClass<TowerInfoContainer>(topNode, "TOWERINFO_CALIB_HCALOUT");
Expand Down Expand Up @@ -304,6 +307,11 @@ int CaloVtxAlgoMLP::CalculateVertex(PHCompositeNode *topNode, float &zvtx)

}

if (ijet < 2)
{
return Fun4AllReturnCodes::EVENT_OK;
}

// TODO: fill `features` from topNode in the exact order documented in
// VertexMLP.h (emcal/ohcal lead+sublead flags, zmean/zsig/zskew,
// energy, exj). This is the same per-event extraction CaloVtxReco used
Expand Down