00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 #ifndef EVTCONEXC_HH
00069 #define EVTCONEXC_HH
00070
00071
00072 #include "EvtGenBase/EvtId.hh"
00073 #include "EvtGenBase/EvtDecayIncoherent.hh"
00074 #include "EvtGenModels/EvtXsection.hh"
00075
00076 #include "TH1.h"
00077 #include "TH2.h"
00078 #include "TH3.h"
00079 #include "TFile.h"
00080 #include "TROOT.h"
00081 #include "TTree.h"
00082 #include "TGraphErrors.h"
00083 #include "TDirectory.h"
00084
00085 class EvtParticle;
00086
00087 class EvtConExc:public EvtDecayIncoherent {
00088
00089 public:
00090
00091 EvtConExc() {
00092 }
00093
00094 virtual ~EvtConExc();
00095
00096 void getName(std::string& name);
00097
00098 EvtDecayBase* clone();
00099
00100 void initProbMax();
00101
00102 void init();
00103 void init_Br_ee();
00104
00105 void decay(EvtParticle *p);
00106 void init_mode(int mode);
00107 double gamHXSection(EvtParticle* p, double El, double Eh, int nmc=100000);
00108 double gamHXSection(double s, double El, double Eh, int nmc=100000);
00109 double gamHXSection(double El, double Eh);
00110 double gamHXSection(double El, double Eh,int mode);
00111 double gamHXSection_er(double El,double Eh);
00112
00113 void findMaxXS(EvtParticle *p);
00114 double difgamXs(EvtParticle* p);
00115 double difgamXs(double mhds,double sintheta);
00116 double Mhad_sampling(double *x,double *y);
00117 double ISR_ang_integrate(double x,double theta);
00118 double ISR_ang_sampling(double x);
00119 bool hadron_angle_sampling(EvtVector4R ppi, EvtVector4R pcm);
00120 void SetP4(EvtParticle *part, double mhdr,double xeng, double theta);
00121 void SetP4Rvalue(EvtParticle *part, double mhdr,double xeng, double theta);
00122 bool gam_sampling(EvtParticle *p);
00123 bool xs_sampling(double xs);
00124 bool xs_sampling(double xs,double xs1);
00125 bool baryon_sampling(EvtVector4R pcm, EvtVector4R pi);
00126 bool meson_sampling(EvtVector4R pcm, EvtVector4R pi);
00127 bool VP_sampling(EvtVector4R pcm, EvtVector4R pi);
00128 bool angularSampling(EvtParticle* part);
00129 bool photonSampling(EvtParticle* part);
00130 double baryonAng(double mx);
00131 double Rad1(double s, double x);
00132 double Rad2(double s, double x);
00133 double Rad2difXs(EvtParticle *p);
00134 double Rad2difXs(double s, double x);
00135 double Rad1difXs(EvtParticle *p);
00136 double Ros_xs(double mx, double bree,EvtId pid);
00137 static EvtXsection *myxsection;
00138 static double _cms;
00139 static double XS_max;
00140 static double SetMthr;
00141
00142 static int getMode;
00143 double Li2(double x);
00144 double SoftPhoton_xs(double s,double b);
00145 double lgr(double *x,double *y,int n,double t);
00146 bool islgr(double *x,double *y,int n,double t);
00147 double LLr(double *x,double *y,int n,double t);
00148 int selectMode(std::vector<int> vmod, double mhds);
00149 void findMaxXS(double mhds );
00150 bool gam_sampling(double mhds,double sintheta);
00151 void resetResMass();
00152 void getResMass();
00153 bool checkdecay(EvtParticle* p);
00154 double sumExc(double mx);
00155 void showResMass();
00156 int getNdaugs(){return _ndaugs;}
00157 EvtId* getDaugId(){return daugs;}
00158 int getSelectedMode(){return _selectedMode;}
00159 static int conexcmode;
00160 double narrowRXS(double mxL,double mxH);
00161 double selectMass();
00162 double addNarrowRXS(double mhi, double binwidth);
00163 void ReadVP();
00164 double getVP(double cms);
00165 void mk_VXS(double Esig,double Egamcut,double EgamH,int midx);
00166 int get_mode_index(int mode);
00167 double getObsXsection(double mhds,int mode);
00168 double Egam2Mhds(double Egam);
00169 std::vector<EvtId> get_mode(int mode);
00170 void writeDecayTabel();
00171 void checkEvtRatio();
00172 int getModeIndex(int m);
00173 private:
00174
00175 int _mode,_ndaugs,radflag,testflag;
00176 EvtId daugs[10],gamId;
00177 static double _xs0,_xs1;
00178 static double _er0,_er1;
00179 static int _nevt;
00180 std::vector<double> ISRXS,ISRM;
00181 std::vector<bool> ISRFLAG;
00182 EvtParticle* gamH;
00183 double maxXS;
00184 double differ,differ2,Rad2Xs;
00185 std::string _unit;
00186 std::vector<double> BR_ee;
00187 std::vector<EvtId > ResId,ISRID;
00188
00189 double Egamcut;
00190
00191 TFile *myfile;
00192 Double_t pgam[4],phds[4],ph1[4],ph2[4],mhds,sumxs;
00193 Double_t mass1,mass2,costheta,selectmode;
00194 Double_t cosp,cosk;
00195 Int_t imode;
00196 TTree *xs;
00197 bool mydbg;
00198 TGraphErrors *mygr;
00199 TH1F* myth,*Xobs,*Xsum;
00200
00201 int pdgcode;
00202 std::string file;
00203 EvtId son[10],pid;
00204 int nson;
00205 double vph;
00206 double AF[600],AA[600],MH[600],RadXS[600],EgamH;
00207
00208 double mjsi,mpsip,mpsipp,mphi,momega,mrho0,mrho3s,momega2s;
00209 double wjsi,wpsip,wpsipp,wphi,womega,wrho0,wrho3s,womega2s;
00210 double _mhdL;
00211 double cmsspread;
00212 int _selectedMode;
00213 std::vector<int> _modeFlag;
00214 bool VISR;
00215 std::vector<int > vmode;
00216 static std::vector<std::vector <double> > VXS;
00217 std::vector<double> vpx,vpr,vpi;
00218 double Mthr;
00219 EvtParticle *theparent;
00220 };
00221
00222 #endif
00223