Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:15:34

0001 #ifndef __SIMPLETRACKINGANALYSIS_H__
0002 #define __SIMPLETRACKINGANALYSIS_H__
0003 
0004 
0005 // --- need to check all these includes...
0006 #include <fun4all/SubsysReco.h>
0007 #include <vector>
0008 
0009 class PHCompositeNode;
0010 //class PHG4HoughTransform;
0011 class TH1D;
0012 class TH2D;
0013 //class TProfile;
0014 class TProfile2D;
0015 class RawTower;
0016 class RawCluster;
0017 class RawTowerContainer;
0018 class RawClusterContainer;
0019 
0020 class SimpleTrackingAnalysis: public SubsysReco
0021 {
0022 
0023  public:
0024 
0025   SimpleTrackingAnalysis(const std::string &name="SimpleTrackingAnalysis");
0026 
0027   int Init(PHCompositeNode*);
0028   int process_event(PHCompositeNode*);
0029   int End(PHCompositeNode*);
0030 
0031   void set_nlayers(unsigned int x) {nlayers = x;}
0032 
0033   void set_verbosity(int x) {verbosity = x;}
0034   //void set_docalocuts(bool x) {docalocuts = x;}
0035 
0036 
0037 
0038  private:
0039 
0040   // all values taken from sPHENIX pCDR
0041   // note the somewhat mysterious overlap
0042   // between the outer edge of the EMC
0043   // and the inner edge of the inner HCal
0044   // that shouldn't be a problem here, though
0045   const double emc_radius_inner =  90.0;
0046   const double hci_radius_inner = 115.7;
0047   const double hco_radius_inner = 182.0;
0048   const double emc_radius_outer = 116.1;
0049   const double hci_radius_outer = 137.0;
0050   const double hco_radius_outer = 268.5;
0051 
0052   // PHG4HoughTransform _hough; ERROR
0053 
0054   double magneticfield;
0055 
0056   int verbosity;
0057   //bool docalocuts;
0058 
0059   // event counter
0060   unsigned long long nevents;
0061   unsigned long long nerrors;
0062   unsigned long long nwarnings;
0063 
0064   // number of layers
0065   unsigned int nlayers;
0066 
0067   // output histograms ---------------------------------------------------------
0068 
0069   TH2D* _recopt_quality;                      // quality distributions
0070   TH2D* _recopt_quality_tracks_all;
0071   TH2D* _recopt_quality_tracks_recoWithin4Percent;
0072   TH2D* _truept_quality_particles_recoWithin4Percent;
0073 
0074   TH2D* _truept_dca; // dca resolution
0075   TH2D* _truept_dptoverpt; // momentum resolution
0076   TH1D* _truept_particles_leavingAllHits; // pattern reco eff baseline
0077   TH1D* _truept_particles_recoWithExactHits; // pattern reco eff by nhits
0078   TH1D* _truept_particles_recoWithin1Hit;
0079   TH1D* _truept_particles_recoWithin2Hits;
0080   TH1D* _truept_particles_recoWithin3Percent; // parttern reco eff by momentum match
0081   TH1D* _truept_particles_recoWithin4Percent;
0082   TH1D* _truept_particles_recoWithin5Percent;
0083 
0084 
0085 
0086   TH1D* _recopt_tracks_all;                   // purity baseline (non-embedded particles)
0087   TH1D* _recopt_tracks_recoWithExactHits;     // purity by nhit match
0088   TH1D* _recopt_tracks_recoWithin1Hit;
0089   TH1D* _recopt_tracks_recoWithin2Hits;
0090   TH1D* _recopt_tracks_recoWithin3Percent;    // purity by momentum match
0091   TH1D* _recopt_tracks_recoWithin4Percent;
0092   TH1D* _recopt_tracks_recoWithin5Percent;
0093 
0094 
0095   // purity histograms for calo cuts
0096   TH2D* th2d_recopt_tracks_withcalocuts_all; // purity baseline (non-embedded particles)
0097   TH2D* th2d_recopt_tracks_withcalocuts_recoWithExactHits; // purity by nhit match
0098   TH2D* th2d_recopt_tracks_withcalocuts_recoWithin1Hit;
0099   TH2D* th2d_recopt_tracks_withcalocuts_recoWithin2Hits;
0100   TH2D* th2d_recopt_tracks_withcalocuts_recoWithin3Percent; // purity by momentum match
0101   TH2D* th2d_recopt_tracks_withcalocuts_recoWithin4Percent;
0102   TH2D* th2d_recopt_tracks_withcalocuts_recoWithin5Percent;
0103   TH2D* th2d_recopt_tracks_withcalocuts_recoWithin1Sigma; // purity by momentum match
0104   TH2D* th2d_recopt_tracks_withcalocuts_recoWithin2Sigma;
0105   TH2D* th2d_recopt_tracks_withcalocuts_recoWithin3Sigma;
0106 
0107   // efficiency histograms for calo cuts
0108   TH2D* th2d_truept_particles_withcalocuts_leavingAllHits;
0109   TH2D* th2d_truept_particles_withcalocuts_recoWithExactHits;
0110   TH2D* th2d_truept_particles_withcalocuts_recoWithin1Hit;
0111   TH2D* th2d_truept_particles_withcalocuts_recoWithin2Hits;
0112   TH2D* th2d_truept_particles_withcalocuts_recoWithin3Percent;
0113   TH2D* th2d_truept_particles_withcalocuts_recoWithin4Percent;
0114   TH2D* th2d_truept_particles_withcalocuts_recoWithin5Percent;
0115   TH2D* th2d_truept_particles_withcalocuts_recoWithin1Sigma;
0116   TH2D* th2d_truept_particles_withcalocuts_recoWithin2Sigma;
0117   TH2D* th2d_truept_particles_withcalocuts_recoWithin3Sigma;
0118 
0119   // --- new additional (eventual replacement?) histograms for purity study
0120   TH2D* th2d_reco_calo_nhits8;
0121   TH2D* th2d_reco_calo_nhits7;
0122   TH2D* th2d_reco_calo_nhits6;
0123   TH2D* th2d_reco_calo_nhits5;
0124   TH2D* th2d_reco_calo_nhits4;
0125   TH2D* th2d_reco_calo_nhits3;
0126   TH2D* th2d_reco_calo_nhits2;
0127   TH2D* th2d_reco_calo_nhits1;
0128 
0129   TH2D* th2d_reco_calo_pt1sigma;
0130   TH2D* th2d_reco_calo_pt2sigma;
0131   TH2D* th2d_reco_calo_pt3sigma;
0132   TH2D* th2d_reco_calo_pt4sigma;
0133   TH2D* th2d_reco_calo_pt5sigma;
0134   TH2D* th2d_reco_calo_pt6sigma;
0135 
0136 
0137 
0138   // --- new additional (eventual replacement?) histograms for purity study
0139   TH2D* th2d_true_calo_nhits8;
0140   TH2D* th2d_true_calo_nhits7;
0141   TH2D* th2d_true_calo_nhits6;
0142   TH2D* th2d_true_calo_nhits5;
0143   TH2D* th2d_true_calo_nhits4;
0144   TH2D* th2d_true_calo_nhits3;
0145   TH2D* th2d_true_calo_nhits2;
0146   TH2D* th2d_true_calo_nhits1;
0147 
0148   TH2D* th2d_true_calo_pt1sigma;
0149   TH2D* th2d_true_calo_pt2sigma;
0150   TH2D* th2d_true_calo_pt3sigma;
0151   TH2D* th2d_true_calo_pt4sigma;
0152   TH2D* th2d_true_calo_pt5sigma;
0153   TH2D* th2d_true_calo_pt6sigma;
0154 
0155 
0156   // vertex info hisograms
0157   TH1D* _dx_vertex;
0158   TH1D* _dy_vertex;
0159   TH1D* _dz_vertex;
0160 
0161   TH1D* hmult;
0162   TH1D* hmult_vertex;
0163 
0164 
0165 
0166 };
0167 
0168 #endif // __SIMPLETRACKINGANALYSIS_H__