Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JetMultSub.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file JetMultSub.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef JETMULTSUB_H
4 #define JETMULTSUB_H
5 
6 #include <fun4all/SubsysReco.h>
7 
8 #include <string>
9 
10 class PHCompositeNode;
11 
15 
16 class JetMultSub : public SubsysReco
17 {
18 public:
19  // Constructor
20  JetMultSub(const std::string &name = "JetMultSub");
21 
22  // Destructor
23  ~JetMultSub() override;
24 
25  // setters
26  void setEtaRange(double low, double high){
27  m_etaRange.first = low;
28  m_etaRange.second = high;
29  }
30 
31  void setPtRange(double low, double high){
32  m_ptRange.first = low;
33  m_ptRange.second = high;
34  }
35 
36 
37  // add input(s)
38  void add_reco_input(const std::string &recoinput){m_reco_input = recoinput;}
39  void add_kt_input(const std::string &ktinput){m_kt_input = ktinput;}
40  // add output
41  void set_output_name(const std::string &outputname){m_subtracted_output = outputname;}
42 
43 
44  // Standard Fun4All functions
45  int Init(PHCompositeNode *topNode) override;
46  int InitRun(PHCompositeNode *topNode) override;
47  int process_event(PHCompositeNode *topNode) override;
48  int ResetEvent(PHCompositeNode *topNode) override;
49  int EndRun(const int runnumber) override;
50  int End(PHCompositeNode *topNode) override;
51  int Reset(PHCompositeNode * /*topNode*/) override;
52  void Print(const std::string &what = "ALL") const override;
53 
54 
55 private:
56 
57  // private variables
61  std::pair<double, double> m_etaRange;
62  std::pair<double, double> m_ptRange;
63 
65  int CreateNode(PHCompositeNode *topNode); // create node if it doesn't exist
66  float EstimateRho(PHCompositeNode *topNode); // estimate rho using kT jets-> returns rho
67  float GetMultiplicityCorrection(float pt); // get multiplicity correction for given pt from vector of corrections
68 
69 
70 };
71 
72 #endif // JETMULTSUB_H