// Mul.C Multiplicity processor for MDC 1 // // DMcL 9/12/98 Remove most commented out code (refer to .MDB versions // for original) & move some lines back out of phat.C // MDB 9/08/98 Modify for MDC: Remove global actions (may break standalone) // DMcL 9/05/98 Initial version (obtained from runmul.C by RV) // Event loop cut out, & turned into macro function Mul.C; only // the lines from if(ev) to its } are used below. // The first part of runmul.C was converted into Mul.h. // See help on phat.C for details on how to convert macros. //*********************************************************************** // runmul.C: minimal ROOT script to do multiplicity reconstruction // 28-Aug-98: Based on fitdept.C (Robin Verdier) //************************************************************************** //& Mul.C function wrapper: void Mul(Int_t phase = 0, Int_t dflag = 0) { if (ReportLevel >= 3) { printf("Mul entered, phase = %d, dflag = %d\n",phase,dflag); } if(phase == kIni1) { if (ReportLevel >= 3) printf("Mul initialization\n"); if(flMul != 0) { c1 = new TCanvas("c1", "dN/dEta in Phobos", 0, 0, 400, 800); c1->Divide(1, nPlots); //Changed prev. line; TCanvas *c1 is in Mul.h } } // end of initialization phase wrapper //****************************************************************** // if(phase == kRun3) { if(phase == kRun1) { mp.SetVertex(v1); if(ReportLevel >= 3) { if(v1) { printf("Vertex at %f %f %f\n",v1->GetX(),v1->GetY(),v1->GetZ()); } else { printf("v1??, what v1?"); } } if(iev == 0) { mp.Process(ev, -1); // mp.fHitArrayId = HitArrayName; mp.Process(ev,1); if (ReportLevel >= 3) printf("EV loop: af mp.Process(ev, 1)\n"); } // end of some actions done only on the first event else { mp.Process(ev); if (ReportLevel >= 3) printf("EV loop: af mp.Process(ev)\n"); } // Get display graphs for display or storage: for (Int_t ip = 0; ip < nPlots; ip++) { if (ReportLevel >= 3) { printf("EV loop: iev,dg[%d]:%d,%d\n",ip,iev,dg[ip]); } if (iev>=0 && dg[ip]) { dg[ip]->Delete(); if (ReportLevel >= 3) printf("EV loop: delete dg[%d]\n",ip); } // dg[ip] = mp.GetGraph(dNames[ip],dSelectors[ip],13,14,360); if(ip<2) dg[ip] = mp.GetHist(dNames[ip],dSelectors[ip],13,14,360); if(ip==2)dg[ip] = mp.GetHist(dNames[ip],dSelectors[ip],11,12,360); } } // end of run phase wrapper //****************************************************************** if(phase == kDis3) { if (ReportLevel >= 3) printf("MUL:starting display\n"); for (Int_t ip = 0; ip < nPlots; ip++) { // if (dg[ip] && (iev != 0)) { if (dg[ip]) { c1->cd(ip+1); dg[ip]->SetMarkerSize(0.6); if (ip == 1) { dg[ip]->SetMarkerColor(4); dg[ip]->Draw("ape"); } else dg[ip]->Draw("BOX"); //else dg[ip]->Draw(""); // AT if (!ip) dg[ip]->Draw("pesame"); c1->Update(); } } c1->Update(); } // end of display phase wrapper } // end of Mul.C