LArDLContent.cc
Go to the documentation of this file.
1 /**
2  * @file larpandoradlcontent/LArDLContent.cc
3  *
4  * @brief Factory implementations for content intended for use with particle flow reconstruction at liquid argon time projection chambers
5  *
6  * $Log: $
7  */
8 
9 #include "Api/PandoraApi.h"
10 
11 #include "Pandora/Algorithm.h"
12 #include "Pandora/AlgorithmTool.h"
13 #include "Pandora/Pandora.h"
14 
21 
23 
24 // clang-format off
25 #define LAR_DL_ALGORITHM_LIST(d) \
26  d("LArDLMaster", DLMasterAlgorithm) \
27  d("LArDLClusterCharacterisation", DlClusterCharacterisationAlgorithm) \
28  d("LArDLHitTrackShowerId", DlHitTrackShowerIdAlgorithm) \
29  d("LArDLPfoCharacterisation", DlPfoCharacterisationAlgorithm) \
30  d("LArDLHitValidation", DlHitValidationAlgorithm) \
31  d("LArDLTrackShowerStreamSelection", DlTrackShowerStreamSelectionAlgorithm)
32 
33 #define LAR_DL_ALGORITHM_TOOL_LIST(d)
34 
35 #define DL_FACTORY Factory
36 
37 //------------------------------------------------------------------------------------------------------------------------------------------
38 //------------------------------------------------------------------------------------------------------------------------------------------
39 
40 namespace lar_dl_content
41 {
42 
43 #define LAR_DL_CONTENT_CREATE_ALGORITHM_FACTORY(a, b) \
44  class b##DL_FACTORY : public pandora::AlgorithmFactory \
45  { \
46  public: \
47  pandora::Algorithm *CreateAlgorithm() const \
48  { \
49  return new b; \
50  }; \
51  };
52 
54 
55 //------------------------------------------------------------------------------------------------------------------------------------------
56 
57 #define LAR_DL_CONTENT_CREATE_ALGORITHM_TOOL_FACTORY(a, b) \
58  class b##DL_FACTORY : public pandora::AlgorithmToolFactory \
59  { \
60  public: \
61  pandora::AlgorithmTool *CreateAlgorithmTool() const \
62  { \
63  return new b; \
64  }; \
65  };
66 
68 
69 } // namespace lar_dl_content
70 
71 //------------------------------------------------------------------------------------------------------------------------------------------
72 //------------------------------------------------------------------------------------------------------------------------------------------
73 
74 #define LAR_DL_CONTENT_REGISTER_ALGORITHM(a, b) \
75  { \
76  const pandora::StatusCode statusCode(PandoraApi::RegisterAlgorithmFactory(pandora, a, new lar_dl_content::b##DL_FACTORY)); \
77  if (pandora::STATUS_CODE_SUCCESS != statusCode) \
78  return statusCode; \
79  }
80 
81 #define LAR_DL_CONTENT_REGISTER_ALGORITHM_TOOL(a, b) \
82  { \
83  const pandora::StatusCode statusCode(PandoraApi::RegisterAlgorithmToolFactory(pandora, a, new lar_dl_content::b##DL_FACTORY)); \
84  if (pandora::STATUS_CODE_SUCCESS != statusCode) \
85  return statusCode; \
86  }
87 // clang-format on
88 
89 pandora::StatusCode LArDLContent::RegisterAlgorithms(const pandora::Pandora &pandora)
90 {
93  return pandora::STATUS_CODE_SUCCESS;
94 }
Header file detailing content for use with particle flow reconstruction at liquid argon time projecti...
Header file for the cut based pfo characterisation algorithm class.
#define LAR_DL_CONTENT_REGISTER_ALGORITHM(a, b)
Definition: LArDLContent.cc:74
#define LAR_DL_ALGORITHM_LIST(d)
Definition: LArDLContent.cc:25
Header file for the master algorithm class.
#define LAR_DL_ALGORITHM_TOOL_LIST(d)
Definition: LArDLContent.cc:33
Header file for the deep learning track shower id validation algorithm.
#define LAR_DL_CONTENT_REGISTER_ALGORITHM_TOOL(a, b)
Definition: LArDLContent.cc:81
Header file for the deep learning track shower id algorithm.
#define LAR_DL_CONTENT_CREATE_ALGORITHM_FACTORY(a, b)
Definition: LArDLContent.cc:43
#define LAR_DL_CONTENT_CREATE_ALGORITHM_TOOL_FACTORY(a, b)
Definition: LArDLContent.cc:57
Header file for the deep learning track shower cluster streaming algorithm.
static pandora::StatusCode RegisterAlgorithms(const pandora::Pandora &pandora)
Register all the lar dl content algorithms and tools with pandora.
Definition: LArDLContent.cc:89