224{
225 bool batch = gROOT->IsBatch();
228 gROOT->SetBatch();
229 }
230
232
233 gStyle->SetPalette(1);
234 gStyle->SetOptStat(0);
235 gPad->SetGridx(1);
236 gPad->SetGridy(1);
237
238 float margin=10;
243
244 TH2F *hh = new TH2F("hh","Corrections map",100,minXborder,maxXborder,100,minYborder,maxYborder);
245 hh->GetXaxis()->SetTitle("X (#mum)");
246 hh->GetYaxis()->SetTitle("Y (#mum)");
247 hh->Draw();
248
250 plate->SetFillColor(16);
251 plate->SetFillStyle(3001);
253
254 Double_t meanx=0, meany=0, wtot=0;
255 float scale = 15.;
257 for( int i=0; i<nc; i++ ) {
262 float dx = (*dxy)[0];
263 float dy = (*dxy)[1];
264
265 TArrow *arrow = new TArrow(x,y,x+scale*dx,y+scale*dy,0.01);
266 arrow->SetLineWidth(1);
267 arrow->Draw();
268
269 meanx += dx;
270 meany += dy;
272 }
273
274 meanx /= wtot;
275 meany /= wtot;
276 printf("\nmeanx = %g meany = %g wtot = %f\n", meanx, meany, wtot);
277
280 cc->Write("corr_map");
281 gROOT->SetBatch(batch);
282}
float Xmax() const
Definition: EdbCell2.h:65
float Xj(int j) const
Definition: EdbCell2.h:62
float Ymin() const
Definition: EdbCell2.h:66
float Yj(int j) const
Definition: EdbCell2.h:63
TH2F * DrawH2(const char *name="plot2d", const char *title="EdbH2plot2D")
Definition: EdbCell2.cpp:187
float Xmin() const
Definition: EdbCell2.h:64
float Ymax() const
Definition: EdbCell2.h:67
TFile * eOutputFile
Definition: EdbViewMatch.h:52
Int_t plate
Definition: merge_Energy_SytematicSources_Electron.C:1