Class Reference for E1039 Core & Analysis Software
SQCosmicGen.h
Go to the documentation of this file.
1 #ifndef SQCosmicGen_H__
2 #define SQCosmicGen_H__
3 
5 
6 #include <string>
7 
8 #include <TRandom1.h>
9 
10 class PHG4InEvent;
11 class PHCompositeNode;
12 
14 {
15 public:
16 
17  SQCosmicGen(const std::string& name = "COSMICGEN");
18  virtual ~SQCosmicGen() {}
19 
20  int InitRun(PHCompositeNode *topNode);
21  int process_event(PHCompositeNode *topNode);
22 
23  void set_mom_range(const double lo, const double hi);
24  void set_theta_range(const double lo, const double hi);
25  void set_charge_ratio(const double p, const double n);
26 
27  void set_acceptance_st(int stationID, bool b = true) { _req_st[stationID] = b; }
28 
29 private:
31  double cosmicProb(double p, double theta);
32 
34  double uniformRand(const double lo, const double hi);
35 
37  void getZVtxLimits(int stationID, double ty, double y, double& min, double& max);
38  void getXVtxLimits(int stationID, double tx, double z, double& min, double& max);
39 
41  bool generateVtx(double tx, double ty, double& x, double& y, double& z);
42 
44  inline bool acceptedInSt(int stationID, double x, double y, double z, double tx, double ty);
45 
47  PHG4InEvent* _ineve;
48 
50  double _prob_mup;
51  double _prob_mum;
52 
54  double _mom_min;
55  double _mom_max;
56 
58  double _theta_min;
59  double _theta_max;
60 
62  bool _req_st[5];
63  double _z_st[5];
64  double _size_x_st[5];
65  double _size_y_st[5];
66 
68  double _p0;
69  double _p1;
70  double _p2;
71 
73  double _altitude;
74 
76  double _size_x;
77  double _size_z;
78 
80  double _prob_max;
81 
83  TRandom1 _rndm;
84 };
85 
86 #endif
void set_acceptance_st(int stationID, bool b=true)
Definition: SQCosmicGen.h:27
void set_mom_range(const double lo, const double hi)
Definition: SQCosmicGen.cc:84
int InitRun(PHCompositeNode *topNode)
Definition: SQCosmicGen.cc:67
void set_charge_ratio(const double p, const double n)
Definition: SQCosmicGen.cc:122
virtual ~SQCosmicGen()
Definition: SQCosmicGen.h:18
int process_event(PHCompositeNode *topNode)
Definition: SQCosmicGen.cc:128
void set_theta_range(const double lo, const double hi)
Definition: SQCosmicGen.cc:104
SQCosmicGen(const std::string &name="COSMICGEN")
Definition: SQCosmicGen.cc:24