CMS 3D CMS Logo

CrossSection.h
Go to the documentation of this file.
1 //-*-C++-*-
2 //-*-CrossSection.h-*-
3 // Written by James Monk and Andrew Pilkington
5 
6 #ifndef CROSSSECTION_HH
7 #define CROSSSECTION_HH
8 
9 #include <cmath>
10 #include <complex>
11 #include <cstdlib>
12 #include <iostream>
13 #include <map>
14 #include <string>
15 #include <utility>
16 #include <vector>
17 
18 //#include "CLHEP/config/CLHEP.h"
19 #include "CLHEP/Vector/LorentzVector.h"
20 #include "CLHEP/Vector/ThreeVector.h"
21 
23 //#include "GeneratorInterface/ExhumeInterface/interface/PythiaRecord.h"
25 
27 
28 //#include "CLHEP/HepMC/include/PythiaWrapper6_2.h"
29 //#include "CLHEP/HepMC/ConvertHEPEVT.h"
30 //#include "CLHEP/HepMC/CBhepevt.h"
31 
32 namespace CLHEP {
33  class HepRandomEngine;
34 }
35 
37 namespace Exhume {
38 
39  typedef std::pair<double, double> fEntry;
40  typedef std::pair<const char *, char *> PCharPair;
41  typedef std::pair<const char *, const void *> PConstVoidPair;
42 
43  class CrossSection {
44  public:
46  virtual ~CrossSection();
47  virtual void MaximiseSubParameters() = 0;
48  virtual void SetPartons() = 0;
49  virtual void SetSubParameters() = 0;
50  virtual double SubParameterRange() = 0;
51  virtual double SubParameterWeight() = 0;
52 
53  double AlphaS(const double &);
54 
55  inline void SetRandomEngine(CLHEP::HepRandomEngine *engine) { randomEngine = engine; }
56 
57  inline double GetRg(const double &x_, const double &Qt) { return (Rg_(x_, Qt)); };
58 
59  //.....
60  inline double Differential() {
61  if (x1 > 1.0 || x2 > 1.0) {
62  return (0.0);
63  }
64 
65  //return( SubProcess() );
66 
67  //Factor of 2/sqrt(sHat) because we integrate dM not dln(M^2)
68  return (2.0 * InvSqrtsHat * Lumi() * SubProcess() * exp(B * (t1 + t2)));
69  };
70  //.....
71 
72  inline double GetB() { return (B); };
73 
74  inline double GetRoot_s() { return (root_s); };
75 
76  inline std::map<double, double> Getfg2Map() { return (fg2Map); };
77 
78  inline CLHEP::HepLorentzVector GetProton1() { return (Proton1); };
79 
80  inline CLHEP::HepLorentzVector GetProton2() { return (Proton2); };
81 
82  inline std::vector<Particle> GetPartons() { return (Partons); };
83 
84  inline double Getx1() { return (x1); };
85 
86  inline double Getx2() { return (x2); };
87 
88  inline double Gett1() { return (t1); };
89 
90  inline double Gett2() { return (t2); };
91 
92  inline double GetsHat() { return (sHat); };
93 
94  inline double GetSqrtsHat() { return (SqrtsHat); };
95 
96  inline double GetEta() { return (y); };
97 
98  inline double GetPhi1() { return (Phi1); };
99 
100  inline double GetPhi2() { return (Phi2); };
101 
102  void Hadronise();
103  void SetKinematics(const double &, const double &, const double &, const double &, const double &, const double &);
104 
105  inline std::string GetName() { return (Name); };
106 
107  private:
108  void AlphaSInit();
109 
110  double Fg1Fg2(const double &, const double &, const double &);
111  double Fg1Fg2(const int &, const double &, const double &);
112 
113  inline double Fg_Qt2(const double &Qt2_, const double &x_, const double &xp_) {
114  double grad = 5.0 * (Txg(1.1 * Qt2_, x_) - Txg(0.9 * Qt2_, x_)) / Qt2_;
115 
116  //protect from Qt2 == 0
117 
118  if (grad != grad) {
119  return (0.0);
120  }
121  return (grad);
122  };
123 
124  template <typename T_>
125  inline void insert(const std::string _name_, const T_ _x_) {
126  PMap.insert(std::pair<std::string, PConstVoidPair>(_name_, PConstVoidPair(typeid(_x_).name(), _x_)));
127  }
128 
129  virtual double SubProcess() = 0;
130 
131  void LumiInit();
132  double Lumi();
133  double Lumi_();
134  void NoMem();
135  void ReadCard(const std::string &);
136  double Splitting(const double &);
137  double T(const double &);
138  double TFast(const double &);
139 
141  std::map<double, std::map<double, double> > TMap2d;
142  std::map<double, std::map<double, double> >::iterator TMjuHigh, TMjuLow;
143 
144  double Txg(const double &, const double &);
145 
146  double Rg1Rg2(const double &);
147  double Rg_(const double &, double);
148 
149  std::map<double, std::map<double, double> > RgMap2d;
150  std::map<double, std::map<double, double> >::iterator RgHigh[2], RgLow[2];
152 
154 
155  double PDF;
156 
157  double ASFreeze, ASConst;
158  //.............................
159  //Used for Lumi function:
160 
162  unsigned int LumAccuracy, LumNStart;
165  double LumConst;
167 
168  std::map<std::string, PConstVoidPair> PMap;
169  std::map<const char *, char *> TypeMap;
170  std::map<double, double> fg2Map;
171 
172  //...............................
173  //Used for T:
174  double TConst;
175  int Tn, Tn_1;
176  double *TFunc;
177 
178  //...............................
179  //Used for Splitting:
180  double Inv3;
181 
183 
184  protected:
186 
187  std::complex<double> F0(const double &);
188  std::complex<double> f(const double &);
189  std::complex<double> Fsf(const double &);
190 
191  //PPhi is azimuthal angle between protons.
192  //InvSqrtsHat = 1/sHat
193  //Others are obvious.
195  Mju, LnMju2, Pt1, Pt2, Pt1DotPt2, x1x2, ey;
196 
198 
200 
201  double MuonMass, TauMass;
202 
204 
206  double root_s, s, Invs;
207 
208  CLHEP::HepLorentzVector CentralVector;
209  CLHEP::HepLorentzVector Proton1, Proton2, P1In, P2In;
210  /*
211  struct Particle {
212  CLHEP::HepLorentzVector p;
213  int id;
214  };
215  */
216 
217  std::vector<Particle> Partons;
219 
220  double Gev2fb;
221 
223 
224  CLHEP::HepRandomEngine *randomEngine;
225  };
226 } // namespace Exhume
227 
228 #endif
229 
Exhume::CrossSection::LumNStart
unsigned int LumNStart
Definition: CrossSection.h:162
Exhume::CrossSection::AlphaS
double AlphaS(const double &)
Exhume::CrossSection::Rg_
double Rg_(const double &, double)
Exhume::CrossSection::Hadronise
void Hadronise()
Exhume::CrossSection::y
double y
Definition: CrossSection.h:194
Particle.h
Exhume::CrossSection::InvSqrtsHat
double InvSqrtsHat
Definition: CrossSection.h:194
Exhume::CrossSection::F0
std::complex< double > F0(const double &)
Exhume::CrossSection::AlphaEw
double AlphaEw
Definition: CrossSection.h:197
Exhume::CrossSection::SubProcess
virtual double SubProcess()=0
Exhume::CrossSection::x1p
double x1p
Definition: CrossSection.h:194
Exhume::CrossSection::Differential
double Differential()
Definition: CrossSection.h:60
Exhume::CrossSection::Name
std::string Name
Definition: CrossSection.h:185
Exhume::CrossSection::SqrtsHat
double SqrtsHat
Definition: CrossSection.h:194
Exhume::CrossSection::GetB
double GetB()
Definition: CrossSection.h:72
Exhume::CrossSection::MidQt2
double MidQt2
Definition: CrossSection.h:161
Exhume::CrossSection::Rg1Rg2
double Rg1Rg2(const double &)
Exhume::PCharPair
std::pair< const char *, char * > PCharPair
Definition: CrossSection.h:40
Exhume::fEntry
std::pair< double, double > fEntry
Definition: CrossSection.h:39
Exhume::CrossSection::Fg1Fg2
double Fg1Fg2(const double &, const double &, const double &)
Exhume::CrossSection::Pt2
double Pt2
Definition: CrossSection.h:194
Exhume::CrossSection::Inv2PI
double Inv2PI
Definition: CrossSection.h:166
Exhume::CrossSection::LumiInit
void LumiInit()
Exhume::CrossSection::TMjuHigh
std::map< double, std::map< double, double > >::iterator TMjuHigh
Definition: CrossSection.h:142
Exhume::CrossSection::_AlphaS
double * _AlphaS
Definition: CrossSection.h:164
Exhume::CrossSection::Splitting
double Splitting(const double &)
Exhume::CrossSection::ASFreeze
double ASFreeze
Definition: CrossSection.h:157
Exhume::CrossSection::Cf_2PIRg
double Cf_2PIRg
Definition: CrossSection.h:166
Exhume::CrossSection::lhapdfSetPath_
std::string lhapdfSetPath_
Definition: CrossSection.h:222
Exhume::CrossSection::MaximiseSubParameters
virtual void MaximiseSubParameters()=0
Exhume::CrossSection::SetRandomEngine
void SetRandomEngine(CLHEP::HepRandomEngine *engine)
Definition: CrossSection.h:55
Exhume::CrossSection::RgMap2d
std::map< double, std::map< double, double > > RgMap2d
Definition: CrossSection.h:149
Exhume::CrossSection::Nc_2PI
double Nc_2PI
Definition: CrossSection.h:166
Exhume::CrossSection::Getx2
double Getx2()
Definition: CrossSection.h:86
Exhume::CrossSection::Lumi
double Lumi()
Exhume::CrossSection::AlphaSInit
void AlphaSInit()
Exhume::CrossSection::_NcAs_2PI
double * _NcAs_2PI
Definition: CrossSection.h:164
Exhume::CrossSection::GetSqrtsHat
double GetSqrtsHat()
Definition: CrossSection.h:94
Exhume::CrossSection::GetProton2
CLHEP::HepLorentzVector GetProton2()
Definition: CrossSection.h:80
Exhume::CrossSection::sHat
double sHat
Definition: CrossSection.h:194
Exhume::CrossSection::TauMass
double TauMass
Definition: CrossSection.h:201
Exhume::CrossSection::fg2Map
std::map< double, double > fg2Map
Definition: CrossSection.h:170
Exhume::CrossSection::RgHigh
std::map< double, std::map< double, double > >::iterator RgHigh[2]
Definition: CrossSection.h:150
Exhume::CrossSection::InvsHat2
double InvsHat2
Definition: CrossSection.h:194
Exhume::CrossSection::Partons
std::vector< Particle > Partons
Definition: CrossSection.h:217
Exhume::CrossSection::Fsf
std::complex< double > Fsf(const double &)
Exhume::CrossSection::Proton1Id
int Proton1Id
Definition: CrossSection.h:182
Exhume::CrossSection::ReadCard
void ReadCard(const std::string &)
Exhume::CrossSection::MinQt2
double MinQt2
Definition: CrossSection.h:161
Exhume::CrossSection::LumAccuracy
unsigned int LumAccuracy
Definition: CrossSection.h:162
Exhume::CrossSection::GetPartons
std::vector< Particle > GetPartons()
Definition: CrossSection.h:82
Exhume::CrossSection::GetPhi1
double GetPhi1()
Definition: CrossSection.h:98
Exhume::CrossSection::Gev2fb
double Gev2fb
Definition: CrossSection.h:220
Exhume
Definition: CrossSection.h:37
Exhume::CrossSection::_KtHigh
double * _KtHigh
Definition: CrossSection.h:164
Exhume::CrossSection::InvV1MinusV2
double InvV1MinusV2
Definition: CrossSection.h:218
Exhume::CrossSection::SetKinematics
void SetKinematics(const double &, const double &, const double &, const double &, const double &, const double &)
Exhume::CrossSection::MuonMass
double MuonMass
Definition: CrossSection.h:201
Exhume::CrossSection::CharmMass
double CharmMass
Definition: CrossSection.h:199
Exhume::PConstVoidPair
std::pair< const char *, const void * > PConstVoidPair
Definition: CrossSection.h:41
Exhume::CrossSection::t2
double t2
Definition: CrossSection.h:194
Exhume::CrossSection::TBegin
bool TBegin
Definition: CrossSection.h:140
Exhume::CrossSection::BottomMass
double BottomMass
Definition: CrossSection.h:199
Exhume::CrossSection::T
double T(const double &)
Exhume::CrossSection::Pt1DotPt2
double Pt1DotPt2
Definition: CrossSection.h:194
Exhume::CrossSection::TFast
double TFast(const double &)
Exhume::CrossSection::TFunc
double * TFunc
Definition: CrossSection.h:176
Exhume::CrossSection::ey
double ey
Definition: CrossSection.h:194
Exhume::CrossSection::Mju
double Mju
Definition: CrossSection.h:194
Exhume::CrossSection::HiggsVev
double HiggsVev
Definition: CrossSection.h:197
Exhume::CrossSection::Proton2Id
int Proton2Id
Definition: CrossSection.h:182
Exhume::CrossSection::TopMass
double TopMass
Definition: CrossSection.h:199
Exhume::CrossSection::sHat2
double sHat2
Definition: CrossSection.h:194
Exhume::CrossSection::Inv3
double Inv3
Definition: CrossSection.h:180
Exhume::CrossSection::Proton2
CLHEP::HepLorentzVector Proton2
Definition: CrossSection.h:209
Exhume::CrossSection::TConst
double TConst
Definition: CrossSection.h:174
Exhume::CrossSection::_CfAs_2PIRg
double * _CfAs_2PIRg
Definition: CrossSection.h:164
Exhume::CrossSection::Lumi_
double Lumi_()
Exhume::CrossSection::root_s
double root_s
Definition: CrossSection.h:206
CLHEP
Definition: CocoaGlobals.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Exhume::CrossSection::GetPhi2
double GetPhi2()
Definition: CrossSection.h:100
Exhume::CrossSection::LumSimpsFunc
double * LumSimpsFunc
Definition: CrossSection.h:164
Exhume::CrossSection::Invsx1x2
double Invsx1x2
Definition: CrossSection.h:218
Exhume::CrossSection::SubParameterWeight
virtual double SubParameterWeight()=0
Exhume::CrossSection::x2p
double x2p
Definition: CrossSection.h:194
edm::ParameterSet
Definition: ParameterSet.h:36
Exhume::CrossSection::_Qt
double * _Qt
Definition: CrossSection.h:164
I.h
Exhume::CrossSection::SetSubParameters
virtual void SetSubParameters()=0
Exhume::CrossSection::Fg_Qt2
double Fg_Qt2(const double &Qt2_, const double &x_, const double &xp_)
Definition: CrossSection.h:113
Exhume::CrossSection::TypeMap
std::map< const char *, char * > TypeMap
Definition: CrossSection.h:169
Exhume::CrossSection::GetEta
double GetEta()
Definition: CrossSection.h:96
Exhume::CrossSection::PMap
std::map< std::string, PConstVoidPair > PMap
Definition: CrossSection.h:168
Exhume::CrossSection::LumNSimps
int LumNSimps
Definition: CrossSection.h:163
Exhume::CrossSection
Definition: CrossSection.h:43
Exhume::CrossSection::NoMem
void NoMem()
Exhume::CrossSection::StrangeMass
double StrangeMass
Definition: CrossSection.h:199
Exhume::CrossSection::Freeze
double Freeze
Definition: CrossSection.h:153
Exhume::CrossSection::LnMju2
double LnMju2
Definition: CrossSection.h:194
Exhume::CrossSection::TInterpolate
bool TInterpolate
Definition: CrossSection.h:140
Exhume::CrossSection::s
double s
Definition: CrossSection.h:206
Exhume::CrossSection::Phi2
double Phi2
Definition: CrossSection.h:194
Exhume::CrossSection::TMjuLow
std::map< double, std::map< double, double > >::iterator TMjuLow
Definition: CrossSection.h:142
Exhume::CrossSection::gw
double gw
Definition: CrossSection.h:197
Exhume::CrossSection::LumConst
double LumConst
Definition: CrossSection.h:165
Exhume::CrossSection::Txg
double Txg(const double &, const double &)
Exhume::CrossSection::LumNSimps_1
int LumNSimps_1
Definition: CrossSection.h:163
Exhume::CrossSection::SetPartons
virtual void SetPartons()=0
Exhume::CrossSection::Phi1
double Phi1
Definition: CrossSection.h:194
Exhume::CrossSection::~CrossSection
virtual ~CrossSection()
Exhume::CrossSection::Gett2
double Gett2()
Definition: CrossSection.h:90
Exhume::CrossSection::x1
double x1
Definition: CrossSection.h:194
Exhume::CrossSection::GetRoot_s
double GetRoot_s()
Definition: CrossSection.h:74
Exhume::CrossSection::randomEngine
CLHEP::HepRandomEngine * randomEngine
Definition: CrossSection.h:224
Exhume::CrossSection::P1In
CLHEP::HepLorentzVector P1In
Definition: CrossSection.h:209
Exhume::CrossSection::Survive
double Survive
Definition: CrossSection.h:153
Exhume::CrossSection::GetName
std::string GetName()
Definition: CrossSection.h:105
Exhume::CrossSection::Tn
int Tn
Definition: CrossSection.h:175
Exhume::CrossSection::insert
void insert(const std::string _name_, const T_ _x_)
Definition: CrossSection.h:125
Exhume::CrossSection::B
double B
Definition: CrossSection.h:153
Exhume::CrossSection::PPhi
double PPhi
Definition: CrossSection.h:194
Exhume::CrossSection::GetsHat
double GetsHat()
Definition: CrossSection.h:92
Exhume::CrossSection::Gett1
double Gett1()
Definition: CrossSection.h:88
Exhume::CrossSection::Rg
double Rg
Definition: CrossSection.h:153
Exhume::CrossSection::GetProton1
CLHEP::HepLorentzVector GetProton1()
Definition: CrossSection.h:78
Exhume::CrossSection::f
std::complex< double > f(const double &)
Exhume::CrossSection::RgBegin
bool RgBegin
Definition: CrossSection.h:151
Exhume::CrossSection::ZMass
double ZMass
Definition: CrossSection.h:203
Exhume::CrossSection::HiggsMass
double HiggsMass
Definition: CrossSection.h:203
Exhume::CrossSection::FNAL_or_LHC
int FNAL_or_LHC
Definition: CrossSection.h:205
Exhume::CrossSection::RgInterpolate
bool RgInterpolate[2]
Definition: CrossSection.h:151
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
Exhume::CrossSection::Tn_1
int Tn_1
Definition: CrossSection.h:175
Exhume::CrossSection::WMass
double WMass
Definition: CrossSection.h:203
Exhume::CrossSection::t1
double t1
Definition: CrossSection.h:194
Exhume::CrossSection::Getfg2Map
std::map< double, double > Getfg2Map()
Definition: CrossSection.h:76
Exhume::CrossSection::LambdaW
double LambdaW
Definition: CrossSection.h:197
Exhume::CrossSection::Invs
double Invs
Definition: CrossSection.h:206
ParameterSet.h
Exhume::CrossSection::_Qt2
double * _Qt2
Definition: CrossSection.h:164
Exhume::CrossSection::ASConst
double ASConst
Definition: CrossSection.h:157
Exhume::CrossSection::Getx1
double Getx1()
Definition: CrossSection.h:84
Exhume::CrossSection::GetRg
double GetRg(const double &x_, const double &Qt)
Definition: CrossSection.h:57
Exhume::CrossSection::Mju2
double Mju2
Definition: CrossSection.h:194
Exhume::CrossSection::SubParameterRange
virtual double SubParameterRange()=0
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
Exhume::CrossSection::LambdaQCD
double LambdaQCD
Definition: CrossSection.h:153
Exhume::CrossSection::RgLow
std::map< double, std::map< double, double > >::iterator RgLow[2]
Definition: CrossSection.h:150
Exhume::CrossSection::x1x2
double x1x2
Definition: CrossSection.h:194
Exhume::CrossSection::P2In
CLHEP::HepLorentzVector P2In
Definition: CrossSection.h:209
Exhume::CrossSection::Pt1
double Pt1
Definition: CrossSection.h:194
Exhume::CrossSection::InvMidQt2
double InvMidQt2
Definition: CrossSection.h:161
Exhume::CrossSection::InvMidQt4
double InvMidQt4
Definition: CrossSection.h:161
Exhume::CrossSection::InvMaxQt2
double InvMaxQt2
Definition: CrossSection.h:161
Exhume::CrossSection::PDF
double PDF
Definition: CrossSection.h:155
Exhume::CrossSection::TMap2d
std::map< double, std::map< double, double > > TMap2d
Definition: CrossSection.h:141
Exhume::CrossSection::LumSimpsIncr
double LumSimpsIncr
Definition: CrossSection.h:161
Exhume::CrossSection::CrossSection
CrossSection(const edm::ParameterSet &)
Exhume::CrossSection::Proton1
CLHEP::HepLorentzVector Proton1
Definition: CrossSection.h:209
Exhume::CrossSection::InvsHat
double InvsHat
Definition: CrossSection.h:194
Exhume::CrossSection::CentralVector
CLHEP::HepLorentzVector CentralVector
Definition: CrossSection.h:208
Exhume::CrossSection::_KtLow
double * _KtLow
Definition: CrossSection.h:164
Exhume::CrossSection::x2
double x2
Definition: CrossSection.h:194