StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFttFastSimMaker.h
1 
2 #ifndef ST_FTT_FAST_SIM_MAKER_H
3 #define ST_FTT_FAST_SIM_MAKER_H
4 
5 class g2t_emc_hit_st;
6 class StFtsHit;
7 class StEvent;
8 
9 #include "StChain/StMaker.h"
10 #include <vector>
11 
12 #include "TFile.h"
13 #include "TH1F.h"
14 #include "TH2F.h"
15 #include "TNtuple.h"
16 
17 class StRnDHit;
18 
19 class StFttFastSimMaker : public StMaker {
20  public:
21  explicit StFttFastSimMaker(const Char_t *name = "fttSim");
22  virtual ~StFttFastSimMaker() {}
23  Int_t Make();
24  int Init();
25  int Finish() {
26  return kStOk;
27  }
28  virtual const char *GetCVS() const;
29 
30  void SetDiskRotation(int disk, float degrees) {
31 
32  const float deg_to_radians = 0.017453292f; // = 3.1415926 / 180.0;
33  if (9 == disk)
34  sTGC_disk9_theta = degrees * deg_to_radians;
35  else if (10 == disk)
36  sTGC_disk10_theta = degrees * deg_to_radians;
37  else if (11 == disk)
38  sTGC_disk11_theta = degrees * deg_to_radians;
39  else if (12 == disk)
40  sTGC_disk12_theta = degrees * deg_to_radians;
41  return;
42  }
43 
44  private:
45  void FillThinGapChambers(StEvent *event);
46 
47  int iEvent;
48 
49  TH2F *hGlobalYX;
50  TH2F *hOctantYX;
51 
52  TH2F *hOctantWireYX;
53  TH2F *hOctantStripYX;
54 
55  TH2F *hWireDeltasX;
56  TH2F *hWireDeltasY;
57  TH2F *hStripDeltasX;
58  TH2F *hStripDeltasY;
59 
60  TH2F *hWirePullsX;
61  TH2F *hWirePullsY;
62  TH2F *hStripPullsX;
63  TH2F *hStripPullsY;
64 
65  TH2F *hPointsPullsX;
66  TH2F *hPointsPullsY;
67 
68  //table to keep pointer to hit for each disc, r & phi strips
69 
70  // convert x, y to quandrant and local X, Y
71  // quadrants are
72  // 0 1
73  // 3 2
74  void GlobalToLocal(float x, float y, int disk, int &quad, float &localX, float &localY);
75  void LocalToGlobal(float localX, float localY, int disk, int quad, float &globalX, float &globalY);
76  bool Overlaps(StRnDHit *hitA, StRnDHit *hitB);
77  void QuadBottomLeft(int disk, int quad, float &bottom, float &left);
78  float DiskOffset(int disk);
79  float DiskRotation(int disk);
80 
81  void rot(float theta, float x, float y, float &xp, float &yp) {
82  xp = x * cos(theta) - y * sin(theta);
83  yp = x * sin(theta) + y * cos(theta);
84  }
85 
86  const double STGC_BEAM_CUT_OUT = 6.0; // cm
87  const double STGC_QUAD_WIDTH = 60.0; // cm
88  const double STGC_QUAD_HEIGHT = 60.0; // cm
89  const double STGC_WIRE_WIDTH = 0.32; // cm
90  const double STGC_SIGMA_X = 0.01; // 100 microns
91  const double STGC_SIGMA_Y = 0.01; // 100 microns
92  const double STGC_SIGMA_Z = 0.001; // 10 microns
93  const double STGC_WIRE_LENGTH = 15.0; // cm
94  const bool STGC_MAKE_GHOST_HITS = true; //should be moved to run-time opt
95 
96  float sTGC_disk9_theta = 0.0f;
97  float sTGC_disk10_theta = 0.0f;
98  float sTGC_disk11_theta = 0.0f;
99  float sTGC_disk12_theta = 0.0f;
100 
101  int sTGCNRealPoints = 0;
102  int sTGCNGhostPoints = 0;
103 
104  ClassDef(StFttFastSimMaker, 0)
105 };
106 
107 inline const char *StFttFastSimMaker::GetCVS() const {
108  static const char cvs[] = "Tag $Name: $ $Id: StFttFastSimMaker.h,v 1.1 2021/03/26 14:11:40 jdb Exp $ built " __DATE__ " " __TIME__;
109  return cvs;
110 }
111 
112 #endif
Definition: Stypes.h:41