File indexing completed on 2025-08-05 08:12:42
0001
0002
0003 #ifndef HEPMCJETTRIGGER_H
0004 #define HEPMCJETTRIGGER_H
0005 #pragma GCC diagnostic push
0006 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
0007 #include <string>
0008 #include <vector>
0009 #include <fun4all/SubsysReco.h>
0010 #include <phhepmc/PHHepMCGenEvent.h>
0011 #include <phhepmc/PHHepMCGenEventMap.h>
0012
0013 #include <phool/phool.h>
0014 #include <phool/getClass.h>
0015 #include <phool/PHCompositeNode.h>
0016 #include <phool/PHObject.h>
0017 #include <fastjet/JetDefinition.hh>
0018 #include <fastjet/PseudoJet.hh>
0019
0020 #include <HepMC/GenEvent.h>
0021
0022
0023 class PHCompositeNode;
0024
0025 class HepMCJetTrigger : public SubsysReco
0026 {
0027 public:
0028
0029 HepMCJetTrigger(float trigger_thresh=10., int n_incom=1000, bool up_lim=false, const std::string &name = "HepMCJetTrigger");
0030
0031 ~HepMCJetTrigger() override;
0032
0033
0034
0035
0036
0037
0038 int Init(PHCompositeNode *topNode) override;
0039
0040
0041
0042
0043
0044
0045 int InitRun(PHCompositeNode *topNode) override;
0046
0047
0048
0049
0050 int process_event(PHCompositeNode *topNode) override;
0051
0052
0053 int ResetEvent(PHCompositeNode *topNode) override;
0054
0055
0056 int EndRun(const int runnumber) override;
0057
0058
0059 int End(PHCompositeNode *topNode) override;
0060
0061
0062 int Reset(PHCompositeNode * ) override;
0063
0064 void Print(const std::string &what = "ALL") const override;
0065 int n_evts=0;
0066 int n_good=0;
0067 private:
0068 bool isGoodEvent(HepMC::GenEvent* e1);
0069 std::vector<fastjet::PseudoJet> findAllJets(HepMC::GenEvent* e1);
0070 int jetsAboveThreshold(std::vector<fastjet::PseudoJet> jets);
0071 float threshold=0.;
0072 int goal_event_number=1000;
0073 bool set_event_limit=false;
0074 };
0075
0076 #endif