Skip to content

Commit f1c7259

Browse files
authored
fix(doc): action functions must use action_function docstring, and non-action functions must not (#312)
1 parent 71bdf86 commit f1c7259

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace iguana::clas12 {
3838
void Run(hipo::banklist& banks) const override;
3939
void Stop() override;
4040

41-
/// **Method**: Applies forward detector cut using REC::Particle Theta
41+
/// Applies forward detector cut using REC::Particle Theta
4242
/// @param theta lab angle of the particle with respect to the beam direction (radians)
4343
/// @returns `true` if the particle's theta is within the forward detector coverage, `false` otherwise
4444
bool ForwardDetectorFilter(float const theta) const;
@@ -66,14 +66,14 @@ namespace iguana::clas12 {
6666
double ecout_m2v = 0;
6767
};
6868

69-
/// **Method**: Applies pid purity cuts to photons, compatible to how the GBT models are trained
69+
/// Applies pid purity cuts to photons, compatible to how the GBT models are trained
7070
/// @param E energy of the photon
7171
/// @param Epcal energy the photon has deposited in the pre-shower calorimeter
7272
/// @param theta lab angle of the photon with respect to the beam direction (radians)
7373
/// @returns `true` if the photon passes the pid purity cuts, `false` otherwise
7474
bool PidPurityPhotonFilter(float const E, float const Epcal, float const theta) const;
7575

76-
/// **Action function**: Classifies the photon for a given event as signal or background
76+
/// Classifies the photon for a given event as signal or background
7777
/// @param particleBank the REC::Particle hipo bank
7878
/// @param caloBank the REC::Calorimeter hipo bank
7979
/// @param calo_map the std::map<> of calorimeter data for the event, indexed by pindex
@@ -83,32 +83,32 @@ namespace iguana::clas12 {
8383
bool Filter(hipo::bank const &particleBank, hipo::bank const &caloBank, std::map<int, PhotonGBTFilter::calo_row_data> calo_map, int const row, int const runnum) const;
8484

8585

86-
/// **Method**: Calls the appropriate CatBoost model for the given run group, classifying the photon of interest
86+
/// Calls the appropriate CatBoost model for the given run group, classifying the photon of interest
8787
/// @param input_data the input features of the model
8888
/// @param runnum the run number associated to the event
8989
/// @returns `true` if the
9090
bool ClassifyPhoton(std::vector<float> const &input_data, int const runnum) const;
9191

9292

93-
/// **Method**: Gets calorimeter data for particles in the event
93+
/// Gets calorimeter data for particles in the event
9494
/// @param bank the bank to get data from
9595
/// @returns a map with keys as particle indices (pindex) and values as calo_row_data structs
9696
std::map<int, PhotonGBTFilter::calo_row_data> GetCaloMap(hipo::bank const &bank) const;
9797

9898

99-
/// **Method**: Gets the calorimeter vector for a particle in the event
99+
/// Gets the calorimeter vector for a particle in the event
100100
/// @param crd data struct of a single REC::Calorimeter's row data
101101
/// @returns a ROOT::Math::XYZVector with the coordinates of the particle in the calorimeter
102102
ROOT::Math::XYZVector GetParticleCaloVector(PhotonGBTFilter::calo_row_data calo_row) const;
103103

104104

105-
/// **Method**: Gets the mass of a particle given its PID
105+
/// Gets the mass of a particle given its PID
106106
/// @param pid the particle ID to get the mass for
107107
/// @returns the mass of the particle in GeV; returns -1.0 if the PID is not recognized
108108
double GetMass(int pid) const;
109109

110110

111-
/// **Method**: Gets the model function for the run number
111+
/// Gets the model function for the run number
112112
/// @param runnum the run of the associated event
113113
/// @returns GBT function for the run period
114114
std::function<double(std::vector<float> const &)> getModelFunction(int runnum) const;

src/iguana/algorithms/example/ExampleAlgorithm/Algorithm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ namespace iguana::example {
8383
// # - `Transform` for a transformation type algorithm, such as momentum corrections
8484
// # - `Create` for a creation type algorithm, such as inclusive kinematic (x, Q2, etc.) reconstruction
8585
// ############################################################################
86-
/// **Action function**: checks if the PDG `pid` is positive;
86+
/// @action_function{scalar filter} checks if the PDG `pid` is positive;
8787
/// this is an example action function, please replace it with your own
8888
/// @param pid the particle PDG to check
8989
/// @returns `true` if `pid` is positive

0 commit comments

Comments
 (0)