Newer
Older
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
TChain* chain;
void LoadRootFiles();
void LoadCuts();
TCutG* cut44;
TCutG* cut40;
double Exo_EDC_vamos;
int FPMW_Section;
double FF_Mass;
double FF_DE;
double FF_Eres;
///////////////////////////////////////////
void LoadRootFiles()
{
chain = new TChain("PhysicsTree");
chain->Add("../../root/analysis/run_28.root");
chain->Add("../../root/analysis/run_29.root");
chain->Add("../../root/analysis/run_30.root");
chain->Add("../../root/analysis/run_31.root");
chain->Add("../../root/analysis/run_32.root");
chain->Add("../../root/analysis/run_36.root");
chain->Add("../../root/analysis/run_37.root");
chain->Add("../../root/analysis/run_39.root");
chain->Add("../../root/analysis/run_41.root");
chain->Add("../../root/analysis/run_42.root");
chain->Add("../../root/analysis/run_43.root");
chain->Add("../../root/analysis/run_44.root");
chain->Add("../../root/analysis/run_45.root");
chain->Add("../../root/analysis/run_46.root");
chain->Add("../../root/analysis/run_48.root");
chain->Add("../../root/analysis/run_49.root");
chain->Add("../../root/analysis/run_50.root");
chain->Add("../../root/analysis/run_51.root");
chain->Add("../../root/analysis/run_52.root");
chain->Add("../../root/analysis/run_53.root");
chain->Add("../../root/analysis/run_69.root");
}
///////////////////////////////////////////
void LoadCuts()
{
TFile* ifile = new TFile("cut44.root");
cut44 = (TCutG*) ifile->FindObjectAny("cut44");
ifile->Close();
ifile = new TFile("cut40.root");
cut40 = (TCutG*) ifile->FindObjectAny("cut40");
ifile->Close();
}
///////////////////////////////////////////
void check_gamma()
{
LoadCuts();
LoadRootFiles();
TFile* ofile = new TFile("mass_check.root","recreate");
TH2F* hmass44 = new TH2F("hmass44","hmass44",20,0,20,1000,60,160);
TH2F* h108 = new TH2F("h108","h108",20,0,20,500,0,2000);
TH2F* h106 = new TH2F("h106","h106",20,0,20,500,0,2000);
TH2F* h100 = new TH2F("h100","h100",20,0,20,500,0,2000);
TH2F* h98 = new TH2F("h98","h98",20,0,20,500,0,2000);
TH1F* hg108 = new TH1F("hg108","hg108",500,0,2000);
TH1F* hg106 = new TH1F("hg106","hg106",500,0,2000);
TH1F* hg100 = new TH1F("hg100","hg100",500,0,2000);
TH1F* hg98 = new TH1F("hg98","hg98",500,0,2000);
chain->SetBranchStatus("Exo_EDC_vamos",true);
chain->SetBranchAddress("Exo_EDC_vamos",&Exo_EDC_vamos);
chain->SetBranchStatus("FPMW_Section",true);
chain->SetBranchAddress("FPMW_Section",&FPMW_Section);
chain->SetBranchStatus("FF_Mass13",true);
chain->SetBranchAddress("FF_Mass13",&FF_Mass);
chain->SetBranchStatus("FF_DE",true);
chain->SetBranchAddress("FF_DE",&FF_DE);
chain->SetBranchStatus("FF_Eres",true);
chain->SetBranchAddress("FF_Eres",&FF_Eres);
int nentries = chain->GetEntries();
for(int i=0; i<nentries; i++){
if(i%100000==0) cout << i*100./nentries << "% \r" << flush;
chain->GetEntry(i);
if(cut44->IsInside(FF_Eres,FF_DE)){
hmass44->Fill(FPMW_Section,FF_Mass);
if(abs(FF_Mass-108)<0.5){
h108->Fill(FPMW_Section,Exo_EDC_vamos);
hg108->Fill(Exo_EDC_vamos);
}
else if(abs(FF_Mass-106)<0.5){
h106->Fill(FPMW_Section,Exo_EDC_vamos);
hg106->Fill(Exo_EDC_vamos);
}
}
else if(cut40->IsInside(FF_Eres,FF_DE)){
if(abs(FF_Mass-100)<0.5){
h100->Fill(FPMW_Section,Exo_EDC_vamos);
hg100->Fill(Exo_EDC_vamos);
}
else if(abs(FF_Mass-98)<0.5){
h98->Fill(FPMW_Section,Exo_EDC_vamos);
hg98->Fill(Exo_EDC_vamos);
}
}
}
hmass44->Write();
h108->Write();
h106->Write();
h100->Write();
h98->Write();
hg108->Write();
hg106->Write();
hg100->Write();
hg98->Write();
ofile->Close();
}