ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/TheLimits.cc
Revision: 1.4
Committed: Sat Nov 27 12:22:28 2010 UTC (14 years, 5 months ago) by auterman
Content type: text/plain
Branch: MAIN
Changes since 1.3: +92 -35 lines
Log Message:
restructurinf code

File Contents

# Content
1 #include "TheLimits.h"
2 #include "SusyScan.h"
3 #include "GeneratorMasses.h"
4
5 #include <fstream>
6 #include <iostream>
7 #include <cmath>
8
9
10 void TheLimits::match()
11 {
12 for (std::vector<SusyScan*>::iterator it=_scan.begin();it!=_scan.end();++it){
13 bool match = false;
14 for (std::vector<GeneratorMasses*>::const_iterator gt=_masses.begin();gt!=_masses.end();++gt){
15 if ((*it)->Mzero==(*gt)->Mzero &&
16 (*it)->Mhalf==(*gt)->Mhalf &&
17 (*it)->Azero==(*gt)->Azero &&
18 (*it)->TanBeta==(*gt)->TanBeta &&
19 (*it)->Mu==(*gt)->Mu ) {
20 (*it)->M1 = (*gt)->M1;
21 (*it)->M2 = (*gt)->M2;
22 (*it)->M3 = (*gt)->M3;
23 (*it)->MGL = (*gt)->MGL;
24 (*it)->MUL = (*gt)->MUL;
25 (*it)->MB1 = (*gt)->MB1;
26 (*it)->MSN = (*gt)->MSN;
27 (*it)->MNTAU = (*gt)->MNTAU;
28 (*it)->MZ1 = (*gt)->MZ1;
29 (*it)->MW1 = (*gt)->MW1;
30 (*it)->MHL = (*gt)->MHL;
31 (*it)->MUR = (*gt)->MUR;
32 (*it)->MB2 = (*gt)->MB2;
33 (*it)->MEL = (*gt)->MEL;
34 (*it)->MTAU1 = (*gt)->MTAU1;
35 (*it)->MZ2 = (*gt)->MZ2;
36 (*it)->MW2 = (*gt)->MW2;
37 (*it)->MHH = (*gt)->MHH;
38 (*it)->MDL = (*gt)->MDL;
39 (*it)->MT1 = (*gt)->MT1;
40 (*it)->MER = (*gt)->MER;
41 (*it)->MTAU2 = (*gt)->MTAU2;
42 (*it)->MZ3 = (*gt)->MZ3;
43 (*it)->MHA = (*gt)->MHA;
44 (*it)->MDR = (*gt)->MDR;
45 (*it)->MT2 = (*gt)->MT2;
46 (*it)->MZ4 = (*gt)->MZ4;
47 (*it)->MHp = (*gt)->MHp;
48 match = true;
49 }
50 }
51 //if (!match) std::cout << "No match for M0="<<(*it)->Mzero
52 // << ", M12="<<(*it)->Mhalf<<std::endl;
53 }
54 }
55
56 void TheLimits::FillGeneratorMasses(std::string file)
57 {
58 std::ifstream masses_file;
59 masses_file.open(file.c_str());
60 while (1) {
61 GeneratorMasses * p = new GeneratorMasses;
62 masses_file >> p->Mzero
63 >> p->Mhalf
64 >> p->TanBeta
65 >> p->Mu
66 >> p->Azero
67 >> p->Mtop
68 >> p->muQ
69 >> p->Q
70 >> p->M1
71 >> p->M2
72 >> p->M3
73 >> p->MGL
74 >> p->MUL
75 >> p->MB1
76 >> p->MSN
77 >> p->MNTAU
78 >> p->MZ1
79 >> p->MW1
80 >> p->MHL
81 >> p->MUR
82 >> p->MB2
83 >> p->MEL
84 >> p->MTAU1
85 >> p->MZ2
86 >> p->MW2
87 >> p->MHH
88 >> p->MDL
89 >> p->MT1
90 >> p->MER
91 >> p->MTAU2
92 >> p->MZ3
93 >> p->MHA
94 >> p->MDR
95 >> p->MT2
96 >> p->MZ4
97 >> p->MHp;
98
99 if (!masses_file.good()) break;
100 if (fabs(p->Mu)!=1.) {
101 std::cerr << "check lines near m0=" << p->Mzero << ", m1/2=" << p->Mhalf << std::endl;
102 break;
103 }
104 _masses.push_back( p );
105 }
106 }