26 #include "TRootEmbeddedCanvas.h"
54 if (plane != NULL )plane->
print();
64 for(Int_t ndet=0;ndet<2;ndet++) {
67 if ( m == NULL )
continue;
72 for(Int_t j=0;j<
NCHAN;j++){
74 for(Int_t i=0;i<
NADC;i++){
76 if(q <= -1000)
continue;
82 Int_t lengthmax = 0, i1max = -1, j1max = -1, i2max = -1, j2max = -1;
85 if(
fHistShortest[ndet][0]->GetBinContent(i1+1,j1+1)<=0)
continue;
91 Int_t l = h->GetBinContent(i2+1,j2+1);
93 if(l >10000)
continue;
105 fHistRoute2[ndet][3]->SetBinContent(i1max,j1max,10000);
106 fHistRoute2[ndet][3]->SetBinContent(i2max,j2max,10000);
116 Int_t nV = vArray->GetEntries();
120 for(Int_t iV = 0; iV<nV; iV++){
125 Int_t iv = nVp[plane];
129 Int_t lengthmax = 0, imax = -1, jmax = -1;
134 if(l >10000)
continue;
142 if(lengthmax<=1)
continue;
144 Int_t lengthmax2 = 0, imax2 = -1, jmax2 = -1;
147 if(
fHistRoute[plane][iv]->GetBinContent(i+1,j+1)>0)
continue;
150 if(l >10000)
continue;
158 if(lengthmax2<=2)
continue;
176 if(h->GetBinContent(i,j)>length) h->SetBinContent(i,j,length);
190 Info(
"GetRoute",
"%d %d %d / %d",i,j,Int_t(h->GetBinContent(i,j)),length);
191 if(h->GetBinContent(i,j)!=length-1)
return;
192 if(hRoute->GetBinContent(i,j)>0)
return;
193 hRoute->SetBinContent(i,j,100000);
211 Long64_t rebinX = 10;
213 Info(
"Constructor",
"Use default RebinX %d",
fRebinX);
217 Long64_t rebinZ = 10;
219 Info(
"Constructor",
"Use default RebinZ %d",
fRebinZ);
239 TCanvas* c = ecTab->GetCanvas();
240 c->GetPad(1)->Delete();
241 c->GetPad(2)->Delete();
247 Int_t nV = vArray->GetEntries();
249 Int_t nCl = clArray->GetEntries();
251 for(Int_t plane = 0; plane<2;plane++){
252 TVirtualPad* cMap = c->GetPad(plane+1);
254 for(Int_t i = 0; i<4; i++){
262 for(Int_t iV = 0; iV<nV; iV++){
264 if(plane!=vertex->
GetPlane())
continue;
269 for(Int_t k = 0; k<5; k++){
270 Double_t X = 0, Z = 0;
271 for(Int_t icl1 = 0; icl1<nCl; icl1++){
273 if(plane!=cluster1->
GetPlane())
continue;
274 Double_t xV1 = cluster1->
GetX();
275 Double_t zV1 = cluster1->
GetZ();
281 if(nx*(xV1-xV) + nz*(zV1-zV)>0){
291 cout <<
"(X,Z) = (" << X <<
", " << Z <<
")" << endl;
292 Double_t norm = TMath::Sqrt(X*X+Z*Z);
297 cout <<
"n = (" << nx <<
", " << nz <<
")" << endl;
299 TArrow* arrow =
new TArrow();
300 arrow->SetLineColor(kGray);
301 arrow->SetFillColor(kGray);
302 arrow->SetArrowSize(0.01);
303 arrow->DrawArrow(zV,xV,zV+30*nz,xV+30*nx);
319 UInt_t ysize = 10*ysize2;
320 TGTransientFrame*
main =
new TGTransientFrame(gClient->GetRoot(), fMain, xsize, ysize);
321 main->Connect(
"CloseWindow()",
"HarpoRecoMonitorGui", main,
"CloseWindow()");
322 main->DontCallClose();
325 main->SetCleanup(kDeepCleanup);
327 TGVerticalFrame* frame =
new TGVerticalFrame(main,xsize,ysize,kVerticalFrame);
330 TGLayoutHints* fLayout1 =
new TGLayoutHints(kLHintsLeft ,5,5,5,5);
331 TGLayoutHints* fLayout2 =
new TGLayoutHints(kLHintsRight ,5,5,5,5);
332 TGLayoutHints* fLayout3 =
new TGLayoutHints(kLHintsTop | kLHintsExpandX ,5,5,5,5);
333 TGLayoutHints* fLayout4 =
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,5,5,5,5);
341 TGLabel* fAnalysisLabel =
new TGLabel(frame,
"Template analysis");
344 TGHorizontalFrame* rebinXFrame =
new TGHorizontalFrame(frame,xsize,ysize2,kHorizontalFrame);
345 TGLabel* rebinXLabel =
new TGLabel(rebinXFrame,
"fRebinX");
348 TGHorizontalFrame* rebinZFrame =
new TGHorizontalFrame(frame,xsize,ysize2,kHorizontalFrame);
349 TGLabel* rebinZLabel =
new TGLabel(rebinZFrame,
"fRebinZ");
353 main->AddFrame(frame,fLayout4);
354 frame->AddFrame(fAnalysisLabel,fLayout3);
355 frame->AddFrame(rebinXFrame,fLayout3);
356 rebinXFrame->AddFrame(rebinXLabel,fLayout1);
358 frame->AddFrame(rebinZFrame,fLayout3);
359 rebinZFrame->AddFrame(rebinZLabel,fLayout1);
366 TGTextButton* setConf =
new TGTextButton(frame,
"Save Config",
id);
367 setConf->Associate(fMain);
369 frame->AddFrame(setConf,fLayout3);
371 main->MapSubwindows();
HarpoRecoEvent * GetRecoEvent()
static const Int_t kMaxNvertex
TH2I * fHistRoute2[2][kMaxNvertex]
Double_t GetData(Int_t i, Int_t j)
Set/Get Data Cell.
int main(int argc, char **argv)
Bool_t isExist(ULong_t det)
Detecror date exist //! Number of Real Detectors.
Object containing the reconstruction information for one event (with array of HarpoRecoClusters Harpo...
2D vertex object, containing position, angle and associated track numbers, and quality info ...
void GetRoute(TH2I *hRoute, TH2I *h, Int_t length, Int_t i, Int_t j)
void GetShortest(TH2I *h, Int_t length, Int_t i, Int_t j)
Redefine empty default.
TGNumberEntry * fChooseRebinZ
TClonesArray * GetVertexArray()
TH2I * fHistShortest[2][kMaxNvertex]
Cluster object, containing position, charge and quality information.
void DisplayAnalysis(TRootEmbeddedCanvas *ecTab, TGListBox *infobox)
TFile * OpenHistFile(const char *ananame)
unpacked dcc data The class contains the data map for DCC or Feminos The data is stored as a 2D TMatr...
TVirtualPad * MakeNiceHisto(TH1 *hist, TVirtualPad *c1, const char *opt, Bool_t copy)
void Save(char *mode=NULL)
Bool_t Lookup(const char *path, Bool_t &val)
Lookup function for scalar values.
TGNumberEntry * fChooseRebinX
Dummy analysis to run as test and example. Give basic histograms of the data.
const ULong_t gkNDetectors
HarpoDccMap * GetDccMap(Long_t plane=XDCC)
TH2I * fHistRoute[2][kMaxNvertex]
TClonesArray * GetClustersArray()
R__EXTERN HarpoDetSet * gHDetSet
void ConfigFrame(TGMainFrame *fMain, Int_t id)