1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#include <string>
#include <sstream>
#include "TFile.h"
#include "TList.h"
#include "TNtuple.h"
#include "TTree.h"
void compareGeomSerial(){
//gStyle->SetOptStat(000000000);
gStyle->SetOptStat("emr");
gStyle->SetPadLeftMargin(0.15);
gStyle->SetPadTopMargin(0.20);
gStyle->SetTitleFontSize(0.08);
TFile fin("<PATH>/comparisonV3_<N>.root");
fin.cd();
TTree* data = alignTree;
// subdetectors ("sublevel"): PXB (1), PXF, TIB (3), TID, TOB, TEC (6)
TCut levelCut = "((level == 1) && (sublevel >= 3))";
TCanvas* c = new TCanvas("c", "c", 200, 10, 800, 800);
c->SetFillColor(0);
data->SetMarkerStyle(6);
TH2D* hist2d = new TH2D("hist2D", "#Delta r vs. r; #Delta r (cm); r (cm)", 500, 0, 130, 1000, -1.0, 1.0);
data->Project("hist2D", "r*dphi:r", levelCut);
hist2d->Draw();
TAxis *xaxis = hist2d->GetXaxis();
TAxis *yaxis = hist2d->GetYaxis();
xaxis->SetTitle("");
yaxis->SetTitle("");
xaxis->CenterTitle(true);
yaxis->CenterTitle(true);
xaxis->SetTitleSize(0.06);
yaxis->SetTitleSize(0.06);
yaxis->SetTitleOffset(-0.25);
yaxis->SetLabelSize(.06);
xaxis->SetLabelSize(.06);
c->Print("<PATH>/comparisonV3_<N>.jpg");
}
|