Loading [MathJax]/extensions/tex2jax.js
Iguana 0.8.0
Implementation Guardian of Analysis Algorithms
All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros Modules Pages
Algorithm.h
1#pragma once
2
3#include "iguana/algorithms/Algorithm.h"
4
5namespace iguana::clas12 {
6
22 class SectorFinder : public Algorithm
23 {
24
26
27 public:
28
29 void Start(hipo::banklist& banks) override;
30 void Run(hipo::banklist& banks) const override;
31 void Stop() override;
32
71 int GetSector(std::vector<int> const& sectors, std::vector<int> const& pindices, int const pindex) const;
72
77 void GetListsSectorPindex(hipo::bank const& bank, std::vector<int>& sectors, std::vector<int>& pindices) const;
78
79 private:
80
82 hipo::banklist::size_type b_particle;
83 hipo::banklist::size_type b_calorimeter;
84 hipo::banklist::size_type b_track;
85 hipo::banklist::size_type b_scint;
86 hipo::banklist::size_type b_user_charged;
87 hipo::banklist::size_type b_user_uncharged;
88 hipo::banklist::size_type b_result;
89 bool userSpecifiedBank_charged{false};
90 bool userSpecifiedBank_uncharged{true};
91
92 // `b_result` bank item indices
93 int i_sector;
94 int i_pindex;
95
97 std::string o_bankname_charged;
98 std::string o_bankname_uncharged;
99
100 //only want sectors from FD detectors
101 std::set<int> const listFDDets{6,7,12,15,16,18};
102 };
103
104}
#define DEFINE_IGUANA_ALGORITHM(ALGO_NAME, ALGO_FULL_NAME)
Algorithm(std::string_view name)
Definition Algorithm.h:46
Algorithm: Find the sector for all rows in REC::Particle
Definition Algorithm.h:23
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