FEDRA emulsion software from the OPERA Collaboration
bitview.h
Go to the documentation of this file.
1 #ifndef _BITVIEW_H_
2 #define _BITVIEW_H_
3 
4 #include "TObject.h"
5 #include "TObjArray.h"
6 #include "bitmatrix.h"
7 #include "basematrix.h"
8 #include "bytematrix.h"
9 #include "EdbView.h"
10 #include "EdbCluster.h"
11 #include "EdbFrame.h"
12 #include "TH2.h"
13 
14 class track : public TObject {
15 public:
16  double tgx;
17  double tgy;
18  double x;
19  double y;
20  double z;
21  int height;
22  track();
23  track(double tx, double ty, double xx, double yy, double zz, int h);
24  virtual ~track();
25 };
26 
27 class TBitView : public TObject {
28 protected:
29  TObjArray* TBitArray;
30 // int NumberOfLayers;
31  float Z1,Z2,Z3,Z4;
32  float delta;
33 public:
34  float ZBase;
35  float bitSize; //size of bit in microns
36  TBitView();
37  TBitView(float z, float bs);
38  virtual ~TBitView();
39  float GetZ1(void) {return Z1;}
40  float GetZ2(void) {return Z2;}
41  float GetZ3(void) {return Z3;}
42  float GetZ4(void) {return Z4;}
43  void AddNewLayer(TBitMatrix* TLayer);
44  TBitMatrix* GetLayer(int n);
45 
46  TBitMatrix* operator[](int n) {return GetLayer(n);}
47  int GetNumberOfLayers(void) {return TBitArray->GetEntries();}
48 // void SetZ(float z) {ZBase = z;}
49 // float GetZBase(void) {return ZBase;}
50 // void SetBitSize(float bs) {bitSize = bs;}
51 // float GetBitSize(void) {return bitSize;}
52 
53  void FillBitView(EdbView* view, float sx, float sy, float Xmin, float Xmax, float Ymin, float Ymax,int inside = 1, int rep = 1); //in View coordinates
54  // s - conversion factor mkm/pix for x & y
55  // inside - 1 counting only INSIDE emulsion clusters; - 0 counting all clusters, not depence its base relative position
56  // rep - take to account each "rep" frame. NOT 0!
57 
58  ClassDef(TBitView,1)
59 };
60 
61 //________________________________________________________________________________
62 class TBinTracking : public TObject {
63 protected:
64  TObjArray* TByteArray;
65 // TObjArray* TTrackArray;
66 // int NumberOfElements;
67 public:
69  float ZBase;
71  double dX, dY, dZ;
72 
73  TBinTracking();
74  TBinTracking(double tgxmin, double tgxmax, double tgymin, double tgymax, double tgstep);
75  TBinTracking(double tgxmin, double tgxmax, double tgymin, double tgymax, double tgstep, double dx, double dy, double dz);
76  virtual ~TBinTracking();
77  TByteMatrix* GetElement(int n);
78  TByteMatrix* GetElement(double tgx, double tgy);
79  TByteMatrix* operator[](int n) {return GetElement(n);}
80  int GetNelements(void) {return TByteArray->GetEntries();}
81 // void SetZ(float z) {ZBase = z);
82  void FillByteArray(TBitView *Tv);
83  TObjArray* FindBinTracks(int thr); // Array of tracks !!!
84  void ImproveTracksArray(TObjArray *tracks, int thr, float accept); // Improve Array of tracks (now testing)
85  EdbView* AdoptSegment(EdbView* view, float sx, float sy, float Xmin, float Xmax, float Ymin, float Ymax, float bs,
86  int thr, float accept, int inside = 1, int excludeCommonClusters = 0, int rep = 1);
87  // view with segments !!!!!!!!
88  // s - conversion factor in mkm/pix for x & y
89  // Xmin - Xmax; Ymin - Ymax : window
90  // bs - binSize (mkm per bin)
91  // thr - threshold (min number of clusters belong segment)
92  // accept - mkm max spread of clusters around segment
93  // inside - 1 counting only INSIDE emulsion clusters; - 0 counting all clusters, not depence its base relative position
94  // excludeCommonClusters - 1 if segments have common clusters, one of them will be excluded.
95  // rep - take to account each "rep" frame. NOT 0!
96  TH2F* Histo(double tgx, double tgy);
97 
98  ClassDef(TBinTracking,1)
99 
100 };
101 
102 //________________________________________________________________________________
103 #endif
brick dz
Definition: RecDispMC.C:107
Definition: EdbView.h:134
Definition: bitview.h:62
float ZBase
Definition: bitview.h:69
double Tgxmin
Definition: bitview.h:68
double Tgymax
Definition: bitview.h:68
EdbView * AdoptSegment(EdbView *view, float sx, float sy, float Xmin, float Xmax, float Ymin, float Ymax, float bs, int thr, float accept, int inside=1, int excludeCommonClusters=0, int rep=1)
Definition: bitview.cxx:734
double Tgstep
Definition: bitview.h:68
TByteMatrix * GetElement(int n)
Definition: bitview.cxx:582
TBinTracking()
Definition: bitview.cxx:530
TH2F * Histo(double tgx, double tgy)
Definition: bitview.cxx:957
double Tgymin
Definition: bitview.h:68
void ImproveTracksArray(TObjArray *tracks, int thr, float accept)
Definition: bitview.cxx:655
double dZ
Definition: bitview.h:71
double Tgxmax
Definition: bitview.h:68
void FillByteArray(TBitView *Tv)
Definition: bitview.cxx:604
int GetNelements(void)
Definition: bitview.h:80
TObjArray * TByteArray
Definition: bitview.h:64
TByteMatrix * operator[](int n)
Definition: bitview.h:79
double dY
Definition: bitview.h:71
TObjArray * FindBinTracks(int thr)
Definition: bitview.cxx:633
virtual ~TBinTracking()
Definition: bitview.cxx:569
double dX
Definition: bitview.h:71
Definition: bitmatrix.h:13
Definition: bitview.h:27
TBitView()
Definition: bitview.cxx:367
float GetZ4(void)
Definition: bitview.h:42
void FillBitView(EdbView *view, float sx, float sy, float Xmin, float Xmax, float Ymin, float Ymax, int inside=1, int rep=1)
Definition: bitview.cxx:407
void AddNewLayer(TBitMatrix *TLayer)
Definition: bitview.cxx:394
TObjArray * TBitArray
Definition: bitview.h:29
float delta
Definition: bitview.h:32
float GetZ3(void)
Definition: bitview.h:41
float Z3
Definition: bitview.h:31
TBitMatrix * GetLayer(int n)
Definition: bitview.cxx:401
float GetZ2(void)
Definition: bitview.h:40
int GetNumberOfLayers(void)
Definition: bitview.h:47
float ZBase
Definition: bitview.h:34
float GetZ1(void)
Definition: bitview.h:39
float Z4
Definition: bitview.h:31
virtual ~TBitView()
Definition: bitview.cxx:385
float Z1
Definition: bitview.h:31
float Z2
Definition: bitview.h:31
TBitMatrix * operator[](int n)
Definition: bitview.h:46
float bitSize
Definition: bitview.h:35
Definition: bytematrix.h:12
Definition: bitview.h:14
virtual ~track()
Definition: bitview.cxx:361
double tgy
Definition: bitview.h:17
int height
Definition: bitview.h:21
double z
Definition: bitview.h:20
double tgx
Definition: bitview.h:16
double x
Definition: bitview.h:18
track()
Definition: bitview.cxx:346
double y
Definition: bitview.h:19
TTree * tracks
Definition: check_tr.C:19