2 TFile *fin =
new TFile(filename,
"READ");
3 TTree *
mdc = (TTree *)fin->Get(
"mdcTrack");
5 TFile *fin1 =
new TFile(filename,
"READ");
6 TTree *mdc1 = (TTree *)fin1->Get(
"mdcHit");
11 float Tanl, Dr, Dz, Chisq, FiTerm;
12 float Hits_ddl,Hits_id;
13 float Hits_ddr, doca, Hits_mdc_id, layer, wire;
14 float Hits_tdc, Hits_adc;
18 mdc->SetBranchAddress(
"runNo",&
runNo);
19 mdc->SetBranchAddress(
"nhits",&
nhits);
20 mdc->SetBranchAddress(
"Id", &Id);
21 mdc->SetBranchAddress(
"Phi0", &Phi0);
22 mdc->SetBranchAddress(
"Tanl",&Tanl);
23 mdc->SetBranchAddress(
"Cpa",&Cpa);
24 mdc->SetBranchAddress(
"Dr", &Dr);
25 mdc->SetBranchAddress(
"Dz", &Dz);
26 mdc->SetBranchAddress(
"Chisq", &Chisq);
27 mdc->SetBranchAddress(
"FiTerm", &FiTerm);
28 mdc1->SetBranchAddress(
"Hits_id", &Hits_id);
29 mdc1->SetBranchAddress(
"Hits_ddl", &Hits_ddl);
30 mdc1->SetBranchAddress(
"Hits_ddr", &Hits_ddr);
31 mdc->SetBranchAddress(
"Nhits", &Nhits);
32 mdc->SetBranchAddress(
"Nster", &Nster);
33 mdc1->SetBranchAddress(
"doca", &doca);
34 mdc1->SetBranchAddress(
"Hits_mdc_id", &Hits_mdc_id);
35 mdc1->SetBranchAddress(
"layer", &layer);
36 mdc1->SetBranchAddress(
"wire", &wire);
37 mdc1->SetBranchAddress(
"Hits_tdc", &Hits_tdc);
38 mdc1->SetBranchAddress(
"Hits_adc", &Hits_adc);
45 TH1F *m_nhits =
new TH1F(
"nhits",
"nhits",100,0,5000);
46 TH1F *m_eventNo =
new TH1F(
"eventNo",
"eventNo", 100,0,10000);
47 TH1F *m_runNo =
new TH1F(
"runNo",
"runNo",100, 0, 100000);
48 TH1F *m_Id =
new TH1F(
"Id",
"track_id",100,0,100);
49 TH1F *m_Phi0 =
new TH1F(
"Phi0",
"phi0",100,0,3.14);
50 TH1F *m_Tanl =
new TH1F(
"Tanl",
"tanl",100,-300,300);
51 TH1F *m_Dr =
new TH1F(
"Dr",
"dr",100,-300,300);
52 TH1F *m_Dz =
new TH1F(
"Dz",
"dz",100,-300,300);
53 TH1F *m_Chisq =
new TH1F(
"Chisq",
"chisq_of_fit",100,-300,3000);
54 TH1F *m_FiTerm =
new TH1F(
"FiTerm",
"phi_terminal",100,0,6.3);
55 TH1F *m_Nhits =
new TH1F(
"Nhits",
"number_of_hits",100,0,500);
56 TH1F *m_Nster =
new TH1F(
"Nster",
"number_of_stereo_hits",100,0,5000);
57 TH1F *m_Cpa =
new TH1F(
"Cpa",
"cpa",100,0,5000);
59 TFile *fout1 =
new TFile(
"ValidRecMdcTrackHist.root",
"recreate");
61 TH1F *m_Hits_id =
new TH1F(
"Hits_id",
"hits_id",100,0,300);
62 TH1F *m_Hits_ddl =
new TH1F(
"Hits_ddl",
"hits_ddl",100,-300,300);
63 TH1F *m_Hits_ddr =
new TH1F(
"Hits_ddr",
"hits_ddr",100,-300,300);
64 TH1F *
m_doca =
new TH1F(
"doca",
"doca",100,-300,300);
65 TH1F *m_Hits_mdc_id =
new TH1F(
"Hits_mdc_id",
"hits_mdc_id",100,-300,300);
66 TH1F *
m_layer =
new TH1F(
"layer",
"layer",100,-300,300);
67 TH1F *
m_wire =
new TH1F(
"wire",
"wire",100,-300,300);
68 TH1F *m_Hits_tdc =
new TH1F(
"Hits_tdc",
"hits_tdc",100,-300,300);
69 TH1F *m_Hits_adc =
new TH1F(
"Hits_adc",
"hits_adc",100,-300,300);
72 for(
int i = 0; i <
mdc->GetEntries(); i++){
86 m_FiTerm->Fill(FiTerm);
102 for(
int i = 0; i < mdc1->GetEntries(); i++){
105 m_Hits_id->Fill(Hits_id);
106 m_Hits_ddl->Fill(Hits_ddl);
107 m_Hits_ddr->Fill(Hits_ddr);
109 m_Hits_mdc_id->Fill(Hits_mdc_id);
112 m_Hits_tdc->Fill(Hits_tdc);
113 m_Hits_adc->Fill(Hits_adc);
133 m_Hits_mdc_id->Write();