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 
28 #ifndef TRG_VERSION
29 #define TRG_VERSION 0x32
30 #endif
31 
32 #include "l3CoordinateTransformer.h"
33 #include "FtfFinder.h"
34 #include "FtfDedx.h"
35 #include "daqFormats.h"
36 #include "sizes.h"
37 #include "DAQ_READER/daqReader.h"
38 #include "gl3Event.h"
39 
41 public:
42  double phiMin ;
43  double phiMax ;
44  double phiShift ;
45  double etaMin ;
46  double etaMax ;
47 };
48 
49 class FtfSl3: public FtfFinder
50 {
51 
52  private:
53  int sectorNr;
54  short debugLevel ;
55  double xyError ;
56  double zError ;
57 
58  sectorGeometry* sectorGeo ;
59 
60  public:
61  daqReader *rdr;
62 
63  public:
64  int minTimeBin ;
65  int maxTimeBin ;
66  int minClusterCharge ;
67  int maxClusterCharge ;
68  int embedded;// flag to show that the current event being read in is embedded
69 
70 //
71 // Constructor
72 //
73  FtfSl3 ( l3CoordinateTransformer* inTrans, daqReader *rdr ) {
74  debugLevel = 0 ;
75  xyError = 0.3 ;
76  zError = 1.0 ;
77  minTimeBin = 0 ;
78  maxTimeBin = 380 ;
79  minClusterCharge = 80 ;
80  maxClusterCharge = 100000 ;
81  coordinateTransformer = inTrans ;
82  sectorGeo = new sectorGeometry[24];
83  fDedx = new FtfDedx(inTrans);
84  this->rdr = rdr;
85  };
86  ~FtfSl3 ( ) {
87  if ( track != 0 ) delete []track ;
88  if ( hit != 0 ) delete []hit ;
89  delete []sectorGeo ;
90  delete fDedx;
91  };
92 
93  //
94  // Coordinate Transformer classes
95  //
96  inline l3CoordinateTransformer* getCoordinateTransformer()
97  { return (l3CoordinateTransformer*)coordinateTransformer ; } ;
98  //
99  // Sector phase space
100  //
101  sectorGeometry* getSectorGeometry ( int n ) {
102  if ( n < 1 && n > 24 ) {
103  printf ( "FtfSl3::getSectorGeometry: wrong sector %d, returning sector 1 \n", n ) ;
104  n = 0 ;
105  }
106  return &(sectorGeo[n]);
107  }
108 
109  //
110  int fillTracks ( int maxBytes, char* buff, unsigned int token ) ;
111  int fillHits ( unsigned int maxBytes, char* buff, unsigned int token ) ;
112  float getXyError ( ) { return xyError ; } ;
113  float getZError ( ) { return zError ; } ;
114  int getNrTracks ( ) ;
115 
116  int canItBeMerged ( FtfTrack* thisTrack ) ;
117  int dEdx ( ) ;
118  int processSector ( ) ;
119  //int processData (TPCSECLP* seclp, char* trackBuffer, int maxTrackBytes, int& nTrackBytes,
120  //char* hitBuffer, int maxHitBytes, int& nHitBytes);
121  int readMezzanine ( int sector, int readOutBoard,
122  int MezzanninneNr, struct TPCMZCLD_local *mzcld );
123  int readSector ( struct bankHeader *bank ) ;
124  int readSector (DATAP *datap, int sector);
125  int readSector ( struct TPCSECLP *seclp1, struct TPCSECLP *seclp2 );
126 
127  int setTrackingAngles(int hypersector);
128  // int readSectorFromEvpReader(int sector);
129  void setClustersFromGl3Event(gl3Event *event, int sector);
130 
131  int setParameters ( ) ;
132  void setCoordinateTransformer ( l3CoordinateTransformer* in )
133  { coordinateTransformer = (void *)in ; } ;
134  void setDebugLevel ( int _debugLevel ) { debugLevel = _debugLevel ; } ;
135  void setSector ( int _sector ) { sectorNr = _sector ; } ;
136  void setXyError ( float _xyError ) { xyError = _xyError ; } ;
137  void setZError ( float _zError ) { zError = _zError ; } ;
138  int setup ( int maxHitsIn=szSL3_default_mHits, int maxTracksIn=szSL3_default_mTracks ) ;
139  void Print() const{};
140 private:
141  void* coordinateTransformer ;
142  FtfDedx *fDedx;
143 
144 };
145 #endif
Definition: FtfSl3.h:49