// $Id$ #include "AliL3StandardIncludes.h" #include "AliL3RootTypes.h" #include "AliLevel3.h" #include "AliL3Transform.h" #include "AliL3RawDataFileHandler.h" #include "AliL3SpacePointData.h" #include "AliL3ClustFinderNew.h" #include "AliL3ConfMapper.h" #include "AliL3Vertex.h" #include "AliL3MemHandler.h" #include "AliL3Logging.h" #include "AliL3TrackArray.h" #include "AliL3Track.h" #include #include #include #include #include #include #include #include #include #include #include #if __GNUC__== 3 using namespace std; #else #include #include #include #endif //This program does the clusterfinding and the tracking. int main(Int_t argc,Char_t **argv){ //Display all clusters. Char_t cfile[1024]; Char_t path[1024]; Char_t fname[1024]; if(argc<3){ cout<<"Usage: tpcbeamtestdisplay filename path_to_files"<2) { sprintf(cfile,"%s",argv[1]); sprintf(path,"%s",argv[2]); } //displaying the tracks: UInt_t fNcl; AliL3MemHandler *clusterfile = new AliL3MemHandler(); sprintf(fname,"%s/%s-points_0_-1.raw",path,cfile); cout<<"file: "<SetBinaryInput(fname)){ cout<<"file: "<SetBinaryInput(fname); AliL3SpacePointData *fClusters = new AliL3SpacePointData(); memset(fClusters,0,sizeof(AliL3SpacePointData*)); fClusters = (AliL3SpacePointData*)clusterfile->Allocate(); clusterfile->Binary2Memory(fNcl,fClusters); clusterfile->CloseBinaryInput(); TApplication theApp("App", &argc, argv); TCanvas *c1 = new TCanvas("c1","",900,700); c1->cd(); c1->Clear(); c1->SetFillColor(1); AliL3SpacePointData *points = fClusters; TH2F *clusters = new TH2F("clusters","",65,-1,64,77,17,94); if(!points) cout<<"no points"<Fill(x_tmp,y_tmp,1); } TH2F *nothing = new TH2F(cfile,"",65,-1,64,77,17,94); // nothing->SetName("Test"); //Adding a regression method to calculate the line parameters. float *x=new float[npoints]; float *y=new float[npoints]; float xyParamA=0; float xyParamB=0; Int_t numofXYPoints=npoints; float sumX=0; float sumY=0; float sumXtimesY=0; float sumXsquare=0; float sumYsquare=0; for(Int_t i=0; iSetParameters(xyParamA,xyParamB); TLine *leftline= new TLine(0,(0-AliL3Transform::GetNPads(0)/2+55),0,AliL3Transform::GetNPads(0)-(AliL3Transform::GetNPads(0)/2)+55); TLine *rightline=new TLine(63,(0-AliL3Transform::GetNPads(63)/2+55),63,AliL3Transform::GetNPads(63)-(AliL3Transform::GetNPads(63)/2)+55); TLine *upperline=new TLine(0,(AliL3Transform::GetNPads(0)-AliL3Transform::GetNPads(0)/2+55),63,AliL3Transform::GetNPads(63)-(AliL3Transform::GetNPads(63)/2)+55); TLine *underline=new TLine(0,(0-AliL3Transform::GetNPads(0)/2+55),63,0-(AliL3Transform::GetNPads(63)/2)+55); nothing->Draw("colz"); nothing->SetXTitle("Padrows"); nothing->SetYTitle("Pads"); clusters->SetMarkerStyle(22); clusters->Draw("same"); line->Draw("same"); line->SetLineColor(2); leftline->Draw("same"); leftline->SetLineWidth(2); rightline->Draw("same"); rightline->SetLineWidth(2); upperline->Draw("same"); upperline->SetLineWidth(2); underline->Draw("same"); underline->SetLineWidth(2); c1->SetFillColor(10); c1->Update(); c1->Draw(); while(1){ } }