CMS 3D CMS Logo

Event.h
Go to the documentation of this file.
1 //-*-c++-*-
2 //-*-Event.h-*-
3 // Written by James Monk and Andrew Pilkington
5 #ifndef EVENT_HH
6 #define EVENT_HH
7 
10 
11 namespace CLHEP {
12 class HepRandomEngine;
13 }
14 
15 namespace Exhume{
16 
17  class Event : public Weight{
18 
19  public:
20 
21  Event(CrossSection&, CLHEP::HepRandomEngine*);
22  ~Event() override;
23 
24  inline void SetRandomEngine(CLHEP::HepRandomEngine* engine){
25  randomEngine = engine;
26  Process->SetRandomEngine(engine);
27  }
28 
29  void Generate();
30  inline void Setx1Max(const double &xx_){
31  x1Max = xx_;
32  return;
33  };
34  inline void Setx2Max(const double &xx_){
35  x2Max = xx_;
36  return;
37  };
38  inline void Sett1Max(const double &xx_){
39  t1Max = xx_;
40  return;
41  };
42  inline void Sett2Max(const double &xx_){
43  t2Max = xx_;
44  return;
45  };
46  inline void Sett1Min(const double &xx_){
47  t1Min = xx_;
48  return;
49  };
50  inline void Sett2Min(const double &xx_){
51  t2Min = xx_;
52  return;
53  };
54  inline void SetMassRange(const double &Min_, const double &Max_){
55  MinMass = Min_;
56  MaxMass = Max_;
57  return;
58  };
59 
60  inline unsigned int GetLastSeed(){
61  return(rand());
62  };
63 
64  inline std::vector<std::pair<double, double> > GetVar(){
65  return(Var);
66  };
67 
68  void SetParameterSpace();
69 
70  double CrossSectionCalculation();
71 
72  inline double GetEfficiency(){
73  return(100.0 * NumberOfEvents / TotalAttempts);
74  };
75 
76  private:
77 
78  void SelectValues();
79  double WeightFunc(const double&) override;
80 
81  std::vector<std::pair<double, double> > Var;
82 
83  double CSi, CSMass, Sigmai, wgt, yRange;
84  double TwoPI, B, InvB, InvBlnB, Root_s, InvRoot_s;
85  double SqrtsHat, Eta, t1, t2, Phi1, Phi2, VonNeu;
86  double ymax, ymin;
88  unsigned int NumberOfEvents, TotalAttempts;
89 
90  double x1Max, x2Max, t1Min, t1Max, t2Min, t2Max, MinMass, MaxMass;
91  double tt1max, tt1min, tt2max, tt2min;
92 
93  CLHEP::HepRandomEngine* randomEngine;
94  };
95 
96 }
97 
98 #endif
CLHEP::HepRandomEngine * randomEngine
Definition: Dummies.cc:7
unsigned int TotalAttempts
Definition: Event.h:88
double x2Max
Definition: Event.h:90
CLHEP::HepRandomEngine * randomEngine
Definition: Event.h:93
unsigned int GetLastSeed()
Definition: Event.h:60
double TwoPI
Definition: Event.h:84
void Sett1Min(const double &xx_)
Definition: Event.h:46
void Setx1Max(const double &xx_)
Definition: Event.h:30
double GetEfficiency()
Definition: Event.h:72
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:20
void Sett1Max(const double &xx_)
Definition: Event.h:38
double VonNeu
Definition: Event.h:85
double tt2min
Definition: Event.h:91
void SetMassRange(const double &Min_, const double &Max_)
Definition: Event.h:54
std::vector< std::pair< double, double > > GetVar()
Definition: Event.h:64
CrossSection * Process
Definition: Event.h:87
static const std::string B
void SetRandomEngine(CLHEP::HepRandomEngine *engine)
Definition: Event.h:24
void Setx2Max(const double &xx_)
Definition: Event.h:34
void Sett2Min(const double &xx_)
Definition: Event.h:50
double ymin
Definition: Event.h:86
double yRange
Definition: Event.h:83
Signal rand(Signal arg)
Definition: vlib.cc:442
void Sett2Max(const double &xx_)
Definition: Event.h:42
std::vector< std::pair< double, double > > Var
Definition: Event.h:81