void vdct0cardCheck(){ //void vdct0wire(char * runlist){ //extract from rawtdc //attachfile(runlist); TChain *T = new TChain("T"); //T->Add("/taidisk/L_detCheck/e07006_L_det_1231.root"); //T->Add("/taidisk/L_detCheck/e07006_L_det_1235.root"); T->Add("/taidisk/L_detCheck/e07006_L_det_1236.root"); T->Add("/taidisk/L_detCheck/e07006_L_det_1237.root"); T->Add("/taidisk/L_detCheck/e07006_L_det_1241.root"); T->Add("/taidisk/L_detCheck/e07006_L_det_1242.root"); T->Add("/taidisk/L_detCheck/e07006_L_det_1243.root"); double const offsetCh = 1800; int const NBIN= 200; //200; int const DOM_MIN = -50; int const DOM_MAX = 150;//800; double binwidth = (DOM_MAX-DOM_MIN)/NBIN; int const WIRE = 368; int const ARM=1;//2 int const PLANE=4; char arm[ARM][10] = {"L"}; //{"L","R"}; char plane[PLANE][100] = {"u1","v1","u2","v2"}; TH1F *hist[ARM][PLANE][WIRE]; char hist_name[ARM][PLANE][WIRE][300]; char plot_var[ARM][PLANE][300]; char plot_wire[ARM][PLANE][300]; char select[ARM][PLANE][WIRE][300]; char plot_hist[ARM][PLANE][WIRE][300]; TLine *bmax[ARM][PLANE][WIRE]; TLine *zero[ARM][PLANE][WIRE]; double offset[ARM][PLANE][WIRE]; for(int i=0;iGetXaxis()->SetTitle("time [ns]"); sprintf(plot_hist[i][j][l],"%s>>%s",plot_var[i][j],hist_name[i][j][l]); sprintf(select[i][j][l],"%s>=%d && %s<%d && DBB.evtypebits&(1<<3)",plot_wire[i][j],l,plot_wire[i][j],l+16); } } } int binmax,currentbin; double binmaxvalue,binmaxedge,halfbinwidth=0.5*binwidth; double x_maxslope; double slope, maxslope; //double aver=0; int bin30p; double bin30value; int skip=-1; if(1){/////// int section=0; int count=0; char canvas_name[300]; TCanvas *vdc[ARM][PLANE][WIRE/8+1]; for(int i=0;iDivide(2,4); } count++; //vdc[i][j][section]->cd(count); //cout<Draw(plot_hist[i][j][l],select[i][j][l]); //maximum bin properties binmax = hist[i][j][l]->GetMaximumBin(); binmaxvalue = hist[i][j][l]->GetBinContent(binmax); binmaxedge = hist[i][j][l]->GetBinLowEdge(binmax); halfbinwidth = 0.5*(hist[i][j][l]->GetBinWidth(binmax)); currentbin = binmax; bmax[i][j][l] = new TLine(binmaxedge+halfbinwidth,0,binmaxedge+halfbinwidth,binmaxvalue); bmax[i][j][l]->SetLineColor(kBlue); bmax[i][j][l]->Draw("same"); //cout<<"bin max "<< binmax<< "has count "<SetLineColor(kRed); zero[i][j][l]->Draw("same"); vdc[i][j][section]->Update(); } } } }//if }