StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFtpcFastSimu.hh
1 // $Id: StFtpcFastSimu.hh,v 1.17 2004/02/12 19:38:46 oldi Exp $
2 //
3 // $Log: StFtpcFastSimu.hh,v $
4 // Revision 1.17 2004/02/12 19:38:46 oldi
5 // Removal of intermediate tables.
6 //
7 // Revision 1.16 2004/01/28 02:04:43 jcs
8 // replace all instances of StFtpcReducedPoint and StFtpcPoint with StFtpcConfMapPoint
9 //
10 // Revision 1.15 2003/10/10 12:36:15 jcs
11 // implement new FTPC geant volume id method
12 // initialize counters and arrays to zero
13 // replace many int,float's wiht Int_t,Float_t
14 //
15 // Revision 1.14 2002/09/16 12:43:22 jcs
16 // replace large statically dimensioned arrays with dynamically dimensioned arrays
17 //
18 // Revision 1.13 2001/03/19 15:52:47 jcs
19 // use ftpcDimensions from database
20 //
21 // Revision 1.12 2001/01/25 15:25:49 oldi
22 // Fix of several bugs which caused memory leaks:
23 // - Some arrays were not allocated and/or deleted properly.
24 // - TClonesArray seems to have a problem (it could be that I used it in a
25 // wrong way in StFtpcTrackMaker form where Holm cut and pasted it).
26 // I changed all occurences to TObjArray which makes the program slightly
27 // slower but much more save (in terms of memory usage).
28 //
29 // Revision 1.11 2001/01/08 17:10:04 jcs
30 // move remaining constants from code to database
31 //
32 // Revision 1.10 2000/11/24 15:02:33 hummler
33 // commit changes omitted in last commit
34 //
35 // Revision 1.8 2000/09/18 14:26:49 hummler
36 // expand StFtpcParamReader to supply data for slow simulator as well
37 // introduce StFtpcGeantReader to separate g2t tables from simulator code
38 // implement StFtpcGeantReader in StFtpcFastSimu
39 //
40 // Revision 1.7 2000/08/03 14:39:00 hummler
41 // Create param reader to keep parameter tables away from cluster finder and
42 // fast simulator. StFtpcClusterFinder now knows nothing about tables anymore!
43 //
44 // Revision 1.6 2000/02/04 13:49:42 hummler
45 // upgrade ffs:
46 // -remove unused fspar table
47 // -make hit smearing gaussian with decent parameters and static rand engine
48 // -separate hit smearing from cluster width calculation
49 //
50 // Revision 1.5 2000/02/02 15:40:08 hummler
51 // make hit smearing gaussian instead of box-shaped
52 //
53 // Revision 1.4 2000/02/02 15:20:37 hummler
54 // correct acceptance at sector boundaries,
55 // take values from fcl_det
56 //
57 // Revision 1.3 2000/01/03 12:48:59 jcs
58 // Add CVS Id strings
59 //
60 
61 #ifndef STAR_StFtpcFastSimu
62 #define STAR_StFtpcFastSimu
63 #include "ffs_gepoint.h"
64 #include "TObjArray.h"
65 #include "StFtpcGeantPoint.hh"
66 #include "StFtpcTrackMaker/StFtpcConfMapPoint.hh"
67 
68 #define TRUE 1
69 #define FALSE 0
70 
71 class RandGauss;
72 class StFtpcParamReader;
73 class StFtpcDbReader;
74 class StFtpcGeantReader;
75 
77 {
78  private:
79  StFtpcParamReader *mParam;
80  StFtpcDbReader *mDb;
81  StFtpcGeantReader *mGeant;
82  StFtpcConfMapPoint *mPoint;
83  StFtpcGeantPoint *mGeantPoint;
84 
85  Char_t mStart; // start of simple variables
86 
87  Int_t nPoints;
88  Int_t nPadrows;
89  Int_t * nrowmax;
90  Int_t * nrow;
91 
92  Float_t Va;
93  Float_t Vhm[4];
94  Float_t Tbm[4];
95  Float_t s_rad[4];
96  Float_t s_azi[4];
97  Float_t err_rad[4];
98  Float_t err_azi[4];
99  Float_t ri;
100  Float_t ra;
101  Float_t phimin;
102  Float_t phisec;
103  Float_t sector_phi_min;
104  Float_t sector_phi_max;
105 
106  Char_t mEnd; //End of simple variables
107 
108  double myModulo(double x1, double x2)
109  {
110  return x1-(double)(int)(x1/x2)*x2;
111  }
112  public:
113  StFtpcFastSimu(StFtpcGeantReader *geantReader,
114  StFtpcParamReader *paramReader,
115  StFtpcDbReader *dbReader,
116  TObjArray *pointarray,
117  TObjArray *geantarray);
118  ~StFtpcFastSimu();
119  int ffs_gen_padres();
120  int ffs_hit_rd();
121  int ffs_hit_smear(float phi,
122  float xi,
123  float yi,
124  float zi,
125  float *xo,
126  float *yo,
127  float *zo,
128  float st_dev_l_hit,
129  float st_dev_tr_hit,
130  float *st_dev_z,
131  float *st_dev_x,
132  float *st_dev_y,
133  RandGauss *quasiRandom);
134  int ffs_ini();
135  int ffs_merge_tagger();
136  int ffs_tag();
137 };
138 
139 #endif