HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HarpoMatching.h
Go to the documentation of this file.
1 #ifndef HARPOMATCHING
2 #define HARPOMATCHING
3 
5 //
6 // NewHarpoMatching
7 //
8 // Generic class for HARPO Detectors
9 //
10 #include <cstring>
11 #include "TMatrixD.h"
12 #include "TObject.h"
13 #include "TH2D.h"
14 #include "TH2F.h"
15 #include "TH1F.h"
16 #include "TVirtualPad.h"
17 #include "TGraph2D.h"
18 #include "TGNumberEntry.h"
19 #include "HarpoConfig.h"
20 #include "HarpoAnalyse.h"
21 
22 /* #define facXY 1.075 */
23 /* #define facTronc 0.6 */
24 /* #define facRec 0.8 */
25 /* #define chi2TroncNcut 0.5 */
26 //#define NADC 511
27 //#define NCHAN 288
28 //#define NCLUSTERMAX 3000
29 //#define CUTCLUSTER 500;
30 #define NTESTMAT 50
31 #define NTRACK 100
32 
33 
35 {
36 
37  public:
38 
40 
41  void Init();
42  void Save(char *mode=NULL);
43  void process();
44  void print(){}
45 
46 
47 
48  //fontion
49  /* void ResetMatching(); */
50  void Matching(TH1F* hX, TH1F* hY, Double_t &coverageX, Double_t &coverageY, Double_t &chi2);
51 
52  Int_t InitEventNew();
53  /* void MatchingNew(Int_t i1, Int_t i2); */
54  /* void AddGoodMatch(Int_t i1, Int_t i2, Int_t trX, Int_t trY, Double_t chi2); */
55 
56 
57 
58  TH1* GetHist(Int_t i, Int_t match = -1);
59  void DisplayAnalysis(TRootEmbeddedCanvas* ecTab,TGListBox* info);
60  void DrawMatching(HarpoRecoMatching* match, TVirtualPad* c);
61  void ConfigFrame(TGMainFrame* fMain, Int_t id);
62  void SetConfig();
63 
64  // Int_t GetNgoodmatch(){return ngoodmatch;}
65 
66  /* Int_t QtTx[NTRACK]; */
67  /* Int_t QtTy[NTRACK]; */
68  /* Int_t iXtestmatch[ NTESTMAT],iYtestmatch[NTESTMAT];//, indgoodm[NTRACK]; */
69  /* Double_t chi2TroncN[50],/\* DecTr[NTRACK],*\/ coveX[ NTESTMAT],coveY[ NTESTMAT]; */
70  /* Double_t QtTrX[NADC][NTRACK], QtTrY[NADC][NTRACK]; */
71  /* Int_t iMatchX[NTRACK], iMatchY[NTRACK]; */
72  /* Int_t iMatchTrX[NTESTMAT], iMatchTrY[NTESTMAT]; */
73  /* Int_t mTrX, mTrY; */
74  /* Int_t nbinNZTrX[NTRACK]; */
75  /* Int_t nbinNZTrY[NTRACK]; */
76  /* Int_t Qtrack_x[NTRACK],Qtrack_y[NTRACK]; */
77  /* Double_t Qtotal_x[NTRACK][NCLUSTERMAX],Qtotal_y[NTRACK][NCLUSTERMAX]; */
78  // Double_t ThetaX,ThetaY;
79 
80  /* TGraph2D* GetGraph3D(Int_t i){if(i<ngoodmatch) return fGraph3D[i]; return 0;} */
81 
82 
83  private:
84 
85  void DoMatchingNew();
86  void DoMatching();
87 
88  void MakeCompoundTracks(Int_t iTr, ULong64_t mask, Int_t plane);
89  Int_t GetNcom(ULong64_t iTr, ULong64_t mask, Int_t plane);
90  TH1F* GetCompoundHist(ULong64_t mask, Int_t plane);
91  Int_t CombineTracks(ULong64_t mask, Int_t plane);
92 
93  Double_t FacXY;
94  Double_t FacTronc;
95  Double_t FacRec;
96  Double_t Chi2TroncNcut;
97  Int_t fNcomMin;
98  TGNumberEntry* fChooseFacXY;
99  TGNumberEntry* fChooseFacTronc;
100  TGNumberEntry* fChooseFacRec;
101  TGNumberEntry* fChooseChi2TroncNcut;
102  TGNumberEntry* fChooseNcomMin;
103 
104  TH2F* hQxyVsNcom;
105  TH1F* hCoverageX;
106  TH1F* hCoverageY;
107  TH1F* hChi2;
111  TH1F* hChi2Event;
112  TH1F* hQvsTX[NTRACK];
113  TH1F* hQvsTY[NTRACK];
114 
115  static const Int_t kNmaxCompoundTracks = NTRACK;
118  Int_t fTrMax[2];
119  ULong64_t fMask[NTRACK][2];
120 
121  /* TGraph2D* fGraph3D[NTESTMAT]; */
122  //Int_t fMatchId[NTRACK][NTRACK];
123 
124  ClassDef(HarpoMatching,1) //Event structure
125  };
126 
127 #endif
TGNumberEntry * fChooseChi2TroncNcut
Int_t GetNcom(ULong64_t iTr, ULong64_t mask, Int_t plane)
Double_t Chi2TroncNcut
Definition: HarpoMatching.h:96
A virtual class which define intrafece between HARPO Reader and Event Analysis code.
Definition: HarpoAnalyse.h:47
TGNumberEntry * fChooseFacXY
Definition: HarpoMatching.h:98
static const Int_t kNmaxCompoundTracks
Matching object, containing matched track number, and quality info.
TGNumberEntry * fChooseNcomMin
TH1F * hCoverageXEvent
void Matching(TH1F *hX, TH1F *hY, Double_t &coverageX, Double_t &coverageY, Double_t &chi2)
Redefine empty default.
TH1F * hQvsTY[NTRACK]
Int_t fTrMax[2]
TH2F * hQxyVsNcomEvent
ULong64_t fCompoundTrack[2][kNmaxCompoundTracks]
TGNumberEntry * fChooseFacRec
void DrawMatching(HarpoRecoMatching *match, TVirtualPad *c)
Double_t FacTronc
Definition: HarpoMatching.h:94
TH1F * hCoverageYEvent
void DisplayAnalysis(TRootEmbeddedCanvas *ecTab, TGListBox *info)
ULong64_t fMask[NTRACK][2]
Int_t InitEventNew()
TH1F * GetCompoundHist(ULong64_t mask, Int_t plane)
void MakeCompoundTracks(Int_t iTr, ULong64_t mask, Int_t plane)
#define NTRACK
Definition: HarpoMatching.h:31
void print()
Ovreloaded medod whic do all job.
Definition: HarpoMatching.h:44
void Save(char *mode=NULL)
Int_t CombineTracks(ULong64_t mask, Int_t plane)
void ConfigFrame(TGMainFrame *fMain, Int_t id)
TH1F * hQvsTX[NTRACK]
TGNumberEntry * fChooseFacTronc
Definition: HarpoMatching.h:99
TH1 * GetHist(Int_t i, Int_t match=-1)
Int_t fNcompoundTracks[2]
Double_t FacRec
Definition: HarpoMatching.h:95
Double_t FacXY
Definition: HarpoMatching.h:93