tau_reweight_lib.h
00001 #ifndef _TAU_REWEIGHT_LIB_H_
00002 #define _TAU_REWEIGHT_LIB_H_
00003
00004
00005 #ifdef DEBUG_MODE
00006 #define DEBUG(arg) arg;
00007 #else
00008 #define DEBUG(arg)
00009 #endif
00010
00011
00012 #include "Tauola/Tauola.h"
00013
00014 #include "TauSpinner/Tauola_wrapper.h"
00015 #include "TauSpinner/SimpleParticle.h"
00016 #include "TauSpinner/Particle.h"
00017
00018
00019 #include "LHAPDF/LHAPDF.h"
00020
00021 #include <vector>
00022 #include <iostream>
00023 using std::vector;
00024 using std::cout;
00025 using std::endl;
00026
00027 namespace TauSpinner {
00028
00029
00030 extern "C" double disth_(double *SVAR, double *COSTHE, int *TA, int *TB);
00031
00032
00033
00034
00035 void initialize_spinner(bool _Ipp, int _Ipol, int _nonSM2, int _nonSMN, double _CMSENE);
00036
00037
00038
00039 void setRelWTnonSM(int _relWTnonSM);
00040
00041
00042 void setHiggsParameters(int jak, double mass, double width, double normalization);
00043
00044
00045 void getHiggsParameters(double *mass, double *width, double *normalization);
00046
00047
00048 void setSpinOfSample(bool _Ipol);
00049
00050
00051 void setNonSMkey(int key);
00052
00053
00054 double getWtNonSM();
00055
00056
00057 double getWtamplitP();
00058
00059
00060 double getWtamplitM();
00061
00062
00063
00064
00065 double getTauSpin();
00066
00067
00068
00069
00070
00071 double calculateWeightFromParticlesWorHpn(SimpleParticle &W, SimpleParticle &tau, SimpleParticle &nu_tau, vector<SimpleParticle> &tau_daughters);
00072
00073
00074
00075
00076
00077 double calculateWeightFromParticlesH(SimpleParticle &sp_X, SimpleParticle &sp_tau1, SimpleParticle &sp_tau2, vector<SimpleParticle> &sp_tau1_daughters, vector<SimpleParticle> &sp_tau2_daughters);
00078
00079
00080
00081
00082
00083 void prepareKinematicForHH(Particle &tau, Particle &nu_tau, vector<Particle> &tau_daughters, double *phi2, double *theta2);
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093 double* calculateHH(int tau_pdgid, vector<Particle> &tau_daughters, double phi, double theta);
00094
00095
00096
00097
00098
00099
00100 double getLongitudinalPolarization(double S, SimpleParticle &sp_tau, SimpleParticle &sp_nu_tau);
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110 bool channelMatch(vector<Particle> &particles, int p1, int p2=0, int p3=0, int p4=0, int p5=0, int p6=0);
00111
00112
00113
00114
00115
00116
00117
00118
00119 void print(Particle &W, Particle &nu_tau, Particle &tau, vector<Particle> &tau_daughters);
00120
00121
00122 Particle *vector_sum(vector<Particle> &x);
00123
00124 }
00125 #endif