{ #include gROOT->LoadMacro("AtlasUtils.C"); ATLAS->SetPadTickX(1); ATLAS->SetPadRightMargin(0.12); ATLAS->SetPadLeftMargin(0.12); gStyle->SetOptStat(0); c1 = new TCanvas("c1","A Simple Graph",500,10,700,500); c1->Divide(2,3); c1->cd(1); // double HVcut=140., TEMPcut_high=14.0, TEMPcut_low= -4.; double Temp[3][10][13][56]; //Temp[bec][layer][eta][phi] double Temp1[3][10][13][56]; //Temp[bec][layer][eta][phi] double Phi[56]; int barrel[10]={0,0,0,32,40,48,56,0,0,0}; for (int i=0;i<56;i++) Phi[i]=i; // for(int i=0;i<3;i++){ for(int j=0;j<10;j++){ for(int k=0;k<13;k++){ for(int l=0;l<56;l++){ Temp[i][j][k][l] = -999.; } } } } //--------------------------------- int bec,layer,phi,eta,date,time; //------------------TM0--------------------------- int bec0=9,layer0=9,phi0=9,eta0=9,date0=9,time0=9; double data, data0=-999.; int idata=0; double sum=0.; ifstream fin("sct_TM0_000016.txt"); while(fin>>bec>>layer>>phi>>eta>>data>>date>>time) { if(bec!=bec0 || layer!=layer0 || phi!=phi0 || eta!=eta0){ if(idata != 0) { if(bec0==1) eta0 += 6; Temp[bec0][layer0][eta0][phi0] = sum/idata; if(bec0==1 && layer0 ==3 && eta0 == 0) cout<>bec>>layer>>phi>>eta>>data>>date>>time) { if(bec!=bec0 || layer!=layer0 || phi!=phi0 || eta!=eta0){ if(idata != 0) { if(bec0==1) eta0 += 6; Temp1[bec0][layer0][eta0][phi0] = sum/idata; if(bec0==1 && layer0 ==3 && eta0 == 0) cout< 6) continue; for(int Eta=0; Eta<13 ;Eta++) { int etavalue = Eta -6; if( Eta == 6 ) continue; icd = Eta + 1; if( Eta > 6 ) icd = Eta - 6 ; c1 -> cd(icd); int nphi = barrel[Layer]; // cout<SetMarkerSize(0.5); h1->SetMarkerColor(50);h2->SetMarkerSize(0.5);h2->SetMarkerColor(1); h1->SetMaximum(15.); h1->SetMinimum(-5.); h1->GetXaxis()->SetTitle("phi"); h1->GetXaxis()->SetTitleOffset(0.8); h1->GetXaxis()->SetTitleSize(0.10); h1->GetXaxis()->SetLabelSize(0.08); h1->GetYaxis()->SetTitle("T [^{o}C]"); h1->GetYaxis()->SetTitleOffset(0.5); h1->GetYaxis()->SetTitleSize(0.10); h1->GetYaxis()->SetLabelSize(0.08); h1->GetXaxis()->SetLimits(0.,nphi); h1->Draw("ALP"); h2->Draw("SAME LP"); cut = new TLine(0,TEMPcut_high, nphi, TEMPcut_high); cut->SetLineStyle(2); cut->SetLineColor(3); cut->Draw(); cut = new TLine(0,TEMPcut_low, nphi, TEMPcut_low); cut->SetLineStyle(2); cut->SetLineColor(3); cut->Draw(); cid = new char[40]; sprintf(cid,"Barrel B%d, #eta %d",Layer,etavalue); cid[39]=0; yleg = 0.58; if(Layer==6) yleg=0.24; leg = new TLegend(0.55 ,yleg ,0.85,yleg+0.25,cid); leg -> SetFillColor(10); leg->AddEntry(h1,"link 0","p"); leg->AddEntry(h2,"link 1","p"); leg->SetBorderSize(0); leg->SetTextSize(0.09); leg->Draw(); cfile = new char[25];sprintf(cfile,"Temp_Barrel_%d_1.pdf",Layer);cfile[24]=0; if( Eta == 5 ) c1->Print(cfile); cfile = new char[25];sprintf(cfile,"Temp_Barrel_%d_2.pdf",Layer);cfile[24]=0; if( Eta == 12 )c1->Print(cfile); } } //-------------plot endcaps-------------------- for(int BEC=0; BEC<3; BEC+=2){ for(int Eta=0; Eta<3 ;Eta++) { c1->Clear(); c1->Divide(3,3); for(int Layer=1; Layer<10; Layer++) { c1 -> cd(Layer); int nphi = 52; if(Eta !=0) nphi=39; // cout<SetMarkerSize(0.5); h1->SetMarkerColor(50); h1->SetMaximum(15.); h1->SetMinimum(-5.); h1->GetXaxis()->SetTitle("phi"); h1->GetXaxis()->SetTitleOffset(0.8); h1->GetXaxis()->SetTitleSize(0.10); h1->GetXaxis()->SetLabelSize(0.08); h1->GetYaxis()->SetTitle("T [^{o}C]"); h1->GetYaxis()->SetTitleOffset(0.7); h1->GetYaxis()->SetTitleSize(0.07); h1->GetYaxis()->SetLabelSize(0.08); h1->GetXaxis()->SetLimits(0.,nphi); h1->Draw("ALP"); cut = new TLine(0,TEMPcut_high, nphi, TEMPcut_high); cut->SetLineStyle(2); cut->SetLineColor(3); cut->Draw(); cut = new TLine(0,TEMPcut_low, nphi, TEMPcut_low); cut->SetLineStyle(2); cut->SetLineColor(3); cut->Draw(); cid = new char[40]; cid[39]=0; if(BEC==0){ sprintf(cid,"ECC Layer %d, outer",Layer); if(Eta==1) sprintf(cid,"ECC Layer %d middle",Layer); if(Eta==2) sprintf(cid,"ECC Layer %d inner",Layer); } else { sprintf(cid,"ECA Layer %d, outer",Layer); if(Eta==1) sprintf(cid,"ECA Layer %d middle",Layer); if(Eta==2) sprintf(cid,"ECA Layer %d inner",Layer); } leg = new TLegend(0.42 ,0.24 ,0.85,0.36,cid);leg -> SetFillColor(10); leg->SetBorderSize(0); leg->SetTextSize(0.07); leg->Draw(); } cfile = new char[25]; cfile[24]=0; if(BEC==0) sprintf(cfile,"Temp_ECC_%d.pdf",Eta); if(BEC==2) sprintf(cfile,"Temp_ECA_%d.pdf",Eta); c1->Print(cfile); } } //------------------------------------------ }