File indexing completed on 2025-08-05 08:16:00
0001 #ifndef PHPYTHIA8_PHPY8PARTICLETRIGGER_H
0002 #define PHPYTHIA8_PHPY8PARTICLETRIGGER_H
0003
0004 #include "PHPy8GenTrigger.h"
0005
0006 #include <string>
0007 #include <vector> // for vector
0008
0009 namespace Pythia8
0010 {
0011 class Pythia;
0012 }
0013
0014 class PHPy8ParticleTrigger : public PHPy8GenTrigger
0015 {
0016 public:
0017 PHPy8ParticleTrigger(const std::string &name = "PHPy8ParticleTrigger");
0018 ~PHPy8ParticleTrigger() override;
0019
0020 bool Apply(Pythia8::Pythia *pythia) override;
0021
0022 void AddParticles(const std::string &particles);
0023 void AddParticles(int particle);
0024 void AddParticles(std::vector<int> particles);
0025
0026 void AddParents(const std::string &parents);
0027 void AddParents(int parent);
0028 void AddParents(std::vector<int> parents);
0029
0030 void SetPtHigh(double pt);
0031 void SetPtLow(double pt);
0032 void SetPtHighLow(double ptHigh, double ptLow);
0033
0034 void SetPHigh(double p);
0035 void SetPLow(double p);
0036 void SetPHighLow(double pHigh, double pLow);
0037
0038
0039 void SetYHigh(double eta);
0040 void SetYLow(double eta);
0041 void SetYHighLow(double etaHigh, double etaLow);
0042
0043 void SetEtaHigh(double eta);
0044 void SetEtaLow(double eta);
0045 void SetEtaHighLow(double etaHigh, double etaLow);
0046
0047 void SetAbsEtaHigh(double eta);
0048 void SetAbsEtaLow(double eta);
0049 void SetAbsEtaHighLow(double etaHigh, double etaLow);
0050
0051 void SetPzHigh(double pz);
0052 void SetPzLow(double pz);
0053 void SetPzHighLow(double pzHigh, double pzLow);
0054
0055
0056 void SetStableParticleOnly(bool b) { m_doStableParticleOnly = b; }
0057
0058 void PrintConfig();
0059
0060 private:
0061 std::vector<int> _theParents;
0062 std::vector<int> _theParticles;
0063
0064 double _theYHigh = 999, _theYLow = -999;
0065 double _theEtaHigh, _theEtaLow;
0066 double _thePtHigh, _thePtLow;
0067 double _thePHigh, _thePLow;
0068 double _thePzHigh, _thePzLow;
0069
0070 bool _doYHighCut = false, _doYLowCut = false, _doBothYCut = false;
0071 bool _doEtaHighCut, _doEtaLowCut, _doBothEtaCut;
0072 bool _doAbsEtaHighCut, _doAbsEtaLowCut, _doBothAbsEtaCut;
0073 bool _doPtHighCut, _doPtLowCut, _doBothPtCut;
0074 bool _doPHighCut, _doPLowCut, _doBothPCut;
0075 bool _doPzHighCut, _doPzLowCut, _doBothPzCut;
0076
0077 bool m_doStableParticleOnly = true;
0078 };
0079
0080 #endif