Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:46:01

0001 {
0002 #include <string>
0003 #include <sstream>
0004 
0005 #include "TFile.h"
0006 #include "TList.h"
0007 #include "TNtuple.h"
0008 #include "TTree.h"
0009   
0010   //gStyle->SetOptStat(000000000);
0011   //gStyle->SetPadBorderSize(0.0);
0012   //gStyle->SetPadBottomMargin(0.15);
0013   gStyle->SetPadLeftMargin(0.15);
0014   gStyle->SetPadTopMargin(0.20);
0015   gStyle->SetTitleFontSize(0.08);
0016   
0017   //TFile fin("zijinData/compareMis1.root");
0018   //TFile fin("compareHIPtoSurvey_globalshift.root");
0019   //TFile fin("compareHIP.root");
0020   //TFile fin("Compare13Xto14X_pos.root");
0021   //TFile fin("UCSBCompare.root");
0022   //TFile fin("testCompare.root");
0023   TFile fin("stripCompare2.root");
0024   //TFile fin("fullsurveyCompare_19_18_13_11_8_5_1.root");
0025   fin.cd();
0026   TTree* data = alignTree;
0027 
0028 
0029   TCut levelCut1 = "(level == 1) && (sublevel > 0) && (sublevel < 7)";
0030   TCut zCut = "(z < 40)&&(z>-40)";
0031   TCut pXCut = "(phi < 1.5707) && (phi > -1.5707)";
0032   TCut mXCut = "(phi > 1.5707) && (phi < -1.5707)";
0033   TCut levelCut = levelCut1;//+ zCut;// + pXCut;
0034 
0035 
0036   TCanvas* c = new TCanvas("c", "c", 200, 10, 800, 800);
0037   c->SetFillColor(0);
0038   data->SetMarkerStyle(0);
0039   c->Divide(3,3);
0040   c->cd(1);
0041   data->Draw("dr:r", levelCut);
0042   TH1F* htemp = (TH1F*)gPad->GetPrimitive("htemp");
0043   htemp->SetTitle("#Delta r (cm) vs. r (cm)");
0044   TAxis *xaxis = htemp->GetXaxis();
0045   TAxis *yaxis = htemp->GetYaxis();
0046   xaxis->SetTitle("");
0047   yaxis->SetTitle("");
0048   xaxis->CenterTitle(true);
0049   yaxis->CenterTitle(true);
0050   xaxis->SetTitleSize(0.06);
0051   yaxis->SetTitleSize(0.06);
0052   yaxis->SetTitleOffset(-0.25);
0053   yaxis->SetLabelSize(.06);
0054   xaxis->SetLabelSize(.06);
0055   //yaxis->SetRangeUser(-.1,.2);
0056   //yaxis->SetRangeUser(-.005,0.02);
0057   c->Update();
0058   c->cd(2);
0059   data->Draw("dz:r", levelCut);
0060   TH1F* htemp = (TH1F*)gPad->GetPrimitive("htemp");
0061   htemp->SetTitle("#Delta z (cm) vs. r (cm)");
0062   TAxis *xaxis = htemp->GetXaxis();
0063   TAxis *yaxis = htemp->GetYaxis();
0064   xaxis->SetTitle("r (cm)");
0065   yaxis->SetTitle("#Delta z (cm)");
0066   xaxis->SetTitle("");
0067   yaxis->SetTitle("");
0068   xaxis->CenterTitle(true);
0069   yaxis->CenterTitle(true);
0070   xaxis->SetTitleSize(0.06);
0071   yaxis->SetTitleSize(0.06);
0072   yaxis->SetTitleOffset(-0.3);
0073   yaxis->SetLabelSize(.06);
0074   xaxis->SetLabelSize(.06);
0075   //yaxis->SetRangeUser(-.1,.175);
0076   //yaxis->SetRangeUser(-.5,1.5);
0077   c->Update();
0078   c->cd(3);
0079   data->Draw("r*dphi:r", levelCut);
0080    TH1F* htemp = (TH1F*)gPad->GetPrimitive("htemp");
0081   htemp->SetTitle("r*#Delta #phi (cm) vs. r (cm)");
0082   TAxis *xaxis = htemp->GetXaxis();
0083   TAxis *yaxis = htemp->GetYaxis();
0084   xaxis->SetTitle("r (cm)");
0085   yaxis->SetTitle("r*#Delta #phi (cm)");
0086   xaxis->SetTitle("");
0087   yaxis->SetTitle("");
0088   xaxis->CenterTitle(true);
0089   yaxis->CenterTitle(true);
0090   xaxis->SetTitleSize(0.06);
0091   yaxis->SetTitleSize(0.06);
0092   yaxis->SetTitleOffset(-0.3);
0093   yaxis->SetLabelSize(.06);
0094   xaxis->SetLabelSize(.06);
0095   //yaxis->SetRangeUser(-.22,.55);
0096   //yaxis->SetRangeUser(-.3,.32);
0097   c->Update();
0098   c->cd(4);
0099   data->Draw("dr:z", levelCut);
0100   TH1F* htemp = (TH1F*)gPad->GetPrimitive("htemp");
0101   htemp->SetTitle("#Delta r (cm) vs. z (cm)");
0102   TAxis *xaxis = htemp->GetXaxis();
0103   TAxis *yaxis = htemp->GetYaxis();
0104   xaxis->SetTitle("z (cm)");
0105   yaxis->SetTitle("#Delta r (cm)");
0106   xaxis->SetTitle("");
0107   yaxis->SetTitle("");
0108   xaxis->CenterTitle(true);
0109   yaxis->CenterTitle(true);
0110   xaxis->SetTitleSize(0.06);
0111   yaxis->SetTitleSize(0.06);
0112   yaxis->SetTitleOffset(-0.3);
0113   xaxis->SetLabelSize(.06);
0114   yaxis->SetLabelSize(.06);
0115   //yaxis->SetRangeUser(-.1,.2); 
0116   //yaxis->SetRangeUser(-.3,1.0);
0117   //yaxis->SetRangeUser(-.005,0.02);
0118   c->Update();
0119   c->cd(5);
0120   data->Draw("dz:z", levelCut);
0121   TH1F* htemp = (TH1F*)gPad->GetPrimitive("htemp");
0122   htemp->SetTitle("#Delta z (cm) vs. z (cm)");
0123   TAxis *xaxis = htemp->GetXaxis();
0124   TAxis *yaxis = htemp->GetYaxis();
0125   xaxis->SetTitle("z (cm)");
0126   yaxis->SetTitle("#Delta z (cm)");
0127   xaxis->SetTitle("");
0128   yaxis->SetTitle("");
0129   xaxis->CenterTitle(true);
0130   yaxis->CenterTitle(true);
0131   xaxis->SetTitleSize(0.06);
0132   yaxis->SetTitleSize(0.06);
0133   yaxis->SetTitleOffset(-0.3);
0134   yaxis->SetLabelSize(.06);
0135   xaxis->SetLabelSize(.06);
0136   //yaxis->SetRangeUser(-.1,.175);
0137   //yaxis->SetRangeUser(-.5,1.5);
0138   c->Update();
0139   c->cd(6);
0140   data->Draw("r*dphi:z", levelCut);
0141   TH1F* htemp = (TH1F*)gPad->GetPrimitive("htemp");
0142   htemp->SetTitle("r*#Delta #phi (cm) vs. z (cm)");
0143   TAxis *xaxis = htemp->GetXaxis();
0144   TAxis *yaxis = htemp->GetYaxis();
0145   xaxis->SetTitle("z (cm)");
0146   yaxis->SetTitle("r*#Delta #phi (cm)");
0147   xaxis->SetTitle("");
0148   yaxis->SetTitle("");
0149   xaxis->CenterTitle(true);
0150   yaxis->CenterTitle(true);
0151   xaxis->SetTitleSize(0.06);
0152   yaxis->SetTitleSize(0.06);
0153   yaxis->SetTitleOffset(-0.3);
0154   yaxis->SetLabelSize(.06);
0155   xaxis->SetLabelSize(.06);
0156   //yaxis->SetRangeUser(-.22,.55);
0157   //yaxis->SetRangeUser(-.3,.32);
0158   c->Update();
0159   c->cd(7);
0160   data->Draw("dr:phi", levelCut);
0161   TH1F* htemp = (TH1F*)gPad->GetPrimitive("htemp");
0162   htemp->SetTitle("#Delta r  (cm)vs. #phi");
0163   TAxis *xaxis = htemp->GetXaxis();
0164   TAxis *yaxis = htemp->GetYaxis();
0165   xaxis->SetTitle("#phi");
0166   yaxis->SetTitle("#Delta r (cm)");
0167   xaxis->SetTitle("");
0168   yaxis->SetTitle("");
0169   xaxis->CenterTitle(true);
0170   yaxis->CenterTitle(true);
0171   xaxis->SetTitleSize(0.06);
0172   yaxis->SetTitleSize(0.06);
0173   yaxis->SetTitleOffset(-0.3);
0174   yaxis->SetLabelSize(.06);
0175   xaxis->SetLabelSize(.06);
0176   //yaxis->SetRangeUser(-.1,.2);
0177   //yaxis->SetRangeUser(-.3,1.0);
0178   //yaxis->SetRangeUser(-.005,0.02);
0179   c->Update();
0180   c->cd(8);
0181   data->Draw("dz:phi", levelCut);
0182   TH1F* htemp = (TH1F*)gPad->GetPrimitive("htemp");
0183   htemp->SetTitle("#Delta z  (cm)vs. #phi");
0184   TAxis *xaxis = htemp->GetXaxis();
0185   TAxis *yaxis = htemp->GetYaxis();
0186   xaxis->SetTitle("#phi");
0187   yaxis->SetTitle("#Delta z (cm)");
0188   xaxis->SetTitle("");
0189   yaxis->SetTitle("");
0190   xaxis->CenterTitle(true);
0191   yaxis->CenterTitle(true);
0192   xaxis->SetTitleSize(0.06);
0193   yaxis->SetTitleSize(0.06);
0194   yaxis->SetTitleOffset(-0.3);
0195   yaxis->SetLabelSize(.06);
0196   xaxis->SetLabelSize(.06);
0197   //yaxis->SetRangeUser(-.1,.175);
0198   //yaxis->SetRangeUser(-.5,1.5);
0199   c->Update();
0200   c->cd(9);
0201   data->Draw("r*dphi:phi", levelCut);
0202   TH1F* htemp = (TH1F*)gPad->GetPrimitive("htemp");
0203   htemp->SetTitle("r*#Delta #phi (cm) vs. #phi");
0204   TAxis *xaxis = htemp->GetXaxis();
0205   TAxis *yaxis = htemp->GetYaxis();
0206   xaxis->SetTitle("#phi");
0207   yaxis->SetTitle("r*#Delta #phi (cm)");
0208   xaxis->SetTitle("");
0209   yaxis->SetTitle("");
0210   xaxis->CenterTitle(true);
0211   yaxis->CenterTitle(true);
0212   xaxis->SetTitleSize(0.06);
0213   yaxis->SetTitleSize(0.06);
0214   yaxis->SetTitleOffset(-0.3);
0215   yaxis->SetLabelSize(.06);
0216   xaxis->SetLabelSize(.06);
0217   //yaxis->SetRangeUser(-.22,.55);
0218   //yaxis->SetRangeUser(-.4,.75);
0219   c->Update();
0220   
0221 
0222 }