Iguana 0.0.0
Implementation Guardian of Analysis Algorithms
Loading...
Searching...
No Matches
Algorithm.h
1#pragma once
2
3#include "iguana/algorithms/Algorithm.h"
4
5namespace iguana::clas12 {
6
17 class SectorFinder : public Algorithm
18 {
19
21
22 public:
23
24 void Start(hipo::banklist& banks) override;
25 void Run(hipo::banklist& banks) const override;
26 void Stop() override;
27
66 int GetSector(std::vector<int> const& sectors, std::vector<int> const& pindices, int const pindex) const;
67
72 void GetListsSectorPindex(hipo::bank const& bank, std::vector<int>& sectors, std::vector<int>& pindices) const;
73
74 private:
75
77 hipo::banklist::size_type b_particle;
78 hipo::banklist::size_type b_calorimeter;
79 hipo::banklist::size_type b_track;
80 hipo::banklist::size_type b_scint;
81 hipo::banklist::size_type b_user_charged;
82 hipo::banklist::size_type b_user_uncharged;
83 hipo::banklist::size_type b_result;
84 bool userSpecifiedBank_charged{false};
85 bool userSpecifiedBank_uncharged{true};
86
87 // `b_result` bank item indices
88 int i_sector;
89 int i_pindex;
90
92 std::string o_bankname_charged;
93 std::string o_bankname_uncharged;
94
95 //only want sectors from FD detectors
96 std::set<int> const listFDDets{6,7,12,15,16,18};
97 };
98
99}
#define DEFINE_IGUANA_ALGORITHM(ALGO_NAME, ALGO_FULL_NAME)
Base class for all algorithms to inherit from.
Definition Algorithm.h:40
Algorithm: Find the sector for all rows in REC::Particle
Definition Algorithm.h:18
void GetListsSectorPindex(hipo::bank const &bank, std::vector< int > &sectors, std::vector< int > &pindices) const
void Start(hipo::banklist &banks) override
Initialize this algorithm before any events are processed, with the intent to process banks
int GetSector(std::vector< int > const &sectors, std::vector< int > const &pindices, int const pindex) const
Action Function: for a given particle with index pindex, get its sector from a detector bank's list o...
void Stop() override
Finalize this algorithm after all events are processed.
void Run(hipo::banklist &banks) const override
Run this algorithm for an event.
CLAS12 algorithms.
Definition Algorithm.h:5