-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCrossSectionTable.h
60 lines (46 loc) · 1.73 KB
/
CrossSectionTable.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// -*- C++ -*-
/*
see .cxx file for some description
*/
#ifndef CROSSSECTIONTABLE_H
#define CROSSSECTIONTABLE_H
enum SUSYProcess {
ng = 0,
ns = 1,
nn = 2,
ll = 3,
sb = 4,
ss = 5,
tb = 6,
bb = 7,
gg = 8,
sg = 9,
NotFound = 10
};
#include <map>
#include <iostream>
#include <fstream>
#include <cassert>
#include "TString.h"
class CrossSectionTable {
public:
CrossSectionTable(const TString & inputFile, const TString & format="CMSSM" ,const TString & histoname="");
~CrossSectionTable();
void loadFileToDatabase(const TString & filename); //CMSSM
void loadFileToDatabaseSMS(const TString & filename); //SMS
void loadFileToDatabaseSMS_simple(const TString & filename); // simple 2 column [mass] [cross-section] format
void loadFileToDatabaseSMSRoot(const TString & filename,const TString & histoname); //SMS from root file
void loadFileToDatabasePMSSM(const TString & filename,const bool append); //pMSSM
void appendFileToDatabasePMSSM(const TString & filename) {loadFileToDatabasePMSSM(filename,true);}
//allow const-safe direct access to the database
std::map<SUSYProcess,double> operator[] (const std::pair<int,int> & scanpoint) const;
//for interactive ROOT
double getCrossSection(const int m0, const int m12, const SUSYProcess process) const;
double getSMSCrossSection(const int m0) const;
double getPMSSMCrossSection(const int pointindex) const {return getSMSCrossSection(pointindex);}
std::map<std::pair<int, int>, std::map<SUSYProcess, double> >::iterator begin() { return database_.begin();}
std::map<std::pair<int, int>, std::map<SUSYProcess, double> >::iterator end() { return database_.end();}
private:
std::map<std::pair<int, int>, std::map<SUSYProcess, double> > database_;
};
#endif