Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #ifndef UPCTRIGSTUDY_H
0002 #define UPCTRIGSTUDY_H
0003 
0004 #include <Rtypes.h>
0005 #include <fun4all/SubsysReco.h>
0006 
0007 /// Class declarations for use in the analysis module
0008 class Fun4AllHistoManager;
0009 class PHCompositeNode;
0010 class TFile;
0011 class TTree;
0012 class TH1;
0013 class TH2;
0014 class PHCompositeNode;
0015 class GlobalVertex;
0016 class CaloTriggerInfo;
0017 class EventHeader;
0018 class Gl1Packet;
0019 class MbdOut;
0020 class TowerInfoContainer;
0021 
0022 /// Definition of this analysis module class
0023 class UPCTrigStudy : public SubsysReco
0024 {
0025  public:
0026   /// Constructor
0027   UPCTrigStudy(const std::string &name = "UPCTrigStudy",
0028                const std::string &outputfname = "UPCTrigStudy.root");
0029 
0030   // Destructor
0031   virtual ~UPCTrigStudy();
0032 
0033   /// SubsysReco initialize processing method
0034   int Init(PHCompositeNode *) override;
0035 
0036   /// SubsysReco event processing method
0037   int process_event(PHCompositeNode *) override;
0038 
0039   /// SubsysReco end processing method
0040   int End(PHCompositeNode *) override;
0041 
0042   /// Set the minimum cluster pT to cut on
0043   //void setMinClusPt(float mincluspt) { m_mincluspt = mincluspt; }
0044 
0045  private:
0046   /// String to contain the outfile name containing the trees
0047   std::string m_outfilename;
0048 
0049   /// Fun4All Histogram Manager tool
0050   Fun4AllHistoManager *m_hm;
0051 
0052   /// Set things to analyze
0053   int process_triggers();
0054   void process_zdc();
0055   int Getpeaktime(TH1 *);
0056 
0057   /// TFile to hold the following TTrees and histograms
0058   TFile *m_outfile{nullptr};
0059   TTree *_globaltree{nullptr};
0060  
0061   TH1 *h_trig{nullptr};
0062   TH1 *h_ntracks{nullptr};
0063   TH1 *h_zdcse{nullptr};
0064   TH1 *h_zdcne{nullptr};
0065   TH1 *h_zdce{nullptr};
0066   TH1 *h_zdctimecut{nullptr};
0067 
0068   Gl1Packet* _gl1raw {nullptr};
0069   MbdOut *_mbdout{nullptr};
0070   TowerInfoContainer* _zdctowers{nullptr};
0071 
0072   /// Methods for grabbing the data
0073   int GetNodes(PHCompositeNode *topNode);
0074   //void getEMCalClusters(PHCompositeNode *topNode);
0075 
0076   /// Data
0077   EventHeader *evthdr{nullptr};
0078 
0079   void resetVariables();
0080   void initializeTrees();
0081 
0082   /**
0083    * Make variables for the relevant trees
0084    */
0085 
0086   // Global Info
0087   Int_t f_run{ 0 };
0088   Int_t f_evt{ 0 };
0089   ULong64_t f_rtrig{ 0 };
0090   ULong64_t f_ltrig{ 0 };
0091   ULong64_t f_strig{ 0 };
0092   Float_t f_zdcse{ 0 };
0093   Float_t f_zdcne{ 0 };
0094   Short_t f_cross{ 0 };
0095   Short_t f_mbdsn{ 0 };
0096   Short_t f_mbdnn{ 0 };
0097 
0098   Int_t f_ntracks{ 0 };
0099   Int_t _mbdwide{ 0 };
0100   Int_t _nprocessed{ 0 };
0101 
0102   /// Cluster variables
0103   /*
0104   double m_clusenergy;
0105   double m_cluseta;
0106   double m_clustheta;
0107   double m_cluspt;
0108   double m_clusphi;
0109   double m_cluspx;
0110   double m_cluspy;
0111   double m_cluspz;
0112   double m_E_4x4;
0113   */
0114 };
0115 
0116 #endif  // UPCTRIGSTUDY_H