File indexing completed on 2025-08-05 08:15:02
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef PHAJMAKER_H__
0010 #define PHAJMAKER_H__
0011
0012 #include <fun4all/SubsysReco.h>
0013 #include <fun4all/Fun4AllServer.h>
0014 #include <fun4all/Fun4AllHistoManager.h>
0015 #include <map>
0016 #include <set>
0017 #include <string>
0018 #include <vector>
0019
0020 #include "PJTranslator.h"
0021
0022 #ifndef __CINT__
0023 #include "JetAnalyzer.hh"
0024 #include "AjParameters.hh"
0025 #endif
0026
0027 #include "TH1.h"
0028 #include "TH2.h"
0029 #include "TH3.h"
0030 #include "TString.h"
0031 #include "TChain.h"
0032
0033 class PHCompositeNode;
0034 class RawClusterContainer;
0035 class SvtxTrackMap;
0036 class TF1;
0037
0038 #include <assert.h>
0039 #include <iostream>
0040 #include <cmath>
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050 class PHAJMaker: public SubsysReco
0051 {
0052
0053
0054
0055 public:
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069 PHAJMaker( const std::string &name = "PHAJMaker",
0070 double R = 0.4,
0071 double jet_ptmin = 10.0, double jet_ptmax = 100.0,
0072 double LeadPtMin = 20.0, double SubLeadPtMin = 10,
0073 double max_track_rap = 1.0, double PtConsLo=0.2, double PtConsHi=2.0,
0074 double dPhiCut = 0.4
0075 );
0076
0077
0078 int Init(PHCompositeNode *);
0079
0080
0081 int process_event(PHCompositeNode *);
0082
0083
0084
0085 bool Has10Gev;
0086
0087
0088
0089
0090 inline double GetR ( ) { return R; };
0091
0092 inline void SetR ( const double newv ) { R=newv; };
0093
0094
0095 inline double GetJet_ptmin ( ) { return jet_ptmin; };
0096
0097 inline void SetJet_ptmin ( const double newv ) { jet_ptmin=newv; };
0098
0099
0100 inline double GetJet_ptmax ( ) { return jet_ptmax; };
0101
0102 inline void SetJet_ptmax ( const double newv ) { jet_ptmax=newv; };
0103
0104
0105 inline double GetMax_rap ( ) { return max_rap; };
0106
0107 inline void SetMax_rap ( const double newv ) { max_rap=newv; };
0108
0109
0110 inline double GetGhost_maxrap ( ) { return ghost_maxrap; };
0111
0112 inline void SetGhost_maxrap ( const double newv ) { ghost_maxrap=newv; };
0113
0114
0115 inline double GetDPhiCut ( ) { return dPhiCut; };
0116
0117 inline void SetDPhiCut ( const double newv ) { dPhiCut=newv; };
0118
0119
0120 virtual ~PHAJMaker();
0121
0122
0123
0124 #ifndef __CINT__
0125 inline double CalcAj ( std::vector<fastjet::PseudoJet>& jets ){
0126 if ( jets.size()!=2 ){
0127 throw ( -1 );
0128 return -1e10;
0129 }
0130 return fabs (( jets.at(0).pt()-jets.at(1).pt() ) / ( jets.at(0).pt()+jets.at(1).pt() ));
0131 }
0132
0133
0134
0135 inline fastjet::JetDefinition& GetJet_def () { return jet_def; }
0136
0137 inline fastjet::Selector& GetLoConsSelector () { return slo; }
0138
0139 inline fastjet::Selector& GetHiConsSelector () { return shi; }
0140
0141
0142 inline fastjet::Selector& GetJetSelector () { return sjet; }
0143
0144
0145 inline fastjet::GhostedAreaSpec& GetArea_spec () { return area_spec; }
0146
0147 inline fastjet::AreaDefinition& GetArea_def () { return area_def; }
0148
0149
0150
0151 inline JetAnalyzer* GetJAhi() {return pJAhi; };
0152
0153 inline JetAnalyzer* GetJAlo() {return pJAlo; };
0154
0155
0156 inline std::vector<fastjet::PseudoJet> GetJAhiResult() {return JAhiResult; };
0157
0158 inline std::vector<fastjet::PseudoJet> GetJAloResult() {return JAloResult; };
0159
0160
0161 inline std::vector<fastjet::PseudoJet> GetLoConstituents() {return pLo; };
0162
0163 inline std::vector<fastjet::PseudoJet> GetHiConstituents() {return pHi; };
0164
0165
0166
0167 inline std::vector<fastjet::PseudoJet> GetDiJetsHi() {return DiJetsHi; };
0168
0169 inline std::vector<fastjet::PseudoJet> GetDiJetsLo() {return DiJetsLo; };
0170
0171
0172 #endif
0173
0174
0175
0176
0177
0178
0179
0180
0181 private:
0182
0183 Fun4AllHistoManager* MyHistos;
0184 TH2D* UnmatchedAJ_hi;
0185 TH2D* AJ_hi;
0186 TH2D* AJ_lo;
0187
0188 double R;
0189 double jet_ptmin;
0190 double jet_ptmax;
0191 double LeadPtMin;
0192 double SubLeadPtMin;
0193 double max_rap;
0194 double ghost_maxrap;
0195
0196 double max_track_rap;
0197 double PtConsLo;
0198 double PtConsHi;
0199
0200 double dPhiCut;
0201
0202 #ifndef __CINT__
0203 fastjet::JetDefinition jet_def;
0204 fastjet::JetDefinition other_jet_def;
0205
0206 fastjet::Selector select_track_rap;
0207 fastjet::Selector select_lopt;
0208 fastjet::Selector select_hipt;
0209
0210 fastjet::Selector slo;
0211 fastjet::Selector shi;
0212
0213
0214 fastjet::Selector select_jet_rap;
0215 fastjet::Selector select_jet_pt_min;
0216 fastjet::Selector select_jet_pt_max;
0217 fastjet::Selector sjet;
0218
0219 fastjet::GhostedAreaSpec area_spec;
0220 fastjet::AreaDefinition area_def;
0221
0222 JetAnalyzer* pJAhi;
0223 JetAnalyzer* pJAlo;
0224 JetAnalyzer* pOtherJAlo;
0225
0226 std::vector<fastjet::PseudoJet> pHi;
0227 std::vector<fastjet::PseudoJet> pLo;
0228
0229 std::vector<fastjet::PseudoJet> JAhiResult;
0230 std::vector<fastjet::PseudoJet> JAloResult;
0231 std::vector<fastjet::PseudoJet> OtherJAloResult;
0232
0233 std::vector<fastjet::PseudoJet> DiJetsHi;
0234 std::vector<fastjet::PseudoJet> DiJetsLo;
0235 std::vector<fastjet::PseudoJet> OtherDiJetsLo;
0236
0237 #endif
0238
0239
0240 };
0241
0242 #endif