Skip to content
Closed
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
34 changes: 34 additions & 0 deletions offline/packages/calovtxreco/CaloVtxAlgo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#ifndef CALOVTXALGO_H
#define CALOVTXALGO_H

#include <string>
#include <globalvertex/VertexDefs.h>

class PHCompositeNode;

class CaloVtxAlgo
{
public:
virtual ~CaloVtxAlgo() = default;

// Where set-up occurs:
// Calibrations/ML weights etc
// Basic information from geometry

virtual int Init(PHCompositeNode * /*topNode*/) { return 0; }

// Called once per event. Read whatever input this algorithm needs from
// topNode and fill vtxz [cm]. Return nonzero (e.g.
// Fun4AllReturnCodes::ABORTEVENT) if no vertex could be found.

virtual int CalculateVertex(PHCompositeNode *topNode, float &zvtx) = 0;

// Short identifier used to name this algorithm's output node
// (e.g. "CALOVTXOUT_MLP") and in log/eval output so results from
// different algorithms don't collide and can be compared directly.
virtual std::string Name() const = 0;

virtual VertexDefs::CALOALGO Algo() const = 0;
};

#endif
Loading