StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
FtfSl3.h
1 /*:>-------------------------------------------------------------------
2 **: FILE: FtfSl3.h
3 **: HISTORY: may 29, 1999 Frame for sl3 tracking
4 **: aug 23, 1999 add setup with number of hits and tracks
5 **: sep 28, 1999 cs: new input functions (pointer to
6 **: bank instead of FILE) using
7 **: daqFormats.h
8 **: oct 25, 1999 ppy: use sl3CoordianteTransform header
9 **: 11/24/99 cle: include <L3Formats.h> intead daqFormats.h
10 **: commented out fillUSTracks
11 **: added public sectorNr variable
12 **: 12/03/99 ppy: sectorGeometry class added
13 **: variable sectorGeo added
14 **: clean extra includes
15 **: 12/06/99 ppy: method added to check whether track can be merged
16 **: 01/26/00 ppy: delete rawToGlobal declaration
17 **: feb 10, 2000 ppy: add xyError and zError
18 **: mar 21 2000 ppy: add fill Hits
19 **: apr 8 2000 ppy: add variables to cut hit based on charge and time
20 **: apr 18 2000 ppy: modify readMezzannine to include rb and mz as arguments
21 **: apr 19 2000 ppy: dEdx from Christof
22 **: apr 19 2000 cs ppy: include FtfDedx added
23 **:<------------------------------------------------------------------*/
24 #ifndef FTFSL3
25 #define FTFSL3
26 
27 #include "Stl3Util/base/St_l3_Coordinate_Transformer.h"
28 #include "Stl3Util/ftf/FtfFinder.h"
29 #include "Stl3Util/ftf/FtfDedx.h"
30 //#include "Stl3Util/base/l3GeneralHeaders.h"
31 #include "Stl3Util/foreign/daqFormats.h"
32 
33 
34 class sectorGeometry {
35 public:
36  double phiMin ;
37  double phiMax ;
38  double phiShift ;
39  double etaMin ;
40  double etaMax ;
41 };
42 
43 class FtfSl3: public FtfFinder
44 {
45 
46  private:
47  static const int NSECTORS = 24;
48 
49  int sectorNr;
50  short debugLevel ;
51  double xyError ;
52  double zError ;
53 
54  sectorGeometry* sectorGeo ;
55 
56  public:
57  int minTimeBin ;
58  int maxTimeBin ;
59  int minClusterCharge ;
60  int maxClusterCharge ;
61  int embedded;// flag to show that the current event being read in is embedded
62 
63  //
64  // Constructor
65  //
66  FtfSl3 ( St_l3_Coordinate_Transformer* inTrans ) {
67  debugLevel = 0 ;
68  xyError = 0.3 ;
69  zError = 1.0 ;
70  minTimeBin = 0 ;
71  maxTimeBin = 380 ;
72  minClusterCharge = 80 ;
73  maxClusterCharge = 100000 ;
74  coordinateTransformer = inTrans ;
75  sectorGeo = new sectorGeometry[NSECTORS];
76  fDedx = new FtfDedx(inTrans);
77  };
78 
79 
80  ~FtfSl3 ( ) {
81  if ( track != 0 ) delete []track ;
82  if ( hit != 0 ) delete []hit ;
83  delete []sectorGeo ;
84  delete fDedx;
85  };
86 
87 
88  // Coordinate Transformer classes
89  St_l3_Coordinate_Transformer* getCoordinateTransformer()
90  { return (St_l3_Coordinate_Transformer*)coordinateTransformer ; } ;
91 
92  // Sector phase space
93  sectorGeometry* getSectorGeometry ( int n ) {
94  if ( n < 1 && n > NSECTORS ) {
95  printf ( "FtfSl3::getSectorGeometry: wrong sector %d, returning sector 1 \n", n ) ;
96  n = 0 ;
97  }
98  return &(sectorGeo[n]);
99  }
100 
101  //
102  int fillTracks ( int maxBytes, char* buff, unsigned int token ) ;
103  int fillHits ( unsigned int maxBytes, char* buff, unsigned int token ) ;
104  float getXyError ( ) { return xyError ; } ;
105  float getZError ( ) { return zError ; } ;
106  int getNrTracks ( ) ;
107 
108  int canItBeMerged ( FtfTrack* thisTrack ) ;
109  int dEdx ( ) ;
110  int processSector ( ) ;
111  int readMezzanine ( int sector, int readOutBoard,
112  int MezzanninneNr, struct TPCMZCLD_local *mzcld );
113  int readSector ( struct TPCSECLP *seclp ) ;
114  int readSector ( struct TPCSECLP *seclp1, struct TPCSECLP *seclp2 );
115  int setParameters ( ) ;
116  void setCoordinateTransformer ( St_l3_Coordinate_Transformer* in )
117  { coordinateTransformer = (void *)in ; } ;
118  void setDebugLevel ( int _debugLevel ) { debugLevel = _debugLevel ; } ;
119  void setSector ( int _sector ) { sectorNr = _sector ; } ;
120  void setXyError ( float _xyError ) { xyError = _xyError ; } ;
121  void setZError ( float _zError ) { zError = _zError ; } ;
122  int setup ( int maxHitsIn=20000, int maxTracksIn=2000 ) ;
123  void Print() const{};
124  private:
125  void* coordinateTransformer ;
126  FtfDedx *fDedx;
127 
128 };
129 #endif
Definition: FtfSl3.h:49