fast pQCD calculations for hadron-induced processes
fastNLOCoeffBase.h
1 #ifndef __fastNLOCoeffBase__
2 #define __fastNLOCoeffBase__
3 
4 #include <string>
5 #include <fstream>
6 #include <sstream>
7 #include <math.h>
8 #include <vector>
9 #include <iostream>
10 
11 #include "fastNLOConstants.h"
12 #include "speaker.h"
13 
14 
16 
17  friend class fastNLOTable;
18 
19 public:
20  fastNLOCoeffBase() = delete;
21  fastNLOCoeffBase(int NObsBin);
22  // deletes instance of derived classes through pointer to base class
23  virtual ~fastNLOCoeffBase(){};
24  virtual fastNLOCoeffBase* Clone() const;
25 
26  virtual void Read(std::istream& table);
27  virtual void Write(std::ostream& table, int ITabVersionWrite);
28  virtual void Print(int iprint) const;
29 
30  // Erase or multiply observable bin; iObsIdx is the C++ array index to be removed and
31  // not the observable bin no. running from 1 to fNObsBins
32  virtual void EraseBin(unsigned int iObsIdx);
33  virtual void MultiplyBin(unsigned int iObsIdx, double fact);
34  // Catenate observable to table
35  virtual void CatBin(const fastNLOCoeffBase& other, unsigned int iObsIdx);
36 
37  bool IsCatenable(const fastNLOCoeffBase& other) const;
38 
39  void SetCoeffAddDefaults();
40 
41  int GetIDataFlag() const {return IDataFlag;}
42  void SetIDataFlag(int n){IDataFlag = n;}
43 
44  int GetIAddMultFlag() const {return IAddMultFlag;}
45  void SetIAddMultFlag(int n){IAddMultFlag = n;}
46 
47  int GetIContrFlag1() const {return IContrFlag1;}
48  void SetIContrFlag1(int n){IContrFlag1 = n;}
49 
50  int GetIContrFlag2() const {return IContrFlag2;}
51  void SetIContrFlag2(int n){IContrFlag2 = n;}
52 
53  int GetNScaleDep() const {return NScaleDep;}
54  void SetNScaleDep(int n){NScaleDep = n;}
55 
56  int GetIXsectUnits() const { return IXsectUnits;}
57  void SetIXsectUnits(int n){IXsectUnits = n;}
58 
59  int GetNObsBin() const { return fNObsBins;}
60  void SetNObsBin(unsigned int nObs) { fNObsBins = nObs;}
61 
62  bool GetIsFlexibleScale() const { return (NScaleDep>=3) && (IAddMultFlag==0); }
63 
64  std::vector<std::string > GetContributionDescription() const { return CtrbDescript; }
65  void SetContributionDescription(std::vector<std::string > descr ) { CtrbDescript = descr; };
66  std::vector<std::string > GetCodeDescription() const { return CodeDescript; }
67 
68  bool IsLO() const {return IContrFlag1==1 && IContrFlag2==1;}
69  bool IsNLO() const {return IContrFlag1==1 && IContrFlag2==2;}
70  bool IsNNLO() const {return IContrFlag1==1 && IContrFlag2==3;}
71  bool IsCompatible(const fastNLOCoeffBase& other) const;
72 
73 
74 
75 protected:
76  void ReadBase(std::istream& table);
77  void EndReadCoeff(std::istream& table);
78 
79  int fNObsBins; // obtained from Scenario
80 
81  int IXsectUnits;
82  int IDataFlag;
83  int IAddMultFlag;
84  int IContrFlag1;
85  int IContrFlag2;
86  int NScaleDep;
87  int fVersionRead = 23000;
88  std::vector < std::string > CtrbDescript;
89  std::vector < std::string > CodeDescript;
90 
91 };
92 
93 
94 #endif
std::vector< std::string > GetCodeDescription() const
Set contribution description.
Definition: fastNLOCoeffBase.h:66
virtual ~fastNLOCoeffBase()
Use this constructor.
Definition: fastNLOCoeffBase.h:23
Definition: speaker.h:96
Definition: fastNLOCoeffBase.h:15
virtual fastNLOCoeffBase * Clone() const
destructor
Definition: fastNLOCoeffBase.cc:19
Definition: fastNLOTable.h:20
unsigned int GetNObsBin() const
get/set no. of observable bins
Definition: fastNLOTable.h:173