26 #include "TRootEmbeddedCanvas.h"
53 if (plane != NULL )plane->
print();
61 Info(
"PROCESS",
"START %ld",
nEvents);
67 Int_t nTr = trArray->GetEntries();
72 Int_t nV3D = v3DArray->GetEntries();
74 for(Int_t iV3D = 0; iV3D<nV3D; iV3D++){
85 Double_t chi2[8][2][2];
87 for(Int_t plane = 0; plane<2; plane++){
88 for(Int_t i = 0; i<2; i++){
89 for(Int_t j = 0; j<8; j++)
90 chi2[j][plane][i] = -1;
99 for(Int_t itr = 0; itr<nTr; itr++){
101 for(Int_t plane = 0; plane<2; plane++){
102 for(Int_t i = 0; i<2; i++){
109 chi2[4][plane][i] = track->
GetXend();
110 chi2[5][plane][i] = track->
GetZend();
111 chi2[6][plane][i] = track->
GetPxEnd();
112 chi2[7][plane][i] = track->
GetPzEnd();
120 hChi2_XY->Fill(chi2[0][0][0],chi2[0][1][0]);
121 hChi2_XY->Fill(chi2[0][0][1],chi2[0][1][1]);
122 hChi2_3D->Fill(0.5*(chi2[0][0][1]+chi2[0][1][1]));
123 hChi2_3D->Fill(0.5*(chi2[0][0][0]+chi2[0][1][0]));
124 for(Int_t i = 0; i<2; i++){
126 for(Int_t j = 0; j<18; j++) data[j] = -2;
129 for(Int_t j = 0; j<8; j++){
131 data[2*j+2] = chi2[j][0][i];
132 data[2*j+3] = chi2[j][1][i];
135 for(Int_t j = 0; j<18; j++)
136 std::cerr << data[j] <<
" ";
137 std::cerr << std::endl;
177 hChi2_XY =
new TH2F(
"hChi2_XY",
"",500,0,TMath::Pi(),500,0,TMath::Pi());
178 hChi2_3D =
new TH1F(
"hChi2_3D",
"",500,0,TMath::Pi());
181 fNtuple =
new TNtupleD(
"fNtuple",
"",
"nClX:nClY:chi2X:chi2Y:chi2X2:chi2Y2:chi2X3:chi2Y3:chi2X4:chi2Y4:chi2X5:chi2Y5:chi2X6:chi2Y6:chi2X7:chi2Y7:chi2X8:chi2Y8");
201 TCanvas* c = ecTab->GetCanvas();
202 c->GetPad(1)->Delete();
203 c->GetPad(2)->Delete();
206 for(Int_t plane = 0; plane<2;plane++){
207 TVirtualPad* cMap = c->GetPad(plane+1);
209 TH2F* h =
new TH2F(
"h",
"",512,0,512,288,0,288);
210 for(Int_t i=1;i<
NADC;i++){
211 for(Int_t j=0;j<
NCHAN;j++){
213 h->SetBinContent(i+1,j+1,q);
232 UInt_t ysize = 10*ysize2;
233 TGTransientFrame*
main =
new TGTransientFrame(gClient->GetRoot(), fMain, xsize, ysize);
234 main->Connect(
"CloseWindow()",
"HarpoRecoMonitorGui", main,
"CloseWindow()");
235 main->DontCallClose();
238 main->SetCleanup(kDeepCleanup);
240 TGVerticalFrame* frame =
new TGVerticalFrame(main,xsize,ysize,kVerticalFrame);
243 TGLayoutHints* fLayout1 =
new TGLayoutHints(kLHintsLeft ,5,5,5,5);
244 TGLayoutHints* fLayout2 =
new TGLayoutHints(kLHintsRight ,5,5,5,5);
245 TGLayoutHints* fLayout3 =
new TGLayoutHints(kLHintsTop | kLHintsExpandX ,5,5,5,5);
246 TGLayoutHints* fLayout4 =
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,5,5,5,5);
254 TGLabel* fAnalysisLabel =
new TGLabel(frame,
"Template analysis");
257 TGHorizontalFrame* nBinsFrame =
new TGHorizontalFrame(frame,xsize,ysize2,kHorizontalFrame);
258 TGLabel* nBinsLabel =
new TGLabel(nBinsFrame,
"fNbins");
262 main->AddFrame(frame,fLayout4);
263 frame->AddFrame(fAnalysisLabel,fLayout3);
264 frame->AddFrame(nBinsFrame,fLayout3);
265 nBinsFrame->AddFrame(nBinsLabel,fLayout1);
272 TGTextButton* setConf =
new TGTextButton(frame,
"Save Config",
id);
273 setConf->Associate(fMain);
275 frame->AddFrame(setConf,fLayout3);
277 main->MapSubwindows();
HarpoRecoEvent * GetRecoEvent()
TClonesArray * GetKalmanTracksArray()
Double_t GetData(Int_t i, Int_t j)
Set/Get Data Cell.
int main(int argc, char **argv)
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 ...
TClonesArray * GetVertexArray()
Dummy analysis to run as test and example. Give basic histograms of the data.
HarpoRecoTracks object, Obtained with Kalman filter.
TFile * OpenHistFile(const char *ananame)
void Save(char *mode=NULL)
unpacked dcc data The class contains the data map for DCC or Feminos The data is stored as a 2D TMatr...
void print()
Overloaded method which do all job.
TVirtualPad * MakeNiceHisto(TH1 *hist, TVirtualPad *c1, const char *opt, Bool_t copy)
void ConfigFrame(TGMainFrame *fMain, Int_t id)
TClonesArray * GetVertex3DArray()
void DisplayAnalysis(TRootEmbeddedCanvas *ecTab, TGListBox *infobox)
Redefine empty default.
HarpoEventHeader * GetHeader()
const ULong_t gkNDetectors
HarpoDccMap * GetDccMap(Long_t plane=XDCC)
TGNumberEntry * fChooseNbins
3D vertex object, containing position, angle and associated 2D vertexes, and quality info ...