File indexing completed on 2025-08-05 08:12:34
0001
0002 #ifndef __SPHANALYSIS_H__
0003 #define __SPHANALYSIS_H__
0004
0005 #include <fun4all/SubsysReco.h>
0006
0007 #include <TVector3.h>
0008
0009 #include <HepMC/GenEvent.h> // for GenEvent::particle_const_ite...
0010 #include <HepMC/GenParticle.h> // for GenParticle
0011
0012
0013 class TFile;
0014 class TNtuple;
0015 class TH1D;
0016 class TF1;
0017 class TRandom;
0018 class SvtxTrack;
0019 class RawCluster;
0020 class RawClusterContainer;
0021 class RawTowerContainer;
0022 class RawTowerGeomContainer;
0023
0024 class sPHAnalysis: public SubsysReco {
0025
0026 public:
0027
0028 sPHAnalysis(const std::string &name = "sPHAnalysis", const std::string &filename = "test.root");
0029 virtual ~sPHAnalysis() {}
0030
0031 int Init(PHCompositeNode *topNode);
0032 int InitRun(PHCompositeNode *topNode);
0033 int process_event(PHCompositeNode *topNode);
0034 int End(PHCompositeNode *topNode);
0035
0036 void set_whattodo(int what) { _whattodo = what; }
0037
0038 protected:
0039
0040 int process_event_hepmc(PHCompositeNode *topNode);
0041 int process_event_pythiaupsilon(PHCompositeNode *topNode);
0042 int process_event_upsilons(PHCompositeNode *topNode);
0043 int process_event_test(PHCompositeNode *topNode);
0044 int process_event_bimp(PHCompositeNode *topNode);
0045 int process_event_pairs(PHCompositeNode *topNode);
0046 int process_event_notracking(PHCompositeNode *topNode);
0047 int process_event_filtered(PHCompositeNode *topNode);
0048
0049 HepMC::GenParticle* GetParent(HepMC::GenParticle*, HepMC::GenEvent*);
0050
0051 RawCluster* MatchClusterCEMC(SvtxTrack* track, RawClusterContainer* cemc_clusters, double &dphi, double &deta, double Zvtx, int what);
0052 double Get_CAL_e3x3(SvtxTrack* track, RawTowerContainer* _towersRawOH, RawTowerGeomContainer* _geomOH, int what, double Zvtx, double &dphi, double &deta);
0053 TVector3 GetProjectionToCalorimeter(SvtxTrack* track, int what);
0054
0055 bool isElectron(SvtxTrack* trk);
0056
0057 TFile* OutputNtupleFile;
0058 std::string OutputFileName;
0059
0060 TNtuple* ntp_notracking;
0061 TNtuple* ntppid;
0062 TNtuple* ntpb;
0063 TNtuple* ntp1;
0064 TNtuple* ntp2;
0065 TNtuple* ntpmc1;
0066 TNtuple* ntpmc2;
0067
0068 TH1D* hmult;
0069 TH1D* hmass;
0070 TH1D* hgmass;
0071 TH1D* hgmass0;
0072 TH1D* hgmass09;
0073 TH1D* hdphi;
0074 TH1D* hdeta;
0075 TH1D* heop;
0076 TH1D* heop3x3;
0077 TH1D* heop5x5;
0078 TH1D* hdca2d;
0079 TH1D* hdca3dxy;
0080 TH1D* hdca3dz;
0081 TH1D* hchi2;
0082 TH1D* hndf;
0083 TH1D* hquality;
0084 TH1D* h_notracking_etabins_em;
0085 TH1D* h_notracking_phibins_em;
0086 TH1D* h_notracking_etabins;
0087 TH1D* h_notracking_phibins;
0088 TH1D* h_notracking_etabinsout;
0089 TH1D* h_notracking_phibinsout;
0090 TH1D* h_notracking_eoh;
0091
0092 TH1D* test;
0093
0094 int EventNumber;
0095
0096 TRandom* _rng;
0097 TF1 *fsin = nullptr;
0098
0099 int _whattodo;
0100
0101 };
0102
0103 #endif
0104