ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RawClusterBuilderHelper.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RawClusterBuilderHelper.h
1 #ifndef EICCALORECO_RAWCLUSTERBUILDERHELPER_H
2 #define EICCALORECO_RAWCLUSTERBUILDERHELPER_H
3 
4 #include <calobase/RawClusterContainer.h>
5 #include <calobase/RawTower.h>
6 #include <calobase/RawTowerDefs.h>
7 
8 #include <fun4all/SubsysReco.h>
9 
10 #include <phool/PHCompositeNode.h>
11 
12 #include <string>
13 
15 {
16  public:
17  typedef struct
18  {
19  float tower_E;
22  int tower_iL;
25  } towersStrct;
26  static bool towerECompare(towersStrct lhs, towersStrct rhs) { return lhs.tower_E > rhs.tower_E; }
27 
28  RawClusterBuilderHelper(const std::string &name);
30 
31  int InitRun(PHCompositeNode *topNode) override;
32  int process_event(PHCompositeNode *topNode) override;
33  int End(PHCompositeNode *topNode) override;
34 
35  void Detector(const std::string &d) { detector = d; }
36  void set_seed_e(const float e) { _seed_e = e; }
37  void set_agg_e(const float e) { _agg_e = e; }
38 
39  protected:
40  float _seed_e;
41  float _agg_e;
42  std::string detector;
43  std::string ClusterNodeName;
44 
46 
47  virtual void cluster(std::vector<towersStrct> &input_towers, uint caloId) { return; };
48 
49  int caloTowersPhi(int caloID);
50  bool IsForwardCalorimeter(int caloID);
51  void CreateNodes(PHCompositeNode *topNode);
52 };
53 
54 #endif // EICCALORECO_RAWCLUSTERBUILDERHELPER_H