File indexing completed on 2025-08-06 08:13:57
0001 #pragma once
0002
0003 #include "cluster.hh"
0004
0005 class clustEvent
0006 {
0007 public:
0008 int run_no = 0;
0009 int ievt = 0;
0010 uint64_t bco_intt = 0;
0011 bool mag_on = false;
0012
0013 double dcaz_max = 9999;
0014 double dcaz_min = -9999;
0015 double dca2d_max = 9999;
0016 double dca2d_min = -9999;
0017
0018 double dca_mean[3] = {0, 0, 0};
0019
0020 vector < cluster > vclus;
0021 vector < truth* > vtruth;
0022 vector < track* > vtrack;
0023 vector < int > colorset;
0024
0025 public:
0026 clustEvent();
0027
0028 int GetClusterNum()
0029 {
0030 return vclus.size();
0031 }
0032
0033 int GetAssociatedClusterNum()
0034 {
0035 int counter = 0;
0036 for( auto& cluster : vclus )
0037 if( cluster.is_associated == true )
0038 counter++;
0039
0040 return counter;
0041 }
0042
0043 double GetAssociatedClusterRatio()
0044 {
0045 return double(GetAssociatedClusterNum()) / GetClusterNum();
0046 }
0047
0048 int GetTrackNum()
0049 {
0050 return vtrack.size();
0051 }
0052
0053 int GetGoodTrackNum( bool dca_range_cut = false,
0054 bool is_deleted = false,
0055 bool reverse = false );
0056
0057 double GetTrackLeftRightAsymmetry();
0058 double GetTrackUpDownAsymmetry();
0059
0060 int GetTruthNum()
0061 {
0062 return vtruth.size();
0063 }
0064
0065 void clear();
0066 void makeonetrack();
0067
0068 void dca_check(bool Debug);
0069 void truth_check();
0070 void cluster_check();
0071 void track_check();
0072 void charge_check();
0073
0074 void draw_intt(int mode);
0075 void draw_frame(int mode = 0, bool is_preliminary=false );
0076 void draw_signature( bool is_preliminary = false );
0077 void draw_date();
0078
0079 string GetDate();
0080
0081 void draw_tracklets(int mode = 0,
0082 bool does_overlay = false,
0083 int color = kBlack,
0084 bool dca_range_cut = false,
0085 bool is_deleted = false,
0086 bool reverse = false );
0087
0088 void draw_trackline(int mode = 0,
0089 bool does_overlay = false,
0090
0091 bool dca_range_cut = false,
0092 bool is_deleted = false,
0093 bool reverse = false );
0094
0095 double rad_deg(double Rad);
0096 void draw_curve2(int mode,
0097 double px,
0098 double py,
0099 double pz,
0100 double rad,
0101 double cx,
0102 double cy,
0103 int color,
0104 const vector<double> &V );
0105
0106 void draw_trackcurve( int mode = 0,
0107 bool does_overlay = false,
0108 bool dca_range_cut = false,
0109 bool is_deleted = false,
0110 bool reverse = false );
0111
0112 void draw_truthcurve(int mode = 0,
0113 bool does_overlay = false,
0114 int color = kBlack,
0115 bool only_far_cluster = false,
0116 bool only_far_track = false);
0117 void draw_truthline(int mode = 0,
0118 bool does_overlay = false,
0119 int color = kBlack,
0120 bool only_far_cluster = false,
0121 bool only_far_track = false);
0122 void draw_clusters(int mode = 0,
0123 bool does_overlay = false,
0124 int color = kBlack);
0125
0126 vector<double> get_crosspoint(const vector<double> &V,
0127 double cx,
0128 double cy,
0129 double rad,
0130 double p1_x,
0131 double p1_y);
0132
0133 vector<double> get_closestpoint(const vector<vector<double>> VV, double p1_x, double p1_y);
0134 vector<double> get_crossframe(double cx, double cy, double rad, double p1_x, double p1_y);
0135
0136 void SetTrackInfoToCluster( );
0137 void Print();
0138 };
0139
0140 #ifndef clustEvent_cc
0141 #include "clustEvent.cc"
0142 #endif