void mutCalMon(Int_t Sta,Int_t ioctant) { // Loading PHOOL libraries gSystem->Load("libEvent.so"); gSystem->Load("libphool.so"); gSystem->Load("libWrappers.so"); gSystem->Load("libPhHistogramFactory.so"); gSystem->Load("libuti.so"); gSystem->Load("libdcm.so"); gSystem->Load("libPHGeant.so"); gSystem->Load("libPdbCal.so"); gSystem->Load("libdgo.so"); gSystem->Load("libPISARoot.so"); gSystem->Load("libgea.so"); // Loading subsystem libraries gSystem->Load("libbbc.so"); gSystem->Load("libmvd.so"); gSystem->Load("libmui.so"); gSystem->Load("libmfm.so"); gSystem->Load("libmut.so"); PHCompositeNode* topNode = new PHCompositeNode("TOP"); calibData* calib = new calibData; PHTimeStamp tsearch(2001,7,24,0,0,0); calib->dbGetAll(tsearch); TFile *f = new TFile("mutcal.root","RECREATE"); TNtuple *so[3][8]; so[0][0] = new TNtuple("s0o0","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[0][1] = new TNtuple("s0o1","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[0][2] = new TNtuple("s0o2","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[0][3] = new TNtuple("s0o3","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[0][4] = new TNtuple("s0o4","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[0][5] = new TNtuple("s0o5","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[0][6] = new TNtuple("s0o6","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[0][7] = new TNtuple("s0o7","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[1][0] = new TNtuple("s1o0","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[1][1] = new TNtuple("s1o1","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[1][2] = new TNtuple("s1o2","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[1][3] = new TNtuple("s1o3","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[1][4] = new TNtuple("s1o4","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[1][5] = new TNtuple("s1o5","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[1][6] = new TNtuple("s1o6","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[1][7] = new TNtuple("s1o7","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[2][0] = new TNtuple("s2o0","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[2][1] = new TNtuple("s2o1","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[2][2] = new TNtuple("s2o2","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[2][3] = new TNtuple("s2o3","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[2][4] = new TNtuple("s2o4","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[2][5] = new TNtuple("s2o5","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[2][6] = new TNtuple("s2o6","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); so[2][7] = new TNtuple("s2o7","Pedestal Gain Rms","arm:station:octant:half:gap:plane:strip:pedestal:gain:rms"); cout << " Booking the Histos " << endl; Int_t index; Float_t gain,ped,rms; Int_t arm=0;// south arm anly for(int sta=0; sta<3; sta++) { for(int octant=0; octant<8; octant++) { for(int halfoct=0; halfoct<2; halfoct++) { for(int gap=0; gap<3;gap++) { for(int pla=0; pla<2; pla++) { for(int str=0; str<187; str++) { gain = calib->getGain(0,sta,octant,halfoct,gap,pla,str); ped = calib->getPedestal(0,sta,octant,halfoct,gap,pla,str); rms = calib->getRms(0,sta,octant,halfoct,gap,pla,str); if ( !(gain==0 || ped==0 || rms==0)) { if(sta==0&&octant==0){so[0][0]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==0&&octant==1){so[0][1]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==0&&octant==2){so[0][2]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==0&&octant==3){so[0][3]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==0&&octant==4){so[0][4]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==0&&octant==5){so[0][5]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==0&&octant==6){so[0][6]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==0&&octant==7){so[0][7]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==1&&octant==0){so[1][0]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==1&&octant==1){so[1][1]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==1&&octant==2){so[1][2]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==1&&octant==3){so[1][3]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==1&&octant==4){so[1][4]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==1&&octant==5){so[1][5]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==1&&octant==6){so[1][6]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==1&&octant==7){so[1][7]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==2&&octant==0){so[2][0]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==2&&octant==1){so[2][1]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==2&&octant==2){so[2][2]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==2&&octant==3){so[2][3]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==2&&octant==4){so[2][4]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==2&&octant==5){so[2][5]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==2&&octant==6){so[2][6]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} if(sta==2&&octant==7){so[2][7]->Fill(arm,sta,octant,halfoct,gap,pla,str,ped,gain,rms);} } } } } } } } gStyle->SetOptFit(1111); // open the file and get histograms // set up a title char title[80]; sprintf(title,"Station[%d]_Octant[%d]",Sta,ioctant); cout <<"+++++++++++++++++++++++"<Divide(2,6); c2->Divide(2,6); c3->Divide(2,6); } else{ c1->Divide(2,4); c2->Divide(2,4); c3->Divide(2,4); } // draw canvas and pads c1.cd(); c2.cd(); c3.cd(); so[Sta][ioctant]->SetMarkerStyle(4); so[Sta][ioctant]->SetMarkerSize(0.2); so[Sta][ioctant]->SetMarkerColor(2); // show gains c1->cd(1); so[Sta][ioctant]->Draw("gain:strip","(half==0)&&(gap==0)&&(plane==0)"); c1->cd(2); so[Sta][ioctant]->Draw("gain:strip","(half==0)&&(gap==0)&&(plane==1)"); c1->cd(3); so[Sta][ioctant]->Draw("gain:strip","(half==0)&&(gap==1)&&(plane==0)"); c1->cd(4); so[Sta][ioctant]->Draw("gain:strip","(half==0)&&(gap==1)&&(plane==1)"); c1->cd(5); so[Sta][ioctant]->Draw("gain:strip","(half==1)&&(gap==0)&&(plane==0)"); c1->cd(6); so[Sta][ioctant]->Draw("gain:strip","(half==1)&&(gap==0)&&(plane==1)"); c1->cd(7); so[Sta][ioctant]->Draw("gain:strip","(half==1)&&(gap==1)&&(plane==0)"); c1->cd(8); so[Sta][ioctant]->Draw("gain:strip","(half==1)&&(gap==1)&&(plane==1)"); if(Sta==1){ c1->cd(9); so[Sta][ioctant]->Draw("gain:strip","(half==0)&&(gap==2)&&(plane==0)"); c1->cd(10); so[Sta][ioctant]->Draw("gain:strip","(half==0)&&(gap==2)&&(plane==1)"); c1->cd(11); so[Sta][ioctant]->Draw("gain:strip","(half==1)&&(gap==2)&&(plane==0)"); c1->cd(12); so[Sta][ioctant]->Draw("gain:strip","(half==1)&&(gap==2)&&(plane==1)"); } // show pedestals c2->cd(1); so[Sta][ioctant]->Draw("pedestal:strip","(half==0)&&(gap==0)&&(plane==0)"); c2->cd(2); so[Sta][ioctant]->Draw("pedestal:strip","(half==0)&&(gap==0)&&(plane==1)"); c2->cd(3); so[Sta][ioctant]->Draw("pedestal:strip","(half==0)&&(gap==1)&&(plane==0)"); c2->cd(4); so[Sta][ioctant]->Draw("pedestal:strip","(half==0)&&(gap==1)&&(plane==1)"); c2->cd(5); so[Sta][ioctant]->Draw("pedestal:strip","(half==1)&&(gap==0)&&(plane==0)"); c2->cd(6); so[Sta][ioctant]->Draw("pedestal:strip","(half==1)&&(gap==0)&&(plane==1)"); c2->cd(7); so[Sta][ioctant]->Draw("pedestal:strip","(half==1)&&(gap==1)&&(plane==0)"); c2->cd(8); so[Sta][ioctant]->Draw("pedestal:strip","(half==1)&&(gap==1)&&(plane==1)"); if(Sta==1){ c2->cd(9); so[Sta][ioctant]->Draw("pedestal:strip","(half==0)&&(gap==2)&&(plane==0)"); c2->cd(10); so[Sta][ioctant]->Draw("pedestal:strip","(half==0)&&(gap==2)&&(plane==1)"); c2->cd(11); so[Sta][ioctant]->Draw("pedestal:strip","(half==1)&&(gap==2)&&(plane==0)"); c2->cd(12); so[Sta][ioctant]->Draw("pedestal:strip","(half==1)&&(gap==2)&&(plane==1)"); } // show rms c3->cd(1); so[Sta][ioctant]->Draw("rms:strip","(half==0)&&(gap==0)&&(plane==0)"); c3->cd(2); so[Sta][ioctant]->Draw("rms:strip","(half==0)&&(gap==0)&&(plane==1)"); c3->cd(3); so[Sta][ioctant]->Draw("rms:strip","(half==0)&&(gap==1)&&(plane==0)"); c3->cd(4); so[Sta][ioctant]->Draw("rms:strip","(half==0)&&(gap==1)&&(plane==1)"); c3->cd(5); so[Sta][ioctant]->Draw("rms:strip","(half==1)&&(gap==0)&&(plane==0)"); c3->cd(6); so[Sta][ioctant]->Draw("rms:strip","(half==1)&&(gap==0)&&(plane==1)"); c3->cd(7); so[Sta][ioctant]->Draw("rms:strip","(half==1)&&(gap==1)&&(plane==0)"); c3->cd(8); so[Sta][ioctant]->Draw("rms:strip","(half==1)&&(gap==1)&&(plane==1)"); if(Sta==1){ c3->cd(9); so[Sta][ioctant]->Draw("rms:strip","(half==0)&&(gap==2)&&(plane==0)"); c3->cd(10); so[Sta][ioctant]->Draw("rms:strip","(half==0)&&(gap==2)&&(plane==1)"); c3->cd(11); so[Sta][ioctant]->Draw("rms:strip","(half==1)&&(gap==2)&&(plane==0)"); c3->cd(12); so[Sta][ioctant]->Draw("rms:strip","(half==1)&&(gap==2)&&(plane==1)"); } // Sta==2 //f->Close(); //cout<< "mutcal.root was generated holding all calib information"<