Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef JETMULTSUB_H
0004 #define JETMULTSUB_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <string>
0009 
0010 class PHCompositeNode;
0011 
0012 /// \class JetMultSub
0013 ///
0014 /// \brief Subtracts reco jets using multiplicity method
0015 
0016 class JetMultSub : public SubsysReco
0017 {
0018 public:
0019     // Constructor
0020     JetMultSub(const std::string &name = "JetMultSub");
0021 
0022     // Destructor
0023     ~JetMultSub() override;
0024 
0025     // setters 
0026     void setEtaRange(double low, double high){
0027         m_etaRange.first = low;
0028         m_etaRange.second = high;
0029     }
0030     
0031     void setPtRange(double low, double high){
0032         m_ptRange.first = low;
0033         m_ptRange.second = high;
0034     }
0035 
0036 
0037     // add input(s)
0038     void add_reco_input(const std::string &recoinput){m_reco_input = recoinput;}
0039     void add_kt_input(const std::string &ktinput){m_kt_input = ktinput;}
0040     // add output
0041     void set_output_name(const std::string &outputname){m_subtracted_output = outputname;}
0042 
0043 
0044     // Standard Fun4All functions
0045     int Init(PHCompositeNode *topNode) override;
0046     int InitRun(PHCompositeNode *topNode) override;
0047     int process_event(PHCompositeNode *topNode) override;
0048     int ResetEvent(PHCompositeNode *topNode) override;
0049     int EndRun(const int runnumber) override;
0050     int End(PHCompositeNode *topNode) override;
0051     int Reset(PHCompositeNode * /*topNode*/) override;
0052     void Print(const std::string &what = "ALL") const override;
0053 
0054     
0055 private:
0056 
0057     // private variables
0058     std::string m_reco_input;
0059     std::string m_kt_input;
0060     std::string m_subtracted_output;
0061     std::pair<double, double> m_etaRange;
0062     std::pair<double, double> m_ptRange;
0063 
0064     /// private methods
0065     int CreateNode(PHCompositeNode *topNode); // create node if it doesn't exist
0066     float EstimateRho(PHCompositeNode *topNode); // estimate rho using kT jets-> returns rho
0067     float GetMultiplicityCorrection(float pt); //  get multiplicity correction for given pt from vector of corrections
0068 
0069 
0070 };
0071 
0072 #endif // JETMULTSUB_H