File indexing completed on 2024-04-06 12:27:56
0001
0002
0003
0004
0005
0006 {
0007
0008 TFile f("testContCorrect.root");
0009 TTree *t =(TTree*) f.Get("test");
0010
0011 TH2D *energy3x3 =
0012 new TH2D("e3x3vsx","e3x3vsx",100, -10.,10.,100,120.,150.);
0013 TH2D *corrected3x3=
0014 new TH2D("corr3x3vsx","corr3x3vsx",100, -10.,10.,100,120.,150.);
0015 TH2D *energy5x5=
0016 new TH2D("e5x5vsx","e5x5vsx",100, -10.,10.,100,120.,150.);
0017 TH2D *corrected5x5=
0018 new TH2D("corr5x5vsx","corr5x5vsx",100, -10.,10.,100,10.,150.);
0019
0020 t->Project("e3x3vsx","energy3x3:posx");
0021 t->Project("corr3x3vsx","corrected3x3:posx");
0022 t->Project("e5x5vsx","energy5x5:posx");
0023 t->Project("corr5x5vsx","corrected5x5:posx");
0024
0025 TCanvas * canvas = new TCanvas("corrections","corrections");
0026 canvas->Divide(2,2);
0027
0028 canvas->cd(1);
0029 energy3x3.Draw();
0030
0031 canvas->cd(2);
0032 corrected3x3.Draw();
0033
0034 canvas->cd(3);
0035 energy5x5.Draw();
0036
0037 canvas->cd(4);
0038 corrected5x5.Draw();
0039 }