Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-04-07 08:08:32

0001 #ifndef __CLUSTER_SMALL_INFO_CONTAINER_H__
0002 #define __CLUSTER_SMALL_INFO_CONTAINER_H__
0003 
0004 #include "ClusterSmallInfo.h"
0005 #include <phool/PHObject.h>
0006 #include <TClonesArray.h>
0007 #include <cstdint>
0008 #include <iostream>
0009 
0010 class ClusterSmallInfoContainer : public PHObject
0011 {
0012  public:
0013   ClusterSmallInfoContainer();
0014   ~ClusterSmallInfoContainer() override;
0015   void identify(std::ostream& os = std::cout) const override;
0016   void Reset() override;
0017 
0018   void set_live_trigger(uint64_t live_trigger) { _live_trigger = live_trigger; }
0019   void set_scaled_trigger(uint64_t scaled_trigger) { _scaled_trigger = scaled_trigger; }
0020   void set_bunchnumber(float bunchnumber) { _bunchnumber = bunchnumber; }
0021   //void set_bad_flag(bool bad_flag) { _bad_flag = bad_flag; }
0022   //void set_total_E(float total_E) { _total_E = total_E; }
0023   //void set_total_E_quiet(float total_E_quiet) { _total_E_quiet = total_E_quiet; }
0024   bool add_cluster(const float&, const float&, const float&, const float&, const float&);
0025   
0026   ClusterSmallInfo* get_cluster_at(int);
0027   const ClusterSmallInfo* get_cluster_at(int) const;
0028 
0029   uint64_t get_live_trigger() const { return _live_trigger; }
0030   uint64_t get_scaled_trigger() const { return _scaled_trigger; }
0031   float get_bunch_number() const { return _bunchnumber; }
0032   //bool get_bad_flag() const { return _bad_flag; }
0033   //bool get_total_E() const { return _total_E; }
0034   //bool get_total_E_quiet() const { return _total_E_quiet; }
0035   size_t size() const { return _size; }
0036   void compress();
0037   
0038  protected:
0039   size_t _size;
0040   TClonesArray *_clones = nullptr;
0041   uint64_t _live_trigger;
0042   uint64_t _scaled_trigger;
0043   float _bunchnumber;
0044   //bool _bad_flag = false; // If total EMCal E < 0 (event selection)
0045   //float _total_E = 0;
0046   //float _total_E_quiet = 0;
0047 
0048  private:
0049   ClassDefOverride(ClusterSmallInfoContainer, 1);
0050 };
0051 
0052 #endif