File indexing completed on 2023-10-25 10:00:17
0001 void CSCSegmentPlotter(int segtype){
0002
0003
0004
0005
0006
0007
0008
0009
0010 float nsigmas = 1.5;
0011
0012
0013
0014
0015 TString suffixps = ".gif";
0016
0017 TString segment = "shower";
0018
0019 if (segtype == 2) TString segment = "shower_zoom";
0020 if (segtype == 3) TString segment = "DF";
0021 if (segtype == 4) TString segment = "DF_zoom";
0022
0023 TString endfile = ".root";
0024 TString tfile = "cscsegments_"+segment+endfile;
0025
0026 TFile *file = TFile::Open(tfile);
0027
0028 TString plot0 = "matched_pair_"+segment+suffixps;
0029
0030 TString plot1a = "eff_raw_"+segment+suffixps;
0031 TString plot1b = "eff_6hit_"+segment+suffixps;
0032
0033 TString plot2 = "chi2_"+segment+suffixps;
0034
0035 TString plot3 = "nhits_per_seg_"+segment+suffixps;
0036
0037 TString plot4a = "dx_seg_Ori_"+segment+suffixps;
0038 TString plot4b = "dy_seg_Ori_"+segment+suffixps;
0039 TString plot4c = "dphi_seg_Dir_"+segment+suffixps;
0040 TString plot4d = "dtheta_seg_Dir_"+segment+suffixps;
0041
0042
0043
0044
0045
0046
0047
0048 hRawEff = (TH1F *) file->Get("h1");
0049 h6hitEff = (TH1F *) file->Get("h3");
0050
0051
0052 hChi2 = (TH1F *) file->Get("h4");
0053
0054
0055 hNhit = (TH1F *) file->Get("h5");
0056
0057
0058 hdxME1A = (TH1F *) file->Get("h20");
0059 hdyME1A = (TH1F *) file->Get("h30");
0060 hdphiME1A = (TH1F *) file->Get("h40");
0061 hdthetaME1A = (TH1F *) file->Get("h50");
0062
0063
0064
0065
0066
0067
0068 gStyle->SetOptStat(kFALSE);
0069 TCanvas *c1 = new TCanvas("c1","");
0070 c1->SetFillColor(10);
0071 c1->SetFillColor(10);
0072 hRawEff->SetTitle(segment);
0073 hRawEff->Draw();
0074 hRawEff->GetXaxis()->SetTitle("chamber type");
0075 hRawEff->GetYaxis()->SetTitle("3+ hit segment/6-layer events ");
0076 c1->Print(plot1a);
0077
0078
0079 gStyle->SetOptStat(kFALSE);
0080 TCanvas *c1 = new TCanvas("c1","");
0081 c1->SetFillColor(10);
0082 c1->SetFillColor(10);
0083 h6hitEff->SetTitle(segment);
0084 h6hitEff->Draw();
0085 h6hitEff->GetXaxis()->SetTitle("chamber type");
0086 h6hitEff->GetYaxis()->SetTitle("6-hit segment/6-layer events ");
0087 c1->Print(plot1b);
0088
0089
0090
0091
0092
0093
0094 gStyle->SetOptStat(kTRUE);
0095 TCanvas *c1 = new TCanvas("c1","");
0096 gPad->SetLogy(kTRUE);
0097 c1->SetFillColor(10);
0098 c1->SetFillColor(10);
0099 hChi2->SetTitle(segment);
0100 hChi2->Draw();
0101 hChi2->GetXaxis()->SetTitle("#chi^{2}/(2 N_{hit} - 4)");
0102 hChi2->GetYaxis()->SetTitle(" ");
0103 c1->Print(plot2);
0104
0105
0106
0107
0108
0109
0110 gStyle->SetOptStat(kTRUE);
0111 TCanvas *c1 = new TCanvas("c1","");
0112 c1->SetFillColor(10);
0113 c1->SetFillColor(10);
0114 hNhit->SetTitle(segment);
0115 hNhit->Draw();
0116 hNhit->GetXaxis()->SetTitle("number of hits/segment");
0117 hNhit->GetYaxis()->SetTitle(" ");
0118 c1->Print(plot3);
0119
0120
0121
0122
0123
0124 gStyle->SetOptStat(kTRUE);
0125 TCanvas *c1 = new TCanvas("c1","");
0126 c1->SetFillColor(10);
0127 c1->SetFillColor(10);
0128 hdxME1A->SetTitle(segment);
0129 hdxME1A->Draw();
0130 hdxME1A->GetXaxis()->SetTitle("#Delta X for seg. origin (cm)");
0131 hdxME1A->GetYaxis()->SetTitle(" ");
0132 c1->Print(plot4a);
0133
0134 gStyle->SetOptStat(kTRUE);
0135 TCanvas *c1 = new TCanvas("c1","");
0136 c1->SetFillColor(10);
0137 c1->SetFillColor(10);
0138 hdyME1A->SetTitle(segment);
0139 hdyME1A->Draw();
0140 hdyME1A->GetXaxis()->SetTitle("#Delta Y for seg. origin (cm)");
0141 hdyME1A->GetYaxis()->SetTitle(" ");
0142 c1->Print(plot4b);
0143
0144 gStyle->SetOptStat(kTRUE);
0145 TCanvas *c1 = new TCanvas("c1","");
0146 c1->SetFillColor(10);
0147 c1->SetFillColor(10);
0148 hdphiME1A->SetTitle(segment);
0149 hdphiME1A->Draw();
0150 hdphiME1A->GetXaxis()->SetTitle("#Delta #phi on seg. direction (global)");
0151 hdphiME1A->GetYaxis()->SetTitle(" ");
0152 c1->Print(plot4c);
0153
0154 gStyle->SetOptStat(kTRUE);
0155 TCanvas *c1 = new TCanvas("c1","");
0156 c1->SetFillColor(10);
0157 c1->SetFillColor(10);
0158 hdthetaME1A->SetTitle(segment);
0159 hdthetaME1A->Draw();
0160 hdthetaME1A->GetXaxis()->SetTitle("#Delta #theta on seg. direction (global)");
0161 hdthetaME1A->GetYaxis()->SetTitle(" ");
0162 c1->Print(plot4d);
0163
0164
0165 gROOT->ProcessLine(".q");
0166
0167 }