Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:13:14

0001 #ifndef RHOFLUCT__H
0002 #define RHOFLUCT__H
0003 
0004 #include <fun4all/SubsysReco.h>
0005 
0006 #include <memory>
0007 #include <string>
0008 #include <utility>  // std::pair, std::make_pair
0009 
0010 #include <array>
0011 #include <vector>
0012 
0013 #include <TRandom3.h>
0014 
0015 class PHCompositeNode;
0016 class JetEvalStack;
0017 class TTree;
0018 class TH2D;
0019 class TH1;
0020 class JetInput;
0021 
0022 class RhoFluct : public SubsysReco
0023 {
0024  public:
0025   RhoFluct
0026     ( const std::string& outputfilename = "RhoFluct.root"
0027     , const float _jet_R = 0.4
0028     );
0029 
0030   virtual ~RhoFluct();
0031 
0032   /* void use_initial_vertex(const bool b = true) {initial_vertex = b;} */
0033   int Init          (PHCompositeNode *topNode);
0034   int InitRun       (PHCompositeNode *topNode);
0035   int process_event (PHCompositeNode *topNode);
0036   int End           (PHCompositeNode *topNode);
0037   void add_input_Sub1(JetInput *input) { m_input_Sub1.push_back(input); }
0038   void add_input_rhoA(JetInput *input) { m_input_rhoA.push_back(input); }
0039 
0040  private:
0041   TRandom3 rand3 {};
0042 
0043   long long int nevent { 0 };
0044   long long int outevent { 0 };
0045   const std::string m_outputfilename;
0046   const float jet_R;
0047   const std::string m_truthJetName;
0048   const std::string m_Sub1JetName;
0049 
0050   int i_truthset = 0;
0051 
0052   std::string m_recoJetName;
0053   //! Output Tree variables
0054   TTree *m_T;
0055 
0056   /* int   m_id; */
0057   float m_rho; // all calorimeters
0058   float m_rho_sigma;
0059   float m_cent_mdb    { -1. };
0060   float m_cent { -1. };
0061   float m_cent_epd    { -1. };
0062   float m_impactparam { -1. };
0063 
0064   //Calo Jets -- all
0065   float m_1TeV_phi ; // always embed a 100 GeV particle
0066   float m_1TeV_eta ;
0067 
0068 
0069   bool   m_rhoA_ismatched;
0070   float  m_rhoAJetPhi ;
0071   float  m_rhoAJetEta ;
0072   float  m_rhoAJetPt  ;
0073   float  m_rhoAJetArea  ;
0074   float  m_rhoAJetPtLessRhoA ; // pT - rho x A
0075   float  m_rhoAJet_delpt; // (pT-rhoxA)-1TeV
0076 
0077   bool   m_Sub1_ismatched;
0078   float  m_Sub1JetPhi ;
0079   float  m_Sub1JetEta ;
0080   float  m_Sub1JetPt  ;
0081   float   m_Sub1Jet_delpt ; // pT - 1TeV
0082 
0083   // FIXME -- functions straight from background median estimator
0084   float        mBGE_mean_area    { 0 };
0085   float        mBGE_empty_area   { 0 };
0086   float        mBGE_n_empty_jets { 0 };
0087   unsigned int mBGE_n_jets_used  { 0 };
0088 
0089   std::vector<JetInput *> m_input_Sub1, m_input_rhoA; // copied from /direct/sphenix+u/dstewart/vv/coresoftware/simulation/g4simulation/g4jets/JetReco.h .cc
0090 };
0091 
0092 #endif  // RhoFluct