File indexing completed on 2025-08-03 08:12:30
0001 #ifndef __DVMPHELPER__
0002 #define __DVMPHELPER__
0003
0004 #include <vector>
0005 #include <stdlib.h>
0006 class DVMPHelper
0007 {
0008
0009 public:
0010
0011 DVMPHelper(std::vector<float> reco_eta, std::vector<float> reco_phi,
0012 std::vector<float> reco_ptotal, std::vector<int> reco_charge,
0013 std::vector<float> reco_cluster_e,
0014 std::vector<bool> reco_is_scattered_lepton,
0015 std::vector<float> true_eta, std::vector<float> true_phi,
0016 std::vector<float> true_ptotal, std::vector<int> pid,
0017 std::vector<bool> is_scattered_lepton);
0018
0019
0020 ~DVMPHelper() {}
0021
0022
0023 struct particle_reco{
0024 float eta;
0025 float phi;
0026 float ptotal;
0027 int charge;
0028 float e;
0029 bool is_scattered_lepton;
0030 };
0031
0032
0033 struct particle_truth{
0034 float eta;
0035 float phi;
0036 float ptotal;
0037 int pid;
0038 bool is_scattered_lepton;
0039 };
0040
0041
0042 std::vector<float> calculateInvariantMass_1();
0043
0044
0045 std::vector<float> calculateInvariantMass_2();
0046
0047
0048 std::vector<float> calculateInvariantMass_3();
0049
0050
0051 std::vector<float> calculateInvariantMass_4();
0052
0053
0054 std::vector<float> calculateInvariantMass_5();
0055
0056
0057 std::vector<float> calculateInvariantMass_6();
0058
0059
0060
0061 int _size_reco;
0062 int _size_truth;
0063
0064
0065 DVMPHelper::particle_reco * rparticles;
0066 DVMPHelper::particle_truth * tparticles;
0067
0068
0069 particle_reco GetParticleReco(float eta, float phi, float ptotal, int charge, float e,bool is_scattered_lepton);
0070
0071
0072 particle_truth GetParticleTruth(float eta, float phi, float ptotal, int pid, bool is_scattered_lepton);
0073
0074
0075 float get_invariant_mass(DVMPHelper::particle_reco, DVMPHelper::particle_reco);
0076
0077
0078 float get_invariant_mass(DVMPHelper::particle_truth, DVMPHelper::particle_truth);
0079
0080
0081 float get_pt(float eta, float ptotal);
0082
0083
0084 bool find_positron();
0085
0086
0087 bool pass_cut(int index);
0088
0089 private:
0090
0091
0092 };
0093
0094 #endif