Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:13:21

0001 /// ---------------------------------------------------------------------------
0002 /*! \file   REvtInfo.h
0003  *  \author Derek Anderson
0004  *  \date   03.06.2024
0005  *
0006  *  Utility class to hold event-level reconstructed
0007  *  information.
0008  */
0009 /// ---------------------------------------------------------------------------
0010 
0011 #ifndef SCORRELATORUTILITIES_REVTNFO_H
0012 #define SCORRELATORUTILITIES_REVTNFO_H
0013 
0014 // c++ utilities
0015 #include <cmath>
0016 #include <limits>
0017 #include <string>
0018 #include <vector>
0019 #include <optional>
0020 // root libraries
0021 #include <Rtypes.h>
0022 #include <Math/Vector3D.h>
0023 // phool libraries
0024 #include <phool/PHCompositeNode.h>
0025 // analysis utilities
0026 #include "Tools.h"
0027 #include "Constants.h"
0028 #include "Interfaces.h"
0029 
0030 // make common namespaces implicit
0031 using namespace std;
0032 
0033 
0034 
0035 namespace SColdQcdCorrelatorAnalysis {
0036   namespace Types {
0037 
0038     // ------------------------------------------------------------------------
0039     //! Event-level reconstructed info
0040     // ------------------------------------------------------------------------
0041     /*! A class to consolidate event-level
0042      *  reconstructed information. Can be
0043      *  by pointing class to a F4A node.
0044      */ 
0045     class REvtInfo {
0046 
0047       private:
0048 
0049         // data members
0050         int    nTrks     = numeric_limits<int>::max();
0051         double pSumTrks  = numeric_limits<double>::max();
0052         double eSumEMCal = numeric_limits<double>::max();
0053         double eSumIHCal = numeric_limits<double>::max();
0054         double eSumOHCal = numeric_limits<double>::max();
0055         double vx        = numeric_limits<double>::max();
0056         double vy        = numeric_limits<double>::max();
0057         double vz        = numeric_limits<double>::max();
0058         double vr        = numeric_limits<double>::max();
0059 
0060         // private methods
0061         void Minimize();
0062         void Maximize();
0063 
0064       public:
0065 
0066         // getters
0067         int    GetNTrks()     const {return nTrks;}
0068         double GetPSumTrks()  const {return pSumTrks;}
0069         double GetESumEMCal() const {return eSumEMCal;}
0070         double GetESumIHCal() const {return eSumIHCal;}
0071         double GetESumOHCal() const {return eSumOHCal;}
0072         double GetVX()        const {return vx;}
0073         double GetVY()        const {return vy;}
0074         double GetVZ()        const {return vz;}
0075         double GetVR()        const {return vr;}
0076 
0077         // setters
0078         void SetNTrks(const int arg_nTrks)            {nTrks     = arg_nTrks;}
0079         void SetPSumTrks(const double arg_pSumTrks)   {pSumTrks  = arg_pSumTrks;}
0080         void SetESumEMCal(const double arg_eSumEMCal) {eSumEMCal = arg_eSumEMCal;}
0081         void SetESumIHCal(const double arg_eSumIHCal) {eSumIHCal = arg_eSumIHCal;}
0082         void SetESumOHCal(const double arg_eSumOHCal) {eSumOHCal = arg_eSumOHCal;}
0083         void SetVX(const double arg_vx)               {vx        = arg_vx;}
0084         void SetVY(const double arg_vy)               {vy        = arg_vy;}
0085         void SetVZ(const double arg_vz)               {vz        = arg_vz;}
0086         void SetVR(const double arg_vr)               {vr        = arg_vr;}
0087 
0088         // public methods
0089         void Reset();
0090         void SetInfo(PHCompositeNode* topNode);
0091 
0092         // static methods
0093         static vector<string> GetListOfMembers();
0094 
0095         // default ctor/dtor
0096         REvtInfo();
0097         ~REvtInfo();
0098 
0099         // ctors accepting arguments
0100         REvtInfo(Const::Init init);
0101         REvtInfo(PHCompositeNode* topNode);
0102 
0103       // identify this class to ROOT
0104       ClassDefNV(REvtInfo, 1)
0105 
0106     };  // end REvtInfo definition
0107 
0108   }  // end Types namespace
0109 }  // end SColdQcdCorrelatorAnalysis namespace
0110 
0111 #endif
0112 
0113 // end ------------------------------------------------------------------------