00001
00002
00003
00004
00005 #ifndef MyToolsH
00006 #define MyToolsH
00007
00008
00009
00010
00011
00020
00021
00022
00023
00024
00025
00026 #include <iostream>
00027
00028
00029
00030 #include <vector>
00031
00032
00033 #include "TLorentzVector.h"
00034
00035
00036 #include "MyParticle.h"
00037 #include "MyTauJet.h"
00038 #include "MyParticleJet.h"
00039
00040 class MyTools {
00041
00042 public:
00043
00044 MyTools(void) {
00045 init();
00046 }
00048
00049 ~MyTools(void) {
00050 destruct();
00051 }
00053
00054
00055
00056
00057 double change_btag_weight(double current_btag_weight, double delta_weight=0);
00058
00059
00060 void scale_b_tags( std::vector<MyParticle*> * jets, int flavour, double delta_bweight=0);
00061
00062
00063 double tauRec_ETcorr(double et_in, double eta_in, int ntrk);
00064
00065
00066
00067
00068
00069 std::vector<MyParticle*> correct_tau_et( std::vector<MyParticle*> tau_vector);
00070
00071
00072
00073 MyParticle* find_matching_particle( MyParticle* particle,
00074 std::vector<MyParticle*> & particle_vector,
00075 double deltaR_cut = 0.1,
00076 bool bool_matchingflag = true,
00077 bool bool_usematching = true);
00083 MyParticle* find_matching_particle( TLorentzVector particle_tlv,
00084 std::vector<MyParticle*> & particle_vector,
00085 double deltaR_cut = 0.1,
00086 bool bool_matchingflag = true,
00087 bool bool_usematching = true);
00088
00089 Int_t nb_multiple_matches(void);
00091
00092 void clear_nb_multiple_matches(void);
00094
00095 void clear_vector(std::vector<MyParticle*> & particle_vector);
00097
00098
00099
00100
00101 std::vector<MyParticle*>
00102 remove_overlap( std::vector<MyParticle*> vec_part_tb_rm,
00103 std::vector<MyParticle*> vec_part_rm_with,
00104 double deltaR_cut);
00108
00109
00110 std::vector<MyParticle*>
00111 delete_doubles(std::vector<MyParticle*> p_vector, double delta_r = 0.1);
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123 std::vector<MyParticle*>
00124 sort_particles(std::vector<MyParticle*> p_vector);
00127
00128 void check_order(std::vector<MyParticle*> p_vector);
00132
00133 std::vector<MyParticle*> append_vector(std::vector<MyParticle*> first_vector,
00134 std::vector<MyParticle*> second_vector);
00136
00137
00138
00139
00140 std::vector<MyParticle*>
00141 pt_eta_cut( const std::vector<MyParticle*> p_vector,
00142 const double pt_min, const double pt_max,
00143 const double eta_min, const double eta_max);
00147
00148
00149
00150 std::vector<MyParticle*>
00151 et_eta_cut( const std::vector<MyParticle*> p_vector,
00152 const double et_min, const double et_max,
00153 const double eta_min, const double eta_max);
00157
00158 std::vector<MyParticle*>
00159 particles_from_vertex( const std::vector<MyParticle*> & p_vector,
00160 const int vertex);
00163
00164
00165
00166 static void PrintVector( std::vector<MyParticle*> p_vector,
00167 std::string option = "");
00169
00170 private:
00171
00172
00173
00174 Int_t m_nb_multiple_matches;
00175
00176 void init();
00177
00178
00179 void destruct(void);
00180
00181
00182 };
00183
00184 #endif