Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:12:49

0001 #ifndef ANTITRIGGER_H
0002 #define ANTITRIGGER_H
0003 
0004 //sPHENIX stuff
0005 #include <fun4all/Fun4AllReturnCodes.h>
0006 #include <fun4all/SubsysReco.h>
0007 #include <phhepmc/PHHepMCGenEvent.h>
0008 #include <phhepmc/PHHepMCGenEventMap.h>
0009 #include <phool/getClass.h>
0010 
0011 
0012 #pragma GCC diagnostic push
0013 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
0014 #include <HepMC/GenEvent.h>
0015 #include <HepMC/GenParticle.h>
0016 #include <HepMC/IteratorRange.h> 
0017 #include <HepMC/SimpleVector.h>
0018 #pragma GCC diagnostic pop
0019 
0020 #include <TDatabasePDG.h>
0021 
0022 #include <algorithm>
0023 #include <iostream>
0024 #include <map>
0025 #include <string>
0026 #include <vector>
0027 
0028 class AntiTrigger : public SubsysReco
0029 {
0030  public:
0031   AntiTrigger();
0032 
0033   explicit AntiTrigger(const std::string &name);
0034 
0035   virtual ~AntiTrigger(){}
0036 
0037   int Init(PHCompositeNode *topNode);
0038 
0039   int process_event(PHCompositeNode *topNode);
0040 
0041   int End(PHCompositeNode *topNode);
0042 
0043   int parseParticleList();
0044 
0045   bool findParticle(PHCompositeNode *topNode);
0046 
0047   bool particleIsInList(std::string particle);
0048 
0049   void printInfo();
0050 
0051   //User configuration
0052   void setParticleList(std::vector<std::string> particleList) { m_particleList = particleList; }
0053  
0054  private:
0055 
0056   PHHepMCGenEventMap *m_geneventmap = NULL;
0057   PHHepMCGenEvent *m_genevt = NULL;
0058 
0059   int m_counter = 0;
0060 
0061   std::vector<std::string> m_particleList;
0062   std::vector<int> m_particleIDs;
0063 };
0064 
0065 #endif  //ANTITRIGGER_H